/*! For license information please see main.js.LICENSE.txt */
!function(){var e,t={"../../node_modules/@redux-beacon/google-tag-manager/dist/google-tag-manager.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("../../node_modules/@redux-beacon/google-tag-manager/dist/utils.js");t.default=function(e){var t=(void 0===e?{}:e).dataLayerName,n=void 0===t?"dataLayer":t;return function(e){if("undefined"!=typeof window){if(!window[n]||"function"!=typeof window[n].push)throw new Error("redux-beacon error: window."+n+" is not defined. Have you forgotten to include Google Tag Manager and dataLayer?");e.forEach((function(e){"object"==typeof e&&window[n].push(r.convertFromGoogleAnalyticsEventIfNeeded(e))}))}}}},"../../node_modules/@redux-beacon/google-tag-manager/dist/index.js":function(e,t,n){"use strict";var r=n("../../node_modules/@redux-beacon/google-tag-manager/dist/google-tag-manager.js");t.Z=r.default},"../../node_modules/@redux-beacon/google-tag-manager/dist/utils.js":function(e,t){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromGoogleAnalyticsEventIfNeeded=function(e){if(!e.event&&e.hitType){var t=e.hitType,i=r(e,["hitType"]);return n({},i,{event:t})}return e}},"../../node_modules/array-flatten/array-flatten.js":function(e){"use strict";function t(e){return r(e,[])}function n(e,t){if("number"!=typeof t)throw new TypeError("Expected the depth to be a number");return i(e,[],t)}function r(e,t){for(var n=0;n<e.length;n++){var i=e[n];Array.isArray(i)?r(i,t):t.push(i)}return t}function i(e,t,n){n--;for(var r=0;r<e.length;r++){var o=e[r];n>-1&&Array.isArray(o)?i(o,t,n):t.push(o)}return t}e.exports=function(e){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return t(e)},e.exports.from=t,e.exports.depth=function(e,t){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return n(e,t)},e.exports.fromDepth=n},"../../node_modules/axios/index.js":function(e,t,n){e.exports=n("../../node_modules/axios/lib/axios.js")},"../../node_modules/axios/lib/adapters/xhr.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/core/settle.js"),o=n("../../node_modules/axios/lib/helpers/cookies.js"),a=n("../../node_modules/axios/lib/helpers/buildURL.js"),s=n("../../node_modules/axios/lib/core/buildFullPath.js"),A=n("../../node_modules/axios/lib/helpers/parseHeaders.js"),c=n("../../node_modules/axios/lib/helpers/isURLSameOrigin.js"),l=n("../../node_modules/axios/lib/core/createError.js"),u=n("../../node_modules/axios/lib/defaults/transitional.js"),d=n("../../node_modules/axios/lib/cancel/Cancel.js");e.exports=function(e){return new Promise((function(t,n){var h,f=e.data,p=e.headers,m=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(f)&&delete p["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(y+":"+w)}var b=s(e.baseURL,e.url);function B(){if(v){var r="getAllResponseHeaders"in v?A(v.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),g()}),(function(e){n(e),g()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(b,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=B:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(B)},v.onabort=function(){v&&(n(l("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(l("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var _=(e.withCredentials||c(b))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;_&&(p[e.xsrfHeaderName]=_)}"setRequestHeader"in v&&r.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),m&&"json"!==m&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){v&&(n(!e||e&&e.type?new d("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),f||(f=null),v.send(f)}))}},"../../node_modules/axios/lib/axios.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/helpers/bind.js"),o=n("../../node_modules/axios/lib/core/Axios.js"),a=n("../../node_modules/axios/lib/core/mergeConfig.js");var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n("../../node_modules/axios/lib/defaults/index.js"));s.Axios=o,s.Cancel=n("../../node_modules/axios/lib/cancel/Cancel.js"),s.CancelToken=n("../../node_modules/axios/lib/cancel/CancelToken.js"),s.isCancel=n("../../node_modules/axios/lib/cancel/isCancel.js"),s.VERSION=n("../../node_modules/axios/lib/env/data.js").version,s.all=function(e){return Promise.all(e)},s.spread=n("../../node_modules/axios/lib/helpers/spread.js"),s.isAxiosError=n("../../node_modules/axios/lib/helpers/isAxiosError.js"),e.exports=s,e.exports.default=s},"../../node_modules/axios/lib/cancel/Cancel.js":function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},"../../node_modules/axios/lib/cancel/CancelToken.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/cancel/Cancel.js");function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},"../../node_modules/axios/lib/cancel/isCancel.js":function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"../../node_modules/axios/lib/core/Axios.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/helpers/buildURL.js"),o=n("../../node_modules/axios/lib/core/InterceptorManager.js"),a=n("../../node_modules/axios/lib/core/dispatchRequest.js"),s=n("../../node_modules/axios/lib/core/mergeConfig.js"),A=n("../../node_modules/axios/lib/helpers/validator.js"),c=A.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&A.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var u=[a,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(l),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=t;r.length;){var h=r.shift(),f=r.shift();try{d=h(d)}catch(e){f(e);break}}try{o=a(d)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},"../../node_modules/axios/lib/core/InterceptorManager.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},"../../node_modules/axios/lib/core/buildFullPath.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/helpers/isAbsoluteURL.js"),i=n("../../node_modules/axios/lib/helpers/combineURLs.js");e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},"../../node_modules/axios/lib/core/createError.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/core/enhanceError.js");e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},"../../node_modules/axios/lib/core/dispatchRequest.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/core/transformData.js"),o=n("../../node_modules/axios/lib/cancel/isCancel.js"),a=n("../../node_modules/axios/lib/defaults/index.js"),s=n("../../node_modules/axios/lib/cancel/Cancel.js");function A(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return A(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return A(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(A(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"../../node_modules/axios/lib/core/enhanceError.js":function(e){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},"../../node_modules/axios/lib/core/mergeConfig.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function A(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:A};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==A||(n[e]=i)})),n}},"../../node_modules/axios/lib/core/settle.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/core/createError.js");e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"../../node_modules/axios/lib/core/transformData.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/defaults/index.js");e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},"../../node_modules/axios/lib/defaults/index.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=n("../../node_modules/axios/lib/helpers/normalizeHeaderName.js"),o=n("../../node_modules/axios/lib/core/enhanceError.js"),a=n("../../node_modules/axios/lib/defaults/transitional.js"),s={"Content-Type":"application/x-www-form-urlencoded"};function A(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n("../../node_modules/axios/lib/adapters/xhr.js")),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(A(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(A(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(s)})),e.exports=l},"../../node_modules/axios/lib/defaults/transitional.js":function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},"../../node_modules/axios/lib/env/data.js":function(e){e.exports={version:"0.26.1"}},"../../node_modules/axios/lib/helpers/bind.js":function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},"../../node_modules/axios/lib/helpers/buildURL.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"../../node_modules/axios/lib/helpers/combineURLs.js":function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"../../node_modules/axios/lib/helpers/cookies.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"../../node_modules/axios/lib/helpers/isAbsoluteURL.js":function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},"../../node_modules/axios/lib/helpers/isAxiosError.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},"../../node_modules/axios/lib/helpers/isURLSameOrigin.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},"../../node_modules/axios/lib/helpers/normalizeHeaderName.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js");e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},"../../node_modules/axios/lib/helpers/parseHeaders.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/utils.js"),i=["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"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},"../../node_modules/axios/lib/helpers/spread.js":function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"../../node_modules/axios/lib/helpers/validator.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/env/data.js").version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,n){return function(i,a,s){if(!1===e)throw new Error(function(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(a," has been removed"+(t?" in "+t:"")));return t&&!o[a]&&(o[a]=!0),!e||e(i,a,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],A=void 0===s||a(s,o,e);if(!0!==A)throw new TypeError("option "+o+" must be "+A)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},"../../node_modules/axios/lib/utils.js":function(e,t,n){"use strict";var r=n("../../node_modules/axios/lib/helpers/bind.js"),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function A(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:A,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return A(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},"./js/variables.js":function(){window.XS_WIDTH=0,window.SM_WIDTH=768,window.MD_WIDTH=992,window.LG_WIDTH=1200,window.XL_WIDTH=1600,window.UW_WIDTH=2e3,window.VIDEO_MD_WIDTH=750},"../../node_modules/big.js/big.js":function(e,t,n){var r;!function(i){"use strict";var o,a=1e6,s=1e6,A="[big.js] ",c=A+"Invalid ",l=c+"decimal places",u=A+"Division by zero",d={},h=void 0,f=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function p(e,t,n,r){var i=e.c;if(n===h&&(n=e.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error("[big.js] Invalid rounding mode");if(t<1)r=3===n&&(r||!!i[0])||0===t&&(1===n&&i[0]>=5||2===n&&(i[0]>5||5===i[0]&&(r||i[1]!==h))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t<i.length){if(r=1===n&&i[t]>=5||2===n&&(i[t]>5||5===i[t]&&(r||i[t+1]!==h||1&i[t-1]))||3===n&&(r||!!i[0]),i.length=t--,r)for(;++i[t]>9;)i[t]=0,t--||(++e.e,i.unshift(1));for(t=i.length;!i[--t];)i.pop()}return e}function m(e,t,n){var r=e.e,i=e.c.join(""),o=i.length;if(t)i=i.charAt(0)+(o>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0)if(++r>o)for(r-=o;r--;)i+="0";else r<o&&(i=i.slice(0,r)+"."+i.slice(r));else o>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&n?"-"+i:i}d.abs=function(){var e=new this.constructor(this);return e.s=1,e},d.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,o=n.s,a=e.s,s=n.e,A=e.e;if(!r[0]||!i[0])return r[0]?o:i[0]?-a:0;if(o!=a)return o;if(t=o<0,s!=A)return s>A^t?1:-1;for(a=(s=r.length)<(A=i.length)?s:A,o=-1;++o<a;)if(r[o]!=i[o])return r[o]>i[o]^t?1:-1;return s==A?0:s>A^t?1:-1},d.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,o=t.s==e.s?1:-1,s=n.DP;if(s!==~~s||s<0||s>a)throw Error(l);if(!i[0])throw Error(u);if(!r[0])return e.s=o,e.c=[e.e=0],e;var A,c,d,f,m,g=i.slice(),v=A=i.length,y=r.length,w=r.slice(0,A),b=w.length,B=e,_=B.c=[],x=0,C=s+(B.e=t.e-e.e)+1;for(B.s=o,o=C<0?0:C,g.unshift(0);b++<A;)w.push(0);do{for(d=0;d<10;d++){if(A!=(b=w.length))f=A>b?1:-1;else for(m=-1,f=0;++m<A;)if(i[m]!=w[m]){f=i[m]>w[m]?1:-1;break}if(!(f<0))break;for(c=b==A?i:g;b;){if(w[--b]<c[b]){for(m=b;m&&!w[--m];)w[m]=9;--w[m],w[b]+=10}w[b]-=c[b]}for(;!w[0];)w.shift()}_[x++]=f?d:++d,w[0]&&f?w[b]=r[v]||0:w=[r[v]]}while((v++<y||w[0]!==h)&&o--);return _[0]||1==x||(_.shift(),B.e--,C--),x>C&&p(B,C,n.RM,w[0]!==h),B},d.eq=function(e){return 0===this.cmp(e)},d.gt=function(e){return this.cmp(e)>0},d.gte=function(e){return this.cmp(e)>-1},d.lt=function(e){return this.cmp(e)<0},d.lte=function(e){return this.cmp(e)<1},d.minus=d.sub=function(e){var t,n,r,i,o=this,a=o.constructor,s=o.s,A=(e=new a(e)).s;if(s!=A)return e.s=-A,o.plus(e);var c=o.c.slice(),l=o.e,u=e.c,d=e.e;if(!c[0]||!u[0])return u[0]?e.s=-A:c[0]?e=new a(o):e.s=1,e;if(s=l-d){for((i=s<0)?(s=-s,r=c):(d=l,r=u),r.reverse(),A=s;A--;)r.push(0);r.reverse()}else for(n=((i=c.length<u.length)?c:u).length,s=A=0;A<n;A++)if(c[A]!=u[A]){i=c[A]<u[A];break}if(i&&(r=c,c=u,u=r,e.s=-e.s),(A=(n=u.length)-(t=c.length))>0)for(;A--;)c[t++]=0;for(A=t;n>s;){if(c[--n]<u[n]){for(t=n;t&&!c[--t];)c[t]=9;--c[t],c[n]+=10}c[n]-=u[n]}for(;0===c[--A];)c.pop();for(;0===c[0];)c.shift(),--d;return c[0]||(e.s=1,c=[d=0]),e.c=c,e.e=d,e},d.mod=function(e){var t,n=this,r=n.constructor,i=n.s,o=(e=new r(e)).s;if(!e.c[0])throw Error(u);return n.s=e.s=1,t=1==e.cmp(n),n.s=i,e.s=o,t?new r(n):(i=r.DP,o=r.RM,r.DP=r.RM=0,n=n.div(e),r.DP=i,r.RM=o,this.minus(n.times(e)))},d.plus=d.add=function(e){var t,n,r,i=this,o=i.constructor;if(e=new o(e),i.s!=e.s)return e.s=-e.s,i.minus(e);var a=i.e,s=i.c,A=e.e,c=e.c;if(!s[0]||!c[0])return c[0]||(s[0]?e=new o(i):e.s=i.s),e;if(s=s.slice(),t=a-A){for(t>0?(A=a,r=c):(t=-t,r=s),r.reverse();t--;)r.push(0);r.reverse()}for(s.length-c.length<0&&(r=c,c=s,s=r),t=c.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+c[t]+n)/10|0;for(n&&(s.unshift(n),++A),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=A,e},d.pow=function(e){var t=this,n=new t.constructor("1"),r=n,i=e<0;if(e!==~~e||e<-1e6||e>s)throw Error(c+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?n.div(r):r},d.prec=function(e,t){if(e!==~~e||e<1||e>a)throw Error(c+"precision");return p(new this.constructor(this),e,t)},d.round=function(e,t){if(e===h)e=0;else if(e!==~~e||e<-a||e>a)throw Error(l);return p(new this.constructor(this),e+this.e+1,t)},d.sqrt=function(){var e,t,n,r=this,i=r.constructor,o=r.s,a=r.e,s=new i("0.5");if(!r.c[0])return new i(r);if(o<0)throw Error(A+"No square root");0===(o=Math.sqrt(r+""))||o===1/0?((t=r.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new i(((o=Math.sqrt(t))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+a)):e=new i(o+""),a=e.e+(i.DP+=4);do{n=e,e=s.times(n.plus(r.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return p(e,(i.DP-=4)+e.e+1,i.RM)},d.times=d.mul=function(e){var t,n=this,r=n.constructor,i=n.c,o=(e=new r(e)).c,a=i.length,s=o.length,A=n.e,c=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!o[0])return e.c=[e.e=0],e;for(e.e=A+c,a<s&&(t=i,i=o,o=t,c=a,a=s,s=c),t=new Array(c=a+s);c--;)t[c]=0;for(A=s;A--;){for(s=0,c=a+A;c>A;)s=t[c]+o[A]*i[c-A-1]+s,t[c--]=s%10,s=s/10|0;t[c]=s}for(s?++e.e:t.shift(),A=t.length;!t[--A];)t.pop();return e.c=t,e},d.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==h){if(e!==~~e||e<0||e>a)throw Error(l);for(n=p(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return m(n,!0,!!r)},d.toFixed=function(e,t){var n=this,r=n.c[0];if(e!==h){if(e!==~~e||e<0||e>a)throw Error(l);for(e=e+(n=p(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length<e;)n.c.push(0)}return m(n,!1,!!r)},d.toJSON=d.toString=function(){var e=this,t=e.constructor;return m(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},d.toNumber=function(){var e=Number(m(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(A+"Imprecise conversion");return e},d.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(e!==h){if(e!==~~e||e<1||e>a)throw Error(c+"precision");for(n=p(new r(n),e,t);n.c.length<e;)n.c.push(0)}return m(n,e<=n.e||n.e<=r.NE||n.e>=r.PE,!!i)},d.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(A+"valueOf disallowed");return m(e,e.e<=t.NE||e.e>=t.PE,!0)},o=function e(){function t(n){var r=this;if(!(r instanceof t))return n===h?e():new t(n);if(n instanceof t)r.s=n.s,r.e=n.e,r.c=n.c.slice();else{if("string"!=typeof n){if(!0===t.strict)throw TypeError(c+"number");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,r,i;if(!f.test(t))throw Error(c+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length);for(i=t.length,r=0;r<i&&"0"==t.charAt(r);)++r;if(r==i)e.c=[e.e=0];else{for(;i>0&&"0"==t.charAt(--i););for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}}(r,n)}r.constructor=t}return t.prototype=d,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),o.default=o.Big=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},"../../node_modules/decode-uri-component/index.js":function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function i(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=i(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var i=o(n[0]);i!==n[0]&&(t[n[0]]=i)}n=r.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var A=a[s];e=e.replace(new RegExp(A,"g"),t[A])}return e}(e)}}},"../../node_modules/filter-obj/index.js":function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}},"../../node_modules/focus-trap-react/dist/focus-trap-react.js":function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var c=n("../../node_modules/react/index.js"),l=n("../../node_modules/react-dom/index.js"),u=n("../../node_modules/prop-types/index.js"),d=n("../../node_modules/focus-trap/dist/focus-trap.esm.js").createFocusTrap,h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(A,e);var t,n,r,s=a(A);function A(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(t=s.call(this,e)).tailoredFocusTrapOptions={returnFocusOnDeactivate:!1},t.returnFocusOnDeactivate=!0;var n=e.focusTrapOptions;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&("returnFocusOnDeactivate"!==r?"onPostDeactivate"!==r?t.tailoredFocusTrapOptions[r]=n[r]:t.onPostDeactivate=n[r]:t.returnFocusOnDeactivate=!!n[r]);return t.focusTrapElements=e.containerElements||[],t.updatePreviousElement(),t}return t=A,(n=[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||("undefined"!=typeof document?document:void 0)}},{key:"getNodeForOption",value:function(e){var t=this.tailoredFocusTrapOptions[e];if(!t)return null;var n,r=t;if("string"==typeof t&&!(r=null===(n=this.getDocument())||void 0===n?void 0:n.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(r=t()))throw new Error("`".concat(e,"` did not return a node"));return r}},{key:"getReturnFocusNode",value:function(){var e=this.getNodeForOption("setReturnFocus");return e||this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var e=this.getDocument();e&&(this.previouslyFocusedElement=e.activeElement)}},{key:"deactivateTrap",value:function(){var e=this,t=this.tailoredFocusTrapOptions,n=t.checkCanReturnFocus,r=t.preventScroll,i=void 0!==r&&r;this.focusTrap&&this.focusTrap.deactivate({returnFocus:!1});var o=function(){var t=e.getReturnFocusNode();(null==t?void 0:t.focus)&&e.returnFocusOnDeactivate&&t.focus({preventScroll:i}),e.onPostDeactivate&&e.onPostDeactivate.call(null)};n?n(this.getReturnFocusNode()).then(o,o):o()}},{key:"setupFocusTrap",value:function(){if(!this.focusTrap){var e=this.focusTrapElements.map(l.findDOMNode);e.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(e,this.tailoredFocusTrapOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(e){if(this.focusTrap){e.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var t=!e.active&&this.props.active,n=e.active&&!this.props.active,r=!e.paused&&this.props.paused,i=e.paused&&!this.props.paused;if(t&&(this.updatePreviousElement(),this.focusTrap.activate()),n)return void this.deactivateTrap();r&&this.focusTrap.pause(),i&&this.focusTrap.unpause()}else e.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var e=this,t=this.props.children?c.Children.only(this.props.children):void 0;if(t){if(t.type&&t.type===c.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return c.cloneElement(t,{ref:function(n){var r=e.props.containerElements;t&&("function"==typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=r||[n]}})}return null}}])&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),A}(c.Component),f="undefined"==typeof Element?Function:Element;h.propTypes={active:u.bool,paused:u.bool,focusTrapOptions:u.shape({document:u.object,onActivate:u.func,onPostActivate:u.func,checkCanFocusTrap:u.func,onDeactivate:u.func,onPostDeactivate:u.func,checkCanReturnFocus:u.func,initialFocus:u.oneOfType([u.instanceOf(f),u.string,u.func,u.bool]),fallbackFocus:u.oneOfType([u.instanceOf(f),u.string,u.func]),escapeDeactivates:u.oneOfType([u.bool,u.func]),clickOutsideDeactivates:u.oneOfType([u.bool,u.func]),returnFocusOnDeactivate:u.bool,setReturnFocus:u.oneOfType([u.instanceOf(f),u.string,u.func]),allowOutsideClick:u.oneOfType([u.bool,u.func]),preventScroll:u.bool,tabbableOptions:u.shape({displayCheck:u.oneOf(["full","non-zero-area","none"]),getShadowRoot:u.oneOfType([u.bool,u.func])})}),containerElements:u.arrayOf(u.instanceOf(f)),children:u.oneOfType([u.element,u.instanceOf(f)])},h.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:d},e.exports=h},"../../node_modules/focus-trap/dist/focus-trap.esm.js":function(e,t,n){"use strict";n.r(t),n.d(t,{createFocusTrap:function(){return F}});var r=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],i=r.join(","),o="undefined"==typeof Element,a=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=!o&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},A=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(i));return t&&a.call(e,i)&&r.unshift(e),r=r.filter(n)},c=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var A=s.shift();if("SLOT"===A.tagName){var c=A.assignedElements(),l=e(c.length?c:A.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:A,candidates:l})}else{a.call(A,i)&&r.filter(A)&&(n||!t.includes(A))&&o.push(A);var u=A.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(A);if(u){var d=e(!0===u?A.children:u.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scope:A,candidates:d})}else s.unshift.apply(s,A.children)}}return o},l=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},h=function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||s(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},f=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},p=function(e,t){return!(t.disabled||function(e){return d(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=a.call(e,"details>summary:first-of-type")?e.parentElement:e;if(a.call(i,"details:not([open]) *"))return!0;if(!n||"full"===n){if("function"==typeof r){for(var o=e;e;){var A=e.parentElement,c=s(e);if(A&&!A.shadowRoot&&!0===r(A))return f(e);e=e.assignedSlot?e.assignedSlot:A||c===e.ownerDocument?A:c.host}e=o}return!e.getClientRects().length}return"non-zero-area"===n&&f(e)}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!a.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(h(t)||l(t)<0||!p(e,t))},g=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scope,a=o?t.scope:t,s=l(a,o),A=o?e(t.candidates):a;0===s?o?n.push.apply(n,A):n.push(a):r.push({documentOrder:i,tabIndex:s,item:t,isScope:o,content:A})})),r.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},v=function(e,t){var n;return n=(t=t||{}).getShadowRoot?c([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot}):A(e,t.includeContainer,m.bind(null,t)),g(n)},y=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,i)&&m(t,e)},w=r.concat("iframe").join(","),b=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,w)&&p(t,e)};function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x,C=(x=[],{activateTrap:function(e){if(x.length>0){var t=x[x.length-1];t!==e&&t.pause()}var n=x.indexOf(e);-1===n||x.splice(n,1),x.push(e)},deactivateTrap:function(e){var t=x.indexOf(e);-1!==t&&x.splice(t,1),x.length>0&&x[x.length-1].unpause()}}),S=function(e){return setTimeout(e,0)},E=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},M=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},U=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},F=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},s=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}if(!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},u=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=v(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?c([t],n.includeContainer,{filter:p.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):A(t,n.includeContainer,p.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return y(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return y(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(u()))},f=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},m=function(e){var t=U(e);s(t)>=0||(M(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!b(t,i.tabbableOptions)}):M(i.allowOutsideClick,e)||e.preventDefault())},g=function(e){var t=U(e),n=s(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||u()))},w=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==M(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=U(e);d();var n=null;if(o.tabbableGroups.length>0){var r=s(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var A=E(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(A<0&&(a.container===t||b(t,i.tabbableOptions)&&!y(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(A=r),A>=0){var c=0===A?o.tabbableGroups.length-1:A-1;n=o.tabbableGroups[c].lastTabbableNode}}else{var u=E(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(u<0&&(a.container===t||b(t,i.tabbableOptions)&&!y(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(u=r),u>=0){var f=u===o.tabbableGroups.length-1?0:u+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),h(n))}(e)},x=function(e){if(!M(i.clickOutsideDeactivates,e)){var t=U(e);s(t)>=0||M(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}},F=function(){if(o.active)return C.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?S((function(){h(u())})):h(u()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",m,{capture:!0,passive:!1}),r.addEventListener("touchstart",m,{capture:!0,passive:!1}),r.addEventListener("click",x,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),n},T=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",m,!0),r.removeEventListener("touchstart",m,!0),r.removeEventListener("click",x,!0),r.removeEventListener("keydown",w,!0),n};return(n={activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){i&&d(),F(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!o.active)return this;clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,T(),o.active=!1,o.paused=!1,C.deactivateTrap(n);var t=a(e,"onDeactivate"),r=a(e,"onPostDeactivate"),i=a(e,"checkCanReturnFocus");t&&t();var s=a(e,"returnFocus","returnFocusOnDeactivate"),A=function(){S((function(){s&&h(f(o.nodeFocusedBeforeActivation)),r&&r()}))};return s&&i?(i(f(o.nodeFocusedBeforeActivation)).then(A,A),this):(A(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,T()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,d(),F(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&d(),this}}).updateContainerElements(e),n}},"../../node_modules/form-serialize/index.js":function(e){var t=/^(?:submit|button|image|reset|file)$/i,n=/^(?:input|select|textarea|keygen)/i,r=/(\[[^\[\]]*\])/g;function i(e,t,n){if(0===t.length)return e=n;var r=t.shift(),o=r.match(/^\[(.+?)\]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(i(null,t,n)):(e._values=e._values||[],e._values.push(i(null,t,n))),e;if(o){var a=o[1],s=+a;isNaN(s)?(e=e||{})[a]=i(e[a],t,n):(e=e||[])[s]=i(e[s],t,n)}else e[r]=i(e[r],t,n);return e}function o(e,t,n){if(t.match(r)){i(e,function(e){var t=[],n=new RegExp(r),i=/^([^\[\]]*)/.exec(e);for(i[1]&&t.push(i[1]);null!==(i=n.exec(e));)t.push(i[1]);return t}(t),n)}else{var o=e[t];o?(Array.isArray(o)||(e[t]=[o]),e[t].push(n)):e[t]=n}return e}function a(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}e.exports=function(e,r){"object"!=typeof r?r={hash:!!r}:void 0===r.hash&&(r.hash=!0);for(var i=r.hash?{}:"",s=r.serializer||(r.hash?o:a),A=e&&e.elements?e.elements:[],c=Object.create(null),l=0;l<A.length;++l){var u=A[l];if((r.disabled||!u.disabled)&&u.name&&(n.test(u.nodeName)&&!t.test(u.type))){var d=u.name,h=u.value;if("checkbox"!==u.type&&"radio"!==u.type||u.checked||(h=void 0),r.empty){if("checkbox"!==u.type||u.checked||(h=""),"radio"===u.type&&(c[u.name]||u.checked?u.checked&&(c[u.name]=!0):c[u.name]=!1),null==h&&"radio"==u.type)continue}else if(!h)continue;if("select-multiple"!==u.type)i=s(i,d,h);else{h=[];for(var f=u.options,p=!1,m=0;m<f.length;++m){var g=f[m],v=r.empty&&!g.value,y=g.value||v;g.selected&&y&&(p=!0,i=r.hash&&"[]"!==d.slice(d.length-2)?s(i,d+"[]",g.value):s(i,d,g.value))}!p&&r.empty&&(i=s(i,d,""))}}}if(r.empty)for(var d in c)c[d]||(i=s(i,d,""));return i}},"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":function(e,t,n){"use strict";var r=n("../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function A(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=h(n);i&&i!==f&&e(t,i,r)}var a=l(n);u&&(a=a.concat(u(n)));for(var s=A(t),p=A(n),m=0;m<a.length;++m){var g=a[m];if(!(o[g]||r&&r[g]||p&&p[g]||s&&s[g])){var v=d(n,g);try{c(t,g,v)}catch(e){}}}}return t}},"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js":function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,A=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case u:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case p:case A:return e;default:return t}}case i:return t}}}function B(e){return b(e)===u}t.AsyncMode=l,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=A,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=p,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return B(e)||b(e)===l},t.isConcurrentMode=B,t.isContextConsumer=function(e){return b(e)===c},t.isContextProvider=function(e){return b(e)===A},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===o},t.isLazy=function(e){return b(e)===m},t.isMemo=function(e){return b(e)===p},t.isPortal=function(e){return b(e)===i},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===a},t.isSuspense=function(e){return b(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===s||e===a||e===h||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===A||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=b},"../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js")},"../../node_modules/html2canvas/dist/html2canvas.js":function(e){e.exports=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{A(r.next(e))}catch(e){o(e)}}function s(e){try{A(r.throw(e))}catch(e){o(e)}}function A(e){e.done?n(e.value):i(e.value).then(a,s)}A((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return A([e,t])}}function A(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}for(var o=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).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}(),a=function(e,t){return o.fromClientRect(e,t.getBoundingClientRect())},s=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new o(0,0,r,i)},A=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t},c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,o="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256),d=0;d<l.length;d++)u[l.charCodeAt(d)]=d;for(var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256),p=0;p<h.length;p++)f[h.charCodeAt(p)]=p;for(var m=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),l=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=f[e.charCodeAt(t)],r=f[e.charCodeAt(t+1)],i=f[e.charCodeAt(t+2)],o=f[e.charCodeAt(t+3)],l[A++]=n<<2|r>>4,l[A++]=(15&r)<<4|i>>2,l[A++]=(3&i)<<6|63&o;return c},g=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},y=5,w=11,b=2,B=65536>>y,_=(1<<y)-1,x=B+(1024>>y)+32,C=65536>>w,S=(1<<w-y)-1,E=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},M=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},U=function(e,t){var n=m(e),r=Array.isArray(n)?v(n):new Uint32Array(n),i=Array.isArray(n)?g(n):new Uint16Array(n),o=24,a=E(i,o/2,r[4]/2),s=2===r[5]?E(i,(o+r[4])/2):M(r,Math.ceil((o+r[4])/4));return new F(r[0],r[1],r[2],r[3],a,s)},F=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>y])<<b)+(e&_),this.data[t];if(e<=65535)return t=((t=this.index[B+(e-55296>>y)])<<b)+(e&_),this.data[t];if(e<this.highStart)return t=x-C+(e>>w),t=this.index[t],t+=e>>y&S,t=((t=this.index[t])<<b)+(e&_),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="undefined"==typeof Uint8Array?[]:new Uint8Array(256),L=0;L<T.length;L++)Q[T.charCodeAt(L)]=L;var I=50,k=1,P=2,O=3,D=4,H=5,R=7,N=8,z=9,V=10,j=11,K=12,G=13,W=14,q=15,X=16,J=17,Y=18,Z=19,$=20,ee=21,te=22,ne=23,re=24,ie=25,oe=26,ae=27,se=28,Ae=29,ce=30,le=31,ue=32,de=33,he=34,fe=35,pe=36,me=37,ge=38,ve=39,ye=40,we=41,be=42,Be=43,_e=[9001,65288],xe="!",Ce="×",Se="÷",Ee=U("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),Me=[ce,pe],Ue=[k,P,O,H],Fe=[V,N],Te=[ae,oe],Qe=Ue.concat(Fe),Le=[ge,ve,ye,he,fe],Ie=[q,G],ke=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach((function(e,o){var a=Ee.get(e);if(a>I?(i.push(!0),a-=I):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(o),n.push(X);if(a===D||a===j){if(0===o)return r.push(o),n.push(ce);var s=n[o-1];return-1===Qe.indexOf(s)?(r.push(r[o-1]),n.push(s)):(r.push(o),n.push(ce))}return r.push(o),a===le?n.push("strict"===t?ee:me):a===be||a===Ae?n.push(ce):a===Be?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(me):n.push(ce):void n.push(a)})),[r,n,i]},Pe=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var o=n;o<=r.length;){if((A=r[++o])===t)return!0;if(A!==V)break}if(i===V)for(o=n;o>0;){var a=r[--o];if(Array.isArray(e)?-1!==e.indexOf(a):e===a)for(var s=n;s<=r.length;){var A;if((A=r[++s])===t)return!0;if(A!==V)break}if(a!==V)break}return!1},Oe=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==V)return r;n--}return 0},De=function(e,t,n,r,i){if(0===n[r])return Ce;var o=r-1;if(Array.isArray(i)&&!0===i[o])return Ce;var a=o-1,s=o+1,A=t[o],c=a>=0?t[a]:0,l=t[s];if(A===P&&l===O)return Ce;if(-1!==Ue.indexOf(A))return xe;if(-1!==Ue.indexOf(l))return Ce;if(-1!==Fe.indexOf(l))return Ce;if(Oe(o,t)===N)return Se;if(Ee.get(e[o])===j)return Ce;if((A===ue||A===de)&&Ee.get(e[s])===j)return Ce;if(A===R||l===R)return Ce;if(A===z)return Ce;if(-1===[V,G,q].indexOf(A)&&l===z)return Ce;if(-1!==[J,Y,Z,re,se].indexOf(l))return Ce;if(Oe(o,t)===te)return Ce;if(Pe(ne,te,o,t))return Ce;if(Pe([J,Y],ee,o,t))return Ce;if(Pe(K,K,o,t))return Ce;if(A===V)return Se;if(A===ne||l===ne)return Ce;if(l===X||A===X)return Se;if(-1!==[G,q,ee].indexOf(l)||A===W)return Ce;if(c===pe&&-1!==Ie.indexOf(A))return Ce;if(A===se&&l===pe)return Ce;if(l===$)return Ce;if(-1!==Me.indexOf(l)&&A===ie||-1!==Me.indexOf(A)&&l===ie)return Ce;if(A===ae&&-1!==[me,ue,de].indexOf(l)||-1!==[me,ue,de].indexOf(A)&&l===oe)return Ce;if(-1!==Me.indexOf(A)&&-1!==Te.indexOf(l)||-1!==Te.indexOf(A)&&-1!==Me.indexOf(l))return Ce;if(-1!==[ae,oe].indexOf(A)&&(l===ie||-1!==[te,q].indexOf(l)&&t[s+1]===ie)||-1!==[te,q].indexOf(A)&&l===ie||A===ie&&-1!==[ie,se,re].indexOf(l))return Ce;if(-1!==[ie,se,re,J,Y].indexOf(l))for(var u=o;u>=0;){if((d=t[u])===ie)return Ce;if(-1===[se,re].indexOf(d))break;u--}if(-1!==[ae,oe].indexOf(l))for(u=-1!==[J,Y].indexOf(A)?a:o;u>=0;){var d;if((d=t[u])===ie)return Ce;if(-1===[se,re].indexOf(d))break;u--}if(ge===A&&-1!==[ge,ve,he,fe].indexOf(l)||-1!==[ve,he].indexOf(A)&&-1!==[ve,ye].indexOf(l)||-1!==[ye,fe].indexOf(A)&&l===ye)return Ce;if(-1!==Le.indexOf(A)&&-1!==[$,oe].indexOf(l)||-1!==Le.indexOf(l)&&A===ae)return Ce;if(-1!==Me.indexOf(A)&&-1!==Me.indexOf(l))return Ce;if(A===re&&-1!==Me.indexOf(l))return Ce;if(-1!==Me.concat(ie).indexOf(A)&&l===te&&-1===_e.indexOf(e[s])||-1!==Me.concat(ie).indexOf(l)&&A===Y)return Ce;if(A===we&&l===we){for(var h=n[o],f=1;h>0&&t[--h]===we;)f++;if(f%2!=0)return Ce}return A===ue&&l===de?Ce:Se},He=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=ke(e,t.lineBreak),r=n[0],i=n[1],o=n[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map((function(e){return-1!==[ie,ce,be].indexOf(e)?me:e})));var a="keep-all"===t.wordBreak?o.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0;return[r,i,a]},Re=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===xe,this.start=n,this.end=r}return e.prototype.slice=function(){return c.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ne=function(e,t){var n=A(e),r=He(n,t),i=r[0],o=r[1],a=r[2],s=n.length,c=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=Ce;l<s&&(e=De(n,o,i,++l,a))===Ce;);if(e!==Ce||l===s){var t=new Re(n,e,c,l);return c=l,{value:t,done:!1}}return{done:!0,value:null}}}},ze=1,Ve=2,je=4,Ke=8,Ge=10,We=47,qe=92,Xe=9,Je=32,Ye=34,Ze=61,$e=35,et=36,tt=37,nt=39,rt=40,it=41,ot=95,at=45,st=33,At=60,ct=62,lt=64,ut=91,dt=93,ht=61,ft=123,pt=63,mt=125,gt=124,vt=126,yt=128,wt=65533,bt=42,Bt=43,_t=44,xt=58,Ct=59,St=46,Et=0,Mt=8,Ut=11,Ft=14,Tt=31,Qt=127,Lt=-1,It=48,kt=97,Pt=101,Ot=102,Dt=117,Ht=122,Rt=65,Nt=69,zt=70,Vt=85,jt=90,Kt=function(e){return e>=It&&e<=57},Gt=function(e){return e>=55296&&e<=57343},Wt=function(e){return Kt(e)||e>=Rt&&e<=zt||e>=kt&&e<=Ot},qt=function(e){return e>=kt&&e<=Ht},Xt=function(e){return e>=Rt&&e<=jt},Jt=function(e){return qt(e)||Xt(e)},Yt=function(e){return e>=yt},Zt=function(e){return e===Ge||e===Xe||e===Je},$t=function(e){return Jt(e)||Yt(e)||e===ot},en=function(e){return $t(e)||Kt(e)||e===at},tn=function(e){return e>=Et&&e<=Mt||e===Ut||e>=Ft&&e<=Tt||e===Qt},nn=function(e,t){return e===qe&&t!==Ge},rn=function(e,t,n){return e===at?$t(t)||nn(t,n):!!$t(e)||!(e!==qe||!nn(e,t))},on=function(e,t,n){return e===Bt||e===at?!!Kt(t)||t===St&&Kt(n):Kt(e===St?t:e)},an=function(e){var t=0,n=1;e[t]!==Bt&&e[t]!==at||(e[t]===at&&(n=-1),t++);for(var r=[];Kt(e[t]);)r.push(e[t++]);var i=r.length?parseInt(c.apply(void 0,r),10):0;e[t]===St&&t++;for(var o=[];Kt(e[t]);)o.push(e[t++]);var a=o.length,s=a?parseInt(c.apply(void 0,o),10):0;e[t]!==Nt&&e[t]!==Pt||t++;var A=1;e[t]!==Bt&&e[t]!==at||(e[t]===at&&(A=-1),t++);for(var l=[];Kt(e[t]);)l.push(e[t++]);var u=l.length?parseInt(c.apply(void 0,l),10):0;return n*(i+s*Math.pow(10,-a))*Math.pow(10,A*u)},sn={type:2},An={type:3},cn={type:4},ln={type:13},un={type:8},dn={type:21},hn={type:9},fn={type:10},pn={type:11},mn={type:12},gn={type:14},vn={type:23},yn={type:1},wn={type:25},bn={type:24},Bn={type:26},_n={type:27},xn={type:28},Cn={type:29},Sn={type:31},En={type:32},Mn=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(A(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==En;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case Ye:return this.consumeStringToken(Ye);case $e:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(en(t)||nn(n,r)){var i=rn(t,n,r)?Ve:ze;return{type:5,value:this.consumeName(),flags:i}}break;case et:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),ln;break;case nt:return this.consumeStringToken(nt);case rt:return sn;case it:return An;case bt:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),gn;break;case Bt:if(on(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case _t:return cn;case at:var o=e,a=this.peekCodePoint(0),s=this.peekCodePoint(1);if(on(o,a,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(rn(o,a,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(a===at&&s===ct)return this.consumeCodePoint(),this.consumeCodePoint(),bn;break;case St:if(on(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case We:if(this.peekCodePoint(0)===bt)for(this.consumeCodePoint();;){var A=this.consumeCodePoint();if(A===bt&&(A=this.consumeCodePoint())===We)return this.consumeToken();if(A===Lt)return this.consumeToken()}break;case xt:return Bn;case Ct:return _n;case At:if(this.peekCodePoint(0)===st&&this.peekCodePoint(1)===at&&this.peekCodePoint(2)===at)return this.consumeCodePoint(),this.consumeCodePoint(),wn;break;case lt:var l=this.peekCodePoint(0),u=this.peekCodePoint(1),d=this.peekCodePoint(2);if(rn(l,u,d))return{type:7,value:this.consumeName()};break;case ut:return xn;case qe:if(nn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case dt:return Cn;case ht:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),un;break;case ft:return pn;case mt:return mn;case Dt:case Vt:var h=this.peekCodePoint(0),f=this.peekCodePoint(1);return h!==Bt||!Wt(f)&&f!==pt||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case gt:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),hn;if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),dn;break;case vt:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),fn;break;case Lt:return En}return Zt(e)?(this.consumeWhiteSpace(),Sn):Kt(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):$t(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:c(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();Wt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===pt&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(c.apply(void 0,e.map((function(e){return e===pt?It:e}))),16),end:parseInt(c.apply(void 0,e.map((function(e){return e===pt?zt:e}))),16)};var r=parseInt(c.apply(void 0,e),16);if(this.peekCodePoint(0)===at&&Wt(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];Wt(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(c.apply(void 0,i),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&this.peekCodePoint(0)===rt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===rt?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===nt||t===Ye){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt||this.peekCodePoint(0)===it)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),vn)}for(;;){var r=this.consumeCodePoint();if(r===Lt||r===it)return{type:22,value:c.apply(void 0,e)};if(Zt(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Lt||this.peekCodePoint(0)===it?(this.consumeCodePoint(),{type:22,value:c.apply(void 0,e)}):(this.consumeBadUrlRemnants(),vn);if(r===Ye||r===nt||r===rt||tn(r))return this.consumeBadUrlRemnants(),vn;if(r===qe){if(!nn(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),vn;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;Zt(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===it||e===Lt)return;nn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t=5e4,n="";e>0;){var r=Math.min(t,e);n+=c.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(r===Lt||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(n)};if(r===Ge)return this._value.splice(0,n),yn;if(r===qe){var i=this._value[n+1];i!==Lt&&void 0!==i&&(i===Ge?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):nn(r,i)&&(t+=this.consumeStringSlice(n),t+=c(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=je,n=this.peekCodePoint(0);for(n!==Bt&&n!==at||e.push(this.consumeCodePoint());Kt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===St&&Kt(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Ke;Kt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===Nt||n===Pt)&&((r===Bt||r===at)&&Kt(i)||Kt(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Ke;Kt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[an(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);return rn(r,i,o)?{type:15,number:t,flags:n,unit:this.consumeName()}:r===tt?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Wt(e)){for(var t=c(e);Wt(this.peekCodePoint(0))&&t.length<6;)t+=c(this.consumeCodePoint());Zt(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||Gt(n)||n>1114111?wt:n}return e===Lt?wt:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(en(t))e+=c(t);else{if(!nn(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=c(this.consumeEscapedCodePoint())}}},e}(),Un=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Mn;return n.write(t),new e(n.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:[]},n=this.consumeToken();;){if(32===n.type||Dn(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?En:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Fn=function(e){return 15===e.type},Tn=function(e){return 17===e.type},Qn=function(e){return 20===e.type},Ln=function(e){return 0===e.type},In=function(e,t){return Qn(e)&&e.value===t},kn=function(e){return 31!==e.type},Pn=function(e){return 31!==e.type&&4!==e.type},On=function(e){var t=[],n=[];return e.forEach((function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)})),n.length&&t.push(n),t},Dn=function(e,t){return 11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type},Hn=function(e){return 17===e.type||15===e.type},Rn=function(e){return 16===e.type||Hn(e)},Nn=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},zn={type:17,number:0,flags:je},Vn={type:16,number:50,flags:je},jn={type:16,number:100,flags:je},Kn=function(e,t,n){var r=e[0],i=e[1];return[Gn(r,t),Gn(void 0!==i?i:r,n)]},Gn=function(e,t){if(16===e.type)return e.number/100*t;if(Fn(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Wn="deg",qn="grad",Xn="rad",Jn="turn",Yn={name:"angle",parse:function(e,t){if(15===t.type)switch(t.unit){case Wn:return Math.PI*t.number/180;case qn:return Math.PI/200*t.number;case Xn:return t.number;case Jn:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},Zn=function(e){return 15===e.type&&(e.unit===Wn||e.unit===qn||e.unit===Xn||e.unit===Jn)},$n=function(e){switch(e.filter(Qn).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zn,zn];case"to top":case"bottom":return er(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zn,jn];case"to right":case"left":return er(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[jn,jn];case"to bottom":case"top":return er(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[jn,zn];case"to left":case"right":return er(270)}return 0},er=function(e){return Math.PI*e/180},tr={name:"color",parse:function(e,t){if(18===t.type){var n=cr[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);return ir(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),1)}if(4===t.value.length){r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);var a=t.value.substring(3,4);return ir(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),parseInt(a+a,16)/255)}if(6===t.value.length)return r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6),ir(parseInt(r,16),parseInt(i,16),parseInt(o,16),1);if(8===t.value.length)return r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6),a=t.value.substring(6,8),ir(parseInt(r,16),parseInt(i,16),parseInt(o,16),parseInt(a,16)/255)}if(20===t.type){var s=ur[t.value.toUpperCase()];if(void 0!==s)return s}return ur.TRANSPARENT}},nr=function(e){return 0==(255&e)},rr=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},ir=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r)<<0)>>>0},or=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},ar=function(e,t){var n=t.filter(Pn);if(3===n.length){var r=n.map(or),i=r[0],o=r[1],a=r[2];return ir(i,o,a,1)}if(4===n.length){var s=n.map(or),A=(i=s[0],o=s[1],a=s[2],s[3]);return ir(i,o,a,A)}return 0};function sr(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var Ar=function(e,t){var n=t.filter(Pn),r=n[0],i=n[1],o=n[2],a=n[3],s=(17===r.type?er(r.number):Yn.parse(e,r))/(2*Math.PI),A=Rn(i)?i.number/100:0,c=Rn(o)?o.number/100:0,l=void 0!==a&&Rn(a)?Gn(a,1):1;if(0===A)return ir(255*c,255*c,255*c,1);var u=c<=.5?c*(A+1):c+A-c*A,d=2*c-u,h=sr(d,u,s+1/3),f=sr(d,u,s),p=sr(d,u,s-1/3);return ir(255*h,255*f,255*p,l)},cr={hsl:Ar,hsla:Ar,rgb:ar,rgba:ar},lr=function(e,t){return tr.parse(e,Un.create(t).parseComponentValue())},ur={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},dr={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Qn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},hr={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fr=function(e,t){var n=tr.parse(e,t[0]),r=t[1];return r&&Rn(r)?{color:n,stop:r}:{color:n,stop:null}},pr=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=zn),null===r.stop&&(r.stop=jn);for(var i=[],o=0,a=0;a<e.length;a++){var s=e[a].stop;if(null!==s){var A=Gn(s,t);A>o?i.push(A):i.push(o),o=A}else i.push(null)}var c=null;for(a=0;a<i.length;a++){var l=i[a];if(null===l)null===c&&(c=a);else if(null!==c){for(var u=a-c,d=(l-i[c-1])/(u+1),h=1;h<=u;h++)i[c+h-1]=d*h;c=null}}return e.map((function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}}))},mr=function(e,t,n){var r=t/2,i=n/2,o=Gn(e[0],t)-r,a=i-Gn(e[1],n);return(Math.atan2(a,o)+2*Math.PI)%(2*Math.PI)},gr=function(e,t,n){var r="number"==typeof e?e:mr(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),o=t/2,a=n/2,s=i/2,A=Math.sin(r-Math.PI/2)*s,c=Math.cos(r-Math.PI/2)*s;return[i,o-c,o+c,a-A,a+A]},vr=function(e,t){return Math.sqrt(e*e+t*t)},yr=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var o=t[0],a=t[1],s=vr(n-o,r-a);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},wr=function(e,t,n,r,i){var o=0,a=0;switch(e.size){case 0:0===e.shape?o=a=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-r)),a=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===e.shape)o=a=Math.min(vr(t,n),vr(t,n-i),vr(t-r,n),vr(t-r,n-i));else if(1===e.shape){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),A=yr(r,i,t,n,!0),c=A[0],l=A[1];a=s*(o=vr(c-t,(l-n)/s))}break;case 1:0===e.shape?o=a=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-r)),a=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===e.shape)o=a=Math.max(vr(t,n),vr(t,n-i),vr(t-r,n),vr(t-r,n-i));else if(1===e.shape){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var u=yr(r,i,t,n,!1);c=u[0],l=u[1],a=s*(o=vr(c-t,(l-n)/s))}}return Array.isArray(e.size)&&(o=Gn(e.size[0],r),a=2===e.size.length?Gn(e.size[1],i):o),[o,a]},br=function(e,t){var n=er(180),r=[];return On(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&"to"===o.value)return void(n=$n(t));if(Zn(o))return void(n=Yn.parse(e,o))}var a=fr(e,t);r.push(a)})),{angle:n,stops:r,type:1}},Br=function(e,t){var n=er(180),r=[];return On(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(n=$n(t));if(Zn(o))return void(n=(Yn.parse(e,o)+er(270))%er(360))}var a=fr(e,t);r.push(a)})),{angle:n,stops:r,type:1}},_r=function(e,t){var n=er(180),r=[],i=1,o=0,a=3,s=[];return On(t).forEach((function(t,n){var o=t[0];if(0===n){if(Qn(o)&&"linear"===o.value)return void(i=1);if(Qn(o)&&"radial"===o.value)return void(i=2)}if(18===o.type)if("from"===o.name){var a=tr.parse(e,o.values[0]);r.push({stop:zn,color:a})}else if("to"===o.name)a=tr.parse(e,o.values[0]),r.push({stop:jn,color:a});else if("color-stop"===o.name){var s=o.values.filter(Pn);if(2===s.length){a=tr.parse(e,s[1]);var A=s[0];Tn(A)&&r.push({stop:{type:16,number:100*A.number,flags:A.flags},color:a})}}})),1===i?{angle:(n+er(180))%er(360),stops:r,type:i}:{size:a,shape:o,stops:r,position:s,type:i}},xr="closest-side",Cr="farthest-side",Sr="closest-corner",Er="farthest-corner",Mr="circle",Ur="ellipse",Fr="cover",Tr="contain",Qr=function(e,t){var n=0,r=3,i=[],o=[];return On(t).forEach((function(t,a){var s=!0;if(0===a){var A=!1;s=t.reduce((function(e,t){if(A)if(Qn(t))switch(t.value){case"center":return o.push(Vn),e;case"top":case"left":return o.push(zn),e;case"right":case"bottom":return o.push(jn),e}else(Rn(t)||Hn(t))&&o.push(t);else if(Qn(t))switch(t.value){case Mr:return n=0,!1;case Ur:return n=1,!1;case"at":return A=!0,!1;case xr:return r=0,!1;case Fr:case Cr:return r=1,!1;case Tr:case Sr:return r=2,!1;case Er:return r=3,!1}else if(Hn(t)||Rn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)}if(s){var c=fr(e,t);i.push(c)}})),{size:r,shape:n,stops:i,position:o,type:2}},Lr=function(e,t){var n=0,r=3,i=[],o=[];return On(t).forEach((function(t,a){var s=!0;if(0===a?s=t.reduce((function(e,t){if(Qn(t))switch(t.value){case"center":return o.push(Vn),!1;case"top":case"left":return o.push(zn),!1;case"right":case"bottom":return o.push(jn),!1}else if(Rn(t)||Hn(t))return o.push(t),!1;return e}),s):1===a&&(s=t.reduce((function(e,t){if(Qn(t))switch(t.value){case Mr:return n=0,!1;case Ur:return n=1,!1;case Tr:case xr:return r=0,!1;case Cr:return r=1,!1;case Sr:return r=2,!1;case Fr:case Er:return r=3,!1}else if(Hn(t)||Rn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)),s){var A=fr(e,t);i.push(A)}})),{size:r,shape:n,stops:i,position:o,type:2}},Ir=function(e){return 1===e.type},kr=function(e){return 2===e.type},Pr={name:"image",parse:function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=Hr[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)}};function Or(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Hr[e.name])}var Dr,Hr={"linear-gradient":br,"-moz-linear-gradient":Br,"-ms-linear-gradient":Br,"-o-linear-gradient":Br,"-webkit-linear-gradient":Br,"radial-gradient":Qr,"-moz-radial-gradient":Lr,"-ms-radial-gradient":Lr,"-o-radial-gradient":Lr,"-webkit-radial-gradient":Lr,"-webkit-gradient":_r},Rr={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter((function(e){return Pn(e)&&Or(e)})).map((function(t){return Pr.parse(e,t)}))}},Nr={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Qn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},zr={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return On(t).map((function(e){return e.filter(Rn)})).map(Nn)}},Vr={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return On(t).map((function(e){return e.filter(Qn).map((function(e){return e.value})).join(" ")})).map(jr)}},jr=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"}(Dr||(Dr={}));var Kr,Gr={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return On(t).map((function(e){return e.filter(Wr)}))}},Wr=function(e){return Qn(e)||Rn(e)},qr=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Xr=qr("top"),Jr=qr("right"),Yr=qr("bottom"),Zr=qr("left"),$r=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return Nn(t.filter(Rn))}}},ei=$r("top-left"),ti=$r("top-right"),ni=$r("bottom-right"),ri=$r("bottom-left"),ii=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}}},oi=ii("top"),ai=ii("right"),si=ii("bottom"),Ai=ii("left"),ci=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Fn(t)?t.number:0}}},li=ci("top"),ui=ci("right"),di=ci("bottom"),hi=ci("left"),fi={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pi={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},mi={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).reduce((function(e,t){return e|gi(t.value)}),0)}},gi=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},vi={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}},yi={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"}(Kr||(Kr={}));var wi,bi={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?Kr.STRICT:Kr.NORMAL}},Bi={name:"line-height",initialValue:"normal",prefix:!1,type:4},_i=function(e,t){return Qn(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Rn(e)?Gn(e,t):t},xi={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Pr.parse(e,t)}},Ci={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Si={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}}},Ei=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Mi=Ei("top"),Ui=Ei("right"),Fi=Ei("bottom"),Ti=Ei("left"),Qi={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).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}}))}},Li={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},Ii=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ki=Ii("top"),Pi=Ii("right"),Oi=Ii("bottom"),Di=Ii("left"),Hi={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}}},Ri={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}},Ni={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&In(t[0],"none")?[]:On(t).map((function(t){for(var n={color:ur.TRANSPARENT,offsetX:zn,offsetY:zn,blur:zn},r=0,i=0;i<t.length;i++){var o=t[i];Hn(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:n.blur=o,r++):n.color=tr.parse(e,o)}return n}))}},zi={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}},Vi={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 n=ji[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},ji={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})),n=t[0],r=t[1];t[2],t[3];var i=t[4],o=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var a=t[12],s=t[13];return t[14],t[15],16===t.length?[n,r,i,o,a,s]:null}},Ki={type:16,number:50,flags:je},Gi=[Ki,Ki],Wi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(Rn);return 2!==n.length?Gi:[n[0],n[1]]}},qi={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"}(wi||(wi={}));for(var Xi={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return wi.BREAK_ALL;case"keep-all":return wi.KEEP_ALL;default:return wi.NORMAL}}},Ji={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(Tn(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Yi={name:"time",parse: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")}},Zi={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return Tn(t)?t.number:1}},$i={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},eo={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Qn).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}))}},to={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0}})),n.length&&r.push(n.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},no={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ro={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return Tn(t)?t.number:Qn(t)&&"bold"===t.value?700:400}},io={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Qn).map((function(e){return e.value}))}},oo={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"}}},ao=function(e,t){return 0!=(e&t)},so={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t}},Ao={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;for(var r=[],i=t.filter(kn),o=0;o<i.length;o++){var a=i[o],s=i[o+1];if(20===a.type){var A=s&&Tn(s)?s.number:1;r.push({counter:a.value,increment:A})}}return r}},co={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var n=[],r=t.filter(kn),i=0;i<r.length;i++){var o=r[i],a=r[i+1];if(Qn(o)&&"none"!==o.value){var s=a&&Tn(a)?a.number:0;n.push({counter:o.value,reset:s})}}return n}},lo={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Fn).map((function(t){return Yi.parse(e,t)}))}},uo={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;var r=[],i=t.filter(Ln);if(i.length%2!=0)return null;for(var o=0;o<i.length;o+=2){var a=i[o].value,s=i[o+1].value;r.push({open:a,close:s})}return r}},ho=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},fo={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&In(t[0],"none")?[]:On(t).map((function(t){for(var n={color:255,offsetX:zn,offsetY:zn,blur:zn,spread:zn,inset:!1},r=0,i=0;i<t.length;i++){var o=t[i];In(o,"inset")?n.inset=!0:Hn(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:2===r?n.blur=o:n.spread=o,r++):n.color=tr.parse(e,o)}return n}))}},po={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[0,1,2],r=[];return t.filter(Qn).forEach((function(e){switch(e.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2)}})),n.forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),r}},mo={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},go={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Fn(t)?t.number:0}},vo=function(){function e(e,t){var n,r;this.animationDuration=bo(e,lo,t.animationDuration),this.backgroundClip=bo(e,dr,t.backgroundClip),this.backgroundColor=bo(e,hr,t.backgroundColor),this.backgroundImage=bo(e,Rr,t.backgroundImage),this.backgroundOrigin=bo(e,Nr,t.backgroundOrigin),this.backgroundPosition=bo(e,zr,t.backgroundPosition),this.backgroundRepeat=bo(e,Vr,t.backgroundRepeat),this.backgroundSize=bo(e,Gr,t.backgroundSize),this.borderTopColor=bo(e,Xr,t.borderTopColor),this.borderRightColor=bo(e,Jr,t.borderRightColor),this.borderBottomColor=bo(e,Yr,t.borderBottomColor),this.borderLeftColor=bo(e,Zr,t.borderLeftColor),this.borderTopLeftRadius=bo(e,ei,t.borderTopLeftRadius),this.borderTopRightRadius=bo(e,ti,t.borderTopRightRadius),this.borderBottomRightRadius=bo(e,ni,t.borderBottomRightRadius),this.borderBottomLeftRadius=bo(e,ri,t.borderBottomLeftRadius),this.borderTopStyle=bo(e,oi,t.borderTopStyle),this.borderRightStyle=bo(e,ai,t.borderRightStyle),this.borderBottomStyle=bo(e,si,t.borderBottomStyle),this.borderLeftStyle=bo(e,Ai,t.borderLeftStyle),this.borderTopWidth=bo(e,li,t.borderTopWidth),this.borderRightWidth=bo(e,ui,t.borderRightWidth),this.borderBottomWidth=bo(e,di,t.borderBottomWidth),this.borderLeftWidth=bo(e,hi,t.borderLeftWidth),this.boxShadow=bo(e,fo,t.boxShadow),this.color=bo(e,fi,t.color),this.direction=bo(e,pi,t.direction),this.display=bo(e,mi,t.display),this.float=bo(e,vi,t.cssFloat),this.fontFamily=bo(e,to,t.fontFamily),this.fontSize=bo(e,no,t.fontSize),this.fontStyle=bo(e,oo,t.fontStyle),this.fontVariant=bo(e,io,t.fontVariant),this.fontWeight=bo(e,ro,t.fontWeight),this.letterSpacing=bo(e,yi,t.letterSpacing),this.lineBreak=bo(e,bi,t.lineBreak),this.lineHeight=bo(e,Bi,t.lineHeight),this.listStyleImage=bo(e,xi,t.listStyleImage),this.listStylePosition=bo(e,Ci,t.listStylePosition),this.listStyleType=bo(e,Si,t.listStyleType),this.marginTop=bo(e,Mi,t.marginTop),this.marginRight=bo(e,Ui,t.marginRight),this.marginBottom=bo(e,Fi,t.marginBottom),this.marginLeft=bo(e,Ti,t.marginLeft),this.opacity=bo(e,Zi,t.opacity);var i=bo(e,Qi,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=bo(e,Li,t.overflowWrap),this.paddingTop=bo(e,ki,t.paddingTop),this.paddingRight=bo(e,Pi,t.paddingRight),this.paddingBottom=bo(e,Oi,t.paddingBottom),this.paddingLeft=bo(e,Di,t.paddingLeft),this.paintOrder=bo(e,po,t.paintOrder),this.position=bo(e,Ri,t.position),this.textAlign=bo(e,Hi,t.textAlign),this.textDecorationColor=bo(e,$i,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=bo(e,eo,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=bo(e,Ni,t.textShadow),this.textTransform=bo(e,zi,t.textTransform),this.transform=bo(e,Vi,t.transform),this.transformOrigin=bo(e,Wi,t.transformOrigin),this.visibility=bo(e,qi,t.visibility),this.webkitTextStrokeColor=bo(e,mo,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=bo(e,go,t.webkitTextStrokeWidth),this.wordBreak=bo(e,Xi,t.wordBreak),this.zIndex=bo(e,Ji,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return nr(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 ao(this.display,4)||ao(this.display,33554432)||ao(this.display,268435456)||ao(this.display,536870912)||ao(this.display,67108864)||ao(this.display,134217728)},e}(),yo=function(){function e(e,t){this.content=bo(e,so,t.content),this.quotes=bo(e,uo,t.quotes)}return e}(),wo=function(){function e(e,t){this.counterIncrement=bo(e,Ao,t.counterIncrement),this.counterReset=bo(e,co,t.counterReset)}return e}(),bo=function(e,t,n){var r=new Mn,i=null!=n?n.toString():t.initialValue;r.write(i);var o=new Un(r.read());switch(t.type){case 2:var a=o.parseComponentValue();return t.parse(e,Qn(a)?a.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Yn.parse(e,o.parseComponentValue());case"color":return tr.parse(e,o.parseComponentValue());case"image":return Pr.parse(e,o.parseComponentValue());case"length":var s=o.parseComponentValue();return Hn(s)?s:zn;case"length-percentage":var A=o.parseComponentValue();return Rn(A)?A:zn;case"time":return Yi.parse(e,o.parseComponentValue())}}},Bo="data-html2canvas-debug",_o=function(e){switch(e.getAttribute(Bo)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},xo=function(e,t){var n=_o(e);return 1===n||t===n},Co=function(){function e(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,xo(t,3),this.styles=new vo(e,window.getComputedStyle(t,null)),ds(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=a(this.context,t),xo(t,4)&&(this.flags|=16)}return e}(),So="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Eo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Uo=0;Uo<Eo.length;Uo++)Mo[Eo.charCodeAt(Uo)]=Uo;for(var Fo=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),l=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=Mo[e.charCodeAt(t)],r=Mo[e.charCodeAt(t+1)],i=Mo[e.charCodeAt(t+2)],o=Mo[e.charCodeAt(t+3)],l[A++]=n<<2|r>>4,l[A++]=(15&r)<<4|i>>2,l[A++]=(3&i)<<6|63&o;return c},To=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},Qo=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Lo=5,Io=11,ko=2,Po=65536>>Lo,Oo=(1<<Lo)-1,Do=Po+(1024>>Lo)+32,Ho=65536>>Io,Ro=(1<<Io-Lo)-1,No=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},zo=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},Vo=function(e,t){var n=Fo(e),r=Array.isArray(n)?Qo(n):new Uint32Array(n),i=Array.isArray(n)?To(n):new Uint16Array(n),o=24,a=No(i,o/2,r[4]/2),s=2===r[5]?No(i,(o+r[4])/2):zo(r,Math.ceil((o+r[4])/4));return new jo(r[0],r[1],r[2],r[3],a,s)},jo=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>Lo])<<ko)+(e&Oo),this.data[t];if(e<=65535)return t=((t=this.index[Po+(e-55296>>Lo)])<<ko)+(e&Oo),this.data[t];if(e<this.highStart)return t=Do-Ho+(e>>Io),t=this.index[t],t+=e>>Lo&Ro,t=((t=this.index[t])<<ko)+(e&Oo),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Ko="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wo=0;Wo<Ko.length;Wo++)Go[Ko.charCodeAt(Wo)]=Wo;var qo,Xo=1,Jo=2,Yo=3,Zo=4,$o=5,ea=7,ta=8,na=9,ra=10,ia=11,oa=12,aa=13,sa=14,Aa=15,ca=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t},la=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,o="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},ua=Vo(So),da="×",ha="÷",fa=function(e){return ua.get(e)},pa=function(e,t,n){var r=n-2,i=t[r],o=t[n-1],a=t[n];if(o===Jo&&a===Yo)return da;if(o===Jo||o===Yo||o===Zo)return ha;if(a===Jo||a===Yo||a===Zo)return ha;if(o===ta&&-1!==[ta,na,ia,oa].indexOf(a))return da;if(!(o!==ia&&o!==na||a!==na&&a!==ra))return da;if((o===oa||o===ra)&&a===ra)return da;if(a===aa||a===$o)return da;if(a===ea)return da;if(o===Xo)return da;if(o===aa&&a===sa){for(;i===$o;)i=t[--r];if(i===sa)return da}if(o===Aa&&a===Aa){for(var s=0;i===Aa;)s++,i=t[--r];if(s%2==0)return da}return ha},ma=function(e){var t=ca(e),n=t.length,r=0,i=0,o=t.map(fa);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=da;r<n&&(e=pa(t,o,++r))===da;);if(e!==da||r===n){var a=la.apply(null,t.slice(i,r));return i=r,{value:a,done:!1}}return{done:!0,value:null}}}},ga=function(e){for(var t,n=ma(e),r=[];!(t=n.next()).done;)t.value&&r.push(t.value.slice());return r},va=function(e){var t=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height=t+"px",r.style.display="block",e.body.appendChild(r),n.selectNode(r);var i=n.getBoundingClientRect(),o=Math.round(i.height);if(e.body.removeChild(r),o===t)return!0}}return!1},ya=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 n=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,i=A(r.data).map((function(e){return c(e)})),o=0,a={},s=i.every((function(e,t){n.setStart(r,o),n.setEnd(r,o+e.length);var i=n.getBoundingClientRect();o+=e.length;var s=i.x>a.x||i.y>a.y;return a=i,0===t||s}));return e.body.removeChild(t),s},wa=function(){return void 0!==(new Image).crossOrigin},ba=function(){return"string"==typeof(new XMLHttpRequest).responseType},Ba=function(e){var t=new Image,n=e.createElement("canvas"),r=n.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),n.toDataURL()}catch(e){return!1}return!0},_a=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},xa=function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,o=t.toDataURL();i.src=o;var a=Ca(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),Sa(a).then((function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var a=e.createElement("div");return a.style.backgroundImage="url("+o+")",a.style.height=n+"px",_a(i)?Sa(Ca(n,n,0,0,a)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),_a(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))},Ca=function(e,t,n,r,i){var o="http://www.w3.org/2000/svg",a=document.createElementNS(o,"svg"),s=document.createElementNS(o,"foreignObject");return a.setAttributeNS(null,"width",e.toString()),a.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(s),s.appendChild(i),a},Sa=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Ea={get SUPPORT_RANGE_BOUNDS(){var e=va(document);return Object.defineProperty(Ea,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Ea.SUPPORT_RANGE_BOUNDS&&ya(document);return Object.defineProperty(Ea,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Ba(document);return Object.defineProperty(Ea,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?xa(document):Promise.resolve(!1);return Object.defineProperty(Ea,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=wa();return Object.defineProperty(Ea,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=ba();return Object.defineProperty(Ea,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ea,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Ea,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Ma=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),Ua=function(e,t,n,r){var i=Ia(t,n),a=[],s=0;return i.forEach((function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Ea.SUPPORT_RANGE_BOUNDS){var i=Ta(r,s,t.length).getClientRects();if(i.length>1){var A=Qa(t),c=0;A.forEach((function(t){a.push(new Ma(t,o.fromDOMRectList(e,Ta(r,c+s,t.length).getClientRects()))),c+=t.length}))}else a.push(new Ma(t,o.fromDOMRectList(e,i)))}else{var l=r.splitText(t.length);a.push(new Ma(t,Fa(e,r))),r=l}else Ea.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length})),a},Fa=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var s=a(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),s}}return o.EMPTY},Ta=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Qa=function(e){if(Ea.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 ga(e)},La=function(e,t){if(Ea.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map((function(e){return e.segment}))}return Pa(e,t)},Ia=function(e,t){return 0!==t.letterSpacing?Qa(e):La(e,t)},ka=[32,160,4961,65792,65793,4153,4241],Pa=function(e,t){for(var n,r=Ne(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],o=function(){if(n.value){var e=n.value.slice(),t=A(e),r="";t.forEach((function(e){-1===ka.indexOf(e)?r+=c(e):(r.length&&i.push(r),i.push(c(e)),r="")})),r.length&&i.push(r)}};!(n=r.next()).done;)o();return i},Oa=function(){function e(e,t,n){this.text=Da(t.data,n.textTransform),this.textBounds=Ua(e,this.text,n,t)}return e}(),Da=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Ha,Ra);case 2:return e.toUpperCase();default:return e}},Ha=/(^|\s|:|-|\(|\))([a-z])/g,Ra=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Na=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t(n,e),n}(Co),za=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t(n,e),n}(Co),Va=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,o=a(t,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t(n,e),n}(Co),ja=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(Co),Ka=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return t(n,e),n}(Co),Ga=[{type:15,flags:0,unit:"px",number:3}],Wa=[{type:16,flags:0,number:50}],qa=function(e){return e.width>e.height?new o(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new o(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},Xa=function(e){var t=e.type===Za?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t},Ja="checkbox",Ya="radio",Za="password",$a=707406591,es=function(e){function n(t,n){var r=e.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=Xa(n),r.type!==Ja&&r.type!==Ya||(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=qa(r.bounds)),r.type){case Ja:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=Ga;break;case Ya:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=Wa}return r}return t(n,e),n}(Co),ts=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||"",r}return t(n,e),n}(Co),ns=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(Co),rs=function(e){function n(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=ss(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?lr(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):ur.TRANSPARENT,o=n.contentWindow.document.body?lr(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):ur.TRANSPARENT;r.backgroundColor=nr(i)?nr(o)?r.styles.backgroundColor:o:i}}catch(e){}return r}return t(n,e),n}(Co),is=["OL","UL","MENU"],os=function(e,t,n,r){for(var i=t.firstChild,o=void 0;i;i=o)if(o=i.nextSibling,ls(i)&&i.data.trim().length>0)n.textNodes.push(new Oa(e,i,n.styles));else if(us(i))if(Ms(i)&&i.assignedNodes)i.assignedNodes().forEach((function(t){return os(e,t,n,r)}));else{var a=as(e,i);a.styles.isVisible()&&(As(i,a,r)?a.flags|=4:cs(a.styles)&&(a.flags|=2),-1!==is.indexOf(i.tagName)&&(a.flags|=8),n.elements.push(a),i.slot,i.shadowRoot?os(e,i.shadowRoot,a,r):Ss(i)||vs(i)||Es(i)||os(e,i,a,r))}},as=function(e,t){return Bs(t)?new Na(e,t):ws(t)?new za(e,t):vs(t)?new Va(e,t):fs(t)?new ja(e,t):ps(t)?new Ka(e,t):ms(t)?new es(e,t):Es(t)?new ts(e,t):Ss(t)?new ns(e,t):_s(t)?new rs(e,t):new Co(e,t)},ss=function(e,t){var n=as(e,t);return n.flags|=4,os(e,t,n,n),n},As=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||ys(e)&&n.styles.isTransparent()},cs=function(e){return e.isPositioned()||e.isFloating()},ls=function(e){return e.nodeType===Node.TEXT_NODE},us=function(e){return e.nodeType===Node.ELEMENT_NODE},ds=function(e){return us(e)&&void 0!==e.style&&!hs(e)},hs=function(e){return"object"==typeof e.className},fs=function(e){return"LI"===e.tagName},ps=function(e){return"OL"===e.tagName},ms=function(e){return"INPUT"===e.tagName},gs=function(e){return"HTML"===e.tagName},vs=function(e){return"svg"===e.tagName},ys=function(e){return"BODY"===e.tagName},ws=function(e){return"CANVAS"===e.tagName},bs=function(e){return"VIDEO"===e.tagName},Bs=function(e){return"IMG"===e.tagName},_s=function(e){return"IFRAME"===e.tagName},xs=function(e){return"STYLE"===e.tagName},Cs=function(e){return"SCRIPT"===e.tagName},Ss=function(e){return"TEXTAREA"===e.tagName},Es=function(e){return"SELECT"===e.tagName},Ms=function(e){return"SLOT"===e.tagName},Us=function(e){return e.tagName.indexOf("-")>0},Fs=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,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)}));var o=[];return i&&r.forEach((function(e){var n=t.counters[e.counter];o.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),o},e}(),Ts={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"]},Qs={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ls={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Is={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ks=function(e,t,n,r,i,o){return e<t||e>n?qs(e,i,o.length>0):r.integers.reduce((function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t}),"")+o},Ps=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},Os=function(e,t,n,r,i){var o=n-t+1;return(e<0?"-":"")+(Ps(Math.abs(e),o,r,(function(e){return c(Math.floor(e%o)+t)}))+i)},Ds=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Ps(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},Hs=1,Rs=2,Ns=4,zs=8,Vs=function(e,t,n,r,i,o){if(e<-9999||e>9999)return qs(e,4,i.length>0);var a=Math.abs(e),s=i;if(0===a)return t[0]+s;for(var A=0;a>0&&A<=4;A++){var c=a%10;0===c&&ao(o,Hs)&&""!==s?s=t[c]+s:c>1||1===c&&0===A||1===c&&1===A&&ao(o,Rs)||1===c&&1===A&&ao(o,Ns)&&e>100||1===c&&A>1&&ao(o,zs)?s=t[c]+(A>0?n[A-1]:"")+s:1===c&&A>0&&(s=n[A-1]+s),a=Math.floor(a/10)}return(e<0?r:"")+s},js="十百千萬",Ks="拾佰仟萬",Gs="マイナス",Ws="마이너스",qs=function(e,t,n){var r=n?". ":"",i=n?"、":"",o=n?", ":"",a=n?" ":"";switch(t){case 0:return"•"+a;case 1:return"◦"+a;case 2:return"◾"+a;case 5:var s=Os(e,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return Ds(e,"〇一二三四五六七八九",i);case 6:return ks(e,1,3999,Ts,3,r).toLowerCase();case 7:return ks(e,1,3999,Ts,3,r);case 8:return Os(e,945,969,!1,r);case 9:return Os(e,97,122,!1,r);case 10:return Os(e,65,90,!1,r);case 11:return Os(e,1632,1641,!0,r);case 12:case 49:return ks(e,1,9999,Qs,3,r);case 35:return ks(e,1,9999,Qs,3,r).toLowerCase();case 13:return Os(e,2534,2543,!0,r);case 14:case 30:return Os(e,6112,6121,!0,r);case 15:return Ds(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Ds(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return Vs(e,"零一二三四五六七八九",js,"負",i,Rs|Ns|zs);case 47:return Vs(e,"零壹貳參肆伍陸柒捌玖",Ks,"負",i,Hs|Rs|Ns|zs);case 42:return Vs(e,"零一二三四五六七八九",js,"负",i,Rs|Ns|zs);case 41:return Vs(e,"零壹贰叁肆伍陆柒捌玖",Ks,"负",i,Hs|Rs|Ns|zs);case 26:return Vs(e,"〇一二三四五六七八九","十百千万",Gs,i,0);case 25:return Vs(e,"零壱弐参四伍六七八九","拾百千万",Gs,i,Hs|Rs|Ns);case 31:return Vs(e,"영일이삼사오육칠팔구","십백천만",Ws,o,Hs|Rs|Ns);case 33:return Vs(e,"零一二三四五六七八九","十百千萬",Ws,o,0);case 32:return Vs(e,"零壹貳參四五六七八九","拾百千",Ws,o,Hs|Rs|Ns);case 18:return Os(e,2406,2415,!0,r);case 20:return ks(e,1,19999,Is,3,r);case 21:return Os(e,2790,2799,!0,r);case 22:return Os(e,2662,2671,!0,r);case 22:return ks(e,1,10999,Ls,3,r);case 23:return Ds(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ds(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Os(e,3302,3311,!0,r);case 28:return Ds(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Ds(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Os(e,3792,3801,!0,r);case 37:return Os(e,6160,6169,!0,r);case 38:return Os(e,4160,4169,!0,r);case 39:return Os(e,2918,2927,!0,r);case 40:return Os(e,1776,1785,!0,r);case 43:return Os(e,3046,3055,!0,r);case 44:return Os(e,3174,3183,!0,r);case 45:return Os(e,3664,3673,!0,r);case 46:return Os(e,3872,3881,!0,r);default:return Os(e,48,57,!0,r)}},Xs="data-html2canvas-ignore",Js=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Fs,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 n=this,o=Zs(e,t);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var a=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,A=o.contentWindow,c=A.document,l=tA(o).then((function(){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(aA),A&&(A.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||A.scrollY===t.top&&A.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(A.scrollX-t.left,A.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,eA(c)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(c,n)})).then((function(){return o}))]:[2,o]}}))}))}));return c.open(),c.write(iA(document.doctype)+"<html></html>"),oA(this.referenceElement.ownerDocument,a,s),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),l},e.prototype.createElementClone=function(e){if(xo(e,2),ws(e))return this.createCanvasClone(e);if(bs(e))return this.createVideoClone(e);if(xs(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Bs(t)&&(Bs(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Us(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return rA(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].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=n,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 n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}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 i=e.getContext("2d"),o=r.getContext("2d");if(o)if(!this.options.allowTaint&&i)o.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var a=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(a){var s=a.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.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 n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.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,n){us(t)&&(Cs(t)||t.hasAttribute(Xs)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&us(t)&&xs(t)||e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(us(i)&&Ms(i)&&"function"==typeof i.assignedNodes){var o=i.assignedNodes();o.length&&o.forEach((function(e){return r.appendChildNode(t,e,n)}))}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(ls(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&us(e)&&(ds(e)||hs(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),a=n.getComputedStyle(e,":after");this.referenceElement===e&&ds(r)&&(this.clonedReferenceElement=r),ys(r)&&dA(r);var s=this.counters.parse(new wo(this.context,i)),A=this.resolvePseudoContent(e,r,o,qo.BEFORE);Us(e)&&(t=!0),bs(e)||this.cloneChildNodes(e,r,t),A&&r.insertBefore(A,r.firstChild);var c=this.resolvePseudoContent(e,r,a,qo.AFTER);return c&&r.appendChild(c),this.counters.pop(s),(i&&(this.options.copyStyles||hs(e))&&!_s(e)||t)&&rA(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Ss(e)||Es(e))&&(Ss(r)||Es(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var o=n.content,a=t.ownerDocument;if(a&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==n.display){this.counters.parse(new wo(this.context,n));var s=new yo(this.context,n),A=a.createElement("html2canvaspseudoelement");rA(n,A),s.content.forEach((function(t){if(0===t.type)A.appendChild(a.createTextNode(t.value));else if(22===t.type){var n=a.createElement("img");n.src=t.value,n.style.opacity="1",A.appendChild(n)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(Qn);r.length&&A.appendChild(a.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(Pn),c=o[0],l=o[1];if(c&&Qn(c)){var u=i.counters.getCounterValue(c.value),d=l&&Qn(l)?Si.parse(i.context,l.value):3;A.appendChild(a.createTextNode(qs(u,d,!1)))}}else if("counters"===t.name){var h=t.values.filter(Pn),f=(c=h[0],h[1]);if(l=h[2],c&&Qn(c)){var p=i.counters.getCounterValues(c.value),m=l&&Qn(l)?Si.parse(i.context,l.value):3,g=f&&0===f.type?f.value:"",v=p.map((function(e){return qs(e,m,!1)})).join(g);A.appendChild(a.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":A.appendChild(a.createTextNode(ho(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":A.appendChild(a.createTextNode(ho(s.quotes,--i.quoteDepth,!1)));break;default:A.appendChild(a.createTextNode(t.value))}})),A.className=cA+" "+lA;var c=r===qo.BEFORE?" "+cA:" "+lA;return hs(t)?t.className.baseValue+=c:t.className+=c,A}}},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"}(qo||(qo={}));var Ys,Zs=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(Xs,"true"),e.body.appendChild(n),n},$s=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},eA=function(e){return Promise.all([].slice.call(e.images,0).map($s))},tA=function(e){return new Promise((function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))}),50)}}))},nA=["all","d","content"],rA=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);-1===nA.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},iA=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},oA=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},aA=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},sA=":before",AA=":after",cA="___html2canvas___pseudoelement_before",lA="___html2canvas___pseudoelement_after",uA='{\n    content: "" !important;\n    display: none !important;\n}',dA=function(e){hA(e,"."+cA+sA+uA+"\n         ."+lA+AA+uA)},hA=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},fA=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.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}(),pA=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:BA(e)||yA(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 r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:return t=fA.isSameOrigin(e),n=!wA(e)&&!0===this._options.useCORS&&Ea.SUPPORT_CORS_IMAGES&&!t,r=!wA(e)&&!t&&!BA(e)&&"string"==typeof this._options.proxy&&Ea.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||wA(e)||BA(e)||r||n?(o=e,r?[4,this.proxy(o)]:[3,2]):[2];case 1:o=i.sent(),i.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,(bA(o)||n)&&(r.crossOrigin="anonymous"),r.src=o,!0===r.complete&&setTimeout((function(){return e(r)}),500),a._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")}),a._options.imageTimeout)}))];case 3:return[2,i.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,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(i,o){var a=Ea.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===a)i(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return i(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(s.response)}else o("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=o;var A=n.indexOf("?")>-1?"&":"?";if(s.open("GET",""+n+A+"url="+encodeURIComponent(e)+"&responseType="+a),"text"!==a&&s instanceof XMLHttpRequest&&(s.responseType=a),t._options.imageTimeout){var c=t._options.imageTimeout;s.timeout=c,s.ontimeout=function(){return o("Timed out ("+c+"ms) proxying "+r)}}s.send()}))},e}(),mA=/^data:image\/svg\+xml/i,gA=/^data:image\/.*;base64,/i,vA=/^data:image\/.*/i,yA=function(e){return Ea.SUPPORT_SVG_DRAWING||!_A(e)},wA=function(e){return vA.test(e)},bA=function(e){return gA.test(e)},BA=function(e){return"blob"===e.substr(0,4)},_A=function(e){return"svg"===e.substr(-3).toLowerCase()||mA.test(e)},xA=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),CA=function(e,t,n){return new xA(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},SA=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=CA(this.start,this.startControl,t),i=CA(this.startControl,this.endControl,t),o=CA(this.endControl,this.end,t),a=CA(r,i,t),s=CA(i,o,t),A=CA(a,s,t);return n?new e(this.start,r,a,A):new e(A,s,o,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),EA=function(e){return 1===e.type},MA=function(){function e(e){var t=e.styles,n=e.bounds,r=Kn(t.borderTopLeftRadius,n.width,n.height),i=r[0],o=r[1],a=Kn(t.borderTopRightRadius,n.width,n.height),s=a[0],A=a[1],c=Kn(t.borderBottomRightRadius,n.width,n.height),l=c[0],u=c[1],d=Kn(t.borderBottomLeftRadius,n.width,n.height),h=d[0],f=d[1],p=[];p.push((i+s)/n.width),p.push((h+l)/n.width),p.push((o+f)/n.height),p.push((A+u)/n.height);var m=Math.max.apply(Math,p);m>1&&(i/=m,o/=m,s/=m,A/=m,l/=m,u/=m,h/=m,f/=m);var g=n.width-s,v=n.height-u,y=n.width-l,w=n.height-f,b=t.borderTopWidth,B=t.borderRightWidth,_=t.borderBottomWidth,x=t.borderLeftWidth,C=Gn(t.paddingTop,e.bounds.width),S=Gn(t.paddingRight,e.bounds.width),E=Gn(t.paddingBottom,e.bounds.width),M=Gn(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?UA(n.left+x/3,n.top+b/3,i-x/3,o-b/3,Ys.TOP_LEFT):new xA(n.left+x/3,n.top+b/3),this.topRightBorderDoubleOuterBox=i>0||o>0?UA(n.left+g,n.top+b/3,s-B/3,A-b/3,Ys.TOP_RIGHT):new xA(n.left+n.width-B/3,n.top+b/3),this.bottomRightBorderDoubleOuterBox=l>0||u>0?UA(n.left+y,n.top+v,l-B/3,u-_/3,Ys.BOTTOM_RIGHT):new xA(n.left+n.width-B/3,n.top+n.height-_/3),this.bottomLeftBorderDoubleOuterBox=h>0||f>0?UA(n.left+x/3,n.top+w,h-x/3,f-_/3,Ys.BOTTOM_LEFT):new xA(n.left+x/3,n.top+n.height-_/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?UA(n.left+2*x/3,n.top+2*b/3,i-2*x/3,o-2*b/3,Ys.TOP_LEFT):new xA(n.left+2*x/3,n.top+2*b/3),this.topRightBorderDoubleInnerBox=i>0||o>0?UA(n.left+g,n.top+2*b/3,s-2*B/3,A-2*b/3,Ys.TOP_RIGHT):new xA(n.left+n.width-2*B/3,n.top+2*b/3),this.bottomRightBorderDoubleInnerBox=l>0||u>0?UA(n.left+y,n.top+v,l-2*B/3,u-2*_/3,Ys.BOTTOM_RIGHT):new xA(n.left+n.width-2*B/3,n.top+n.height-2*_/3),this.bottomLeftBorderDoubleInnerBox=h>0||f>0?UA(n.left+2*x/3,n.top+w,h-2*x/3,f-2*_/3,Ys.BOTTOM_LEFT):new xA(n.left+2*x/3,n.top+n.height-2*_/3),this.topLeftBorderStroke=i>0||o>0?UA(n.left+x/2,n.top+b/2,i-x/2,o-b/2,Ys.TOP_LEFT):new xA(n.left+x/2,n.top+b/2),this.topRightBorderStroke=i>0||o>0?UA(n.left+g,n.top+b/2,s-B/2,A-b/2,Ys.TOP_RIGHT):new xA(n.left+n.width-B/2,n.top+b/2),this.bottomRightBorderStroke=l>0||u>0?UA(n.left+y,n.top+v,l-B/2,u-_/2,Ys.BOTTOM_RIGHT):new xA(n.left+n.width-B/2,n.top+n.height-_/2),this.bottomLeftBorderStroke=h>0||f>0?UA(n.left+x/2,n.top+w,h-x/2,f-_/2,Ys.BOTTOM_LEFT):new xA(n.left+x/2,n.top+n.height-_/2),this.topLeftBorderBox=i>0||o>0?UA(n.left,n.top,i,o,Ys.TOP_LEFT):new xA(n.left,n.top),this.topRightBorderBox=s>0||A>0?UA(n.left+g,n.top,s,A,Ys.TOP_RIGHT):new xA(n.left+n.width,n.top),this.bottomRightBorderBox=l>0||u>0?UA(n.left+y,n.top+v,l,u,Ys.BOTTOM_RIGHT):new xA(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=h>0||f>0?UA(n.left,n.top+w,h,f,Ys.BOTTOM_LEFT):new xA(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||o>0?UA(n.left+x,n.top+b,Math.max(0,i-x),Math.max(0,o-b),Ys.TOP_LEFT):new xA(n.left+x,n.top+b),this.topRightPaddingBox=s>0||A>0?UA(n.left+Math.min(g,n.width-B),n.top+b,g>n.width+B?0:Math.max(0,s-B),Math.max(0,A-b),Ys.TOP_RIGHT):new xA(n.left+n.width-B,n.top+b),this.bottomRightPaddingBox=l>0||u>0?UA(n.left+Math.min(y,n.width-x),n.top+Math.min(v,n.height-_),Math.max(0,l-B),Math.max(0,u-_),Ys.BOTTOM_RIGHT):new xA(n.left+n.width-B,n.top+n.height-_),this.bottomLeftPaddingBox=h>0||f>0?UA(n.left+x,n.top+Math.min(w,n.height-_),Math.max(0,h-x),Math.max(0,f-_),Ys.BOTTOM_LEFT):new xA(n.left+x,n.top+n.height-_),this.topLeftContentBox=i>0||o>0?UA(n.left+x+M,n.top+b+C,Math.max(0,i-(x+M)),Math.max(0,o-(b+C)),Ys.TOP_LEFT):new xA(n.left+x+M,n.top+b+C),this.topRightContentBox=s>0||A>0?UA(n.left+Math.min(g,n.width+x+M),n.top+b+C,g>n.width+x+M?0:s-x+M,A-(b+C),Ys.TOP_RIGHT):new xA(n.left+n.width-(B+S),n.top+b+C),this.bottomRightContentBox=l>0||u>0?UA(n.left+Math.min(y,n.width-(x+M)),n.top+Math.min(v,n.height+b+C),Math.max(0,l-(B+S)),u-(_+E),Ys.BOTTOM_RIGHT):new xA(n.left+n.width-(B+S),n.top+n.height-(_+E)),this.bottomLeftContentBox=h>0||f>0?UA(n.left+x+M,n.top+w,Math.max(0,h-(x+M)),f-(_+E),Ys.BOTTOM_LEFT):new xA(n.left+x+M,n.top+n.height-(_+E))}return e}();!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"}(Ys||(Ys={}));var UA=function(e,t,n,r,i){var o=(Math.sqrt(2)-1)/3*4,a=n*o,s=r*o,A=e+n,c=t+r;switch(i){case Ys.TOP_LEFT:return new SA(new xA(e,c),new xA(e,c-s),new xA(A-a,t),new xA(A,t));case Ys.TOP_RIGHT:return new SA(new xA(e,t),new xA(e+a,t),new xA(A,c-s),new xA(A,c));case Ys.BOTTOM_RIGHT:return new SA(new xA(A,t),new xA(A,t+s),new xA(e+a,c),new xA(e,c));case Ys.BOTTOM_LEFT:default:return new SA(new xA(A,c),new xA(A-a,c),new xA(e,t+s),new xA(e,t))}},FA=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},TA=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},QA=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},LA=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),IA=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),kA=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),PA=function(e){return 0===e.type},OA=function(e){return 1===e.type},DA=function(e){return 2===e.type},HA=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},RA=function(e,t,n,r,i){return e.map((function(e,o){switch(o){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e}))},NA=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),zA=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new MA(this.container),this.container.styles.opacity<1&&this.effects.push(new kA(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new LA(n,r,i))}if(0!==this.container.styles.overflowX){var o=FA(this.curves),a=QA(this.curves);HA(o,a)?this.effects.push(new IA(o,6)):(this.effects.push(new IA(o,2)),this.effects.push(new IA(a,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter((function(e){return!OA(e)}));if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var o=FA(n.curves),a=QA(n.curves);HA(o,a)||r.unshift(new IA(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter((function(t){return ao(t.target,e)}))},e}(),VA=function(e,t,n,r){e.container.elements.forEach((function(i){var o=ao(i.flags,4),a=ao(i.flags,2),s=new zA(i,e);ao(i.styles.display,2048)&&r.push(s);var A=ao(i.flags,8)?[]:r;if(o||a){var c=o||i.styles.isPositioned()?n:t,l=new NA(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;c.negativeZIndex.some((function(e,t){return u>e.element.container.styles.zIndex.order?(d=t,!1):d>0})),c.negativeZIndex.splice(d,0,l)}else if(u>0){var h=0;c.positiveZIndex.some((function(e,t){return u>=e.element.container.styles.zIndex.order?(h=t+1,!1):h>0})),c.positiveZIndex.splice(h,0,l)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else i.styles.isFloating()?c.nonPositionedFloats.push(l):c.nonPositionedInlineLevel.push(l);VA(s,l,o?l:n,A)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),VA(s,t,n,A);ao(i.flags,8)&&jA(i,A)}))},jA=function(e,t){for(var n=e instanceof Ka?e.start:1,r=e instanceof Ka&&e.reversed,i=0;i<t.length;i++){var o=t[i];o.container instanceof ja&&"number"==typeof o.container.value&&0!==o.container.value&&(n=o.container.value),o.listValue=qs(n,o.container.styles.listStyleType,!0),n+=r?-1:1}},KA=function(e){var t=new zA(e,null),n=new NA(t),r=[];return VA(t,n,n,r),jA(t.container,r),n},GA=function(e,t){switch(t){case 0:return YA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return YA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return YA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return YA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},WA=function(e,t){switch(t){case 0:return YA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return YA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return YA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return YA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},qA=function(e,t){switch(t){case 0:return YA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return YA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return YA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return YA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},XA=function(e,t){switch(t){case 0:return JA(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return JA(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return JA(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return JA(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},JA=function(e,t){var n=[];return EA(e)?n.push(e.subdivide(.5,!1)):n.push(e),EA(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},YA=function(e,t,n,r){var i=[];return EA(e)?i.push(e.subdivide(.5,!1)):i.push(e),EA(n)?i.push(n.subdivide(.5,!0)):i.push(n),EA(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),EA(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},ZA=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},$A=function(e){var t=e.styles,n=e.bounds,r=Gn(t.paddingLeft,n.width),i=Gn(t.paddingRight,n.width),o=Gn(t.paddingTop,n.width),a=Gn(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,o+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+o+a))},ec=function(e,t){return 0===e?t.bounds:2===e?$A(t):ZA(t)},tc=function(e,t){return 0===e?t.bounds:2===e?$A(t):ZA(t)},nc=function(e,t,n){var r=ec(ac(e.styles.backgroundOrigin,t),e),i=tc(ac(e.styles.backgroundClip,t),e),o=oc(ac(e.styles.backgroundSize,t),n,r),a=o[0],s=o[1],A=Kn(ac(e.styles.backgroundPosition,t),r.width-a,r.height-s);return[sc(ac(e.styles.backgroundRepeat,t),A,o,r,i),Math.round(r.left+A[0]),Math.round(r.top+A[1]),a,s]},rc=function(e){return Qn(e)&&e.value===Dr.AUTO},ic=function(e){return"number"==typeof e},oc=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1];if(!a)return[0,0];if(Rn(a)&&s&&Rn(s))return[Gn(a,n.width),Gn(s,n.height)];var A=ic(o);if(Qn(a)&&(a.value===Dr.CONTAIN||a.value===Dr.COVER))return ic(o)?n.width/n.height<o!=(a.value===Dr.COVER)?[n.width,n.width/o]:[n.height*o,n.height]:[n.width,n.height];var c=ic(r),l=ic(i),u=c||l;if(rc(a)&&(!s||rc(s)))return c&&l?[r,i]:A||u?u&&A?[c?r:i*o,l?i:r/o]:[c?r:n.width,l?i:n.height]:[n.width,n.height];if(A){var d=0,h=0;return Rn(a)?d=Gn(a,n.width):Rn(s)&&(h=Gn(s,n.height)),rc(a)?d=h*o:s&&!rc(s)||(h=d/o),[d,h]}var f=null,p=null;if(Rn(a)?f=Gn(a,n.width):s&&Rn(s)&&(p=Gn(s,n.height)),null===f||s&&!rc(s)||(p=c&&l?f/r*i:n.height),null!==p&&rc(a)&&(f=c&&l?p/i*r:n.width),null!==f&&null!==p)return[f,p];throw new Error("Unable to calculate background-size for element")},ac=function(e,t){var n=e[t];return void 0===n?e[0]:n},sc=function(e,t,n,r,i){var o=t[0],a=t[1],s=n[0],A=n[1];switch(e){case 2:return[new xA(Math.round(r.left),Math.round(r.top+a)),new xA(Math.round(r.left+r.width),Math.round(r.top+a)),new xA(Math.round(r.left+r.width),Math.round(A+r.top+a)),new xA(Math.round(r.left),Math.round(A+r.top+a))];case 3:return[new xA(Math.round(r.left+o),Math.round(r.top)),new xA(Math.round(r.left+o+s),Math.round(r.top)),new xA(Math.round(r.left+o+s),Math.round(r.height+r.top)),new xA(Math.round(r.left+o),Math.round(r.height+r.top))];case 1:return[new xA(Math.round(r.left+o),Math.round(r.top+a)),new xA(Math.round(r.left+o+s),Math.round(r.top+a)),new xA(Math.round(r.left+o+s),Math.round(r.top+a+A)),new xA(Math.round(r.left+o),Math.round(r.top+a+A))];default:return[new xA(Math.round(i.left),Math.round(i.top)),new xA(Math.round(i.left+i.width),Math.round(i.top)),new xA(Math.round(i.left+i.width),Math.round(i.height+i.top)),new xA(Math.round(i.left),Math.round(i.height+i.top))]}},Ac="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",cc="Hidden Text",lc=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),r.src=Ac,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(cc)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(cc)),n.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:a,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return void 0===this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),uc=function(){function e(e,t){this.context=e,this.options=t}return e}(),dc=1e4,hc=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new lc(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return t(n,e),n.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},n.prototype.applyEffect=function(e){this.ctx.save(),DA(e)&&(this.ctx.globalAlpha=e.opacity),PA(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)),OA(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},n.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},n.prototype.renderStack=function(e){return r(this,void 0,void 0,(function(){return i(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]}}))}))},n.prototype.renderNode=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return ao(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]}}))}))},n.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):Qa(e.text).reduce((function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width}),e.bounds.left)},n.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=vc(e.fontFamily).join(", "),r=Fn(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},n.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,A,c,l,u=this;return i(this,(function(i){return n=this.createFontStyle(t),r=n[0],o=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,a),A=s.baseline,c=s.middle,l=t.paintOrder,e.textBounds.forEach((function(e){l.forEach((function(n){switch(n){case 0:u.ctx.fillStyle=rr(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,A);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(n){u.ctx.shadowColor=rr(n.color),u.ctx.shadowOffsetX=n.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=n.offsetY.number*u.options.scale,u.ctx.shadowBlur=n.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,A)})),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=rr(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+A),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+c),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=rr(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+A)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter"}}))})),[2]}))}))},n.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=$A(e),i=QA(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,(function(){var t,r,a,s,A,c,l,u,d,h,f,p,m,g,v,y,w,b;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,a=t.styles,s=0,A=t.textNodes,i.label=1;case 1:return s<A.length?(c=A[s],[4,this.renderTextNode(c,a)]):[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof Na))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,8];case 7:return i.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof za&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof Va))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,12];case 11:return i.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof rs&&t.tree?[4,new n(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:l=i.sent(),t.width&&t.height&&this.ctx.drawImage(l,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof es&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===Ja?t.checked&&(this.ctx.save(),this.path([new xA(t.bounds.left+.39363*u,t.bounds.top+.79*u),new xA(t.bounds.left+.16*u,t.bounds.top+.5549*u),new xA(t.bounds.left+.27347*u,t.bounds.top+.44071*u),new xA(t.bounds.left+.39694*u,t.bounds.top+.5649*u),new xA(t.bounds.left+.72983*u,t.bounds.top+.23*u),new xA(t.bounds.left+.84*u,t.bounds.top+.34085*u),new xA(t.bounds.left+.39363*u,t.bounds.top+.79*u)]),this.ctx.fillStyle=rr($a),this.ctx.fill(),this.ctx.restore()):t.type===Ya&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+u/2,t.bounds.top+u/2,u/4,0,2*Math.PI,!0),this.ctx.fillStyle=rr($a),this.ctx.fill(),this.ctx.restore())),fc(t)&&t.value.length){switch(d=this.createFontStyle(a),w=d[0],h=d[1],f=this.fontMetrics.getMetrics(w,h).baseline,this.ctx.font=w,this.ctx.fillStyle=rr(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=mc(t.styles.textAlign),b=$A(t),p=0,t.styles.textAlign){case 1:p+=b.width/2;break;case 2:p+=b.width}m=b.add(p,0,0,-b.height/2+1),this.ctx.save(),this.path([new xA(b.left,b.top),new xA(b.left+b.width,b.top),new xA(b.left+b.width,b.top+b.height),new xA(b.left,b.top+b.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ma(t.value,m),a.letterSpacing,f),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ao(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(g=t.styles.listStyleImage).type)return[3,18];v=void 0,y=g.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return v=i.sent(),this.ctx.drawImage(v,t.bounds.left-(v.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(w=this.createFontStyle(a)[0],this.ctx.font=w,this.ctx.fillStyle=rr(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",b=new o(t.bounds.left,t.bounds.top+Gn(t.styles.paddingTop,t.bounds.width),t.bounds.width,_i(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ma(e.listValue,b),a.letterSpacing,_i(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}}))}))},n.prototype.renderStackContent=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,A,c,l,u,d,h,f,p,m;return i(this,(function(i){switch(i.label){case 0:return ao(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(m=n[t],[4,this.renderStack(m)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),r=0,o=e.nonInlineLevel,i.label=7;case 7:return r<o.length?(m=o[r],[4,this.renderNode(m)]):[3,10];case 8:i.sent(),i.label=9;case 9:return r++,[3,7];case 10:a=0,s=e.nonPositionedFloats,i.label=11;case 11:return a<s.length?(m=s[a],[4,this.renderStack(m)]):[3,14];case 12:i.sent(),i.label=13;case 13:return a++,[3,11];case 14:A=0,c=e.nonPositionedInlineLevel,i.label=15;case 15:return A<c.length?(m=c[A],[4,this.renderStack(m)]):[3,18];case 16:i.sent(),i.label=17;case 17:return A++,[3,15];case 18:l=0,u=e.inlineLevel,i.label=19;case 19:return l<u.length?(m=u[l],[4,this.renderNode(m)]):[3,22];case 20:i.sent(),i.label=21;case 21:return l++,[3,19];case 22:d=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return d<h.length?(m=h[d],[4,this.renderStack(m)]):[3,26];case 24:i.sent(),i.label=25;case 25:return d++,[3,23];case 26:f=0,p=e.positiveZIndex,i.label=27;case 27:return f<p.length?(m=p[f],[4,this.renderStack(m)]):[3,30];case 28:i.sent(),i.label=29;case 29:return f++,[3,27];case 30:return[2]}}))}))},n.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()},n.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},n.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=EA(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),EA(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},n.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},n.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,n),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),i},n.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s;return i(this,(function(A){switch(A.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var o,a,s,A,c,l,u,d,h,f,p,m,g,v,y,w,b,B,_,x,C,S,E,M,U,F,T,Q,L,I,k;return i(this,(function(i){switch(i.label){case 0:if(0!==n.type)return[3,5];o=void 0,a=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return o=i.sent(),[3,4];case 3:return i.sent(),r.context.logger.error("Error loading background-image "+a),[3,4];case 4:return o&&(s=nc(e,t,[o.width,o.height,o.width/o.height]),w=s[0],S=s[1],E=s[2],_=s[3],x=s[4],v=r.ctx.createPattern(r.resizeImage(o,_,x),"repeat"),r.renderRepeat(w,v,S,E)),[3,6];case 5:Ir(n)?(A=nc(e,t,[null,null,null]),w=A[0],S=A[1],E=A[2],_=A[3],x=A[4],c=gr(n.angle,_,x),l=c[0],u=c[1],d=c[2],h=c[3],f=c[4],(p=document.createElement("canvas")).width=_,p.height=x,m=p.getContext("2d"),g=m.createLinearGradient(u,h,d,f),pr(n.stops,l).forEach((function(e){return g.addColorStop(e.stop,rr(e.color))})),m.fillStyle=g,m.fillRect(0,0,_,x),_>0&&x>0&&(v=r.ctx.createPattern(p,"repeat"),r.renderRepeat(w,v,S,E))):kr(n)&&(y=nc(e,t,[null,null,null]),w=y[0],b=y[1],B=y[2],_=y[3],x=y[4],C=0===n.position.length?[Vn]:n.position,S=Gn(C[0],_),E=Gn(C[C.length-1],x),M=wr(n,S,E,_,x),U=M[0],F=M[1],U>0&&F>0&&(T=r.ctx.createRadialGradient(b+S,B+E,0,b+S,B+E,U),pr(n.stops,2*U).forEach((function(e){return T.addColorStop(e.stop,rr(e.color))})),r.path(w),r.ctx.fillStyle=T,U!==F?(Q=e.bounds.left+.5*e.bounds.width,L=e.bounds.top+.5*e.bounds.height,k=1/(I=F/U),r.ctx.save(),r.ctx.translate(Q,L),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-Q,-L),r.ctx.fillRect(b,k*(B-L)+L,_,x*k),r.ctx.restore()):r.ctx.fill())),i.label=6;case 6:return t--,[2]}}))},r=this,o=0,a=e.styles.backgroundImage.slice(0).reverse(),A.label=1;case 1:return o<a.length?(s=a[o],[5,n(s)]):[3,4];case 2:A.sent(),A.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))},n.prototype.renderSolidBorder=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){return this.path(GA(n,t)),this.ctx.fillStyle=rr(e),this.ctx.fill(),[2]}))}))},n.prototype.renderDoubleBorder=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,o)]:[3,2];case 1:return i.sent(),[2];case 2:return r=WA(o,n),this.path(r),this.ctx.fillStyle=rr(e),this.ctx.fill(),a=qA(o,n),this.path(a),this.ctx.fill(),[2]}}))}))},n.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,A,c,l=this;return i(this,(function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!nr(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}],o=pc(ac(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),nr(t.backgroundColor)||(this.ctx.fillStyle=rr(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){l.ctx.save();var n=FA(e.curves),r=t.inset?0:dc,i=RA(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(l.path(n),l.ctx.clip(),l.mask(i)):(l.mask(n),l.ctx.clip(),l.path(i)),l.ctx.shadowOffsetX=t.offsetX.number+r,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=rr(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?rr(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()})),i.label=2;case 2:a=0,s=0,A=r,i.label=3;case 3:return s<A.length?0!==(c=A[s]).style&&!nr(c.color)&&c.width>0?2!==c.style?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,11]:[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==c.style?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==c.style?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:i.sent(),i.label=11;case 11:a++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,A,c,l,u,d,h,f,p,m,g,v,y,w,b;return i(this,(function(i){return this.ctx.save(),r=XA(o,n),s=GA(o,n),2===a&&(this.path(s),this.ctx.clip()),EA(s[0])?(A=s[0].start.x,c=s[0].start.y):(A=s[0].x,c=s[0].y),EA(s[1])?(l=s[1].end.x,u=s[1].end.y):(l=s[1].x,u=s[1].y),d=0===n||2===n?Math.abs(A-l):Math.abs(c-u),this.ctx.beginPath(),3===a?this.formatPath(r):this.formatPath(s.slice(0,2)),h=t<3?3*t:2*t,f=t<3?2*t:t,3===a&&(h=t,f=t),p=!0,d<=2*h?p=!1:d<=2*h+f?(h*=m=d/(2*h+f),f*=m):(g=Math.floor((d+f)/(h+f)),v=(d-g*h)/(g-1),f=(y=(d-(g+1)*h)/g)<=0||Math.abs(f-v)<Math.abs(f-y)?v:y),p&&(3===a?this.ctx.setLineDash([0,h+f]):this.ctx.setLineDash([h,f])),3===a?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=rr(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===a&&(EA(s[0])&&(w=s[3],b=s[0],this.ctx.beginPath(),this.formatPath([new xA(w.end.x,w.end.y),new xA(b.start.x,b.start.y)]),this.ctx.stroke()),EA(s[1])&&(w=s[1],b=s[2],this.ctx.beginPath(),this.formatPath([new xA(w.end.x,w.end.y),new xA(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=rr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=KA(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}}))}))},n}(uc),fc=function(e){return e instanceof ns||e instanceof ts||e instanceof es&&e.type!==Ya&&e.type!==Ja},pc=function(e,t){switch(e){case 0:return FA(t);case 2:return TA(t);default:return QA(t)}},mc=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},gc=["-apple-system","system-ui"],vc=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===gc.indexOf(e)})):e},yc=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return t(n,e),n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=Ca(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,wc(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=rr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},n}(uc),wc=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},bc=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,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||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&&console.info},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||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||this.info.apply(this,e))},e.instances={},e}(),Bc=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new bc({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new pA(this,t)}return e.instanceCount=1,e}(),_c=function(e,t){return void 0===t&&(t={}),xc(e,t)};"undefined"!=typeof window&&fA.setContext(window);var xc=function(e,t){return r(void 0,void 0,void 0,(function(){var r,A,c,l,u,d,h,f,p,m,g,v,y,w,b,B,_,x,C,S,E,M,U,F,T,Q,L,I,k,P,O,D,H,R,N,z,V,j;return i(this,(function(i){switch(i.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(A=r.defaultView))throw new Error("Document is not attached to a Window");return c={allowTaint:null!==(M=t.allowTaint)&&void 0!==M&&M,imageTimeout:null!==(U=t.imageTimeout)&&void 0!==U?U:15e3,proxy:t.proxy,useCORS:null!==(F=t.useCORS)&&void 0!==F&&F},l=n({logging:null===(T=t.logging)||void 0===T||T,cache:t.cache},c),u={windowWidth:null!==(Q=t.windowWidth)&&void 0!==Q?Q:A.innerWidth,windowHeight:null!==(L=t.windowHeight)&&void 0!==L?L:A.innerHeight,scrollX:null!==(I=t.scrollX)&&void 0!==I?I:A.pageXOffset,scrollY:null!==(k=t.scrollY)&&void 0!==k?k:A.pageYOffset},d=new o(u.scrollX,u.scrollY,u.windowWidth,u.windowHeight),h=new Bc(l,d),f=null!==(P=t.foreignObjectRendering)&&void 0!==P&&P,p={allowTaint:null!==(O=t.allowTaint)&&void 0!==O&&O,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:f,copyStyles:f},h.logger.debug("Starting document clone with size "+d.width+"x"+d.height+" scrolled to "+-d.left+","+-d.top),m=new Js(h,e,p),(g=m.clonedReferenceElement)?[4,m.toIFrame(r,d)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return v=i.sent(),y=ys(g)||gs(g)?s(g.ownerDocument):a(h,g),w=y.width,b=y.height,B=y.left,_=y.top,x=Cc(h,g,t.backgroundColor),C={canvas:t.canvas,backgroundColor:x,scale:null!==(H=null!==(D=t.scale)&&void 0!==D?D:A.devicePixelRatio)&&void 0!==H?H:1,x:(null!==(R=t.x)&&void 0!==R?R:0)+B,y:(null!==(N=t.y)&&void 0!==N?N:0)+_,width:null!==(z=t.width)&&void 0!==z?z:Math.ceil(w),height:null!==(V=t.height)&&void 0!==V?V:Math.ceil(b)},f?(h.logger.debug("Document cloned, using foreign object rendering"),[4,new yc(h,C).render(g)]):[3,3];case 2:return S=i.sent(),[3,5];case 3:return h.logger.debug("Document cloned, element located at "+B+","+_+" with size "+w+"x"+b+" using computed rendering"),h.logger.debug("Starting DOM parsing"),E=ss(h,g),x===E.styles.backgroundColor&&(E.styles.backgroundColor=ur.TRANSPARENT),h.logger.debug("Starting renderer for element at "+C.x+","+C.y+" with size "+C.width+"x"+C.height),[4,new hc(h,C).render(E)];case 4:S=i.sent(),i.label=5;case 5:return(null===(j=t.removeContainer)||void 0===j||j)&&(Js.destroy(v)||h.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),h.logger.debug("Finished rendering"),[2,S]}}))}))},Cc=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?lr(e,getComputedStyle(r.documentElement).backgroundColor):ur.TRANSPARENT,o=r.body?lr(e,getComputedStyle(r.body).backgroundColor):ur.TRANSPARENT,a="string"==typeof n?lr(e,n):null===n?ur.TRANSPARENT:4294967295;return t===r.documentElement?nr(i)?nr(o)?a:o:i:a};return _c}()},"../../node_modules/lodash.debounce/index.js":function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,A="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,l=A||c||Function("return this")(),u=Object.prototype.toString,d=Math.max,h=Math.min,f=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,A,c=0,l=!1,u=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function y(e){return c=e,s=setTimeout(b,t),l?v(e):a}function w(e){var n=e-A;return void 0===A||n>=t||n<0||u&&e-c>=o}function b(){var e=f();if(w(e))return B(e);s=setTimeout(b,function(e){var n=t-(e-A);return u?h(n,o-(e-c)):n}(e))}function B(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function _(){var e=f(),n=w(e);if(r=arguments,i=this,A=e,n){if(void 0===s)return y(A);if(u)return s=setTimeout(b,t),v(A)}return void 0===s&&(s=setTimeout(b,t)),a}return t=m(t)||0,p(n)&&(l=!!n.leading,o=(u="maxWait"in n)?d(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=A=i=s=void 0},_.flush=function(){return void 0===s?a:B(f())},_}},"../../node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var r=n("../../node_modules/prop-types/lib/ReactPropTypesSecret.js");function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},"../../node_modules/prop-types/index.js":function(e,t,n){e.exports=n("../../node_modules/prop-types/factoryWithThrowingShims.js")()},"../../node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"../../node_modules/query-string/index.js":function(e,t,n){"use strict";const r=n("../../node_modules/strict-uri-encode/index.js"),i=n("../../node_modules/decode-uri-component/index.js"),o=n("../../node_modules/split-on-first/index.js"),a=n("../../node_modules/filter-obj/index.js"),s=Symbol("encodeFragmentIdentifier");function A(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function l(e,t){return t.decode?i(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){A((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&l(n,e).includes(e.arrayFormatSeparator);n=o?l(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===n?n:l(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?l(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>l(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:l(a,t),n(l(e,t),a,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=f(n[e],t);else r[e]=f(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}t.extract=h,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";A((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[",i,"]"].join("")]:[...n,[c(t,e),"[",c(i,e),"]=",c(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[]"].join("")]:[...n,[c(t,e),"[]=",c(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),":list="].join("")]:[...n,[c(t,e),":list=",c(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[c(n,e),t,c(i,e)].join("")]:[[r,c(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,c(t,e)]:[...n,[c(t,e),"=",c(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?c(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?c(n,t)+"[]":i.reduce(r(n),[]).join("&"):c(n,t)+"="+c(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);const r=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let A=t.stringify(a,n);A&&(A=`?${A}`);let l=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(l=`#${n[s]?c(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${A}${l}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);const{url:i,query:o,fragmentIdentifier:A}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:a(o,n),fragmentIdentifier:A},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},"../../node_modules/react-dom/cjs/react-dom.production.min.js":function(e,t,n){"use strict";var r=n("../../node_modules/react/index.js"),i=n("../../node_modules/scheduler/index.js");function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function A(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var l=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},f={};function p(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new p(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new p(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new p(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new p(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new p(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new p(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!u.call(f,e)||!u.call(h,e)&&(d.test(e)?f[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,v);m[t]=new p(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,v);m[t]=new p(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,v);m[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),B=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),Q=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var I=Symbol.iterator;function k(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=I&&e[I]||e["@@iterator"])?e:null}var P,O=Object.assign;function D(e){if(void 0===P)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return"\n"+P+e}var H=!1;function R(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var A="\n"+i[a].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),A}}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function N(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function z(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case B:return"Portal";case C:return"Profiler";case x:return"StrictMode";case U:return"Suspense";case F:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return z(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function j(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function J(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=j(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Z(e,t){Y(e,t);var n=j(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,j(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+j(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:j(n)}}function oe(e,t){var n=j(t.value),r=j(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ae(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,le,ue=(le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return le(e,t)}))}:le);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function pe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=pe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ge=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Be=null,_e=null,xe=null;function Ce(e){if(e=mi(e)){if("function"!=typeof Be)throw Error(o(280));var t=e.stateNode;t&&(t=vi(t),Be(e.stateNode,e.type,t))}}function Se(e){_e?xe?xe.push(e):xe=[e]:_e=e}function Ee(){if(_e){var e=_e,t=xe;if(xe=_e=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Me(e,t){return e(t)}function Ue(){}var Fe=!1;function Te(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return Me(e,t,n)}finally{Fe=!1,(null!==_e||null!==xe)&&(Ue(),Ee())}}function Qe(e,t){var n=e.stateNode;if(null===n)return null;var r=vi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Le=!1;if(l)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch(le){Le=!1}function ke(e,t,n,r,i,o,a,s,A){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Pe=!1,Oe=null,De=!1,He=null,Re={onError:function(e){Pe=!0,Oe=e}};function Ne(e,t,n,r,i,o,a,s,A){Pe=!1,Oe=null,ke.apply(Re,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function je(e){if(ze(e)!==e)throw Error(o(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return je(i),e;if(a===r)return je(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,A=i.child;A;){if(A===n){s=!0,n=i,r=a;break}if(A===r){s=!0,r=i,n=a;break}A=A.sibling}if(!s){for(A=a.child;A;){if(A===n){s=!0,n=a,r=i;break}if(A===r){s=!0,r=a,n=i;break}A=A.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var We=i.unstable_scheduleCallback,qe=i.unstable_cancelCallback,Xe=i.unstable_shouldYield,Je=i.unstable_requestPaint,Ye=i.unstable_now,Ze=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/At|0)|0},st=Math.log,At=Math.LN2;var ct=64,lt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ut(s):0!==(o&=a)&&(r=ut(o))}else 0!==(a=n&~i)?r=ut(a):0!==o&&(r=ut(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function yt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var wt,bt,Bt,_t,xt,Ct=!1,St=[],Et=null,Mt=null,Ut=null,Ft=new Map,Tt=new Map,Qt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Ut=null;break;case"pointerover":case"pointerout":Ft.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tt.delete(t.pointerId)}}function kt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=mi(t))&&bt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Pt(e){var t=pi(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void xt(e.priority,(function(){Bt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ot(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=mi(n))&&bt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Dt(e,t,n){Ot(e)&&n.delete(t)}function Ht(){Ct=!1,null!==Et&&Ot(Et)&&(Et=null),null!==Mt&&Ot(Mt)&&(Mt=null),null!==Ut&&Ot(Ut)&&(Ut=null),Ft.forEach(Dt),Tt.forEach(Dt)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ht)))}function Nt(e){function t(t){return Rt(t,e)}if(0<St.length){Rt(St[0],e);for(var n=1;n<St.length;n++){var r=St[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Et&&Rt(Et,e),null!==Mt&&Rt(Mt,e),null!==Ut&&Rt(Ut,e),Ft.forEach(t),Tt.forEach(t),n=0;n<Qt.length;n++)(r=Qt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Qt.length&&null===(n=Qt[0]).blockedOn;)Pt(n),null===n.blockedOn&&Qt.shift()}var zt=w.ReactCurrentBatchConfig;function Vt(e,t,n,r){var i=vt,o=zt.transition;zt.transition=null;try{vt=1,Kt(e,t,n,r)}finally{vt=i,zt.transition=o}}function jt(e,t,n,r){var i=vt,o=zt.transition;zt.transition=null;try{vt=4,Kt(e,t,n,r)}finally{vt=i,zt.transition=o}}function Kt(e,t,n,r){var i=Wt(e,t,n,r);if(null===i)zr(e,t,r,Gt,n),It(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Et=kt(Et,e,t,n,r,i),!0;case"dragenter":return Mt=kt(Mt,e,t,n,r,i),!0;case"mouseover":return Ut=kt(Ut,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ft.set(o,kt(Ft.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Tt.set(o,kt(Tt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var o=mi(i);if(null!==o&&wt(o),null===(o=Wt(e,t,n,r))&&zr(e,t,r,Gt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else zr(e,t,r,null,n)}var Gt=null;function Wt(e,t,n,r){if(Gt=null,null!==(e=pi(e=be(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case $e:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Jt=null,Yt=null;function Zt(){if(Yt)return Yt;var e,t,n=Jt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Yt=i.slice(e,1<t?1-t:void 0)}function $t(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function en(){return!0}function tn(){return!1}function nn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?en:tn,this.isPropagationStopped=tn,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=en)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=en)},persist:function(){},isPersistent:en}),t}var rn,on,an,sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=nn(sn),cn=O({},sn,{view:0,detail:0}),ln=nn(cn),un=O({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==an&&(an&&"mousemove"===e.type?(rn=e.screenX-an.screenX,on=e.screenY-an.screenY):on=rn=0,an=e),rn)},movementY:function(e){return"movementY"in e?e.movementY:on}}),dn=nn(un),hn=nn(O({},un,{dataTransfer:0})),fn=nn(O({},cn,{relatedTarget:0})),pn=nn(O({},sn,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=O({},sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gn=nn(mn),vn=nn(O({},sn,{data:0})),yn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function _n(){return Bn}var xn=O({},cn,{key:function(e){if(e.key){var t=yn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=$t(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?$t(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?$t(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Cn=nn(xn),Sn=nn(O({},un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),En=nn(O({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Mn=nn(O({},sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=O({},un,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Fn=nn(Un),Tn=[9,13,27,32],Qn=l&&"CompositionEvent"in window,Ln=null;l&&"documentMode"in document&&(Ln=document.documentMode);var In=l&&"TextEvent"in window&&!Ln,kn=l&&(!Qn||Ln&&8<Ln&&11>=Ln),Pn=String.fromCharCode(32),On=!1;function Dn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Rn=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function Vn(e,t,n,r){Se(r),0<(t=jr(t,"onChange")).length&&(n=new An("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jn=null,Kn=null;function Gn(e){Pr(e,0)}function Wn(e){if(W(gi(e)))return e}function qn(e,t){if("change"===e)return t}var Xn=!1;if(l){var Jn;if(l){var Yn="oninput"in document;if(!Yn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Yn="function"==typeof Zn.oninput}Jn=Yn}else Jn=!1;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function $n(){jn&&(jn.detachEvent("onpropertychange",er),Kn=jn=null)}function er(e){if("value"===e.propertyName&&Wn(Kn)){var t=[];Vn(t,Kn,e,be(e)),Te(Gn,t)}}function tr(e,t,n){"focusin"===e?($n(),Kn=n,(jn=t).attachEvent("onpropertychange",er)):"focusout"===e&&$n()}function nr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Wn(Kn)}function rr(e,t){if("click"===e)return Wn(t)}function ir(e,t){if("input"===e||"change"===e)return Wn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ar(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!or(e[i],t[i]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ar(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function cr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?cr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lr(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=q((e=t.contentWindow).document)}return t}function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function dr(e){var t=lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cr(n.ownerDocument.documentElement,n)){if(null!==r&&ur(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ar(n,o);var a=Ar(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hr=l&&"documentMode"in document&&11>=document.documentMode,fr=null,pr=null,mr=null,gr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==fr||fr!==q(r)||("selectionStart"in(r=fr)&&ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&ar(mr,r)||(mr=r,0<(r=jr(pr,"onSelect")).length&&(t=new An("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}function yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionend:yr("Transition","TransitionEnd")},br={},Br={};function _r(e){if(br[e])return br[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Br)return br[e]=n[t];return e}l&&(Br=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var xr=_r("animationend"),Cr=_r("animationiteration"),Sr=_r("animationstart"),Er=_r("transitionend"),Mr=new Map,Ur="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Fr(e,t){Mr.set(e,t),A(t,[e])}for(var Tr=0;Tr<Ur.length;Tr++){var Qr=Ur[Tr];Fr(Qr.toLowerCase(),"on"+(Qr[0].toUpperCase()+Qr.slice(1)))}Fr(xr,"onAnimationEnd"),Fr(Cr,"onAnimationIteration"),Fr(Sr,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(Er,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),A("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),A("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),A("onBeforeInput",["compositionend","keypress","textInput","paste"]),A("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),A("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),A("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function kr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,A,c){if(Ne.apply(this,arguments),Pe){if(!Pe)throw Error(o(198));var l=Oe;Pe=!1,Oe=null,De||(De=!0,He=l)}}(r,t,void 0,e),e.currentTarget=null}function Pr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],A=s.instance,c=s.currentTarget;if(s=s.listener,A!==o&&i.isPropagationStopped())break e;kr(i,s,c),o=A}else for(a=0;a<r.length;a++){if(A=(s=r[a]).instance,c=s.currentTarget,s=s.listener,A!==o&&i.isPropagationStopped())break e;kr(i,s,c),o=A}}}if(De)throw e=He,De=!1,He=null,e}function Or(e,t){var n=t[di];void 0===n&&(n=t[di]=new Set);var r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}function Dr(e,t,n){var r=0;t&&(r|=4),Nr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){if(!e[Hr]){e[Hr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Dr(t,!1,e),Dr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Dr("selectionchange",!1,t))}}function Nr(e,t,n,r){switch(qt(t)){case 1:var i=Vt;break;case 4:i=jt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function zr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var A=a.tag;if((3===A||4===A)&&((A=a.stateNode.containerInfo)===i||8===A.nodeType&&A.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=pi(s)))return;if(5===(A=a.tag)||6===A){r=o=a;continue e}s=s.parentNode}}r=r.return}Te((function(){var r=o,i=be(n),a=[];e:{var s=Mr.get(e);if(void 0!==s){var A=An,c=e;switch(e){case"keypress":if(0===$t(n))break e;case"keydown":case"keyup":A=Cn;break;case"focusin":c="focus",A=fn;break;case"focusout":c="blur",A=fn;break;case"beforeblur":case"afterblur":A=fn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":A=dn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":A=hn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":A=En;break;case xr:case Cr:case Sr:A=pn;break;case Er:A=Mn;break;case"scroll":A=ln;break;case"wheel":A=Fn;break;case"copy":case"cut":case"paste":A=gn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":A=Sn}var l=0!=(4&t),u=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var h,f=r;null!==f;){var p=(h=f).stateNode;if(5===h.tag&&null!==p&&(h=p,null!==d&&(null!=(p=Qe(f,d))&&l.push(Vr(f,p,h)))),u)break;f=f.return}0<l.length&&(s=new A(s,c,null,n,i),a.push({event:s,listeners:l}))}}if(0==(7&t)){if(A="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!pi(c)&&!c[ui])&&(A||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,A?(A=r,null!==(c=(c=n.relatedTarget||n.toElement)?pi(c):null)&&(c!==(u=ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(A=null,c=r),A!==c)){if(l=dn,p="onMouseLeave",d="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(l=Sn,p="onPointerLeave",d="onPointerEnter",f="pointer"),u=null==A?s:gi(A),h=null==c?s:gi(c),(s=new l(p,f+"leave",A,n,i)).target=u,s.relatedTarget=h,p=null,pi(i)===r&&((l=new l(d,f+"enter",c,n,i)).target=h,l.relatedTarget=u,p=l),u=p,A&&c)e:{for(d=c,f=0,h=l=A;h;h=Kr(h))f++;for(h=0,p=d;p;p=Kr(p))h++;for(;0<f-h;)l=Kr(l),f--;for(;0<h-f;)d=Kr(d),h--;for(;f--;){if(l===d||null!==d&&l===d.alternate)break e;l=Kr(l),d=Kr(d)}l=null}else l=null;null!==A&&Gr(a,s,A,l,!1),null!==c&&null!==u&&Gr(a,u,c,l,!0)}if("select"===(A=(s=r?gi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===A&&"file"===s.type)var m=qn;else if(zn(s))if(Xn)m=ir;else{m=nr;var g=tr}else(A=s.nodeName)&&"input"===A.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=rr);switch(m&&(m=m(e,r))?Vn(a,m,n,i):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?gi(r):window,e){case"focusin":(zn(g)||"true"===g.contentEditable)&&(fr=g,pr=r,mr=null);break;case"focusout":mr=pr=fr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(a,n,i);break;case"selectionchange":if(hr)break;case"keydown":case"keyup":vr(a,n,i)}var v;if(Qn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Rn?Dn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(kn&&"ko"!==n.locale&&(Rn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Rn&&(v=Zt()):(Jt="value"in(Xt=i)?Xt.value:Xt.textContent,Rn=!0)),0<(g=jr(r,y)).length&&(y=new vn(y,e,null,n,i),a.push({event:y,listeners:g}),v?y.data=v:null!==(v=Hn(n))&&(y.data=v))),(v=In?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(On=!0,Pn);case"textInput":return(e=t.data)===Pn&&On?null:e;default:return null}}(e,n):function(e,t){if(Rn)return"compositionend"===e||!Qn&&Dn(e,t)?(e=Zt(),Yt=Jt=Xt=null,Rn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=jr(r,"onBeforeInput")).length&&(i=new vn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Pr(a,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Qe(e,n))&&r.unshift(Vr(e,o,i)),null!=(o=Qe(e,t))&&r.push(Vr(e,o,i))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,A=s.alternate,c=s.stateNode;if(null!==A&&A===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(A=Qe(n,o))&&a.unshift(Vr(n,A,s)):i||null!=(A=Qe(n,o))&&a.push(Vr(n,A,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Wr=/\r\n?/g,qr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Wr,"\n").replace(qr,"")}function Jr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(o(425))}function Yr(){}var Zr=null;function $r(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ti="function"==typeof clearTimeout?clearTimeout:void 0,ni="function"==typeof Promise?Promise:void 0,ri="function"==typeof queueMicrotask?queueMicrotask:void 0!==ni?function(e){return ni.resolve(null).then(e).catch(ii)}:ei;function ii(e){setTimeout((function(){throw e}))}function oi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Nt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Nt(t)}function ai(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function si(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),ci="__reactFiber$"+Ai,li="__reactProps$"+Ai,ui="__reactContainer$"+Ai,di="__reactEvents$"+Ai,hi="__reactListeners$"+Ai,fi="__reactHandles$"+Ai;function pi(e){var t=e[ci];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ui]||n[ci]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=si(e);null!==e;){if(n=e[ci])return n;e=si(e)}return t}n=(e=n).parentNode}return null}function mi(e){return!(e=e[ci]||e[ui])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function gi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function vi(e){return e[li]||null}var yi=[],wi=-1;function bi(e){return{current:e}}function Bi(e){0>wi||(e.current=yi[wi],yi[wi]=null,wi--)}function _i(e,t){wi++,yi[wi]=e.current,e.current=t}var xi={},Ci=bi(xi),Si=bi(!1),Ei=xi;function Mi(e,t){var n=e.type.contextTypes;if(!n)return xi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ui(e){return null!=(e=e.childContextTypes)}function Fi(){Bi(Si),Bi(Ci)}function Ti(e,t,n){if(Ci.current!==xi)throw Error(o(168));_i(Ci,t),_i(Si,n)}function Qi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,V(e)||"Unknown",i));return O({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xi,Ei=Ci.current,_i(Ci,e),_i(Si,Si.current),!0}function Ii(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Qi(e,t,Ei),r.__reactInternalMemoizedMergedChildContext=e,Bi(Si),Bi(Ci),_i(Ci,e)):Bi(Si),_i(Si,n)}var ki=null,Pi=!1,Oi=!1;function Di(e){null===ki?ki=[e]:ki.push(e)}function Hi(){if(!Oi&&null!==ki){Oi=!0;var e=0,t=vt;try{var n=ki;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ki=null,Pi=!1}catch(t){throw null!==ki&&(ki=ki.slice(e+1)),We($e,Hi),t}finally{vt=t,Oi=!1}}return null}var Ri=w.ReactCurrentBatchConfig;function Ni(e,t){if(e&&e.defaultProps){for(var n in t=O({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var zi=bi(null),Vi=null,ji=null,Ki=null;function Gi(){Ki=ji=Vi=null}function Wi(e){var t=zi.current;Bi(zi),e._currentValue=t}function qi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Xi(e,t){Vi=e,Ki=ji=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ms=!0),e.firstContext=null)}function Ji(e){var t=e._currentValue;if(Ki!==e)if(e={context:e,memoizedValue:t,next:null},null===ji){if(null===Vi)throw Error(o(308));ji=e,Vi.dependencies={lanes:0,firstContext:e}}else ji=ji.next=e;return t}var Yi=null,Zi=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function eo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function to(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function no(e,t){var n=e.updateQueue;null!==n&&(n=n.shared,null!==gA&&0!=(1&e.mode)&&0==(2&mA)?(null===(e=n.interleaved)?(t.next=t,null===Yi?Yi=[n]:Yi.push(n)):(t.next=e.next,e.next=t),n.interleaved=t):(null===(e=n.pending)?t.next=t:(t.next=e.next,e.next=t),n.pending=t))}function ro(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}function io(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function oo(e,t,n,r){var i=e.updateQueue;Zi=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var A=s,c=A.next;A.next=null,null===a?o=c:a.next=c,a=A;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==a&&(null===s?l.firstBaseUpdate=c:s.next=c,l.lastBaseUpdate=A))}if(null!==o){var u=i.baseState;for(a=0,l=c=A=null,s=o;;){var d=s.lane,h=s.eventTime;if((r&d)===d){null!==l&&(l=l.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,p=s;switch(d=t,h=n,p.tag){case 1:if("function"==typeof(f=p.payload)){u=f.call(h,u,d);break e}u=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(d="function"==typeof(f=p.payload)?f.call(h,u,d):f))break e;u=O({},u,d);break e;case 2:Zi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(c=l=h,A=u):l=l.next=h,a|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(d=s).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===l&&(A=u),i.baseState=A,i.firstBaseUpdate=c,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);xA|=a,e.lanes=a,e.memoizedState=u}}function ao(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var so=(new r.Component).refs;function Ao(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:O({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var co={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=NA(),i=zA(e),o=to(r,i);o.payload=t,null!=n&&(o.callback=n),no(e,o),null!==(t=VA(e,i,r))&&ro(t,e,i)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=NA(),i=zA(e),o=to(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),no(e,o),null!==(t=VA(e,i,r))&&ro(t,e,i)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=NA(),r=zA(e),i=to(n,r);i.tag=2,null!=t&&(i.callback=t),no(e,i),null!==(t=VA(e,r,n))&&ro(t,e,r)}};function lo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ar(n,r)||!ar(i,o))}function uo(e,t,n){var r=!1,i=xi,o=t.contextType;return"object"==typeof o&&null!==o?o=Ji(o):(i=Ui(t)?Ei:Ci.current,o=(r=null!=(r=t.contextTypes))?Mi(e,i):xi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=co,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ho(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&co.enqueueReplaceState(t,t.state,null)}function fo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=so,$i(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Ji(o):(o=Ui(t)?Ei:Ci.current,i.context=Mi(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Ao(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&co.enqueueReplaceState(i,i.state,null),oo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}var po=[],mo=0,go=null,vo=0,yo=[],wo=0,bo=null,Bo=1,_o="";function xo(e,t){po[mo++]=vo,po[mo++]=go,go=e,vo=t}function Co(e,t,n){yo[wo++]=Bo,yo[wo++]=_o,yo[wo++]=bo,bo=e;var r=Bo;e=_o;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Bo=1<<32-at(t)+i|n<<i|r,_o=o+e}else Bo=1<<o|n<<i|r,_o=e}function So(e){null!==e.return&&(xo(e,1),Co(e,1,0))}function Eo(e){for(;e===go;)go=po[--mo],po[mo]=null,vo=po[--mo],po[mo]=null;for(;e===bo;)bo=yo[--wo],yo[wo]=null,_o=yo[--wo],yo[wo]=null,Bo=yo[--wo],yo[wo]=null}var Mo=null,Uo=null,Fo=!1,To=null;function Qo(e,t){var n=yc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Lo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Mo=e,Uo=ai(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Mo=e,Uo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==bo?{id:Bo,overflow:_o}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=yc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Mo=e,Uo=null,!0);default:return!1}}function Io(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ko(e){if(Fo){var t=Uo;if(t){var n=t;if(!Lo(e,t)){if(Io(e))throw Error(o(418));t=ai(n.nextSibling);var r=Mo;t&&Lo(e,t)?Qo(r,n):(e.flags=-4097&e.flags|2,Fo=!1,Mo=e)}}else{if(Io(e))throw Error(o(418));e.flags=-4097&e.flags|2,Fo=!1,Mo=e}}}function Po(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Mo=e}function Oo(e){if(e!==Mo)return!1;if(!Fo)return Po(e),Fo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!$r(e.type,e.memoizedProps)),t&&(t=Uo)){if(Io(e)){for(e=Uo;e;)e=ai(e.nextSibling);throw Error(o(418))}for(;t;)Qo(e,t),t=ai(t.nextSibling)}if(Po(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Uo=ai(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Uo=null}}else Uo=Mo?ai(e.stateNode.nextSibling):null;return!0}function Do(){Uo=Mo=null,Fo=!1}function Ho(e){null===To?To=[e]:To.push(e)}function Ro(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===so&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function No(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zo(e){return(0,e._init)(e._payload)}function Vo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=bc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function A(e,t,n,r){return null===t||6!==t.tag?((t=Cc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===_?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Q&&zo(o)===t.type)?((r=i(t,n.props)).ref=Ro(e,t,n),r.return=e,r):((r=Bc(n.type,n.key,n.props,null,e.mode,r)).ref=Ro(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Sc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=_c(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Cc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(n=Bc(t.type,t.key,t.props,null,e.mode,n)).ref=Ro(e,null,t),n.return=e,n;case B:return(t=Sc(t,e.mode,n)).return=e,t;case Q:return d(e,(0,t._init)(t._payload),n)}if(te(t)||k(t))return(t=_c(t,e.mode,n,null)).return=e,t;No(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:A(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===i?c(e,t,n,r):null;case B:return n.key===i?l(e,t,n,r):null;case Q:return h(e,t,(i=n._init)(n._payload),r)}if(te(n)||k(n))return null!==i?null:u(e,t,n,r,null);No(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return A(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case B:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Q:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||k(r))return u(t,e=e.get(n)||null,r,i,null);No(t,r)}return null}function p(i,o,s,A){for(var c=null,l=null,u=o,p=o=0,m=null;null!==u&&p<s.length;p++){u.index>p?(m=u,u=null):m=u.sibling;var g=h(i,u,s[p],A);if(null===g){null===u&&(u=m);break}e&&u&&null===g.alternate&&t(i,u),o=a(g,o,p),null===l?c=g:l.sibling=g,l=g,u=m}if(p===s.length)return n(i,u),Fo&&xo(i,p),c;if(null===u){for(;p<s.length;p++)null!==(u=d(i,s[p],A))&&(o=a(u,o,p),null===l?c=u:l.sibling=u,l=u);return Fo&&xo(i,p),c}for(u=r(i,u);p<s.length;p++)null!==(m=f(u,i,p,s[p],A))&&(e&&null!==m.alternate&&u.delete(null===m.key?p:m.key),o=a(m,o,p),null===l?c=m:l.sibling=m,l=m);return e&&u.forEach((function(e){return t(i,e)})),Fo&&xo(i,p),c}function m(i,s,A,c){var l=k(A);if("function"!=typeof l)throw Error(o(150));if(null==(A=l.call(A)))throw Error(o(151));for(var u=l=null,p=s,m=s=0,g=null,v=A.next();null!==p&&!v.done;m++,v=A.next()){p.index>m?(g=p,p=null):g=p.sibling;var y=h(i,p,v.value,c);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),s=a(y,s,m),null===u?l=y:u.sibling=y,u=y,p=g}if(v.done)return n(i,p),Fo&&xo(i,m),l;if(null===p){for(;!v.done;m++,v=A.next())null!==(v=d(i,v.value,c))&&(s=a(v,s,m),null===u?l=v:u.sibling=v,u=v);return Fo&&xo(i,m),l}for(p=r(i,p);!v.done;m++,v=A.next())null!==(v=f(p,i,m,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?m:v.key),s=a(v,s,m),null===u?l=v:u.sibling=v,u=v);return e&&p.forEach((function(e){return t(i,e)})),Fo&&xo(i,m),l}return function e(r,o,a,A){if("object"==typeof a&&null!==a&&a.type===_&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var c=a.key,l=o;null!==l;){if(l.key===c){if((c=a.type)===_){if(7===l.tag){n(r,l.sibling),(o=i(l,a.props.children)).return=r,r=o;break e}}else if(l.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===Q&&zo(c)===l.type){n(r,l.sibling),(o=i(l,a.props)).ref=Ro(r,l,a),o.return=r,r=o;break e}n(r,l);break}t(r,l),l=l.sibling}a.type===_?((o=_c(a.props.children,r.mode,A,a.key)).return=r,r=o):((A=Bc(a.type,a.key,a.props,null,r.mode,A)).ref=Ro(r,o,a),A.return=r,r=A)}return s(r);case B:e:{for(l=a.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Sc(a,r.mode,A)).return=r,r=o}return s(r);case Q:return e(r,o,(l=a._init)(a._payload),A)}if(te(a))return p(r,o,a,A);if(k(a))return m(r,o,a,A);No(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Cc(a,r.mode,A)).return=r,r=o),s(r)):n(r,o)}}var jo=Vo(!0),Ko=Vo(!1),Go={},Wo=bi(Go),qo=bi(Go),Xo=bi(Go);function Jo(e){if(e===Go)throw Error(o(174));return e}function Yo(e,t){switch(_i(Xo,t),_i(qo,e),_i(Wo,Go),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ae(null,"");break;default:t=Ae(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Bi(Wo),_i(Wo,t)}function Zo(){Bi(Wo),Bi(qo),Bi(Xo)}function $o(e){Jo(Xo.current);var t=Jo(Wo.current),n=Ae(t,e.type);t!==n&&(_i(qo,e),_i(Wo,n))}function ea(e){qo.current===e&&(Bi(Wo),Bi(qo))}var ta=bi(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function ia(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=w.ReactCurrentDispatcher,aa=w.ReactCurrentBatchConfig,sa=0,Aa=null,ca=null,la=null,ua=!1,da=!1,ha=0,fa=0;function pa(){throw Error(o(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(sa=a,Aa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?$a:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,la=ca=null,t.updateQueue=null,oa.current=ts,e=n(r,i)}while(da)}if(oa.current=Za,t=null!==ca&&null!==ca.next,sa=0,la=ca=Aa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===la?Aa.memoizedState=la=e:la=la.next=e,la}function wa(){if(null===ca){var e=Aa.alternate;e=null!==e?e.memoizedState:null}else e=ca.next;var t=null===la?Aa.memoizedState:la.next;if(null!==t)la=t,ca=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ca=e).memoizedState,baseState:ca.baseState,baseQueue:ca.baseQueue,queue:ca.queue,next:null},null===la?Aa.memoizedState=la=e:la=la.next=e}return la}function ba(e,t){return"function"==typeof t?t(e):t}function Ba(e){var t=wa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ca,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var A=s=null,c=null,l=a;do{var u=l.lane;if((sa&u)===u)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(A=c=d,s=r):c=c.next=d,Aa.lanes|=u,xA|=u}l=l.next}while(null!==l&&l!==a);null===c?s=r:c.next=A,or(r,t.memoizedState)||(ms=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,Aa.lanes|=a,xA|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _a(e){var t=wa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);or(a,t.memoizedState)||(ms=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function xa(){}function Ca(e,t){var n=Aa,r=wa(),i=t(),a=!or(r.memoizedState,i);if(a&&(r.memoizedState=i,ms=!0),r=r.queue,Pa(Ma.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==la&&1&la.memoizedState.tag){if(n.flags|=2048,Ta(9,Ea.bind(null,n,r,i,t),void 0,null),null===gA)throw Error(o(349));0!=(30&sa)||Sa(n,t,i)}return i}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Aa.updateQueue)?(t={lastEffect:null,stores:null},Aa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ea(e,t,n,r){t.value=n,t.getSnapshot=r,Ua(t)&&VA(e,1,-1)}function Ma(e,t,n){return n((function(){Ua(t)&&VA(e,1,-1)}))}function Ua(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Fa(e){var t=ya();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=Wa.bind(null,Aa,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Aa.updateQueue)?(t={lastEffect:null,stores:null},Aa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Qa(){return wa().memoizedState}function La(e,t,n,r){var i=ya();Aa.flags|=e,i.memoizedState=Ta(1|t,n,void 0,void 0===r?null:r)}function Ia(e,t,n,r){var i=wa();r=void 0===r?null:r;var o=void 0;if(null!==ca){var a=ca.memoizedState;if(o=a.destroy,null!==r&&ma(r,a.deps))return void(i.memoizedState=Ta(t,n,o,r))}Aa.flags|=e,i.memoizedState=Ta(1|t,n,o,r)}function ka(e,t){return La(8390656,8,e,t)}function Pa(e,t){return Ia(2048,8,e,t)}function Oa(e,t){return Ia(4,2,e,t)}function Da(e,t){return Ia(4,4,e,t)}function Ha(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ra(e,t,n){return n=null!=n?n.concat([e]):null,Ia(4,4,Ha.bind(null,t,e),n)}function Na(){}function za(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Va(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ja(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{vt=n,aa.transition=r}}function Ka(){return wa().memoizedState}function Ga(e,t,n){var r=zA(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qa(e)?Xa(t,n):(Ja(e,t,n),null!==(e=VA(e,r,n=NA()))&&Ya(e,t,r))}function Wa(e,t,n){var r=zA(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qa(e))Xa(t,i);else{Ja(e,t,i);var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,or(s,a))return}catch(e){}null!==(e=VA(e,r,n=NA()))&&Ya(e,t,r)}}function qa(e){var t=e.alternate;return e===Aa||null!==t&&t===Aa}function Xa(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){null!==gA&&0!=(1&e.mode)&&0==(2&mA)?(null===(e=t.interleaved)?(n.next=n,null===Yi?Yi=[t]:Yi.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function Ya(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var Za={readContext:Ji,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},$a={readContext:Ji,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Ji,useEffect:ka,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,La(4194308,4,Ha.bind(null,t,e),n)},useLayoutEffect:function(e,t){return La(4194308,4,e,t)},useInsertionEffect:function(e,t){return La(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ga.bind(null,Aa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Fa,useDebugValue:Na,useDeferredValue:function(e){var t=Fa(e),n=t[0],r=t[1];return ka((function(){var t=aa.transition;aa.transition={};try{r(e)}finally{aa.transition=t}}),[e]),n},useTransition:function(){var e=Fa(!1),t=e[0];return e=ja.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Aa,i=ya();if(Fo){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===gA)throw Error(o(349));0!=(30&sa)||Sa(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ka(Ma.bind(null,r,a,e),[e]),r.flags|=2048,Ta(9,Ea.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=gA.identifierPrefix;if(Fo){var n=_o;t=":"+t+"R"+(n=(Bo&~(1<<32-at(Bo)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ji,useCallback:za,useContext:Ji,useEffect:Pa,useImperativeHandle:Ra,useInsertionEffect:Oa,useLayoutEffect:Da,useMemo:Va,useReducer:Ba,useRef:Qa,useState:function(){return Ba(ba)},useDebugValue:Na,useDeferredValue:function(e){var t=Ba(ba),n=t[0],r=t[1];return Pa((function(){var t=aa.transition;aa.transition={};try{r(e)}finally{aa.transition=t}}),[e]),n},useTransition:function(){return[Ba(ba)[0],wa().memoizedState]},useMutableSource:xa,useSyncExternalStore:Ca,useId:Ka,unstable_isNewReconciler:!1},ts={readContext:Ji,useCallback:za,useContext:Ji,useEffect:Pa,useImperativeHandle:Ra,useInsertionEffect:Oa,useLayoutEffect:Da,useMemo:Va,useReducer:_a,useRef:Qa,useState:function(){return _a(ba)},useDebugValue:Na,useDeferredValue:function(e){var t=_a(ba),n=t[0],r=t[1];return Pa((function(){var t=aa.transition;aa.transition={};try{r(e)}finally{aa.transition=t}}),[e]),n},useTransition:function(){return[_a(ba)[0],wa().memoizedState]},useMutableSource:xa,useSyncExternalStore:Ca,useId:Ka,unstable_isNewReconciler:!1};function ns(e,t){try{var n="",r=t;do{n+=N(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}var rs,is,os,as="function"==typeof WeakMap?WeakMap:Map;function ss(e,t,n){(n=to(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){TA||(TA=!0,QA=r)},n}function As(e,t,n){(n=to(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===LA?LA=new Set([this]):LA.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function cs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new as;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=hc.bind(null,e,t,n),t.then(e,e))}function ls(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function us(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=to(-1,1)).tag=2,no(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function ds(e,t){if(!Fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fs(e,t,n){var r=t.pendingProps;switch(Eo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hs(t),null;case 1:case 17:return Ui(t.type)&&Fi(),hs(t),null;case 3:return r=t.stateNode,Zo(),Bi(Si),Bi(Ci),ia(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Oo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==To&&(qA(To),To=null))),hs(t),null;case 5:ea(t);var i=Jo(Xo.current);if(n=t.type,null!==e&&null!=t.stateNode)is(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return hs(t),null}if(e=Jo(Wo.current),Oo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ci]=t,r[li]=a,e=0!=(1&t.mode),n){case"dialog":Or("cancel",r),Or("close",r);break;case"iframe":case"object":case"embed":Or("load",r);break;case"video":case"audio":for(i=0;i<Lr.length;i++)Or(Lr[i],r);break;case"source":Or("error",r);break;case"img":case"image":case"link":Or("error",r),Or("load",r);break;case"details":Or("toggle",r);break;case"input":J(r,a),Or("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Or("invalid",r);break;case"textarea":ie(r,a),Or("invalid",r)}for(var A in ve(n,a),i=null,a)if(a.hasOwnProperty(A)){var c=a[A];"children"===A?"string"==typeof c?r.textContent!==c&&(Jr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(Jr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(A)&&null!=c&&"onScroll"===A&&Or("scroll",r)}switch(n){case"input":G(r),$(r,a,!0);break;case"textarea":G(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Yr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{A=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=A.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=A.createElement(n,{is:r.is}):(e=A.createElement(n),"select"===n&&(A=e,r.multiple?A.multiple=!0:r.size&&(A.size=r.size))):e=A.createElementNS(e,n),e[ci]=t,e[li]=r,rs(e,t),t.stateNode=e;e:{switch(A=ye(n,r),n){case"dialog":Or("cancel",e),Or("close",e),i=r;break;case"iframe":case"object":case"embed":Or("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lr.length;i++)Or(Lr[i],e);i=r;break;case"source":Or("error",e),i=r;break;case"img":case"image":case"link":Or("error",e),Or("load",e),i=r;break;case"details":Or("toggle",e),i=r;break;case"input":J(e,r),i=X(e,r),Or("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=O({},r,{value:void 0}),Or("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Or("invalid",e)}for(a in ve(n,i),c=i)if(c.hasOwnProperty(a)){var l=c[a];"style"===a?me(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&ue(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&&de(e,l):"number"==typeof l&&de(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Or("scroll",e):null!=l&&y(e,a,l,A))}switch(n){case"input":G(e),$(e,r,!1);break;case"textarea":G(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+j(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Yr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return hs(t),null;case 6:if(e&&null!=t.stateNode)os(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Jo(Xo.current),Jo(Wo.current),Oo(t)){if(r=t.stateNode,n=t.memoizedProps,r[ci]=t,(a=r.nodeValue!==n)&&null!==(e=Mo))switch(A=0!=(1&e.mode),e.tag){case 3:Jr(r.nodeValue,n,A);break;case 5:!0!==e.memoizedProps[void 0]&&Jr(r.nodeValue,n,A)}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ci]=t,t.stateNode=r}return hs(t),null;case 13:if(Bi(ta),r=t.memoizedState,Fo&&null!==Uo&&0!=(1&t.mode)&&0==(128&t.flags)){for(r=Uo;r;)r=ai(r.nextSibling);return Do(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Oo(t),null===e){if(!r)throw Error(o(318));if(!(r=null!==(r=t.memoizedState)?r.dehydrated:null))throw Error(o(317));r[ci]=t}else Do(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return hs(t),null}return null!==To&&(qA(To),To=null),0!=(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Oo(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ta.current)?0===BA&&(BA=3):rc())),null!==t.updateQueue&&(t.flags|=4),hs(t),null);case 4:return Zo(),null===e&&Rr(t.stateNode.containerInfo),hs(t),null;case 10:return Wi(t.type._context),hs(t),null;case 19:if(Bi(ta),null===(a=t.memoizedState))return hs(t),null;if(r=0!=(128&t.flags),null===(A=a.rendering))if(r)ds(a,!1);else{if(0!==BA||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(A=na(e))){for(t.flags|=128,ds(a,!1),null!==(r=A.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(A=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=A.childLanes,a.lanes=A.lanes,a.child=A.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=A.memoizedProps,a.memoizedState=A.memoizedState,a.updateQueue=A.updateQueue,a.type=A.type,e=A.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return _i(ta,1&ta.current|2),t.child}e=e.sibling}null!==a.tail&&Ye()>FA&&(t.flags|=128,r=!0,ds(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=na(A))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ds(a,!0),null===a.tail&&"hidden"===a.tailMode&&!A.alternate&&!Fo)return hs(t),null}else 2*Ye()-a.renderingStartTime>FA&&1073741824!==n&&(t.flags|=128,r=!0,ds(a,!1),t.lanes=4194304);a.isBackwards?(A.sibling=t.child,t.child=A):(null!==(n=a.last)?n.sibling=A:t.child=A,a.last=A)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,n=ta.current,_i(ta,r?1&n|2:1&n),t):(hs(t),null);case 22:case 23:return $A(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&wA)&&(hs(t),6&t.subtreeFlags&&(t.flags|=8192)):hs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}rs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},is=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Jo(Wo.current);var o,a=null;switch(n){case"input":i=X(e,i),r=X(e,r),a=[];break;case"select":i=O({},i,{value:void 0}),r=O({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Yr)}for(l in ve(n,r),n=null,i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var A=i[l];for(o in A)A.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(A=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==A&&(null!=c||null!=A))if("style"===l)if(A){for(o in A)!A.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&A[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,A=A?A.__html:void 0,null!=c&&A!==c&&(a=a||[]).push(l,c)):"children"===l?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Or("scroll",e),a||A===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},os=function(e,t,n,r){n!==r&&(t.flags|=4)};var ps=w.ReactCurrentOwner,ms=!1;function gs(e,t,n,r){t.child=null===e?Ko(t,null,n,r):jo(t,e.child,n,r)}function vs(e,t,n,r,i){n=n.render;var o=t.ref;return Xi(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||ms?(Fo&&n&&So(t),t.flags|=1,gs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ds(e,t,i))}function ys(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||wc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Bc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ws(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ar)(a,r)&&e.ref===t.ref)return Ds(e,t,i)}return t.flags|=1,(e=bc(o,r)).ref=t.ref,e.return=t,t.child=e}function ws(e,t,n,r,i){if(null!==e&&ar(e.memoizedProps,r)&&e.ref===t.ref){if(ms=!1,0==(e.lanes&i))return t.lanes=e.lanes,Ds(e,t,i);0!=(131072&e.flags)&&(ms=!0)}return _s(e,t,n,r,i)}function bs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},_i(bA,wA),wA|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,_i(bA,wA),wA|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==o?o.baseLanes:n,_i(bA,wA),wA|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,_i(bA,wA),wA|=r;return gs(e,t,i,n),t.child}function Bs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,i){var o=Ui(n)?Ei:Ci.current;return o=Mi(t,o),Xi(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||ms?(Fo&&r&&So(t),t.flags|=1,gs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ds(e,t,i))}function xs(e,t,n,r,i){if(Ui(n)){var o=!0;Li(t)}else o=!1;if(Xi(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),uo(t,n,r),fo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var A=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ji(c):c=Mi(t,c=Ui(n)?Ei:Ci.current);var l=n.getDerivedStateFromProps,u="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||A!==c)&&ho(t,a,r,c),Zi=!1;var d=t.memoizedState;a.state=d,oo(t,r,a,i),A=t.memoizedState,s!==r||d!==A||Si.current||Zi?("function"==typeof l&&(Ao(t,n,l,r),A=t.memoizedState),(s=Zi||lo(t,n,s,r,d,A,c))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=A),a.props=r,a.state=A,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,eo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ni(t.type,s),a.props=c,u=t.pendingProps,d=a.context,"object"==typeof(A=n.contextType)&&null!==A?A=Ji(A):A=Mi(t,A=Ui(n)?Ei:Ci.current);var h=n.getDerivedStateFromProps;(l="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==u||d!==A)&&ho(t,a,r,A),Zi=!1,d=t.memoizedState,a.state=d,oo(t,r,a,i);var f=t.memoizedState;s!==u||d!==f||Si.current||Zi?("function"==typeof h&&(Ao(t,n,h,r),f=t.memoizedState),(c=Zi||lo(t,n,c,r,d,f,A)||!1)?(l||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,A),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,A)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=A,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,o,i)}function Cs(e,t,n,r,i,o){Bs(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&Ii(t,n,!1),Ds(e,t,o);r=t.stateNode,ps.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=jo(t,e.child,null,o),t.child=jo(t,null,s,o)):gs(e,t,s,o),t.memoizedState=r.state,i&&Ii(t,n,!0),t.child}function Ss(e){var t=e.stateNode;t.pendingContext?Ti(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ti(0,t.context,!1),Yo(e,t.containerInfo)}function Es(e,t,n,r,i){return Do(),Ho(i),t.flags|=256,gs(e,t,n,r),t.child}var Ms={dehydrated:null,treeContext:null,retryLane:0};function Us(e){return{baseLanes:e,cachePool:null}}function Fs(e,t,n){var r,i=t.pendingProps,a=ta.current,s=!1,A=0!=(128&t.flags);if((r=A)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),_i(ta,1&a),null===e)return ko(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(a=i.children,e=i.fallback,s?(i=t.mode,s=t.child,a={mode:"hidden",children:a},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=a):s=xc(a,i,0,null),e=_c(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Us(n),t.memoizedState=Ms,e):Ts(t,a));if(null!==(a=e.memoizedState)){if(null!==(r=a.dehydrated)){if(A)return 256&t.flags?(t.flags&=-257,Is(e,t,n,Error(o(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,a=t.mode,i=xc({mode:"visible",children:i.children},a,0,null),(s=_c(s,a,n,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!=(1&t.mode)&&jo(t,e.child,null,n),t.child.memoizedState=Us(n),t.memoizedState=Ms,s);if(0==(1&t.mode))t=Is(e,t,n,null);else if("$!"===r.data)t=Is(e,t,n,Error(o(419)));else if(i=0!=(n&e.childLanes),ms||i){if(null!==(i=gA)){switch(n&-n){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(i=0!=(s&(i.suspendedLanes|n))?0:s)&&i!==a.retryLane&&(a.retryLane=i,VA(e,i,-1))}rc(),t=Is(e,t,n,Error(o(421)))}else"$?"===r.data?(t.flags|=128,t.child=e.child,t=pc.bind(null,e),r._reactRetry=t,t=null):(n=a.treeContext,Uo=ai(r.nextSibling),Mo=t,Fo=!0,To=null,null!==n&&(yo[wo++]=Bo,yo[wo++]=_o,yo[wo++]=bo,Bo=n.id,_o=n.overflow,bo=t),(t=Ts(t,t.pendingProps.children)).flags|=4096);return t}return s?(i=Ls(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?Us(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Ms,i):(n=Qs(e,t,i.children,n),t.memoizedState=null,n)}return s?(i=Ls(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?Us(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Ms,i):(n=Qs(e,t,i.children,n),t.memoizedState=null,n)}function Ts(e,t){return(t=xc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Qs(e,t,n,r){var i=e.child;return e=i.sibling,n=bc(i,{mode:"visible",children:n}),0==(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Ls(e,t,n,r,i){var o=t.mode,a=(e=e.child).sibling,s={mode:"hidden",children:n};return 0==(1&o)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=s,t.deletions=null):(n=bc(e,s)).subtreeFlags=14680064&e.subtreeFlags,null!==a?r=bc(a,r):(r=_c(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Is(e,t,n,r){return null!==r&&Ho(r),jo(t,e.child,null,n),(e=Ts(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ks(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),qi(e.return,t,n)}function Ps(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Os(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(gs(e,t,r.children,n),0!=(2&(r=ta.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ks(e,n,t);else if(19===e.tag)ks(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_i(ta,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ps(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===na(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ps(t,!0,n,null,o);break;case"together":Ps(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ds(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),xA|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=bc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=bc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Hs(e,t){switch(Eo(t),t.tag){case 1:return Ui(t.type)&&Fi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Zo(),Bi(Si),Bi(Ci),ia(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(Bi(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));Do()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Bi(ta),null;case 4:return Zo(),null;case 10:return Wi(t.type._context),null;case 22:case 23:return $A(),null;default:return null}}var Rs=!1,Ns=!1,zs="function"==typeof WeakSet?WeakSet:Set,Vs=null;function js(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){dc(e,t,n)}else n.current=null}function Ks(e,t,n){try{n()}catch(n){dc(e,t,n)}}var Gs=!1;function Ws(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Ks(t,n,o)}i=i.next}while(i!==r)}}function qs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xs(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Js(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,o=i.destroy;i=i.tag,void 0!==o&&(0!=(2&i)||0!=(4&i))&&Ks(t,n,o),r=r.next}while(r!==e)}break;case 1:if(js(t,n),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){dc(t,n,e)}break;case 5:js(t,n);break;case 4:rA(e,t,n)}}function Ys(e){var t=e.alternate;null!==t&&(e.alternate=null,Ys(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ci],delete t[li],delete t[di],delete t[hi],delete t[fi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zs(e){return 5===e.tag||3===e.tag||4===e.tag}function $s(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Zs(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function eA(e){e:{for(var t=e.return;null!==t;){if(Zs(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(de(t,""),n.flags&=-33),nA(e,n=$s(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,tA(e,n=$s(e),t);break;default:throw Error(o(161))}}function tA(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Yr));else if(4!==r&&null!==(e=e.child))for(tA(e,t,n),e=e.sibling;null!==e;)tA(e,t,n),e=e.sibling}function nA(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(nA(e,t,n),e=e.sibling;null!==e;)nA(e,t,n),e=e.sibling}function rA(e,t,n){for(var r,i,a=t,s=!1;;){if(!s){s=a.return;e:for(;;){if(null===s)throw Error(o(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===a.tag||6===a.tag){e:for(var A=e,c=a,l=n,u=c;;)if(Js(A,u,l),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===c)break e;for(;null===u.sibling;){if(null===u.return||u.return===c)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}i?(A=r,c=a.stateNode,8===A.nodeType?A.parentNode.removeChild(c):A.removeChild(c)):r.removeChild(a.stateNode)}else if(18===a.tag)i?(A=r,c=a.stateNode,8===A.nodeType?oi(A.parentNode,c):1===A.nodeType&&oi(A,c),Nt(A)):oi(r,a.stateNode);else if(4===a.tag){if(null!==a.child){r=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(Js(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(s=!1)}a.sibling.return=a.return,a=a.sibling}}function iA(e,t){switch(t.tag){case 0:case 11:case 14:case 15:return Ws(3,t,t.return),qs(3,t),void Ws(5,t,t.return);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for("input"===e&&"radio"===r.type&&null!=r.name&&Y(n,r),ye(e,i),t=ye(e,r),i=0;i<a.length;i+=2){var s=a[i],A=a[i+1];"style"===s?me(n,A):"dangerouslySetInnerHTML"===s?ue(n,A):"children"===s?de(n,A):y(n,s,A,t)}switch(e){case"input":Z(n,r);break;case"textarea":oe(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?ne(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?ne(n,!!r.multiple,r.defaultValue,!0):ne(n,!!r.multiple,r.multiple?[]:"",!1))}n[li]=r}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void(null!==e&&e.memoizedState.isDehydrated&&Nt(t.stateNode.containerInfo));case 13:case 19:return void oA(t)}throw Error(o(163))}function oA(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new zs),t.forEach((function(t){var r=mc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function aA(e,t,n){Vs=e,sA(e,t,n)}function sA(e,t,n){for(var r=0!=(1&e.mode);null!==Vs;){var i=Vs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Rs;if(!a){var s=i.alternate,A=null!==s&&null!==s.memoizedState||Ns;s=Rs;var c=Ns;if(Rs=a,(Ns=A)&&!c)for(Vs=i;null!==Vs;)A=(a=Vs).child,22===a.tag&&null!==a.memoizedState?lA(i):null!==A?(A.return=a,Vs=A):lA(i);for(;null!==o;)Vs=o,sA(o,t,n),o=o.sibling;Vs=i,Rs=s,Ns=c}AA(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Vs=o):AA(e)}}function AA(e){for(;null!==Vs;){var t=Vs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ns||qs(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ns)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ni(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&ao(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ao(t,s,n)}break;case 5:var A=t.stateNode;if(null===n&&4&t.flags){n=A;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var u=l.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Nt(d)}}}break;default:throw Error(o(163))}Ns||512&t.flags&&Xs(t)}catch(e){dc(t,t.return,e)}}if(t===e){Vs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Vs=n;break}Vs=t.return}}function cA(e){for(;null!==Vs;){var t=Vs;if(t===e){Vs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Vs=n;break}Vs=t.return}}function lA(e){for(;null!==Vs;){var t=Vs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qs(4,t)}catch(e){dc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){dc(t,i,e)}}var o=t.return;try{Xs(t)}catch(e){dc(t,o,e)}break;case 5:var a=t.return;try{Xs(t)}catch(e){dc(t,a,e)}}}catch(e){dc(t,t.return,e)}if(t===e){Vs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Vs=s;break}Vs=t.return}}var uA,dA=Math.ceil,hA=w.ReactCurrentDispatcher,fA=w.ReactCurrentOwner,pA=w.ReactCurrentBatchConfig,mA=0,gA=null,vA=null,yA=0,wA=0,bA=bi(0),BA=0,_A=null,xA=0,CA=0,SA=0,EA=null,MA=null,UA=0,FA=1/0,TA=!1,QA=null,LA=null,IA=!1,kA=null,PA=0,OA=0,DA=null,HA=-1,RA=0;function NA(){return 0!=(6&mA)?Ye():-1!==HA?HA:HA=Ye()}function zA(e){return 0==(1&e.mode)?1:0!=(2&mA)&&0!==yA?yA&-yA:null!==Ri.transition?(0===RA&&(e=ct,0==(4194240&(ct<<=1))&&(ct=64),RA=e),RA):0!==(e=vt)?e:e=void 0===(e=window.event)?16:qt(e.type)}function VA(e,t,n){if(50<OA)throw OA=0,DA=null,Error(o(185));var r=jA(e,t);return null===r?null:(mt(r,t,n),0!=(2&mA)&&r===gA||(r===gA&&(0==(2&mA)&&(CA|=t),4===BA&&XA(r,yA)),KA(r,n),1===t&&0===mA&&0==(1&e.mode)&&(FA=Ye()+500,Pi&&Hi())),r)}function jA(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function KA(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,A=i[a];-1===A?0!=(s&n)&&0==(s&r)||(i[a]=ht(s,t)):A<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=dt(e,e===gA?yA:0);if(0===r)null!==n&&qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qe(n),1===t)0===e.tag?function(e){Pi=!0,Di(e)}(JA.bind(null,e)):Di(JA.bind(null,e)),ri((function(){0===mA&&Hi()})),n=null;else{switch(yt(r)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=gc(n,GA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function GA(e,t){if(HA=-1,RA=0,0!=(6&mA))throw Error(o(327));var n=e.callbackNode;if(lc()&&e.callbackNode!==n)return null;var r=dt(e,e===gA?yA:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=ic(e,r);else{t=r;var i=mA;mA|=2;var a=nc();for(gA===e&&yA===t||(FA=Ye()+500,ec(e,t));;)try{ac();break}catch(t){tc(e,t)}Gi(),hA.current=a,mA=i,null!==vA?t=0:(gA=null,yA=0,t=BA)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=WA(e,i))),1===t)throw n=_A,ec(e,0),XA(e,r),KA(e,Ye()),n;if(6===t)XA(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!or(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=ic(e,r))&&(0!==(a=ft(e))&&(r=a,t=WA(e,a))),1===t))throw n=_A,ec(e,0),XA(e,r),KA(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:cc(e,MA);break;case 3:if(XA(e,r),(130023424&r)===r&&10<(t=UA+500-Ye())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){NA(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ei(cc.bind(null,e,MA),t);break}cc(e,MA);break;case 4:if(XA(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dA(r/1960))-r)){e.timeoutHandle=ei(cc.bind(null,e,MA),r);break}cc(e,MA);break;default:throw Error(o(329))}}}return KA(e,Ye()),e.callbackNode===n?GA.bind(null,e):null}function WA(e,t){var n=EA;return e.current.memoizedState.isDehydrated&&(ec(e,t).flags|=256),2!==(e=ic(e,t))&&(t=MA,MA=n,null!==t&&qA(t)),e}function qA(e){null===MA?MA=e:MA.push.apply(MA,e)}function XA(e,t){for(t&=~SA,t&=~CA,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function JA(e){if(0!=(6&mA))throw Error(o(327));lc();var t=dt(e,0);if(0==(1&t))return KA(e,Ye()),null;var n=ic(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=WA(e,r))}if(1===n)throw n=_A,ec(e,0),XA(e,t),KA(e,Ye()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cc(e,MA),KA(e,Ye()),null}function YA(e,t){var n=mA;mA|=1;try{return e(t)}finally{0===(mA=n)&&(FA=Ye()+500,Pi&&Hi())}}function ZA(e){null!==kA&&0===kA.tag&&0==(6&mA)&&lc();var t=mA;mA|=1;var n=pA.transition,r=vt;try{if(pA.transition=null,vt=1,e)return e()}finally{vt=r,pA.transition=n,0==(6&(mA=t))&&Hi()}}function $A(){wA=bA.current,Bi(bA)}function ec(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ti(n)),null!==vA)for(n=vA.return;null!==n;){var r=n;switch(Eo(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Fi();break;case 3:Zo(),Bi(Si),Bi(Ci),ia();break;case 5:ea(r);break;case 4:Zo();break;case 13:case 19:Bi(ta);break;case 10:Wi(r.type._context);break;case 22:case 23:$A()}n=n.return}if(gA=e,vA=e=bc(e.current,null),yA=wA=t,BA=0,_A=null,SA=CA=xA=0,MA=EA=null,null!==Yi){for(t=0;t<Yi.length;t++)if(null!==(r=(n=Yi[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Yi=null}return e}function tc(e,t){for(;;){var n=vA;try{if(Gi(),oa.current=Za,ua){for(var r=Aa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(sa=0,la=ca=Aa=null,da=!1,ha=0,fA.current=null,null===n||null===n.return){BA=1,_A=t,vA=null;break}e:{var a=e,s=n.return,A=n,c=t;if(t=yA,A.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var l=c,u=A,d=u.tag;if(0==(1&u.mode)&&(0===d||11===d||15===d)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=ls(s);if(null!==f){f.flags&=-257,us(f,s,A,0,t),1&f.mode&&cs(a,l,t),c=l;var p=(t=f).updateQueue;if(null===p){var m=new Set;m.add(c),t.updateQueue=m}else p.add(c);break e}if(0==(1&t)){cs(a,l,t),rc();break e}c=Error(o(426))}else if(Fo&&1&A.mode){var g=ls(s);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),us(g,s,A,0,t),Ho(c);break e}}a=c,4!==BA&&(BA=2),null===EA?EA=[a]:EA.push(a),c=ns(c,A),A=s;do{switch(A.tag){case 3:A.flags|=65536,t&=-t,A.lanes|=t,io(A,ss(0,c,t));break e;case 1:a=c;var v=A.type,y=A.stateNode;if(0==(128&A.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===LA||!LA.has(y)))){A.flags|=65536,t&=-t,A.lanes|=t,io(A,As(A,a,t));break e}}A=A.return}while(null!==A)}Ac(n)}catch(e){t=e,vA===n&&null!==n&&(vA=n=n.return);continue}break}}function nc(){var e=hA.current;return hA.current=Za,null===e?Za:e}function rc(){0!==BA&&3!==BA&&2!==BA||(BA=4),null===gA||0==(268435455&xA)&&0==(268435455&CA)||XA(gA,yA)}function ic(e,t){var n=mA;mA|=2;var r=nc();for(gA===e&&yA===t||ec(e,t);;)try{oc();break}catch(t){tc(e,t)}if(Gi(),mA=n,hA.current=r,null!==vA)throw Error(o(261));return gA=null,yA=0,BA}function oc(){for(;null!==vA;)sc(vA)}function ac(){for(;null!==vA&&!Xe();)sc(vA)}function sc(e){var t=uA(e.alternate,e,wA);e.memoizedProps=e.pendingProps,null===t?Ac(e):vA=t,fA.current=null}function Ac(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=fs(n,t,wA)))return void(vA=n)}else{if(null!==(n=Hs(n,t)))return n.flags&=32767,void(vA=n);if(null===e)return BA=6,void(vA=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(vA=t);vA=t=e}while(null!==t);0===BA&&(BA=5)}function cc(e,t){var n=vt,r=pA.transition;try{pA.transition=null,vt=1,function(e,t,n){do{lc()}while(null!==kA);if(0!=(6&mA))throw Error(o(327));var r=e.finishedWork,i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===gA&&(vA=gA=null,yA=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||IA||(IA=!0,gc(tt,(function(){return lc(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=pA.transition,pA.transition=null;var s=vt;vt=1;var A=mA;mA|=4,fA.current=null,function(e,t){if(ur(e=lr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,A=-1,c=-1,l=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(A=s+i),d!==a||0!==r&&3!==d.nodeType||(c=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(f=d.firstChild);)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++l===i&&(A=s),h===a&&++u===r&&(c=s),null!==(f=d.nextSibling))break;h=(d=h).parentNode}d=f}n=-1===A||-1===c?null:{start:A,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zr={focusedElem:e,selectionRange:n},Vs=t;null!==Vs;)if(e=(t=Vs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Vs=e;else for(;null!==Vs;){t=Vs;try{var p=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ni(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;if(1===w.nodeType)w.textContent="";else if(9===w.nodeType){var b=w.body;null!=b&&(b.textContent="")}break;default:throw Error(o(163))}}catch(e){dc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Vs=e;break}Vs=t.return}p=Gs,Gs=!1}(e,r),function(e,t){for(Vs=t;null!==Vs;){var n=(t=Vs).deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{rA(e,i,t);var o=i.alternate;null!==o&&(o.return=null),i.return=null}catch(e){dc(i,t,e)}}if(n=t.child,0!=(12854&t.subtreeFlags)&&null!==n)n.return=t,Vs=n;else for(;null!==Vs;){t=Vs;try{var a=t.flags;if(32&a&&de(t.stateNode,""),512&a){var s=t.alternate;if(null!==s){var A=s.ref;null!==A&&("function"==typeof A?A(null):A.current=null)}}if(8192&a)switch(t.tag){case 13:if(null!==t.memoizedState){var c=t.alternate;null!==c&&null!==c.memoizedState||(UA=Ye())}break;case 22:var l=null!==t.memoizedState,u=t.alternate,d=null!==u&&null!==u.memoizedState;e:{i=l;for(var h=null,f=r=n=t;;){if(5===f.tag){if(null===h){h=f;var p=f.stateNode;if(i){var m=p.style;"function"==typeof m.setProperty?m.setProperty("display","none","important"):m.display="none"}else{var g=f.stateNode,v=f.memoizedProps.style,y=null!=v&&v.hasOwnProperty("display")?v.display:null;g.style.display=pe("display",y)}}}else if(6===f.tag)null===h&&(f.stateNode.nodeValue=i?"":f.memoizedProps);else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===r)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===r)break;for(;null===f.sibling;){if(null===f.return||f.return===r)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}if(l&&!d&&0!=(1&n.mode)){Vs=n;for(var w=n.child;null!==w;){for(n=Vs=w;null!==Vs;){var b=(r=Vs).child;switch(r.tag){case 0:case 11:case 14:case 15:Ws(4,r,r.return);break;case 1:js(r,r.return);var B=r.stateNode;if("function"==typeof B.componentWillUnmount){var _=r.return;try{B.props=r.memoizedProps,B.state=r.memoizedState,B.componentWillUnmount()}catch(e){dc(r,_,e)}}break;case 5:js(r,r.return);break;case 22:if(null!==r.memoizedState){cA(n);continue}}null!==b?(b.return=r,Vs=b):cA(n)}w=w.sibling}}}switch(4102&a){case 2:eA(t),t.flags&=-3;break;case 6:eA(t),t.flags&=-3,iA(t.alternate,t);break;case 4096:t.flags&=-4097;break;case 4100:t.flags&=-4097,iA(t.alternate,t);break;case 4:iA(t.alternate,t)}}catch(e){dc(t,t.return,e)}if(null!==(n=t.sibling)){n.return=t.return,Vs=n;break}Vs=t.return}}}(e,r),dr(Zr),Zr=null,e.current=r,aA(r,e,i),Je(),mA=A,vt=s,pA.transition=a}else e.current=r;if(IA&&(IA=!1,kA=e,PA=i),0===(a=e.pendingLanes)&&(LA=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),KA(e,Ye()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n(t[r]);if(TA)throw TA=!1,e=QA,QA=null,e;0!=(1&PA)&&0!==e.tag&&lc(),0!=(1&(a=e.pendingLanes))?e===DA?OA++:(OA=0,DA=e):OA=0,Hi()}(e,t,n)}finally{pA.transition=r,vt=n}return null}function lc(){if(null!==kA){var e=yt(PA),t=pA.transition,n=vt;try{if(pA.transition=null,vt=16>e?16:e,null===kA)var r=!1;else{if(e=kA,kA=null,PA=0,0!=(6&mA))throw Error(o(331));var i=mA;for(mA|=4,Vs=e.current;null!==Vs;){var a=Vs,s=a.child;if(0!=(16&Vs.flags)){var A=a.deletions;if(null!==A){for(var c=0;c<A.length;c++){var l=A[c];for(Vs=l;null!==Vs;){var u=Vs;switch(u.tag){case 0:case 11:case 15:Ws(8,u,a)}var d=u.child;if(null!==d)d.return=u,Vs=d;else for(;null!==Vs;){var h=(u=Vs).sibling,f=u.return;if(Ys(u),u===l){Vs=null;break}if(null!==h){h.return=f,Vs=h;break}Vs=f}}}var p=a.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Vs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Vs=s;else e:for(;null!==Vs;){if(0!=(2048&(a=Vs).flags))switch(a.tag){case 0:case 11:case 15:Ws(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Vs=v;break e}Vs=a.return}}var y=e.current;for(Vs=y;null!==Vs;){var w=(s=Vs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Vs=w;else e:for(s=y;null!==Vs;){if(0!=(2048&(A=Vs).flags))try{switch(A.tag){case 0:case 11:case 15:qs(9,A)}}catch(e){dc(A,A.return,e)}if(A===s){Vs=null;break e}var b=A.sibling;if(null!==b){b.return=A.return,Vs=b;break e}Vs=A.return}}if(mA=i,Hi(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{vt=n,pA.transition=t}}return!1}function uc(e,t,n){no(e,t=ss(0,t=ns(n,t),1)),t=NA(),null!==(e=jA(e,1))&&(mt(e,1,t),KA(e,t))}function dc(e,t,n){if(3===e.tag)uc(e,e,n);else for(;null!==t;){if(3===t.tag){uc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===LA||!LA.has(r))){no(t,e=As(t,e=ns(n,e),1)),e=NA(),null!==(t=jA(t,1))&&(mt(t,1,e),KA(t,e));break}}t=t.return}}function hc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=NA(),e.pingedLanes|=e.suspendedLanes&n,gA===e&&(yA&n)===n&&(4===BA||3===BA&&(130023424&yA)===yA&&500>Ye()-UA?ec(e,0):SA|=n),KA(e,t)}function fc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=lt,0==(130023424&(lt<<=1))&&(lt=4194304)));var n=NA();null!==(e=jA(e,t))&&(mt(e,t,n),KA(e,n))}function pc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),fc(e,n)}function mc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),fc(e,n)}function gc(e,t){return We(e,t)}function vc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yc(e,t,n,r){return new vc(e,t,n,r)}function wc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function bc(e,t){var n=e.alternate;return null===n?((n=yc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)wc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case _:return _c(n.children,i,a,t);case x:s=8,i|=8;break;case C:return(e=yc(12,n,t,2|i)).elementType=C,e.lanes=a,e;case U:return(e=yc(13,n,t,i)).elementType=U,e.lanes=a,e;case F:return(e=yc(19,n,t,i)).elementType=F,e.lanes=a,e;case L:return xc(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:s=10;break e;case E:s=9;break e;case M:s=11;break e;case T:s=14;break e;case Q:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=yc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function _c(e,t,n,r){return(e=yc(7,e,r,t)).lanes=n,e}function xc(e,t,n,r){return(e=yc(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={},e}function Cc(e,t,n){return(e=yc(6,e,null,t)).lanes=n,e}function Sc(e,t,n){return(t=yc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ec(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pt(0),this.expirationTimes=pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mc(e,t,n,r,i,o,a,s,A){return e=new Ec(e,t,n,s,A),1===t?(t=1,!0===o&&(t|=8)):t=0,o=yc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},$i(o),e}function Uc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:B,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Fc(e){if(!e)return xi;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ui(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ui(n))return Qi(e,n,t)}return t}function Tc(e,t,n,r,i,o,a,s,A){return(e=Mc(n,r,!0,e,0,o,0,s,A)).context=Fc(null),n=e.current,(o=to(r=NA(),i=zA(n))).callback=null!=t?t:null,no(n,o),e.current.lanes=i,mt(e,i,r),KA(e,r),e}function Qc(e,t,n,r){var i=t.current,o=NA(),a=zA(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=to(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),no(i,t),null!==(e=VA(i,a,o))&&ro(e,i,a),a}function Lc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ic(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function kc(e,t){Ic(e,t),(e=e.alternate)&&Ic(e,t)}uA=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Si.current)ms=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ms=!1,function(e,t,n){switch(t.tag){case 3:Ss(t),Do();break;case 5:$o(t);break;case 1:Ui(t.type)&&Li(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;_i(zi,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(_i(ta,1&ta.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Fs(e,t,n):(_i(ta,1&ta.current),null!==(e=Ds(e,t,n))?e.sibling:null);_i(ta,1&ta.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Os(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),_i(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,bs(e,t,n)}return Ds(e,t,n)}(e,t,n);ms=0!=(131072&e.flags)}else ms=!1,Fo&&0!=(1048576&t.flags)&&Co(t,vo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps;var i=Mi(t,Ci.current);Xi(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ui(r)?(a=!0,Li(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,$i(t),i.updater=co,t.stateNode=i,i._reactInternals=t,fo(t,r,e,n),t=Cs(null,t,r,!0,a,n)):(t.tag=0,Fo&&a&&So(t),gs(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return wc(e)?1:0;if(null!=e){if((e=e.$$typeof)===M)return 11;if(e===T)return 14}return 2}(r),e=Ni(r,e),i){case 0:t=_s(null,t,r,e,n);break e;case 1:t=xs(null,t,r,e,n);break e;case 11:t=vs(null,t,r,e,n);break e;case 14:t=ys(null,t,r,Ni(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:Ni(r,i),n);case 1:return r=t.type,i=t.pendingProps,xs(e,t,r,i=t.elementType===r?i:Ni(r,i),n);case 3:e:{if(Ss(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,eo(e,t),oo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Es(e,t,r,n,i=Error(o(423)));break e}if(r!==i){t=Es(e,t,r,n,i=Error(o(424)));break e}for(Uo=ai(t.stateNode.containerInfo.firstChild),Mo=t,Fo=!0,To=null,n=Ko(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Do(),r===i){t=Ds(e,t,n);break e}gs(e,t,r,n)}t=t.child}return t;case 5:return $o(t),null===e&&ko(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,$r(r,i)?s=null:null!==a&&$r(r,a)&&(t.flags|=32),Bs(e,t),gs(e,t,s,n),t.child;case 6:return null===e&&ko(t),null;case 13:return Fs(e,t,n);case 4:return Yo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=jo(t,null,r,n):gs(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,vs(e,t,r,i=t.elementType===r?i:Ni(r,i),n);case 7:return gs(e,t,t.pendingProps,n),t.child;case 8:case 12:return gs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,_i(zi,r._currentValue),r._currentValue=s,null!==a)if(or(a.value,s)){if(a.children===i.children&&!Si.current){t=Ds(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var A=a.dependencies;if(null!==A){s=a.child;for(var c=A.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=to(-1,n&-n)).tag=2;var l=a.updateQueue;if(null!==l){var u=(l=l.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),qi(a.return,n,t),A.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(A=s.alternate)&&(A.lanes|=n),qi(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}gs(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xi(t,n),r=r(i=Ji(i)),t.flags|=1,gs(e,t,r,n),t.child;case 14:return i=Ni(r=t.type,t.pendingProps),ys(e,t,r,i=Ni(r.type,i),n);case 15:return ws(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ni(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ui(r)?(e=!0,Li(t)):e=!1,Xi(t,n),uo(t,r,i),fo(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Os(e,t,n);case 22:return bs(e,t,n)}throw Error(o(156,t.tag))};var Pc="function"==typeof reportError?reportError:function(e){};function Oc(e){this._internalRoot=e}function Dc(e){this._internalRoot=e}function Hc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Rc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Nc(){}function zc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Lc(a);s.call(e)}}Qc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Lc(a);o.call(e)}}var a=Tc(t,r,e,0,null,!1,0,"",Nc);return e._reactRootContainer=a,e[ui]=a.current,Rr(8===e.nodeType?e.parentNode:e),ZA(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Lc(A);s.call(e)}}var A=Mc(e,0,!1,null,0,!1,0,"",Nc);return e._reactRootContainer=A,e[ui]=A.current,Rr(8===e.nodeType?e.parentNode:e),ZA((function(){Qc(t,A,n,r)})),A}(n,t,e,i,r);return Lc(a)}Dc.prototype.render=Oc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Qc(e,t,null,null)},Dc.prototype.unmount=Oc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ZA((function(){Qc(null,e,null,null)})),t[ui]=null}},Dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qt.length&&0!==t&&t<Qt[n].priority;n++);Qt.splice(n,0,e),0===n&&Pt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(gt(t,1|n),KA(t,Ye()),0==(6&mA)&&(FA=Ye()+500,Hi()))}break;case 13:var r=NA();ZA((function(){return VA(e,1,r)})),kc(e,1)}},bt=function(e){13===e.tag&&(VA(e,134217728,NA()),kc(e,134217728))},Bt=function(e){if(13===e.tag){var t=NA(),n=zA(e);VA(e,n,t),kc(e,n)}},_t=function(){return vt},xt=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},Be=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=vi(r);if(!i)throw Error(o(90));W(r),Z(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Me=YA,Ue=ZA;var Vc={usingClientEntryPoint:!1,Events:[mi,gi,vi,Se,Ee,YA]},jc={findFiberByHostInstance:pi,bundleType:0,version:"18.0.0-fc46dba67-20220329",rendererPackageName:"react-dom"},Kc={bundleType:jc.bundleType,version:jc.version,rendererPackageName:jc.rendererPackageName,rendererConfig:jc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:jc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{it=Gc.inject(Kc),ot=Gc}catch(le){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Hc(t))throw Error(o(200));return Uc(e,t,null,n)},t.createRoot=function(e,t){if(!Hc(e))throw Error(o(299));var n=!1,r="",i=Pc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Mc(e,1,!1,null,0,n,0,r,i),e[ui]=t.current,Rr(8===e.nodeType?e.parentNode:e),new Oc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return ZA(e)},t.hydrate=function(e,t,n){if(!Rc(t))throw Error(o(200));return zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Hc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Pc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Tc(t,null,e,1,null!=n?n:null,i,0,a,s),e[ui]=t.current,Rr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Dc(t)},t.render=function(e,t,n){if(!Rc(t))throw Error(o(200));return zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Rc(e))throw Error(o(40));return!!e._reactRootContainer&&(ZA((function(){zc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ui]=null}))})),!0)},t.unstable_batchedUpdates=YA,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Rc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return zc(e,t,n,!1,r)},t.version="18.0.0-fc46dba67-20220329"},"../../node_modules/react-dom/client.js":function(e,t,n){"use strict";var r=n("../../node_modules/react-dom/index.js");t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},"../../node_modules/react-dom/index.js":function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){}}(),e.exports=n("../../node_modules/react-dom/cjs/react-dom.production.min.js")},"../../node_modules/react-is/cjs/react-is.production.min.js":function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),A=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.for("react.module.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case c:case A:case l:case f:case h:case s:return e;default:return t}}case r:return t}}}t.isContextConsumer=function(e){return g(e)===A}},"../../node_modules/react-is/index.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/react-is/cjs/react-is.production.min.js")},"../../node_modules/react/cjs/react.production.min.js":function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),A=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var w=y.prototype=new v;w.constructor=y,p(w,g.prototype),w.isPureReactComponent=!0;var b=Array.isArray,B=Object.prototype.hasOwnProperty,_={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)B.call(t,i)&&!x.hasOwnProperty(i)&&(o[i]=t[i]);var A=arguments.length-2;if(1===A)o.children=r;else if(1<A){for(var c=Array(A),l=0;l<A;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(i in A=e.defaultProps)void 0===o[i]&&(o[i]=A[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:_.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function U(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var A=!1;if(null===e)A=!0;else switch(s){case"string":case"number":A=!0;break;case"object":switch(e.$$typeof){case n:case r:A=!0}}if(A)return a=a(A=e),e=""===o?"."+M(A,0):o,b(a)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),U(a,t,i,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||A&&A.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(A=0,o=""===o?".":o+":",b(e))for(var c=0;c<e.length;c++){var l=o+M(s=e[c],c);A+=U(s,t,i,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)A+=U(s=s.value,t,i,l=o+M(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return A}function F(e,t,n){if(null==e)return e;var r=[],i=0;return U(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Q={current:null},L={transition:null},I={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:L,ReactCurrentOwner:_};t.Children={map:F,forEach:function(e,t,n){F(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return F(e,(function(){t++})),t},toArray:function(e){return F(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=i,t.Profiler=a,t.PureComponent=y,t.StrictMode=o,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=p({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=_.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var A=e.type.defaultProps;for(c in t)B.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==A?A[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){A=Array(c);for(var l=0;l<c;l++)A[l]=arguments[l+2];i.children=A}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:A,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return Q.current.useCallback(e,t)},t.useContext=function(e){return Q.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return Q.current.useDeferredValue(e)},t.useEffect=function(e,t){return Q.current.useEffect(e,t)},t.useId=function(){return Q.current.useId()},t.useImperativeHandle=function(e,t,n){return Q.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return Q.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return Q.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return Q.current.useMemo(e,t)},t.useReducer=function(e,t,n){return Q.current.useReducer(e,t,n)},t.useRef=function(e){return Q.current.useRef(e)},t.useState=function(e){return Q.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return Q.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return Q.current.useTransition()},t.version="18.0.0-fc46dba67-20220329"},"../../node_modules/react/index.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/react/cjs/react.production.min.js")},"../../node_modules/redux-beacon/dist/create-events.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("../../node_modules/array-flatten/array-flatten.js"),i=function(e){return e.filter((function(e){return e}))};t.default=function(e,t,n,o){return i(r(i(e).map((function(e){return e(n,t,o)}))))}},"../../node_modules/redux-beacon/dist/create-meta-reducer.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("../../node_modules/array-flatten/array-flatten.js"),i=n("../../node_modules/redux-beacon/dist/create-events.js"),o=n("../../node_modules/redux-beacon/dist/get-events-with-matching-key.js"),a=n("../../node_modules/redux-beacon/dist/register-events.js");t.default=function(e,t,n){void 0===n&&(n={});var s="function"==typeof e?function(t){return r([e(t)])}:function(t){return o.default(e,t.type)};return function(e){return function(r,o){var A=e(r,o),c=i.default(s(o),r,o,A);return a.default(c,t,n,r,o,A),A}}}},"../../node_modules/redux-beacon/dist/create-middleware.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("../../node_modules/array-flatten/array-flatten.js"),i=n("../../node_modules/redux-beacon/dist/create-events.js"),o=n("../../node_modules/redux-beacon/dist/get-events-with-matching-key.js"),a=n("../../node_modules/redux-beacon/dist/register-events.js");t.default=function(e,t,n){void 0===n&&(n={});var s="function"==typeof e?function(t){return r([e(t)])}:function(t){return o.default(e,t.type)};return function(e){return function(r){return function(o){var A=e.getState(),c=r(o),l=e.getState(),u=i.default(s(o),A,o,l);return a.default(u,t,n,A,o,l),c}}}}},"../../node_modules/redux-beacon/dist/get-events-with-matching-key.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=Object.keys(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];return n.concat(r).filter((function(e){return"*"===e||e===t})).map((function(t){return e[t]}))}},"../../node_modules/redux-beacon/dist/index.js":function(e,t,n){"use strict";n("../../node_modules/redux-beacon/dist/create-events.js").default,n("../../node_modules/redux-beacon/dist/create-meta-reducer.js").default;var r=n("../../node_modules/redux-beacon/dist/create-middleware.js");t.J7=r.default},"../../node_modules/redux-beacon/dist/is-promise.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==typeof e&&"function"==typeof e.then}},"../../node_modules/redux-beacon/dist/register-events.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("../../node_modules/array-flatten/array-flatten.js"),i=n("../../node_modules/redux-beacon/dist/is-promise.js");t.default=function(e,t,n,o,a,s){void 0===n&&(n={}),void 0===o&&(o={}),void 0===a&&(a={}),void 0===s&&(s={});var A=n.logger,c=n.offlineStorage,l=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];"function"==typeof A&&A.apply(void 0,[e,t,n].concat(r))},u=function(e){return Array.isArray(e)&&0===e.length},d=function(e){u(e)||t(e)},h=function(e){void 0===c?(d(e),l(e,a,o)):c.isConnected(s)?(d(e),l(e,a,o),c.purgeEvents((function(e){u(e)||(t(e),l(e,null,null,!1,!0))}))):(c.saveEvents(e),l(e,a,o,!0,!1))},f=e.filter(i.default);return h(e.filter((function(e){return!i.default(e)}))),Promise.all(f).then(r).then(h)}},"../../node_modules/scheduler/cjs/scheduler.production.min.js":function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,A=e[s],c=s+1,l=e[c];if(0>o(A,n))c<i&&0>o(l,A)?(e[r]=l,e[c]=n,r=c):(e[r]=A,e[s]=n,r=s);else{if(!(c<i&&0>o(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,A=s.now();t.unstable_now=function(){return s.now()-A}}var c=[],l=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function b(e){if(m=!1,w(e),!p)if(null!==r(c))p=!0,L(B);else{var t=r(l);null!==t&&I(b,t.startTime-e)}}function B(e,n){p=!1,m&&(m=!1,v(S),S=-1),f=!0;var o=h;try{for(w(n),d=r(c);null!==d&&(!(d.expirationTime>n)||e&&!U());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),w(n)}else i(c);d=r(c)}if(null!==d)var A=!0;else{var u=r(l);null!==u&&I(b,u.startTime-n),A=!1}return A}finally{d=null,h=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,x=!1,C=null,S=-1,E=5,M=-1;function U(){return!(t.unstable_now()-M<E)}function F(){if(null!==C){var e=t.unstable_now();M=e;var n=!0;try{n=C(!0,e)}finally{n?_():(x=!1,C=null)}}else x=!1}if("function"==typeof y)_=function(){y(F)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,Q=T.port2;T.port1.onmessage=F,_=function(){Q.postMessage(null)}}else _=function(){g(F,0)};function L(e){C=e,x||(x=!0,_())}function I(e,n){S=g((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){p||f||(p=!0,L(B))},t.unstable_forceFrameRate=function(e){0>e||125<e||(E=0<e?Math.floor(1e3/e):5)},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:u++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(l,e),null===r(c)&&e===r(l)&&(m?(v(S),S=-1):m=!0,I(b,o-a))):(e.sortIndex=s,n(c,e),p||f||(p=!0,L(B))),e},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},"../../node_modules/scheduler/index.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/scheduler/cjs/scheduler.production.min.js")},"../../node_modules/split-on-first/index.js":function(e){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},"../../node_modules/strict-uri-encode/index.js":function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},"../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js":function(e,t,n){"use strict";var r=n("../../node_modules/react/index.js");var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,A=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})}),[e,n,t]),a((function(){return c(i)&&l({inst:i}),e((function(){c(i)&&l({inst:i})}))}),[e]),A(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},"../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js":function(e,t,n){"use strict";var r=n("../../node_modules/react/index.js"),i=n("../../node_modules/use-sync-external-store/shim/index.js");var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,A=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var u=s(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;u=c((function(){function e(e){if(!A){if(A=!0,a=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(a=e,s=n)}var a,s,A=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var h=a(e,u[0],u[1]);return A((function(){d.hasValue=!0,d.value=h}),[h]),l(h),h}},"../../node_modules/use-sync-external-store/shim/index.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js")},"../../node_modules/use-sync-external-store/shim/with-selector.js":function(e,t,n){"use strict";e.exports=n("../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js")},"../../node_modules/van11y-accessible-modal-window-aria/dist/van11y-accessible-modal-window-aria.min.js":function(){"use strict";!function(e){function t(e,t){for("string"==typeof t&&(t=document.createElement(t)),e.appendChild(t);e.firstChild!==t;)t.appendChild(e.firstChild)}function n(e){e.parentNode.removeChild(e)}var r="js-modal",i="label_modal_",o="data-modal-background-click",a="data-modal-prefix-class",s="data-modal-text",A="data-modal-content-id",c="data-modal-describedby-id",l="data-modal-title",u="data-modal-focus-toid",d="data-modal-close-text",h="data-modal-close-title",f="data-modal-close-img",p="js-modal-close",m="js-modal-close",g="data-content-back-id",v="data-focus-back",y="js-modal-content",w="modal-title",b="a[href], area[href], input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",B="js-modal-page",_="js-modal",x="js-modal-overlay",C="Close modal",S="data-background-click",E="no-scroll",M="aria-hidden",U="aria-haspopup",F="dialog",T=function(t){return e.getElementById(t)},Q=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},L=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},I=function(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},k=function(e,t){for(var n=!1,r=e.parentNode;r&&!1===n;)!0===I(r,t)?n=!0:r=r.parentNode;return!0===n?r.getAttribute("id"):""},P=function(e){var t=e.text||C,n=e.prefixClass+"modal-overlay",r="disabled"===e.backgroundEnabled?"disabled":"enabled";return'<span\n id="js-modal-overlay"\n class="'+n+'"\n'+S+'="'+r+'"\n title="'+t+'"\n>\n<span class="invisible">'+t+"</span>\n</span>"},O=function(e){var t=e.modalPrefixClass+"modal",n=e.modalPrefixClass+"modal__wrapper",r=e.modalPrefixClass+"modal-close",i=e.modalCloseImgPath?'<img src="'+e.modalCloseImgPath+'" alt="'+e.modalCloseText+'" class="'+e.modalPrefixClass+'modal__closeimg" />':'<span class="'+e.modalPrefixClass+'modal-close__text">\n'+e.modalCloseText+"\n</span>",o=e.modalPrefixClass+"modal__content",a=e.modalPrefixClass+"modal-title",s=""!==e.modalTitle?'<h1 id="'+w+'" class="'+a+'">\n'+e.modalTitle+"\n</h1>":"",A='<button type="button" class="'+m+" "+r+'" id="'+p+'" title="'+e.modalCloseTitle+'" '+g+'="'+e.modalContentId+'" '+v+'="'+e.modalFocusBackId+'">\n'+i+"\n</button>",c=e.modalText,l=""!==e.modalDescribedById?'aria-describedby="'+e.modalDescribedById+'"':"";if(""===c&&e.modalContentId){var u=T(e.modalContentId);u&&(c='<div id="'+y+'">\n'+u.innerHTML+"\n</div",u.innerHTML="")}return'<dialog id="js-modal" class="'+t+'" role="dialog" '+l+' open aria-labelledby="'+w+'">\n<div role="document" class="'+n+'">\n'+A+'\n<div class="'+o+'">\n'+s+"\n"+c+"\n</div>\n</div>\n</dialog>"},D=function(e){if(n(e.modal),n(e.overlay),""!==e.contentBackId){var t=T(e.contentBackId);t&&(t.innerHTML=e.modalContent)}if(e.modalFocusBackId){var r=T(e.modalFocusBackId);r&&r.focus()}},H=function(){var t=arguments.length<=0||void 0===arguments[0]?e:arguments[0];return[].slice.call(t.querySelectorAll("."+r))},R=function(n){var w=arguments.length<=1||void 0===arguments[1]||arguments[1];H(n).forEach((function(n){var r=Math.random().toString(32).slice(2,12),o=T(B),a=e.querySelector("body");if(n.setAttribute("id",i+r),n.setAttribute(U,F),null===o||0===o.length){var s=e.createElement("DIV");s.setAttribute("id",B),t(a,s)}})),w&&["click","keydown"].forEach((function(t){e.body.addEventListener(t,(function(n){var i=k(n.target,r);if((!0===I(n.target,r)||""!==i)&&"click"===t){var w=e.querySelector("body"),U=""!==i?T(i):n.target,F=!0===U.hasAttribute(a)?U.getAttribute(a)+"-":"",H=!0===U.hasAttribute(s)?U.getAttribute(s):"",R=!0===U.hasAttribute(A)?U.getAttribute(A):"",N=!0===U.hasAttribute(c)?U.getAttribute(c):"",z=!0===U.hasAttribute(l)?U.getAttribute(l):"",V=!0===U.hasAttribute(d)?U.getAttribute(d):C,j=!0===U.hasAttribute(h)?U.getAttribute(h):V,K=!0===U.hasAttribute(f)?U.getAttribute(f):"",G=!0===U.hasAttribute(o)?U.getAttribute(o):"",W=!0===U.hasAttribute(u)?U.getAttribute(u):"",q=T(B);w.insertAdjacentHTML("beforeEnd",P({text:j,backgroundEnabled:G,prefixClass:F})),w.insertAdjacentHTML("beforeEnd",O({modalText:H,modalPrefixClass:F,backgroundEnabled:R,modalTitle:z,modalCloseText:V,modalCloseTitle:j,modalCloseImgPath:K,modalContentId:R,modalDescribedById:N,modalFocusBackId:U.getAttribute("id")})),q.setAttribute(M,"true"),Q(w,E);var X=T(p);if(""!==W){var J=T(W);J?J.focus():X.focus()}else X.focus();n.preventDefault()}var Y=k(n.target,m);if((n.target.getAttribute("id")===p||""!==Y||n.target.getAttribute("id")===x||!0===I(n.target,m))&&"click"===t){w=e.querySelector("body"),q=T(B);var Z=T(_),$=T(y)?T(y).innerHTML:"",ee=T(x),te=(re=T(p)).getAttribute(v),ne=re.getAttribute(g);G=ee.getAttribute(S);n.target.getAttribute("id")===x&&"disabled"===G||(D({modal:Z,modalContent:$,overlay:ee,modalFocusBackId:te,contentBackId:ne,backgroundEnabled:G,fromId:n.target.getAttribute("id")}),q.removeAttribute(M),L(w,E))}if(T(_)&&"keydown"===t){w=e.querySelector("body"),q=T(B),Z=T(_),$=T(y)?T(y).innerHTML:"",ee=T(x),te=(re=T(p)).getAttribute(v),ne=re.getAttribute(g);var re,ie=[].slice.call(Z.querySelectorAll(b));27===n.keyCode&&(D({modal:Z,modalContent:$,overlay:ee,modalFocusBackId:te,contentBackId:ne}),q.removeAttribute(M),L(w,E)),9===n.keyCode&&ie.indexOf(n.target)>=0&&(n.shiftKey?n.target===ie[0]&&(ie[ie.length-1].focus(),n.preventDefault()):n.target===ie[ie.length-1]&&(ie[0].focus(),n.preventDefault())),9===n.keyCode&&-1===ie.indexOf(n.target)&&(n.preventDefault(),ie[0].focus())}}),!0)}))};document.addEventListener("DOMContentLoaded",(function e(){R(),document.removeEventListener("DOMContentLoaded",e)})),window.van11yAccessibleModalWindowAria=R}(document)}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(e="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"6a562c1d2"},e.SENTRY_RELEASES=e.SENTRY_RELEASES||{},e.SENTRY_RELEASES["site-frontend-production@steelseries"]={id:"6a562c1d2"},function(){"use strict";var e=r("../../node_modules/react/index.js"),t=r("../../node_modules/react-dom/client.js");function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var s="function"==typeof Symbol&&Symbol.observable||"@@observable",A=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+A(),REPLACE:"@@redux/REPLACE"+A(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+A()}};function l(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function u(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(u)(e,t)}if("function"!=typeof e)throw new Error(a(2));var i=e,o=t,A=[],d=A,h=!1;function f(){d===A&&(d=A.slice())}function p(){if(h)throw new Error(a(3));return o}function m(e){if("function"!=typeof e)throw new Error(a(4));if(h)throw new Error(a(5));var t=!0;return f(),d.push(e),function(){if(t){if(h)throw new Error(a(6));t=!1,f();var n=d.indexOf(e);d.splice(n,1),A=null}}}function g(e){if(!l(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(h)throw new Error(a(9));try{h=!0,o=i(o,e)}finally{h=!1}for(var t=A=d,n=0;n<t.length;n++){(0,t[n])()}return e}function v(e){if("function"!=typeof e)throw new Error(a(10));i=e,g({type:c.REPLACE})}function y(){var e,t=m;return e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(p())}return n(),{unsubscribe:t(n)}}},e[s]=function(){return this},e}return g({type:c.INIT}),(r={dispatch:g,subscribe:m,getState:p,replaceReducer:v})[s]=y,r}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function h(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var f=h();f.withExtraArgument=h;var p=f,m=r("../../node_modules/redux-beacon/dist/index.js"),g=r("../../node_modules/@redux-beacon/google-tag-manager/dist/index.js"),v=r("../../node_modules/use-sync-external-store/shim/index.js"),y=r("../../node_modules/use-sync-external-store/shim/with-selector.js"),w=r("../../node_modules/react-dom/index.js");let b=function(e){e()};const B=()=>b,_=e.createContext(null);let x=null;function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}function S(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var E=r("../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=r.n(E),U=r("../../node_modules/react-is/index.js");const F=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function T(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s,A,c,l,u,d=!1;function h(d,h){const f=!o(h,A),p=!i(d,s);return s=d,A=h,f&&p?(c=e(s,A),t.dependsOnOwnProps&&(l=t(r,A)),u=n(c,l,A),u):f?(e.dependsOnOwnProps&&(c=e(s,A)),t.dependsOnOwnProps&&(l=t(r,A)),u=n(c,l,A),u):p?function(){const t=e(s,A),r=!a(t,c);return c=t,r&&(u=n(c,l,A)),u}():u}return function(i,o){return d?h(i,o):(s=i,A=o,c=e(s,A),l=t(r,A),u=n(c,l,A),d=!0,u)}}function Q(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function L(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function I(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=L(e);let i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=L(i),i=r(t,n)),i},r}}function k(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function P(e,t,n){return C({},n,e,t)}const O={notify(){},get:()=>[]};function D(e,t){let n,r=O;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){const e=B();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}const a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=O)},getListeners:()=>r};return a}const H=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?e.useLayoutEffect:e.useEffect;function R(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function N(e,t){if(R(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!R(e[n[r]],t[n[r]]))return!1;return!0}const z=["reactReduxForwardedRef"];let V=()=>{throw new Error("uSES not initialized!")};const j=[null,null];function K(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function G(e,t){return e===t}var W=function(t,n,r,{pure:i,areStatesEqual:o=G,areOwnPropsEqual:a=N,areStatePropsEqual:s=N,areMergedPropsEqual:A=N,forwardRef:c=!1,context:l=_}={}){const u=l,d=function(e){return e?"function"==typeof e?I(e):k(e,"mapStateToProps"):Q((()=>({})))}(t),h=function(e){return e&&"object"==typeof e?Q((t=>function(e,t){const n={};for(const r in e){const i=e[r];"function"==typeof i&&(n[r]=(...e)=>t(i(...e)))}return n}(e,t))):e?"function"==typeof e?I(e):k(e,"mapDispatchToProps"):Q((e=>({dispatch:e})))}(n),f=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let i,o=!1;return function(t,n,a){const s=e(t,n,a);return o?r(s,i)||(i=s):(o=!0,i=s),i}}}(e):k(e,"mergeProps"):()=>P}(r),p=Boolean(t);return t=>{const n=t.displayName||t.name||"Component",r=`Connect(${n})`,i={shouldHandleStateChanges:p,displayName:r,wrappedComponentName:n,WrappedComponent:t,initMapStateToProps:d,initMapDispatchToProps:h,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:A};function l(n){const[r,o,a]=(0,e.useMemo)((()=>{const{reactReduxForwardedRef:e}=n,t=S(n,z);return[n.context,e,t]}),[n]),s=(0,e.useMemo)((()=>r&&r.Consumer&&(0,U.isContextConsumer)(e.createElement(r.Consumer,null))?r:u),[r,u]),A=(0,e.useContext)(s),c=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=Boolean(A)&&Boolean(A.store);const d=c?n.store:A.store,h=l?A.getServerState:d.getState,f=(0,e.useMemo)((()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=S(t,F);return T(n(e,o),r(e,o),i(e,o),e,o)}(d.dispatch,i)),[d]),[m,g]=(0,e.useMemo)((()=>{if(!p)return j;const e=D(d,c?void 0:A.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,c,A]),v=(0,e.useMemo)((()=>c?A:C({},A,{subscription:m})),[c,A,m]),y=(0,e.useRef)(),w=(0,e.useRef)(a),b=(0,e.useRef)(),B=(0,e.useRef)(!1),_=((0,e.useRef)(!1),(0,e.useRef)(!1)),x=(0,e.useRef)();H((()=>(_.current=!0,()=>{_.current=!1})),[]);const E=(0,e.useMemo)((()=>()=>b.current&&a===w.current?b.current:f(d.getState(),a)),[d,a]),M=(0,e.useMemo)((()=>e=>m?function(e,t,n,r,i,o,a,s,A,c,l){if(!e)return()=>{};let u=!1,d=null;const h=()=>{if(u||!s.current)return;const e=t.getState();let n,h;try{n=r(e,i.current)}catch(e){h=e,d=e}h||(d=null),n===o.current?a.current||c():(o.current=n,A.current=n,a.current=!0,l())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}(p,d,m,f,w,y,B,_,b,g,e):()=>{}),[m]);var Q,L,I;let k;Q=K,L=[w,y,B,a,b,g],H((()=>Q(...L)),I);try{k=V(M,E,h?()=>f(h(),a):E)}catch(e){throw x.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${x.current.stack}\n\n`),e}H((()=>{x.current=void 0,b.current=void 0,y.current=k}));const P=(0,e.useMemo)((()=>e.createElement(t,C({},k,{ref:o}))),[o,t,k]);return(0,e.useMemo)((()=>p?e.createElement(s.Provider,{value:v},P):P),[s,P,v])}const m=e.memo(l);if(m.WrappedComponent=t,m.displayName=l.displayName=r,c){const n=e.forwardRef((function(t,n){return e.createElement(m,C({},t,{reactReduxForwardedRef:n}))}));return n.displayName=r,n.WrappedComponent=t,M()(n,t)}return M()(m,t)}};var q=function({store:t,context:n,children:r,serverState:i}){const o=(0,e.useMemo)((()=>{const e=D(t);return{store:t,subscription:e,getServerState:i?()=>i:void 0}}),[t,i]),a=(0,e.useMemo)((()=>t.getState()),[t]);H((()=>{const{subscription:e}=o;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[o,a]);const s=n||_;return e.createElement(s.Provider,{value:o},r)};var X;(e=>{x=e})(y.useSyncExternalStoreWithSelector),(e=>{V=e})(v.useSyncExternalStore),X=w.unstable_batchedUpdates,b=X;r("../../node_modules/van11y-accessible-modal-window-aria/dist/van11y-accessible-modal-window-aria.min.js");var J="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Y=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(J&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var Z=J&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),Y))}};function $(e){return e&&"[object Function]"==={}.toString.call(e)}function ee(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function te(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function ne(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=ee(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:ne(te(e))}function re(e){return e&&e.referenceNode?e.referenceNode:e}var ie=J&&!(!window.MSInputMethodContext||!document.documentMode),oe=J&&/MSIE 10/.test(navigator.userAgent);function ae(e){return 11===e?ie:10===e?oe:ie||oe}function se(e){if(!e)return document.documentElement;for(var t=ae(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===ee(n,"position")?se(n):n:e?e.ownerDocument.documentElement:document.documentElement}function Ae(e){return null!==e.parentNode?Ae(e.parentNode):e}function ce(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,A=o.commonAncestorContainer;if(e!==A&&t!==A||r.contains(i))return"BODY"===(s=(a=A).nodeName)||"HTML"!==s&&se(a.firstElementChild)!==a?se(A):A;var c=Ae(e);return c.host?ce(c.host,t):ce(e,Ae(t).host)}function le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=le(t,"top"),i=le(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function de(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function he(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],ae(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function fe(e){var t=e.body,n=e.documentElement,r=ae(10)&&getComputedStyle(n);return{height:he("Height",t,n,r),width:he("Width",t,n,r)}}var pe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},me=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ge=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function ye(e){return ve({},e,{right:e.left+e.width,bottom:e.top+e.height})}function we(e){var t={};try{if(ae(10)){t=e.getBoundingClientRect();var n=le(e,"top"),r=le(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?fe(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,A=e.offsetWidth-a,c=e.offsetHeight-s;if(A||c){var l=ee(e);A-=de(l,"x"),c-=de(l,"y"),i.width-=A,i.height-=c}return ye(i)}function be(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=ae(10),i="HTML"===t.nodeName,o=we(e),a=we(t),s=ne(e),A=ee(t),c=parseFloat(A.borderTopWidth),l=parseFloat(A.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var u=ye({top:o.top-a.top-c,left:o.left-a.left-l,width:o.width,height:o.height});if(u.marginTop=0,u.marginLeft=0,!r&&i){var d=parseFloat(A.marginTop),h=parseFloat(A.marginLeft);u.top-=c-d,u.bottom-=c-d,u.left-=l-h,u.right-=l-h,u.marginTop=d,u.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(u=ue(u,t)),u}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=be(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:le(n),s=t?0:le(n,"left"),A={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return ye(A)}function _e(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===ee(e,"position"))return!0;var n=te(e);return!!n&&_e(n)}function xe(e){if(!e||!e.parentElement||ae())return document.documentElement;for(var t=e.parentElement;t&&"none"===ee(t,"transform");)t=t.parentElement;return t||document.documentElement}function Ce(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?xe(e):ce(e,re(t));if("viewport"===r)o=Be(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=ne(te(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var A=be(s,a,i);if("HTML"!==s.nodeName||_e(a))o=A;else{var c=fe(e.ownerDocument),l=c.height,u=c.width;o.top+=A.top-A.marginTop,o.bottom=l+A.top,o.left+=A.left-A.marginLeft,o.right=u+A.left}}var d="number"==typeof(n=n||0);return o.left+=d?n:n.left||0,o.top+=d?n:n.top||0,o.right-=d?n:n.right||0,o.bottom-=d?n:n.bottom||0,o}function Se(e){return e.width*e.height}function Ee(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Ce(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},A=Object.keys(s).map((function(e){return ve({key:e},s[e],{area:Se(s[e])})})).sort((function(e,t){return t.area-e.area})),c=A.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:A[0].key,u=e.split("-")[1];return l+(u?"-"+u:"")}function Me(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?xe(t):ce(t,re(n));return be(n,i,r)}function Ue(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Fe(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function Te(e,t,n){n=n.split("-")[0];var r=Ue(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",A=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[A]/2-r[A]/2,i[s]=n===s?t[s]-r[c]:t[Fe(s)],i}function Qe(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Le(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=Qe(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function;var n=e.function||e.fn;e.enabled&&$(n)&&(t.offsets.popper=ye(t.offsets.popper),t.offsets.reference=ye(t.offsets.reference),t=n(t,e))})),t}function Ie(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Me(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Ee(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Te(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Le(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function ke(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function Pe(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function Oe(){return this.state.isDestroyed=!0,ke(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Pe("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function De(e){var t=e.ownerDocument;return t?t.defaultView:window}function He(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||He(ne(o.parentNode),t,n,r),r.push(o)}function Re(e,t,n,r){n.updateBound=r,De(e).addEventListener("resize",n.updateBound,{passive:!0});var i=ne(e);return He(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function Ne(){this.state.eventsEnabled||(this.state=Re(this.reference,this.options,this.state,this.scheduleUpdate))}function ze(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(e,t){return De(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}(this.reference,this.state))}function Ve(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function je(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Ve(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var Ke=J&&/Firefox/i.test(navigator.userAgent);function Ge(e,t,n){var r=Qe(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i);return i}var We=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],qe=We.slice(3);function Xe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=qe.indexOf(e),r=qe.slice(n+1).concat(qe.slice(0,n));return t?r.reverse():r}var Je="flip",Ye="clockwise",Ze="counterclockwise";function $e(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(Qe(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&a[s].indexOf(",");var A=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(A)[0]]),[a[s].split(A)[1]].concat(a.slice(s+1))]:[a];return c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return ye("%p"===a?n:r)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)}))})),c.forEach((function(e,t){e.forEach((function(n,r){Ve(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var et={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),A=s?"left":"top",c=s?"width":"height",l={start:ge({},A,o[A]),end:ge({},A,o[A]+o[c]-a[c])};e.offsets.popper=ve({},a,l[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],A=void 0;return A=Ve(+n)?[+n,0]:$e(n,o,a,s),"left"===s?(o.top+=A[0],o.left-=A[1]):"right"===s?(o.top+=A[0],o.left+=A[1]):"top"===s?(o.left+=A[0],o.top-=A[1]):"bottom"===s&&(o.left+=A[0],o.top+=A[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||se(e.instance.popper);e.instance.reference===n&&(n=se(n));var r=Pe("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var A=Ce(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=A;var c=t.priority,l=e.offsets.popper,u={primary:function(e){var n=l[e];return l[e]<A[e]&&!t.escapeWithReference&&(n=Math.max(l[e],A[e])),ge({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=l[n];return l[e]>A[e]&&!t.escapeWithReference&&(r=Math.min(l[n],A[e]-("right"===e?l.width:l.height))),ge({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=ve({},l,u[t](e))})),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",A=a?"left":"top",c=a?"width":"height";return n[s]<o(r[A])&&(e.offsets.popper[A]=o(r[A])-n[c]),n[A]>o(r[s])&&(e.offsets.popper[A]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Ge(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,A=-1!==["left","right"].indexOf(i),c=A?"height":"width",l=A?"Top":"Left",u=l.toLowerCase(),d=A?"left":"top",h=A?"bottom":"right",f=Ue(r)[c];s[h]-f<a[u]&&(e.offsets.popper[u]-=a[u]-(s[h]-f)),s[u]+f>a[h]&&(e.offsets.popper[u]+=s[u]+f-a[h]),e.offsets.popper=ye(e.offsets.popper);var p=s[u]+s[c]/2-f/2,m=ee(e.instance.popper),g=parseFloat(m["margin"+l]),v=parseFloat(m["border"+l+"Width"]),y=p-e.offsets.popper[u]-g-v;return y=Math.max(Math.min(a[c]-f,y),0),e.arrowElement=r,e.offsets.arrow=(ge(n={},u,Math.round(y)),ge(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(ke(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Ce(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=Fe(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Je:a=[r,i];break;case Ye:a=Xe(r);break;case Ze:a=Xe(r,!0);break;default:a=t.behavior}return a.forEach((function(s,A){if(r!==s||a.length===A+1)return e;r=e.placement.split("-")[0],i=Fe(r);var c=e.offsets.popper,l=e.offsets.reference,u=Math.floor,d="left"===r&&u(c.right)>u(l.left)||"right"===r&&u(c.left)<u(l.right)||"top"===r&&u(c.bottom)>u(l.top)||"bottom"===r&&u(c.top)<u(l.bottom),h=u(c.left)<u(n.left),f=u(c.right)>u(n.right),p=u(c.top)<u(n.top),m=u(c.bottom)>u(n.bottom),g="left"===r&&h||"right"===r&&f||"top"===r&&p||"bottom"===r&&m,v=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(v&&"start"===o&&h||v&&"end"===o&&f||!v&&"start"===o&&p||!v&&"end"===o&&m),w=!!t.flipVariationsByContent&&(v&&"start"===o&&f||v&&"end"===o&&h||!v&&"start"===o&&m||!v&&"end"===o&&p),b=y||w;(d||g||b)&&(e.flipped=!0,(d||g)&&(r=a[A+1]),b&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=ve({},e.offsets.popper,Te(e.instance.popper,e.offsets.reference,e.placement)),e=Le(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=Fe(t),e.offsets.popper=ye(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Ge(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Qe(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=Qe(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration,a=void 0!==o?o:t.gpuAcceleration,s=se(e.instance.popper),A=we(s),c={position:i.position},l=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},A=o(i.width),c=o(r.width),l=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),d=t?l||u||A%2==c%2?o:a:s,h=t?o:s;return{left:d(A%2==1&&c%2==1&&!u&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:d(r.right)}}(e,window.devicePixelRatio<2||!Ke),u="bottom"===n?"top":"bottom",d="right"===r?"left":"right",h=Pe("transform"),f=void 0,p=void 0;if(p="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-A.height+l.bottom:l.top,f="right"===d?"HTML"===s.nodeName?-s.clientWidth+l.right:-A.width+l.right:l.left,a&&h)c[h]="translate3d("+f+"px, "+p+"px, 0)",c[u]=0,c[d]=0,c.willChange="transform";else{var m="bottom"===u?-1:1,g="right"===d?-1:1;c[u]=p*m,c[d]=f*g,c.willChange=u+", "+d}var v={"x-placement":e.placement};return e.attributes=ve({},v,e.attributes),e.styles=ve({},c,e.styles),e.arrowStyles=ve({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return je(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&je(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=Me(i,t,e,n.positionFixed),a=Ee(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),je(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:et},nt=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};pe(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=Z(this.update.bind(this)),this.options=ve({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(ve({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=ve({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return ve({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&$(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return me(e,[{key:"update",value:function(){return Ie.call(this)}},{key:"destroy",value:function(){return Oe.call(this)}},{key:"enableEventListeners",value:function(){return Ne.call(this)}},{key:"disableEventListeners",value:function(){return ze.call(this)}}]),e}();nt.Utils=("undefined"!=typeof window?window:r.g).PopperUtils,nt.placements=We,nt.Defaults=tt;var rt=nt;var it=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ot=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},st=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),At.call(this),n=ot({},at,n),t.jquery&&(t=t[0]),this.reference=t,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(e){return-1!==["click","hover","focus"].indexOf(e)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(t,r,n)}return it(e,[{key:"_create",value:function(e,t,n,r){var i=window.document.createElement("div");i.innerHTML=t.trim();var o=i.childNodes[0];o.id="tooltip_"+Math.random().toString(36).substr(2,10),o.setAttribute("aria-hidden","false");var a=i.querySelector(this.options.innerSelector);return this._addTitleContent(e,n,r,a),o}},{key:"_addTitleContent",value:function(e,t,n,r){var i;1===t.nodeType||11===t.nodeType?n&&r.appendChild(t):(i=t)&&"[object Function]"==={}.toString.call(i)?this._addTitleContent(e,t.call(e),n,r):n?r.innerHTML=t:r.textContent=t}},{key:"_show",value:function(e,t){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var n=e.getAttribute("title")||t.title;if(!n)return this;var r=this._create(e,t.template,n,t.html);e.setAttribute("aria-describedby",r.id);var i=this._findContainer(t.container,e);return this._append(r,i),this._popperOptions=ot({},t.popperOptions,{placement:t.placement}),this._popperOptions.modifiers=ot({},this._popperOptions.modifiers,{arrow:ot({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:t.arrowSelector}),offset:ot({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:t.offset||this._popperOptions.modifiers&&this._popperOptions.modifiers.offset&&this._popperOptions.modifiers.offset.offset||t.offset})}),t.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:t.boundariesElement}),this.popperInstance=new rt(e,r,this._popperOptions),this._tooltipNode=r,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var e=this;return this._events.forEach((function(t){var n=t.func,r=t.event;e.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}},{key:"_append",value:function(e,t){t.appendChild(e)}},{key:"_setEventListeners",value:function(e,t,n){var r=this,i=[],o=[];t.forEach((function(e){switch(e){case"hover":i.push("mouseenter"),o.push("mouseleave");break;case"focus":i.push("focus"),o.push("blur");break;case"click":i.push("click"),o.push("click")}})),i.forEach((function(t){var i=function(t){!0!==r._isOpening&&(t.usedByTooltip=!0,r._scheduleShow(e,n.delay,n,t))};r._events.push({event:t,func:i}),e.addEventListener(t,i)})),o.forEach((function(t){var i=function(t){!0!==t.usedByTooltip&&r._scheduleHide(e,n.delay,n,t)};r._events.push({event:t,func:i}),e.addEventListener(t,i),"click"===t&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(t){if(r._isOpening){var n=r.popperInstance.popper;e.contains(t.target)||n.contains(t.target)||i(t)}}),!0)}))}},{key:"_scheduleShow",value:function(e,t,n){var r=this;this._isOpening=!0;var i=t&&t.show||t||0;this._showTimeout=window.setTimeout((function(){return r._show(e,n)}),i)}},{key:"_scheduleHide",value:function(e,t,n,r){var i=this;this._isOpening=!1;var o=t&&t.hide||t||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===r.type)if(i._setTooltipNodeEvent(r,e,t,n))return;i._hide(e,n)}}),o)}},{key:"_updateTitleContent",value:function(e){if(void 0!==this._tooltipNode){var t=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(t,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,e,this.options.html,t),this.options.title=e,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=e)}},{key:"_clearTitleContent",value:function(e,t,n){1===n.nodeType||11===n.nodeType?t&&e.removeChild(n):t?e.innerHTML="":e.textContent=""}}]),e}(),At=function(){var e=this;this.show=function(){return e._show(e.reference,e.options)},this.hide=function(){return e._hide()},this.dispose=function(){return e._dispose()},this.toggle=function(){return e._isOpen?e.hide():e.show()},this.updateTitleContent=function(t){return e._updateTitleContent(t)},this._events=[],this._setTooltipNodeEvent=function(t,n,r,i){var o=t.relatedreference||t.toElement||t.relatedTarget;return!!e._tooltipNode.contains(o)&&(e._tooltipNode.addEventListener(t.type,(function r(o){var a=o.relatedreference||o.toElement||o.relatedTarget;e._tooltipNode.removeEventListener(t.type,r),n.contains(a)||e._scheduleHide(n,i.delay,i,o)})),!0)}},ct=st;function lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var ut=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=lt({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=t.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",lt({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,lt({},this.attributes,t))},withConverter:function(t){return e(lt({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),dt=ut,ht={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},ft=console,pt={};Object.keys(ht).forEach((function(e){pt[e]=ft[e]}));var mt="Datadog Browser SDK:",gt={debug:pt.debug.bind(ft,mt),log:pt.log.bind(ft,mt),info:pt.info.bind(ft,mt),warn:pt.warn.bind(ft,mt),error:pt.error.bind(ft,mt)};function vt(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return e.apply(void 0,n)}catch(e){gt.error(t,e)}}}var yt,wt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},bt=!1;function Bt(e){bt=e}function _t(e){return function(){return xt(e,this,arguments)}}function xt(e,t,n){try{return e.apply(t,n)}catch(e){if(Ct(e),yt)try{yt(e)}catch(e){Ct(e)}}}function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];bt&&gt.error.apply(gt,wt(["[MONITOR]"],e,!1))}function St(e,t){return-1!==e.indexOf(t)}function Et(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){return t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function Mt(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}function Ut(e){return Object.keys(e).map((function(t){return e[t]}))}function Ft(e){return Object.keys(e).map((function(t){return[t,e[t]]}))}function Tt(e,t){return e.slice(0,t.length)===t}function Qt(e){return window.CSS&&window.CSS.escape?window.CSS.escape(e):e.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(e,t){return t?"\0"===e?"�":"".concat(e.slice(0,-1),"\\").concat(e.charCodeAt(e.length-1).toString(16)," "):"\\".concat(e)}))}function Lt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function It(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}var kt=/[^\u0000-\u007F]/;function Pt(e){return kt.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function Ot(e,t){var n,r=It();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function Dt(e,t){return Ot(It(),"setTimeout")(_t(e),t)}function Ht(e){Ot(It(),"clearTimeout")(e)}function Rt(e,t){return Ot(It(),"setInterval")(_t(e),t)}function Nt(e){Ot(It(),"clearInterval")(e)}function zt(e,t,n){var r,i,o=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1;return{throttled:function(){for(var n=[],A=0;A<arguments.length;A++)n[A]=arguments[A];s?r=n:(o?e.apply(void 0,n):r=n,s=!0,i=Dt((function(){a&&r&&e.apply(void 0,r),s=!1,r=void 0}),t))},cancel:function(){Ht(i),s=!1,r=void 0}}}function Vt(){}function jt(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function Kt(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],o=0;o<t.length;++o)i[o]=Kt(i[o],t[o],n);return i}var a="object"===jt(e)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=Kt(a[s],t[s],n));return a}}function Gt(e){return Kt(void 0,e)}function Wt(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];null!=o&&(e=Kt(e,o))}return e}function qt(e,t,n){if("object"!=typeof e||null===e)return JSON.stringify(e);var r=Xt(Object.prototype),i=Xt(Array.prototype),o=Xt(Object.getPrototypeOf(e)),a=Xt(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),i(),o(),a()}}function Xt(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):Vt}function Jt(e,t){var n;void 0===t&&(t=225280);var r=Xt(Object.prototype),i=Xt(Array.prototype),o=[],a=new WeakMap,s=Yt(e,"$",void 0,o,a),A=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(!(A>t)){for(;o.length>0&&A<t;){var c=o.shift(),l=0;if(Array.isArray(c.source))for(var u=0;u<c.source.length;u++){if(A+=void 0!==(d=Yt(c.source[u],c.path,u,o,a))?JSON.stringify(d).length:4,A+=l,l=1,A>t){Zt(t,"truncated",e);break}c.target[u]=d}else for(var u in c.source)if(Object.prototype.hasOwnProperty.call(c.source,u)){var d;if(void 0!==(d=Yt(c.source[u],c.path,u,o,a))&&(A+=JSON.stringify(d).length+l+u.length+3,l=1),A>t){Zt(t,"truncated",e);break}c.target[u]=d}}return r(),i(),s}Zt(t,"discarded",e)}function Yt(e,t,n,r,i){var o=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!o||"object"!=typeof o)return function(e){if("bigint"==typeof e)return"[BigInt] ".concat(e.toString());if("function"==typeof e)return"[Function] ".concat(e.name||"unknown");if("symbol"==typeof e)return"[Symbol] ".concat(e.description||e.toString());return e}(o);var a=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"[".concat(t[1],"]")}catch(e){}return"[Unserializable]"}(o);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(i.has(s))return"[Reference seen at ".concat(i.get(s),"]");var A=void 0!==n?"".concat(t,".").concat(n):t,c=Array.isArray(o)?[]:{};return i.set(s,A),r.push({source:o,target:c,path:A}),c}function Zt(e,t,n){gt.warn("The data provided has been ".concat(t," as it is over the limit of ").concat(e," characters:"),n)}var $t,en=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter((function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function tn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new en((function(){var t=e.map((function(e){return e.subscribe((function(e){return n.notify(e)}))}));return function(){return t.forEach((function(e){return e.unsubscribe()}))}}));return n}var nn=(($t={})[0]="feature flag evaluation",$t[1]="user",$t[2]="global context",$t[3]="logger context",$t);function rn(e,t){return e>3072&&(gt.warn("The ".concat(nn[t]," data exceeds the recommended ").concat(3,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}function on(e,t){void 0===t&&(t=Pt);var n,r={},i=!1,o=new en,a=zt((function(r){n=t(qt(r)),i||(i=rn(n,e))}),200).throttled,s={getBytesCount:function(){return n},get:function(){return r},add:function(e,t){r[e]=t,a(r),o.notify()},remove:function(e){delete r[e],a(r),o.notify()},set:function(e){a(r=e),o.notify()},getContext:function(){return Gt(r)},setContext:function(e){"object"===jt(e)?(r=Jt(e),a(r)):s.clearContext(),o.notify()},setContextProperty:function(e,t){r[e]=Jt(t),a(r),o.notify()},removeContextProperty:function(e){delete r[e],a(r),o.notify()},clearContext:function(){r={},n=0,o.notify()},changeObservable:o};return s}var an=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach((function(e){return e()})),this.buffer.length=0},e}();function sn(e){return 0!==e&&100*Math.random()<=e}function An(e,t){return+e.toFixed(t)}function cn(e){return ln(e)&&e>=0&&e<=100}function ln(e){return"number"==typeof e}var un,dn,hn=1e3,fn=6e4;function pn(e){return{relative:e,timeStamp:mn(e)}}function mn(e){var t=vn()-performance.now();return t>Sn()?Math.round(xn(t,e)):function(e){return Math.round(xn(Sn(),e))}(e)}function gn(e){return ln(e)?An(1e6*e,0):e}function vn(){return(new Date).getTime()}function yn(){return vn()}function wn(){return performance.now()}function bn(){return{relative:wn(),timeStamp:yn()}}function Bn(){return{relative:0,timeStamp:Sn()}}function _n(e,t){return t-e}function xn(e,t){return e+t}function Cn(e){return e-Sn()}function Sn(){return void 0===un&&(un=performance.timing.navigationStart),un}function En(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,En)}function Mn(e,t){var n=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")).exec(e);return n?n[1]:void 0}function Un(e,t,n){void 0===n&&(n="");var r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:"".concat(e.slice(0,i)).concat(n)}function Fn(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires=".concat(i.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",A=r&&r.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(o,";path=/;samesite=").concat(a).concat(s).concat(A)}function Tn(e){return Mn(document.cookie,e)}function Qn(e,t){Fn(e,"",0,t)}function Ln(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||Tn("datadog-synthetics-injects-rum"))}function In(){var e=It().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n){e.send(JSON.stringify({eventType:t,event:n}))}}}function kn(e){var t;void 0===e&&(e=null===(t=It().location)||void 0===t?void 0:t.hostname);var n=In();return!!n&&n.getAllowedWebViewHosts().some((function(t){return e===t||(n=e,r=".".concat(t),n.slice(-r.length)===r);var n,r}))}function Pn(e,t,n,r,i){return On(e,t,[n],r,i)}function On(e,t,n,r,i){var o=void 0===i?{}:i,a=o.once,s=o.capture,A=o.passive,c=_t(a?function(e){d(),r(e)}:r),l=A?{capture:s,passive:A}:s,u=Ot(t,"addEventListener");function d(){var e=Ot(t,"removeEventListener");n.forEach((function(n){return e.call(t,n,c,l)}))}return n.forEach((function(e){return u.call(t,e,c,l)})),{stop:d}}var Dn="_dd_c",Hn=[];function Rn(e,t,n,r){void 0===r&&(r=Pt);var i=function(e,t){return"".concat(Dn,"_").concat(e,"_").concat(t)}(t,n),o=on(n,r);return a(),Hn.push(Pn(e,window,"storage",(function(e){var t=e.key;i===t&&a()}))),o.changeObservable.subscribe((function(){localStorage.setItem(i,JSON.stringify(o.getContext()))})),o;function a(){var e=localStorage.getItem(i),t=null!==e?JSON.parse(e):{};o.setContext(t)}}var Nn="?";function zn(e){var t=[],n=Yn(e,"stack"),r=String(e);return n&&Tt(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach((function(e){var n=function(e){var t=Kn.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),i=Gn.exec(t[2]);r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Nn,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=Wn.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:Nn,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=qn.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Nn,line:+t[3],url:t[2]}}(e)||function(e){var t=Xn.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=Jn.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Nn,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=Nn),t.push(n))})),{message:Yn(e,"message"),name:Yn(e,"name"),stack:t}}var Vn="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",jn="(?::(\\d+))",Kn=new RegExp("^\\s*at (.*?) ?\\(".concat(Vn).concat(jn,"?").concat(jn,"?\\)?\\s*$"),"i"),Gn=new RegExp("\\((\\S*)".concat(jn).concat(jn,"\\)"));var Wn=new RegExp("^\\s*at ?".concat(Vn).concat(jn,"?").concat(jn,"??\\s*$"),"i");var qn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Xn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Jn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Yn(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var Zn,$n="No stack, consider using an instance of Error";function er(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,i=e.startClocks,o=e.nonErrorPrefix,a=e.source,s=e.handling,A=n instanceof Error,c=function(e,t,n,r){return(null==e?void 0:e.message)&&(null==e?void 0:e.name)?e.message:t?"Empty message":"".concat(n," ").concat(qt(Jt(r)))}(t,A,o,n),l=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(A,t)?nr(t):$n,u=A?function(e,t){var n=e,r=[];for(;(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var i=zn(n.cause);r.push({message:n.cause.message,source:t,type:null==i?void 0:i.name,stack:i&&nr(i)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:i,source:a,handling:s,handlingStack:r,originalError:n,type:null==t?void 0:t.name,message:c,stack:l,causes:u,fingerprint:tr(n)}}function tr(e){return e instanceof Error&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function nr(e){var t=rr(e);return e.stack.forEach((function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",i=e.line?":".concat(e.line):"",o=e.line&&e.column?":".concat(e.column):"";t+="\n  at ".concat(n).concat(r," @ ").concat(e.url).concat(i).concat(o)})),t}function rr(e){return"".concat(e.name||"Error",": ").concat(e.message)}function ir(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return xt((function(){var n=zn(t);n.stack=n.stack.slice(2),e=nr(n)})),e}function or(e){var t=Lt({},e);return["id","name","email"].forEach((function(e){e in t&&(t[e]=String(t[e]))})),t}!function(e){e.PAGEHIDE="pagehide",e.FEATURE_FLAGS="feature_flags",e.RESOURCE_PAGE_STATES="resource_page_states",e.PAGE_STATES="page_states",e.COLLECT_FLUSH_REASON="collect_flush_reason",e.NO_RESOURCE_DURATION_FROZEN_STATE="no_resource_duration_frozen_state",e.SCROLLMAP="scrollmap",e.INTERACTION_TO_NEXT_PAINT="interaction_to_next_paint",e.WEB_VITALS_ATTRIBUTION="web_vitals_attribution",e.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(Zn||(Zn={}));var ar=new Set;function sr(e){return ar.has(e)}function Ar(){return ar}function cr(e){return Lt({},e)}function lr(e,t){return Object.keys(e).some((function(n){return e[n]===t}))}function ur(e){return 0===Object.keys(e).length}var dr,hr,fr,pr=144e5,mr=9e5;var gr="_dd_s",vr=/^([a-z]+)=([a-z0-9-]+)$/,yr="&";function wr(e){return ur(e)}function br(e){e.expire=String(vn()+mr)}function Br(e){return Ft(e).map((function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)})).join("&")}function _r(e){var t={};return function(e){return!!e&&(-1!==e.indexOf(yr)||vr.test(e))}(e)&&e.split(yr).forEach((function(e){var n=vr.exec(e);if(null!==n){var r=n[1],i=n[2];t[r]=i}})),t}function xr(e){var t=function(e){var t={};t.secure=!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===dn){for(var e="dd_site_test_".concat(En()),t=window.location.hostname.split("."),n=t.pop();t.length&&!Tn(e);)n="".concat(t.pop(),".").concat(n),Fn(e,"test",hn,{domain:n});Qn(e,{domain:n}),dn=n}return dn}());return t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="dd_cookie_test_".concat(En()),n="test";Fn(t,n,fn,e);var r=Tn(t)===n;return Qn(t,e),r}catch(e){return gt.error(e),!1}}(t)?{type:"Cookie",cookieOptions:t}:void 0}function Cr(e){var t,n={isLockEnabled:null!=hr?hr:hr=!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent),persistSession:(t=e,function(e){Fn(gr,Br(e),mr,t)}),retrieveSession:Sr,clearSession:Er(e)};return function(e){if(!Tn(gr)){var t=Tn("_dd"),n=Tn("_dd_r"),r=Tn("_dd_l"),i={};t&&(i.id=t),r&&/^[01]$/.test(r)&&(i.logs=r),n&&/^[012]$/.test(n)&&(i.rum=n),wr(i)||(br(i),e.persistSession(i))}}(n),n}function Sr(){return _r(Tn(gr))}function Er(e){return function(){Qn(gr,e)}}function Mr(e){localStorage.setItem(gr,Br(e))}function Ur(){return _r(localStorage.getItem(gr))}function Fr(){localStorage.removeItem(gr)}var Tr,Qr=[];function Lr(e,t,n){var r;void 0===n&&(n=0);var i=t.isLockEnabled,o=t.retrieveSession,a=t.persistSession,s=t.clearSession;if(Tr||(Tr=e),e===Tr)if(i&&n>=100)kr(t);else{var A,c=o();if(i){if(c.lock)return void Ir(e,t,n);if(A=En(),c.lock=A,a(c),(c=o()).lock!==A)return void Ir(e,t,n)}var l=e.process(c);if(i&&(c=o()).lock!==A)Ir(e,t,n);else{if(l&&(wr(l)?s():(br(l),a(l))),i&&(!l||!wr(l))){if((c=o()).lock!==A)return void Ir(e,t,n);delete c.lock,a(c),l=c}null===(r=e.after)||void 0===r||r.call(e,l||c),kr(t)}}else Qr.push(e)}function Ir(e,t,n){Dt((function(){Lr(e,t,n+1)}),10)}function kr(e){Tr=void 0;var t=Qr.shift();t&&Lr(t,e)}function Pr(e){var t=xr(e);return!t&&e.allowFallbackToLocalStorage&&(t=function(){try{var e=En(),t="".concat("_dd_test_").concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:"LocalStorage"}:void 0}catch(e){return}}()),t}function Or(e,t,n){var r=new en,i=new en,o="Cookie"===e.type?Cr(e.cookieOptions):{isLockEnabled:!1,persistSession:Mr,retrieveSession:Ur,clearSession:Fr},a=o.clearSession,s=o.retrieveSession,A=Rt((function(){Lr({process:function(e){return d(e)?void 0:{}},after:l},o)}),1e3),c=function(){var e=s();if(d(e))return e;return{}}();function l(e){return d(e)||(e={}),u()&&(!function(e){return c.id!==e.id||c[t]!==e[t]}(e)?c=e:(c={},i.notify())),e}function u(){return void 0!==c[t]}function d(e){return(void 0===e.created||vn()-Number(e.created)<pr)&&(void 0===e.expire||vn()<Number(e.expire))}return{expandOrRenewSession:zt((function(){var e;Lr({process:function(r){var i=l(r);return e=function(e){var r=n(e[t]),i=r.trackingType,o=r.isTracked;e[t]=i,o&&!e.id&&(e.id=En(),e.created=String(vn()));return o}(i),i},after:function(t){e&&!u()&&function(e){c=e,r.notify()}(t),c=t}},o)}),1e3).throttled,expandSession:function(){Lr({process:function(e){return u()?l(e):void 0}},o)},getSession:function(){return c},renewObservable:r,expireObservable:i,expire:function(){a(),l({})},stop:function(){Nt(A)}}}function Dr(e){return Rr(e,Vr(window.location)).href}function Hr(e){return Vr(Rr(e))}function Rr(e,t){var n=function(){if(void 0===Nr)try{var e=new zr("http://test/path");Nr="http://test/path"===e.href}catch(e){Nr=!1}return Nr?zr:void 0}();if(n)try{return void 0!==t?new n(e,t):new n(e)}catch(n){throw new Error("Failed to construct URL: ".concat(String(n)," ").concat(qt({url:e,base:t})))}if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var r=document,i=r.createElement("a");if(void 0!==t){var o=(r=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,r.head.appendChild(o),r.body.appendChild(i)}return i.href=e,i}var Nr,zr=URL;function Vr(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}var jr="datad0g.com",Kr="datadoghq.com",Gr="datadoghq.eu",Wr="ap1.datadoghq.com",qr={logs:"logs",rum:"rum",sessionReplay:"session-replay"},Xr={logs:"logs",rum:"rum",sessionReplay:"replay"};function Jr(e,t,n){var r=function(e,t){var n="/api/v2/".concat(Xr[t]),r=e.proxy,i=e.proxyUrl;if(r){var o=Dr(r);return function(e){return"".concat(o,"?ddforward=").concat(encodeURIComponent("".concat(n,"?").concat(e)))}}var a=function(e,t){var n=e.site,r=void 0===n?Kr:n,i=e.internalAnalyticsSubdomain;if(i&&r===Kr)return"".concat(i,".").concat(Kr);var o=r.split("."),a=o.pop(),s=r!==Wr?"".concat(qr[t],"."):"";return"".concat(s,"browser-intake-").concat(o.join("-"),".").concat(a)}(e,t);if(void 0===r&&i){var s=Dr(i);return function(e){return"".concat(s,"?ddforward=").concat(encodeURIComponent("https://".concat(a).concat(n,"?").concat(e)))}}return function(e){return"https://".concat(a).concat(n,"?").concat(e)}}(e,t);return{build:function(i,o){var a=function(e,t,n,r,i){var o=e.clientToken,a=e.internalAnalyticsSubdomain,s=i.retry,A=i.flushReason,c=i.encoding,l=["sdk_version:".concat("4.50.1"),"api:".concat(r)].concat(n);A&&sr(Zn.COLLECT_FLUSH_REASON)&&l.push("flush_reason:".concat(A));s&&l.push("retry_count:".concat(s.count),"retry_after:".concat(s.lastFailureStatus));var u=["ddsource=browser","ddtags=".concat(encodeURIComponent(l.join(","))),"dd-api-key=".concat(o),"dd-evp-origin-version=".concat(encodeURIComponent("4.50.1")),"dd-evp-origin=browser","dd-request-id=".concat(En())];c&&u.push("dd-evp-encoding=".concat(c));"rum"===t&&u.push("batch_time=".concat(yn()));a&&u.reverse();return u.join("&")}(e,t,n,i,o);return r(a)},urlPrefix:r(""),endpointType:t}}var Yr=/[^a-z0-9_:./-]/;function Zr(e,t){var n=200-e.length-1;(t.length>n||Yr.test(t))&&gt.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var r=t.replace(/,/g,"_");return"".concat(e,":").concat(r)}function $r(e){var t=function(e){var t=e.env,n=e.service,r=e.version,i=e.datacenter,o=[];return t&&o.push(Zr("env",t)),n&&o.push(Zr("service",n)),r&&o.push(Zr("version",r)),i&&o.push(Zr("datacenter",i)),o}(e),n=function(e,t){return{logsEndpointBuilder:Jr(e,"logs",t),rumEndpointBuilder:Jr(e,"rum",t),sessionReplayEndpointBuilder:Jr(e,"sessionReplay",t)}}(e,t),r=Ut(n).map((function(e){return e.urlPrefix})),i=function(e,t,n){if(!e.replica)return;var r=Lt({},e,{site:Kr,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:Jr(r,"logs",n),rumEndpointBuilder:Jr(r,"rum",n)};return t.push.apply(t,Ut(i).map((function(e){return e.urlPrefix}))),Lt({applicationId:e.replica.applicationId},i)}(e,r,t);return Lt({isIntakeUrl:function(e){return r.some((function(t){return 0===e.indexOf(t)}))},replica:i,site:e.site||Kr},n)}var ei={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function ti(e){var t,n,r;if(e&&e.clientToken){var i=null!==(t=e.sessionSampleRate)&&void 0!==t?t:e.sampleRate;if(void 0===i||cn(i))if(void 0===e.telemetrySampleRate||cn(e.telemetrySampleRate)){if(void 0===e.telemetryConfigurationSampleRate||cn(e.telemetryConfigurationSampleRate))return Array.isArray(e.enableExperimentalFeatures)&&e.enableExperimentalFeatures.filter((function(e){return lr(Zn,e)})).forEach((function(e){ar.add(e)})),Lt({beforeSend:e.beforeSend&&vt(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:Pr(e),sessionSampleRate:null!=i?i:100,telemetrySampleRate:null!==(n=e.telemetrySampleRate)&&void 0!==n?n:20,telemetryConfigurationSampleRate:null!==(r=e.telemetryConfigurationSampleRate)&&void 0!==r?r:5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},$r(e));gt.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else gt.error("Telemetry Sample Rate should be a number between 0 and 100");else gt.error("Session Sample Rate should be a number between 0 and 100")}else gt.error("Client Token is not configured, we will not send any data.")}function ni(e){var t=jt(e);return"string"===t||"function"===t||e instanceof RegExp}function ri(e,t,n){return void 0===n&&(n=!1),e.some((function(e){try{if("function"==typeof e)return e(t);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return n?Tt(t,e):e===t}catch(e){gt.error(e)}return!1}))}function ii(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function oi(e,t,n,r){if(void 0!==ai()&&n.findTrackedSession()){var i,o,a,s,A,c=Mt(e.allowedTracingUrls,(function(e){return ri([e.match],t.url,!0)}));if(c)t.traceId=new si,t.spanId=new si,t.traceSampled=!ln(e.traceSampleRate)||sn(e.traceSampleRate),r((i=t.traceId,o=t.spanId,a=t.traceSampled,s=c.propagatorTypes,A={},s.forEach((function(e){switch(e){case"datadog":Lt(A,{"x-datadog-origin":"rum","x-datadog-parent-id":o.toDecimalString(),"x-datadog-sampling-priority":a?"1":"0","x-datadog-trace-id":i.toDecimalString()});break;case"tracecontext":Lt(A,{traceparent:"00-0000000000000000".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-0").concat(a?"1":"0")});break;case"b3":Lt(A,{b3:"".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-").concat(a?"1":"0")});break;case"b3multi":Lt(A,{"X-B3-TraceId":i.toPaddedHexadecimalString(),"X-B3-SpanId":o.toPaddedHexadecimalString(),"X-B3-Sampled":a?"1":"0"})}})),A))}}function ai(){return window.crypto||window.msCrypto}var si=function(){function e(){this.buffer=new Uint8Array(8),ai().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return e.prototype.toString=function(e){var t=this.readInt32(0),n=this.readInt32(4),r="";do{var i=t%e*4294967296+n;t=Math.floor(t/e),n=Math.floor(i/e),r=(i%e).toString(e)+r}while(t||n);return r},e.prototype.toDecimalString=function(){return this.toString(10)},e.prototype.toPaddedHexadecimalString=function(){var e=this.toString(16);return Array(17-e.length).join("0")+e},e.prototype.readInt32=function(e){return 16777216*this.buffer[e]+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]},e}();function Ai(e){var t,n,r,i,o,a;if(e.applicationId)if(void 0===e.sessionReplaySampleRate||cn(e.sessionReplaySampleRate)){var s=null!==(t=e.premiumSampleRate)&&void 0!==t?t:e.replaySampleRate;if(void 0!==s&&void 0!==e.sessionReplaySampleRate&&(gt.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),s=void 0),void 0===s||cn(s)){var A=null!==(n=e.traceSampleRate)&&void 0!==n?n:e.tracingSampleRate;if(void 0===A||cn(A))if(void 0===e.excludedActivityUrls||Array.isArray(e.excludedActivityUrls)){var c=function(e){void 0!==e.allowedTracingUrls&&void 0!==e.allowedTracingOrigins&&gt.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==e.allowedTracingUrls){if(!Array.isArray(e.allowedTracingUrls))return void gt.error("Allowed Tracing URLs should be an array");if(0!==e.allowedTracingUrls.length&&void 0===e.service)return void gt.error("Service needs to be configured when tracing is enabled");var t=[];return e.allowedTracingUrls.forEach((function(e){var n;ni(e)?t.push({match:e,propagatorTypes:["datadog"]}):"object"===jt(n=e)&&ni(n.match)&&Array.isArray(n.propagatorTypes)?t.push(e):gt.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",e)})),t}if(void 0!==e.allowedTracingOrigins){if(!Array.isArray(e.allowedTracingOrigins))return void gt.error("Allowed Tracing Origins should be an array");if(0!==e.allowedTracingOrigins.length&&void 0===e.service)return void gt.error("Service needs to be configured when tracing is enabled");var n=[];return e.allowedTracingOrigins.forEach((function(e){var t=function(e){var t;"string"==typeof e?t=e:e instanceof RegExp?t=function(t){return e.test(Hr(t))}:"function"==typeof e&&(t=function(t){return e(Hr(t))});if(void 0===t)return void gt.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",e);return{match:t,propagatorTypes:["datadog"]}}(e);t&&n.push(t)})),n}return[]}(e);if(c){var l=ti(e);if(l){var u=!!(null!==(r=e.trackUserInteractions)&&void 0!==r?r:e.trackInteractions),d=!!e.trackFrustrations;return Lt({applicationId:e.applicationId,version:e.version,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:null!==(o=null!==(i=e.sessionReplaySampleRate)&&void 0!==i?i:s)&&void 0!==o?o:100,oldPlansBehavior:void 0===e.sessionReplaySampleRate,traceSampleRate:A,allowedTracingUrls:c,excludedActivityUrls:null!==(a=e.excludedActivityUrls)&&void 0!==a?a:[],workerUrl:e.workerUrl,trackUserInteractions:u||d,trackFrustrations:d,trackViewsManually:!!e.trackViewsManually,trackResources:e.trackResources,trackLongTasks:e.trackLongTasks,subdomain:e.subdomain,defaultPrivacyLevel:lr(ei,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:ei.MASK_USER_INPUT,customerDataTelemetrySampleRate:1},l)}}}else gt.error("Excluded Activity Urls should be an array");else gt.error("Trace Sample Rate should be a number between 0 and 100")}else gt.error("Premium Sample Rate should be a number between 0 and 100")}else gt.error("Session Replay Sample Rate should be a number between 0 and 100");else gt.error("Application ID is not configured, no RUM data will be collected.")}function ci(e){var t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach((function(e){ni(e)?t.add("datadog"):"object"===jt(e)&&Array.isArray(e.propagatorTypes)&&e.propagatorTypes.forEach((function(e){return t.add(e)}))})),Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0&&t.add("datadog"),Et(t)}function li(e,t,n){return{context:e.getContext(),user:t.getContext(),hasReplay:!!n.isRecording()||void 0}}function ui(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var di,hi="log",fi="configuration",pi=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],mi=["ddog-gov.com"],gi={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function vi(e,t){var n,r=new en;gi.telemetryEnabled=!St(mi,t.site)&&sn(t.telemetrySampleRate),gi.telemetryConfigurationEnabled=gi.telemetryEnabled&&sn(t.telemetryConfigurationSampleRate);var i={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return di=function(t){if(gi.telemetryEnabled){var o=function(e,t,r){return Wt({type:"telemetry",date:yn(),service:e,version:"4.50.1",source:"browser",_dd:{format_version:2},telemetry:Wt(t,{runtime_env:r}),experimental_features:Et(Ar())},void 0!==n?n():{})}(e,t,i);r.notify(o),ui("telemetry",o)}},yt=wi,Lt(gi,{maxEventsPerPage:t.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(e){n=e},observable:r,enabled:gi.telemetryEnabled}}function yi(e,t){Ct(ht.debug,e,t),bi(Lt({type:hi,message:e,status:"debug"},t))}function wi(e,t){bi(Lt({type:hi,status:"error"},function(e){if(e instanceof Error){var t=zn(e);return{error:{kind:t.name,stack:nr(Bi(t))},message:t.message}}return{error:{stack:$n},message:"".concat("Uncaught"," ").concat(qt(e))}}(e),t))}function bi(e){di&&gi.sentEventCount<gi.maxEventsPerPage&&(gi.sentEventCount+=1,di(e))}function Bi(e){return e.stack=e.stack.filter((function(e){return!e.url||pi.some((function(t){return Tt(e.url,t)}))})),e}var _i={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function xi(e){return St(Ut(_i),e)}function Ci(){var e,t=window;if(t.Zone&&(e=Ot(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){var n=Ot(new t.MutationObserver(Vt),"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}function Si(e,t,n){document.readyState===t||"complete"===document.readyState?n():Pn(e,window,"complete"===t?"load":"DOMContentLoaded",n,{once:!0})}var Ei="initial_document",Mi=[["document",function(e){return Ei===e}],["xhr",function(e){return"xmlhttprequest"===e}],["fetch",function(e){return"fetch"===e}],["beacon",function(e){return"beacon"===e}],["css",function(e,t){return/\.css$/i.test(t)}],["js",function(e,t){return/\.js$/i.test(t)}],["image",function(e,t){return St(["image","img","icon"],e)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)}],["font",function(e,t){return null!==/\.(woff|eot|woff2|ttf)$/i.exec(t)}],["media",function(e,t){return St(["audio","video"],e)||null!==/\.(mp3|mp4)$/i.exec(t)}]];function Ui(e){var t=e.name;if(!function(e){try{return!!Rr(e)}catch(e){return!1}}(t))return yi('Failed to construct URL for "'.concat(e.name,'"')),"other";for(var n=function(e){var t=Rr(e).pathname;return"/"===t[0]?t:"/".concat(t)}(t),r=0,i=Mi;r<i.length;r++){var o=i[r],a=o[0];if((0,o[1])(e.initiatorType,n))return a}return"other"}function Fi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=1;n<e.length;n+=1)if(e[n-1]>e[n])return!1;return!0}function Ti(e){var t=Qi(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,a=t.domainLookupStart,s=t.domainLookupEnd,A=t.connectStart,c=t.secureConnectionStart,l=t.connectEnd,u=t.requestStart,d=t.responseStart,h={download:Ii(n,d,t.responseEnd),first_byte:Ii(n,u,d)};return l!==r&&(h.connect=Ii(n,A,l),Fi(A,c,l)&&(h.ssl=Ii(n,c,l))),s!==r&&(h.dns=Ii(n,a,s)),Li(e)&&(h.redirect=Ii(n,i,o)),h}}function Qi(e){if(Fi(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!Li(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),Fi(e.startTime,t,n,e.fetchStart))return Lt({},e,{redirectEnd:n,redirectStart:t})}}function Li(e){return e.fetchStart!==e.startTime}function Ii(e,t,n){return{duration:gn(_n(t,n)),start:gn(_n(e,t))}}function ki(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function Pi(e,t){return t&&!e.isIntakeUrl(t)}function Oi(e){return e.nodeType===Node.TEXT_NODE}function Di(e){return e.nodeType===Node.ELEMENT_NODE}function Hi(e){return Di(e)&&Boolean(e.shadowRoot)}function Ri(e){var t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Di(t.host)}function Ni(e,t){e.childNodes.forEach(t),Hi(e)&&t(e.shadowRoot)}function zi(e){return Ri(e)?e.host:e.parentNode}var Vi;function ji(e){var t=function(e){var t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return Ki(t&&t.content,n&&n.content)}(e)||function(e){var t=function(e){for(var t=0;t<e.childNodes.length;t+=1){if(n=Gi(e.childNodes[t]))return n}if(e.body)for(t=e.body.childNodes.length-1;t>=0;t-=1){var n,r=e.body.childNodes[t];if(n=Gi(r))return n;if(!Oi(r))break}}(e);if(!t)return;return Ki(Mn(t,"trace-id"),Mn(t,"trace-time"))}(e);if(t&&!(t.traceTime<=vn()-12e4))return t.traceId}function Ki(e,t){var n=t&&Number(t);if(e&&n)return{traceId:e,traceTime:n}}function Gi(e){if(e&&function(e){return e.nodeType===Node.COMMENT_NODE}(e)){var t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Wi(){return void 0!==window.performance&&"getEntries"in performance}function qi(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(e)}function Xi(e,t){if(function(e,t){Si(e,"interactive",(function(){var e,n={entryType:Vi.RESOURCE,initiatorType:Ei,traceId:ji(document),toJSON:function(){return Lt({},e,{toJSON:void 0})}};if(qi(Vi.NAVIGATION)&&performance.getEntriesByType(Vi.NAVIGATION).length>0){var r=performance.getEntriesByType(Vi.NAVIGATION)[0];e=Lt(r.toJSON(),n)}else{var i=Ji();e=Lt(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},n)}t(e)}))}(t,(function(n){Yi(e,t,[n])})),Wi()){var n=performance.getEntries();Dt((function(){return Yi(e,t,n)}))}if(window.PerformanceObserver){var r=_t((function(n){return Yi(e,t,n.getEntries())})),i=[Vi.RESOURCE,Vi.NAVIGATION,Vi.LONG_TASK,Vi.PAINT],o=[Vi.LARGEST_CONTENTFUL_PAINT,Vi.FIRST_INPUT,Vi.LAYOUT_SHIFT,Vi.EVENT];try{o.forEach((function(e){new window.PerformanceObserver(r).observe({type:e,buffered:!0,durationThreshold:40})}))}catch(e){i.push.apply(i,o)}new PerformanceObserver(r).observe({entryTypes:i}),Wi()&&"addEventListener"in performance&&Pn(t,performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}qi(Vi.NAVIGATION)||function(e,t){function n(){t(Lt(Ji(),{entryType:Vi.NAVIGATION}))}Si(e,"complete",(function(){Dt(n)}))}(t,(function(n){Yi(e,t,[n])})),qi(Vi.FIRST_INPUT)||function(e,t){var n=vn(),r=!1,i=On(0,window,["click","mousedown","keydown","touchstart","pointerdown"],(function(t){if(t.cancelable){var n={entryType:Vi.FIRST_INPUT,processingStart:wn(),processingEnd:wn(),startTime:t.timeStamp,duration:0,name:""};"pointerdown"===t.type?o(e,n):a(n)}}),{passive:!0,capture:!0}).stop;function o(e,t){On(0,window,["pointerup","pointercancel"],(function(e){"pointerup"===e.type&&a(t)}),{once:!0})}function a(e){if(!r){r=!0,i();var o=e.processingStart-e.startTime;o>=0&&o<vn()-n&&t(e)}}}(t,(function(n){Yi(e,t,[n])}))}function Ji(){var e={},t=performance.timing;for(var n in t)if(ln(t[n])){var r=n,i=t[r];e[r]=0===i?0:Cn(i)}return e}function Yi(e,t,n){var r=n.filter((function(e){return lr(Vi,e.entryType)})).filter((function(e){return!function(e){return e.entryType===Vi.NAVIGATION&&e.loadEventEnd<=0}(e)&&!function(e,t){return t.entryType===Vi.RESOURCE&&!Pi(e,t.name)}(t,e)}));r.length&&e.notify(0,r)}!function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource"}(Vi||(Vi={}));var Zi="agent",$i="console",eo="custom",to="source",no="report";function ro(e,t,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&Dt((function(){r=0}),fn),(r+=1)<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:"Reached max number of ".concat(e,"s by minute: ").concat(t),source:Zi,startClocks:bn()})}finally{i=!1}}return!0}}}function io(){var e,t="string"==typeof(e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Tn("datadog-synthetics-public-id"))?e:void 0,n=function(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||Tn("datadog-synthetics-result-id");return"string"==typeof e?e:void 0}();if(t&&n)return{test_id:t,result_id:n,injected:Ln()}}function oo(e,t,n){var r=Gt(e),i=n(r);return Ft(t).forEach((function(t){var n=t[0],i=t[1],o=function(e,t){for(var n=e,r=0,i=t.split(".");r<i.length;r++){var o=i[r];if(!Ao(n,o))return;n=n[o]}return n}(r,n),a=jt(o);a===i?ao(e,n,Jt(o)):"object"!==i||"undefined"!==a&&"null"!==a||ao(e,n,{})})),i}function ao(e,t,n){for(var r=e,i=t.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!so(r))return;o!==i.length-1?r=r[a]:r[a]=n}}function so(e){return"object"===jt(e)}function Ao(e,t){return so(e)&&Object.prototype.hasOwnProperty.call(e,t)}var co,lo={"view.name":"string","view.url":"string","view.referrer":"string"},uo={context:"object"};function ho(e,t,n,r,i,o,a,s,A){var c,l;(c={}).view=lo,c.error=Lt({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},uo,lo),c.resource=Lt({"resource.url":"string"},uo,lo),c.action=Lt({"action.target.name":"string"},uo,lo),c.long_task=Lt({},uo,lo),co=c;var u=((l={}).error=ro("error",e.eventRateLimiterThreshold,A),l.action=ro("action",e.eventRateLimiterThreshold,A),l),d=io(),h=function(){var e,t=null===(e=window.Cypress)||void 0===e?void 0:e.env("traceId");if("string"==typeof t)return{test_execution_id:t}}();t.subscribe(10,(function(A){var c,l=A.startTime,f=A.rawRumEvent,p=A.domainContext,m=A.savedCommonContext,g=A.customerContext,v=r.findView(l),y=i.findUrl(l),w=n.findTrackedSession(l);if(w&&v&&y){var b=m||s(),B=o.findActionId(l),_=Wt({_dd:{format_version:2,drift:Math.round(vn()-xn(Sn(),performance.now())),session:{plan:w.plan},configuration:{session_sample_rate:An(e.sessionSampleRate,3),session_replay_sample_rate:An(e.sessionReplaySampleRate,3)},browser_sdk_version:kn()?"4.50.1":void 0},application:{id:e.applicationId},date:yn(),service:v.service||e.service,version:v.version||e.version,source:"browser",session:{id:w.id,type:d?"synthetics":h?"ci_test":"user"},view:{id:v.id,name:v.name,url:y.url,referrer:y.referrer},action:(c=f,-1!==["error","resource","long_task"].indexOf(c.type)&&B?{id:B}:void 0),synthetics:d,ci_test:h,display:a.get()},f);_.context=Wt(b.context,g),"has_replay"in _.session||(_.session.has_replay=b.hasReplay),ur(b.user)||(_.usr=b.user),function(e,t,n,r){var i;if(t){var o=oo(e,co[e.type],(function(e){return t(e,n)}));if(!1===o&&"view"!==e.type)return!1;!1===o&&gt.warn("Can't dismiss view events using beforeSend!")}return!(null===(i=r[e.type])||void 0===i?void 0:i.isLimitReached())}(_,e.beforeSend,p,u)&&(ur(_.context)&&delete _.context,t.notify(11,_))}}))}var fo,po=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach((function(e){return e(t)}))},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter((function(e){return t!==e}))}}},e}(),mo=1/0,go=function(){function e(e,t){var n=this;this.expireDelay=e,this.maxEntries=t,this.entries=[],this.clearOldValuesInterval=Rt((function(){return n.clearOldValues()}),6e4)}return e.prototype.add=function(e,t){var n=this,r={value:e,startTime:t,endTime:mo,remove:function(){var e=n.entries.indexOf(r);e>=0&&n.entries.splice(e,1)},close:function(e){r.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},e.prototype.find=function(e){void 0===e&&(e=mo);for(var t=0,n=this.entries;t<n.length;t++){var r=n[t];if(r.startTime<=e){if(e<=r.endTime)return r.value;break}}},e.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===mo&&t.close(e)},e.prototype.findAll=function(e,t){void 0===e&&(e=mo),void 0===t&&(t=0);var n=xn(e,t);return this.entries.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){Nt(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var e=wn()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},e}();function vo(e,t,n){var r=e[t],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return e[t]=o,{stop:function(){e[t]===o?e[t]=r:i=r}}}function yo(e,t,n){var r=n.before,i=n.after;return vo(e,t,(function(e){return function(){var t,n=arguments;return r&&xt(r,this,n),"function"==typeof e&&(t=e.apply(this,n)),i&&xt(i,this,n),t}}))}function wo(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:Vt};var i=function(e,t){Dt((function(){n(e,t)}),0)},o=function(e){r.set.call(this,e),i(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:function(){var n;(null===(n=Object.getOwnPropertyDescriptor(e,t))||void 0===n?void 0:n.set)===o?Object.defineProperty(e,t,r):i=Vt}}}var bo,Bo=new WeakMap;function _o(e){return fo||(fo=function(e){var t=new en((function(){var n=yo(XMLHttpRequest.prototype,"open",{before:xo}).stop,r=yo(XMLHttpRequest.prototype,"send",{before:function(){Co.call(this,e,t)}}).stop,i=yo(XMLHttpRequest.prototype,"abort",{before:So}).stop;return function(){n(),r(),i()}}));return t}(e)),fo}function xo(e,t){Bo.set(this,{state:"open",method:e,url:Dr(String(t))})}function Co(e,t){var n=this,r=Bo.get(this);if(r){var i=r;i.state="start",i.startTime=wn(),i.startClocks=bn(),i.isAborted=!1,i.xhr=this;var o=!1,a=yo(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(A(),a(),!o){o=!0;var e=r;e.state="complete",e.duration=_n(i.startClocks.timeStamp,yn()),e.status=n.status,t.notify(cr(e))}},A=Pn(e,this,"loadend",s).stop;t.notify(i)}}function So(){var e=Bo.get(this);e&&(e.isAborted=!0)}function Eo(){var e;return bo||(e=new en((function(){if(window.fetch){var t=vo(window,"fetch",(function(t){return function(n,r){var i,o=xt(Mo,null,[e,n,r]);return o?(i=t.call(this,o.input,o.init),xt(Uo,null,[e,i,o])):i=t.call(this,n,r),i}})).stop;return t}})),bo=e),bo}function Mo(e,t,n){var r=n&&n.method||t instanceof Request&&t.method||"GET",i=t instanceof Request?t.url:Dr(String(t)),o={state:"start",init:n,input:t,method:r,startClocks:bn(),url:i};return e.notify(o),o}function Uo(e,t,n){var r=function(t){var r=n;r.state="resolve","stack"in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t):"status"in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1),e.notify(r)};t.then(_t(r),_t(r))}var Fo=1;function To(e,t,n){var r=function(e,t){return{clearTracingIfNeeded:ii,traceFetch:function(n){return oi(e,n,t,(function(e){var t;if(n.input instanceof Request&&!(null===(t=n.init)||void 0===t?void 0:t.headers))n.input=new Request(n.input),Object.keys(e).forEach((function(t){n.input.headers.append(t,e[t])}));else{n.init=cr(n.init);var r=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(e,t){r.push([t,e])})):Array.isArray(n.init.headers)?n.init.headers.forEach((function(e){r.push(e)})):n.init.headers&&Object.keys(n.init.headers).forEach((function(e){r.push([e,n.init.headers[e]])})),n.init.headers=r.concat(Ft(e))}}))},traceXhr:function(n,r){return oi(e,n,t,(function(e){Object.keys(e).forEach((function(t){r.setRequestHeader(t,e[t])}))}))}}}(t,n);!function(e,t,n){var r=_o(t).subscribe((function(r){var i=r;if(Pi(t,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=Qo(),e.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(6,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"xhr",url:i.url,xhr:i.xhr})}}))}(e,t,r),function(e,t,n){var r=Eo().subscribe((function(r){var i=r;if(Pi(t,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=Qo(),e.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":!function(e,t){var n=e.response&&function(e){try{return e.clone()}catch(e){return}}(e.response);n&&n.body?function(e,t,n){var r=e.getReader(),i=[],o=0;function a(){var e,a;if(r.cancel().catch(Vt),n.collectStreamBody){var s;if(1===i.length)s=i[0];else{s=new Uint8Array(o);var A=0;i.forEach((function(e){s.set(e,A),A+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(_t((function(t){t.done?a():(n.collectStreamBody&&i.push(t.value),(o+=t.value.length)>n.bytesLimit?a():e())})),_t((function(e){return t(e)})))}()}(n.body,(function(){t(_n(e.startClocks.timeStamp,yn()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):t(_n(e.startClocks.timeStamp,yn()))}(i,(function(t){n.clearTracingIfNeeded(i),e.notify(6,{duration:t,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"fetch",url:i.url,response:i.response,init:i.init,input:i.input})}))}}))}(e,t,r)}function Qo(){var e=Fo;return Fo+=1,e}function Lo(e){var t=e.lifeCycle,n=e.isChildEvent,r=e.onChange,i=void 0===r?Vt:r,o={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},a=t.subscribe(11,(function(e){var t;if("view"!==e.type&&n(e))switch(e.type){case"error":o.errorCount+=1,i();break;case"action":o.actionCount+=1,e.action.frustration&&(o.frustrationCount+=e.action.frustration.type.length),i();break;case"long_task":o.longTaskCount+=1,i();break;case"resource":(null===(t=e._dd)||void 0===t?void 0:t.discarded)||(o.resourceCount+=1,i())}}));return{stop:function(){a.unsubscribe()},eventCounts:o}}var Io=100;function ko(e,t,n,r,i){var o=function(e,t,n){var r=new en((function(){var i,o=[],a=0;o.push(t.subscribe(c),e.subscribe(0,(function(e){e.some((function(e){return e.entryType===Vi.RESOURCE&&!Po(n,e.name)}))&&c()})),e.subscribe(5,(function(e){Po(n,e.url)||(void 0===i&&(i=e.requestIndex),a+=1,c())})),e.subscribe(6,(function(e){Po(n,e.url)||void 0===i||e.requestIndex<i||(a-=1,c())})));var s,A=(s=c,yo(window,"open",{before:s})).stop;return function(){A(),o.forEach((function(e){return e.unsubscribe()}))};function c(){r.notify({isBusy:a>0})}}));return r}(e,t,n);return function(e,t,n){var r,i=!1,o=Dt(_t((function(){return c({hadActivity:!1})})),100),a=void 0!==n?Dt(_t((function(){return c({hadActivity:!0,end:yn()})})),n):void 0,s=e.subscribe((function(e){var t=e.isBusy;Ht(o),Ht(r);var n=yn();t||(r=Dt(_t((function(){return c({hadActivity:!0,end:n})})),100))})),A=function(){i=!0,Ht(o),Ht(r),Ht(a),s.unsubscribe()};function c(e){i||(A(),t(e))}return{stop:A}}(o,r,i)}function Po(e,t){return ri(e.excludedActivityUrls,t)}var Oo="data-dd-action-name";function Do(e,t){return Ho(e,Oo)||t&&Ho(e,t)||jo(e,t,zo)||jo(e,t,Vo)||""}function Ho(e,t){var n;if(function(){void 0===No&&(No="closest"in HTMLElement.prototype);return No}())n=e.closest("[".concat(t,"]"));else for(var r=e;r;){if(r.hasAttribute(t)){n=r;break}r=r.parentElement}if(n)return Go(Ko(n.getAttribute(t).trim()))}var Ro,No,zo=[function(e,t){if(function(){void 0===Ro&&(Ro="labels"in HTMLInputElement.prototype);return Ro}()){if("labels"in e&&e.labels&&e.labels.length>0)return Wo(e.labels[0],t)}else if(e.id){var n=e.ownerDocument&&Mt(e.ownerDocument.querySelectorAll("label"),(function(t){return t.htmlFor===e.id}));return n&&Wo(n,t)}},function(e){if("INPUT"===e.nodeName){var t=e,n=t.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return t.value}},function(e,t){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return Wo(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var n=e.getAttribute("aria-labelledby");if(n)return n.split(/\s+/).map((function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})).filter((function(e){return Boolean(e)})).map((function(e){return Wo(e,t)})).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e,t){if("options"in e&&e.options.length>0)return Wo(e.options[0],t)}],Vo=[function(e,t){return Wo(e,t)}];function jo(e,t,n){for(var r=e,i=0;i<=10&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o=0,a=n;o<a.length;o++){var s=(0,a[o])(r,t);if("string"==typeof s){var A=s.trim();if(A)return Go(Ko(A))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function Ko(e){return e.replace(/\s+/g," ")}function Go(e){return e.length>100?"".concat(Un(e,100)," [...]"):e}function Wo(e,t){if(!e.isContentEditable){if("innerText"in e){var n=e.innerText,r=function(t){for(var r=e.querySelectorAll(t),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return(null!=dr?dr:dr=Boolean(document.documentMode))&&r("script, style"),r("[".concat(Oo,"]")),t&&r("[".concat(t,"]")),n}return e.textContent}}var qo,Xo=[Oo,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Jo=[ea,function(e){if(e.id&&!$o(e.id))return"#".concat(Qt(e.id))}],Yo=[ea,function(e){if("BODY"===e.tagName)return;if(e.classList.length>0)for(var t=0;t<e.classList.length;t+=1){var n=e.classList[t];if(!$o(n))return"".concat(Qt(e.tagName),".").concat(Qt(n))}},function(e){return Qt(e.tagName)}];function Zo(e,t){for(var n="",r=e;r&&"HTML"!==r.nodeName;){var i=na(r,Jo,ra,t,n);if(i)return i;n=na(r,Yo,ia,t,n)||oa(ta(r),n),r=r.parentElement}return n}function $o(e){return/[0-9]/.test(e)}function ea(e,t){if(t&&(i=o(t)))return i;for(var n=0,r=Xo;n<r.length;n++){var i;if(i=o(r[n]))return i}function o(t){if(e.hasAttribute(t))return"".concat(Qt(e.tagName),"[").concat(t,'="').concat(Qt(e.getAttribute(t)),'"]')}}function ta(e){for(var t=e.parentElement.firstElementChild,n=1;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return"".concat(Qt(e.tagName),":nth-of-type(").concat(n,")")}function na(e,t,n,r,i){for(var o=0,a=t;o<a.length;o++){var s=(0,a[o])(e,r);if(s){var A=oa(s,i);if(n(e,A))return A}}}function ra(e,t){return 1===e.ownerDocument.querySelectorAll(t).length}function ia(e,t){return 1===e.parentElement.querySelectorAll(function(){if(void 0===qo)try{document.querySelector(":scope"),qo=!0}catch(e){qo=!1}return qo}()?oa(":scope",t):t).length}function oa(e,t){return t?"".concat(e,">").concat(t):e}var aa=hn;function sa(e,t){var n,r=[],i=0;function o(e){e.stopObservable.subscribe(a),r.push(e),Ht(n),n=Dt(s,1e3)}function a(){1===i&&r.every((function(e){return e.isStopped()}))&&(i=2,t(r))}function s(){Ht(n),0===i&&(i=1,a())}return o(e),{tryAppend:function(e){return 0===i&&(r.length>0&&(t=r[r.length-1].event,n=e.event,!(t.target===n.target&&(a=t,A=n,Math.sqrt(Math.pow(a.clientX-A.clientX,2)+Math.pow(a.clientY-A.clientY,2))<=100)&&t.timeStamp-n.timeStamp<=aa))?(s(),!1):(o(e),!0));var t,n,a,A},stop:function(){s()}}}function Aa(){var e=window.getSelection();return!e||e.isCollapsed}function ca(e){return e.target instanceof Element&&!1!==e.isPrimary}function la(e,t){if(function(e){if(e.some((function(e){return e.getUserActivity().selection})))return!1;for(var t=0;t<e.length-2;t+=1)if(e[t+3-1].event.timeStamp-e[t].event.timeStamp<=hn)return!0;return!1}(e))return t.addFrustration("rage_click"),e.some(ua)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};var n=e.some((function(e){return e.getUserActivity().selection}));return e.forEach((function(e){e.hasError&&e.addFrustration("error_click"),ua(e)&&!n&&e.addFrustration("dead_click")})),{isRage:!1}}function ua(e){return!e.hasPageActivity&&!e.getUserActivity().input&&(t=e.event.target,n='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *',!(t.matches?t.matches(n):t.msMatchesSelector&&t.msMatchesSelector(n)));var t,n}function da(e,t,n){var r,i=new go(3e5),o=new en;e.subscribe(8,(function(){i.reset()})),e.subscribe(4,A);var a=function(e,t){var n,r,i=t.onPointerDown,o=t.onPointerUp,a={selection:!1,input:!1},s=[Pn(e,window,"pointerdown",(function(e){ca(e)&&(n=Aa(),a={selection:!1,input:!1},r=i(e))}),{capture:!0}),Pn(e,window,"selectionchange",(function(){n&&Aa()||(a.selection=!0)}),{capture:!0}),Pn(e,window,"pointerup",(function(e){if(ca(e)&&r){var t=a;o(r,e,(function(){return t})),r=void 0}}),{capture:!0}),Pn(e,window,"input",(function(){a.input=!0}),{capture:!0})];return{stop:function(){s.forEach((function(e){return e.stop()}))}}}(n,{onPointerDown:function(r){return function(e,t,n,r,i){if(!e.trackFrustrations&&r.find())return;var o=(a=i,s=e.actionNameAttribute,A=a.target.getBoundingClientRect(),{type:"click",target:{width:Math.round(A.width),height:Math.round(A.height),selector:Zo(a.target,s)},position:{x:Math.round(a.clientX-A.left),y:Math.round(a.clientY-A.top)},name:Do(a.target,s)});var a,s,A;if(!e.trackFrustrations&&!o.name)return;var c=!1;return ko(t,n,e,(function(e){c=e.hadActivity}),Io),{clickActionBase:o,hadActivityOnPointerDown:function(){return c}}}(n,e,t,i,r)},onPointerUp:function(r,a,A){var c=r.clickActionBase,l=r.hadActivityOnPointerDown;return function(e,t,n,r,i,o,a,s,A,c){var l=ha(t,r,A,a,s);e.trackFrustrations&&o(l);var u=ko(t,n,e,(function(t){t.hadActivity&&t.end<l.startClocks.timeStamp?l.discard():(t.hadActivity?l.stop(t.end):c()?l.stop(l.startClocks.timeStamp):l.stop(),e.trackFrustrations||(t.hadActivity?l.validate():l.discard()))}),1e4).stop,d=t.subscribe(4,(function(e){var t=e.endClocks;l.stop(t.timeStamp)})),h=i.subscribe((function(){l.stop()}));l.stopObservable.subscribe((function(){d.unsubscribe(),u(),h.unsubscribe()}))}(n,e,t,i,o,s,c,a,A,l)}}).stop;return{stop:function(){A(),o.notify(),a()},actionContexts:{findActionId:function(e){return n.trackFrustrations?i.findAll(e):i.find(e)}}};function s(e){if(!r||!r.tryAppend(e)){var t=e.clone();r=sa(e,(function(e){!function(e,t){la(e,t).isRage?(e.forEach((function(e){return e.discard()})),t.stop(yn()),t.validate(e.map((function(e){return e.event})))):(t.discard(),e.forEach((function(e){return e.validate()})))}(e,t)}))}}function A(){r&&r.stop()}}function ha(e,t,n,r,i){var o,a=En(),s=bn(),A=t.add(a,s.relative),c=Lo({lifeCycle:e,isChildEvent:function(e){return void 0!==e.action&&(Array.isArray(e.action.id)?St(e.action.id,a):e.action.id===a)}}),l=0,u=[],d=new en;function h(e){0===l&&(l=1,(o=e)?A.close(Cn(o)):A.remove(),c.stop(),d.notify())}return{event:i,stop:h,stopObservable:d,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==o},getUserActivity:n,addFrustration:function(e){u.push(e)},startClocks:s,isStopped:function(){return 1===l||2===l},clone:function(){return ha(e,t,n,r,i)},validate:function(t){if(h(),1===l){var n=c.eventCounts,A=n.resourceCount,d=n.errorCount,f=n.longTaskCount,p=Lt({type:"click",duration:o&&_n(s.timeStamp,o),startClocks:s,id:a,frustrationTypes:u,counts:{resourceCount:A,errorCount:d,longTaskCount:f},events:null!=t?t:[i],event:i},r);e.notify(1,p),l=2}},discard:function(){h(),l=2}}}function fa(e,t){var n=pa(e)?{action:{id:e.id,loading_time:gn(e.duration),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0;return{customerContext:pa(e)?void 0:e.context,rawRumEvent:Wt({action:{id:En(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action",view:{in_foreground:t.isInActivePageStateAt(e.startClocks.relative)}},n),startTime:e.startClocks.relative,domainContext:pa(e)?{event:e.event,events:e.events}:{}}}function pa(e){return"custom"!==e.type}var ma=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function ga(e){var t=function(e){return yo(window,"onerror",{before:function(t,n,r,i,o){var a;if(o instanceof Error)a=zn(o);else{var s=[{url:n,column:i,line:r}],A=function(e){var t,n,r;"[object String]"==={}.toString.call(e)&&(n=(t=ma.exec(e))[1],r=t[2]);return{name:n,message:r}}(t);a={name:A.name,message:A.message,stack:s}}e(a,null!=o?o:t)}})}(e).stop,n=function(e){return yo(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",r=zn(n);e(r,n)}})}(e).stop;return{stop:function(){t(),n()}}}var va={};function ya(e){var t=e.map((function(e){return va[e]||(va[e]=function(e){var t=new en((function(){var n=ft[e];return ft[e]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n.apply(console,r);var o=ir();xt((function(){t.notify(wa(r,e,o))}))},function(){ft[e]=n}}));return t}(e)),va[e]}));return tn.apply(void 0,t)}function wa(e,t,n){var r,i,o=e.map((function(e){return function(e){if("string"==typeof e)return Jt(e);if(e instanceof Error)return rr(zn(e));return qt(Jt(e),void 0,2)}(e)})).join(" ");if(t===ht.error){var a=Mt(e,(function(e){return e instanceof Error}));r=a?nr(zn(a)):void 0,i=tr(a),o="console error: ".concat(o)}return{api:t,message:o,stack:r,handlingStack:n,fingerprint:i}}var ba="intervention",Ba="csp_violation";function _a(e,t){var n=[];St(t,Ba)&&n.push(function(e){var t=new en((function(){return Pn(e,document,"securitypolicyviolation",(function(e){t.notify(function(e){var t=Ba,n="'".concat(e.blockedURI,"' blocked by '").concat(e.effectiveDirective,"' directive");return{type:Ba,subtype:e.effectiveDirective,message:"".concat(t,": ").concat(n),stack:xa(e.effectiveDirective,e.originalPolicy?"".concat(n,' of the policy "').concat(Un(e.originalPolicy,100,"..."),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)}}(e))})).stop}));return t}(e));var r=t.filter((function(e){return e!==Ba}));return r.length&&n.push(function(e){var t=new en((function(){if(window.ReportingObserver){var n=_t((function(e,n){return e.forEach((function(e){t.notify(function(e){var t=e.type,n=e.body;return{type:t,subtype:n.id,message:"".concat(t,": ").concat(n.message),stack:xa(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)}}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return t}(r)),tn.apply(void 0,n)}function xa(e,t,n,r,i){return n?nr({name:e,message:t,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=i?i:void 0}]}):void 0}function Ca(e,t,n,r){var i=new en;return function(e){var t=ya([ht.error]).subscribe((function(t){return e.notify({startClocks:bn(),message:t.message,stack:t.stack,fingerprint:t.fingerprint,source:$i,handling:"handled",handlingStack:t.handlingStack})}))}(i),function(e){ga((function(t,n){e.notify(er({stackTrace:t,originalError:n,startClocks:bn(),nonErrorPrefix:"Uncaught",source:to,handling:"unhandled"}))}))}(i),function(e,t){var n=_a(e,[Ba,ba]).subscribe((function(e){return t.notify({startClocks:bn(),message:e.message,stack:e.stack,type:e.subtype,source:no,handling:"unhandled"})}))}(t,i),i.subscribe((function(t){return e.notify(12,{error:t})})),function(e,t,n){return e.subscribe(12,(function(r){var i=r.error,o=r.customerContext,a=r.savedCommonContext;e.notify(10,Lt({customerContext:o,savedCommonContext:a},function(e,t,n){var r={date:e.startClocks.timeStamp,error:{id:En(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint},type:"error",view:{in_foreground:t.isInActivePageStateAt(e.startClocks.relative)}},i=n.findFeatureFlagEvaluations(e.startClocks.relative);i&&!ur(i)&&(r.feature_flags=i);return{rawRumEvent:r,startTime:e.startClocks.relative,domainContext:{error:e.originalError}}}(i,t,n)))})),{addError:function(t,n){var r=t.error,i=t.handlingStack,o=t.startClocks,a=t.context,s=er({stackTrace:r instanceof Error?zn(r):void 0,originalError:r,handlingStack:i,startClocks:o,nonErrorPrefix:"Provided",source:eo,handling:"handled"});e.notify(12,{customerContext:a,savedCommonContext:n,error:s})}}}(e,n,r)}function Sa(e){if(performance&&"getEntriesByName"in performance){var t=performance.getEntriesByName(e.url,"resource");if(t.length&&"toJSON"in t[0]){var n=t.map((function(e){return e.toJSON()})).filter(Qi).filter((function(t){return n=t,r=e.startClocks.relative,i=Ea({startTime:e.startClocks.relative,duration:e.duration}),o=1,n.startTime>=r-o&&Ea(n)<=xn(i,o);var n,r,i,o}));return 1===n.length?n[0]:void 0}}}function Ea(e){return xn(e.startTime,e.duration)}function Ma(e,t,n,r){e.subscribe(6,(function(i){e.notify(10,function(e,t,n,r){var i,o="xhr"===e.type?"xhr":"fetch",a=Sa(e),s=a?pn(a.startTime):e.startClocks,A=a?Fa(a):void 0,c=function(e,t){if(!(e.traceSampled&&e.traceId&&e.spanId))return;return{_dd:{span_id:e.spanId.toDecimalString(),trace_id:e.traceId.toDecimalString(),rule_psr:Ta(t)}}}(e,t),l=Qa(n,s),u=function(e,t,n){var r;if(!sr(Zn.NO_RESOURCE_DURATION_FROZEN_STATE))return gn(n);return(null===(r=e.findAll(t.relative,n))||void 0===r?void 0:r.some((function(e){return"frozen"===e.state})))?void 0:gn(n)}(r,s,e.duration),d=La(r,s,null!==(i=null==a?void 0:a.duration)&&void 0!==i?i:e.duration),h=Wt({date:s.timeStamp,resource:{id:En(),type:o,duration:u,method:e.method,status_code:e.status,url:e.url},type:"resource"},c,A,l,d);return{startTime:s.relative,rawRumEvent:h,domainContext:{performanceEntry:a&&a,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}(i,t,n,r))})),e.subscribe(0,(function(i){for(var o=0,a=i;o<a.length;o++){var s=a[o];s.entryType===Vi.RESOURCE&&("xmlhttprequest"!==(A=s).initiatorType&&"fetch"!==A.initiatorType)&&e.notify(10,Ua(s,t,n,r))}var A}))}function Ua(e,t,n,r){var i=Ui(e),o=Fa(e),a=pn(e.startTime),s=function(e,t){if(!e.traceId)return;return{_dd:{trace_id:e.traceId,rule_psr:Ta(t)}}}(e,t),A=Qa(n,a),c=La(r,a,e.duration),l=Wt({date:a.timeStamp,resource:{id:En(),type:i,url:e.name},type:"resource"},s,o,A,c);return{startTime:a.relative,rawRumEvent:l,domainContext:{performanceEntry:e}}}function Fa(e){return{resource:Lt({duration:(t=e,n=t.duration,r=t.startTime,i=t.responseEnd,gn(0===n&&r<i?_n(r,i):n)),size:ki(e)},Ti(e))};var t,n,r,i}function Ta(e){return ln(e.traceSampleRate)?e.traceSampleRate/100:void 0}function Qa(e,t){var n=e.findTrackedSession(t.relative);return{_dd:{discarded:!n||!n.resourceAllowed}}}function La(e,t,n){if(sr(Zn.RESOURCE_PAGE_STATES))return{_dd:{page_states:e.findAll(t.relative,n),page_was_discarded:String(document.wasDiscarded)}}}function Ia(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=e[r+1];if("active"===i.state){var a=i.start>=0?i.start:0,s=o?o.start:gn(t);n.push({start:a,duration:s-a})}}return n}var ka;function Pa(e,t,n,r){var i,o,a,s={},A=function(e,t){return{stop:e.subscribe(0,(function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i.entryType===Vi.NAVIGATION&&t({domComplete:i.domComplete,domContentLoaded:i.domContentLoadedEventEnd,domInteractive:i.domInteractive,loadEvent:i.loadEventEnd,firstByte:i.responseStart>=0&&i.responseStart<=wn()?i.responseStart:void 0})}})).unsubscribe}}(e,(function(e){n(e.loadEvent),s.navigationTimings=e,r()})).stop,c=(void 0===i&&(i=window),"hidden"===document.visibilityState?o=0:(o=1/0,a=On(0,i,["pagehide","visibilitychange"],(function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||(o=e.timeStamp,a())}),{capture:!0}).stop),{get timeStamp(){return o},stop:function(){null==a||a()}}),l=function(e,t,n){return{stop:e.subscribe(0,(function(e){var r=Mt(e,(function(e){return e.entryType===Vi.PAINT&&"first-contentful-paint"===e.name&&e.startTime<t.timeStamp&&e.startTime<6e5}));r&&n(r.startTime)})).unsubscribe}}(e,c,(function(e){s.firstContentfulPaint=e,r()})).stop,u=function(e,t,n,r,i){var o=1/0,a=On(0,r,["pointerdown","keydown"],(function(e){o=e.timeStamp}),{capture:!0,once:!0}).stop,s=e.subscribe(0,(function(e){var r=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(t(r,n,e))return r}}(e,(function(e){return e.entryType===Vi.LARGEST_CONTENTFUL_PAINT&&e.startTime<o&&e.startTime<n.timeStamp&&e.startTime<6e5}));if(r){var a=void 0;sr(Zn.WEB_VITALS_ATTRIBUTION)&&r.element&&(a=Zo(r.element,t.actionNameAttribute)),i({value:r.startTime,targetSelector:a})}})).unsubscribe;return{stop:function(){a(),s()}}}(e,t,c,window,(function(e){s.largestContentfulPaint=e,r()})).stop,d=function(e,t,n,r){return{stop:e.subscribe(0,(function(e){var i=Mt(e,(function(e){return e.entryType===Vi.FIRST_INPUT&&e.startTime<n.timeStamp}));if(i){var o=_n(i.startTime,i.processingStart),a=void 0;sr(Zn.WEB_VITALS_ATTRIBUTION)&&i.target&&Di(i.target)&&(a=Zo(i.target,t.actionNameAttribute)),r({delay:o>=0?o:0,time:i.startTime,targetSelector:a})}})).unsubscribe}}(e,t,c,(function(e){s.firstInput=e,r()})).stop;return{stop:function(){A(),l(),u(),d(),c.stop()},initialViewMetrics:s}}function Oa(e,t,n){if(!qi(Vi.LAYOUT_SHIFT))return{stop:Vt};var r=0;n({value:0});var i=function(){var e,t,n,r,i=0,o=0;return{update:function(a){var s,A;void 0===e||a.startTime-t>=hn||a.startTime-e>=5e3?(e=t=a.startTime,i=a.value,o=0,n=void 0):(i+=a.value,t=a.startTime),a.value>o&&(o=a.value,r=a.startTime,n=(null===(s=a.sources)||void 0===s?void 0:s.length)?null===(A=Mt(a.sources,(function(e){return!!e.node&&Di(e.node)})))||void 0===A?void 0:A.node:void 0)},value:function(){return i},largestLayoutShiftTarget:function(){return n},largestLayoutShiftTime:function(){return r}}}();return{stop:t.subscribe(0,(function(t){for(var o=0,a=t;o<a.length;o++){var s=a[o];if(s.entryType===Vi.LAYOUT_SHIFT&&!s.hadRecentInput&&(i.update(s),i.value()>r)){var A=An(r=i.value(),4),c=i.largestLayoutShiftTarget(),l=void 0;sr(Zn.WEB_VITALS_ATTRIBUTION)&&c&&(l=Zo(c,e.actionNameAttribute)),n({value:A,targetSelector:l})}}})).unsubscribe}}var Da=0,Ha=1/0,Ra=0;var Na,za=function(){return ka?Da:window.performance.interactionCount||0};function Va(e,t,n,r){if(!(qi(Vi.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&sr(Zn.INTERACTION_TO_NEXT_PAINT)))return{getInteractionToNextPaint:function(){},stop:Vt};var i,o=function(e){"interactionCount"in performance||ka||(ka=new window.PerformanceObserver(_t((function(e){e.getEntries().forEach((function(e){var t=e;t.interactionId&&(Ha=Math.min(Ha,t.interactionId),Ra=Math.max(Ra,t.interactionId),Da=(Ra-Ha)/7+1)}))}))),ka.observe({type:"event",buffered:!0,durationThreshold:0}));var t="initial_load"===e?0:za();return{getViewInteractionCount:function(){return za()-t}}}(n).getViewInteractionCount,a=function(e){var t=[];function n(){t.sort((function(e,t){return t.duration-e.duration})).splice(10)}return{process:function(e){var r=t.findIndex((function(t){return e.interactionId===t.interactionId})),i=t[t.length-1];-1!==r?e.duration>t[r].duration&&(t[r]=e,n()):(t.length<10||e.duration>i.duration)&&(t.push(e),n())},estimateP98Interaction:function(){var n=Math.min(t.length-1,Math.floor(e()/50));return t[n]}}}(o),s=-1,A=!1,c=r.subscribe(0,(function(n){for(var r,o=0,c=n;o<c.length;o++){var l=c[o];l.entryType!==Vi.EVENT&&l.entryType!==Vi.FIRST_INPUT||!l.interactionId||a.process(l)}var u=a.estimateP98Interaction();u&&((s=u.duration)>6e5&&!A&&(A=!0,yi("INP outlier",{inp:s,interaction:{timeFromViewStart:_n(t.relative,u.startTime),duration:u.duration,startTime:u.startTime,processingStart:u.processingStart,processingEnd:u.processingEnd,interactionId:u.interactionId,name:u.name,targetNodeName:null===(r=u.target)||void 0===r?void 0:r.nodeName}})),i=sr(Zn.WEB_VITALS_ATTRIBUTION)&&u.target&&Di(u.target)?Zo(u.target,e.actionNameAttribute):void 0)})).unsubscribe;return{getInteractionToNextPaint:function(){return s>=0?{value:s,targetSelector:i}:o()?{value:0}:void 0},stop:c}}function ja(){var e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(e)}function Ka(){var e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(e)}function Ga(e){return Na||(Na=function(e){var t=new en((function(){var n=zt((function(){t.notify(Wa())}),200).throttled;return Pn(e,window,"resize",n,{capture:!0,passive:!0}).stop}));return t}(e)),Na}function Wa(){var e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}function qa(e,t,n,r){void 0===r&&(r=function(e,t){void 0===t&&(t=1e3);var n=new en((function(){function r(){var e,t,r,i;n.notify((e=Ka(),t=Wa().height,r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),i=Math.round(t+e),{scrollHeight:r,scrollDepth:i,scrollTop:e}))}if(window.ResizeObserver){var i=zt(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,a=new ResizeObserver(_t(i.throttled));a.observe(o);var s=Pn(e,window,"scroll",i.throttled,{passive:!0});return function(){i.cancel(),a.unobserve(o),s.stop()}}}));return n}(e));var i=0,o=0,a=0,s=r.subscribe((function(e){var r=e.scrollDepth,s=e.scrollTop,A=e.scrollHeight,c=!1;if(r>i&&(i=r,c=!0),A>o){o=A;var l=wn();a=_n(t.relative,l),c=!0}c&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:s,maxScrollHeight:o,maxScrollHeightTime:a})}));return{stop:function(){return s.unsubscribe()}}}function Xa(e,t,n,r,i,o){var a={},s=function(e,t,n,r,i,o){var a="initial_load"===r,s=!0,A=[];function c(){!s&&!a&&A.length>0&&o(Math.max.apply(Math,A))}return{stop:ko(e,t,n,(function(e){s&&(s=!1,e.hadActivity&&A.push(_n(i.timeStamp,e.end)),c())})).stop,setLoadEvent:function(e){a&&(a=!1,A.push(e),c())}}}(e,t,n,i,o,(function(e){a.loadingTime=e,r()})),A=s.stop,c=s.setLoadEvent,l=qa(n,o,(function(e){a.scroll=e})).stop,u=Oa(n,e,(function(e){a.cumulativeLayoutShift=e,r()})).stop,d=Va(n,o,i,e),h=d.stop,f=d.getInteractionToNextPaint;return{stop:function(){A(),u(),l(),h()},setLoadEvent:c,getCommonViewMetrics:function(){return a.interactionToNextPaint=f(),a}}}var Ja=3e5,Ya=3e5;function Za(e,t,n,r,i,o,a){var s,A=new Set,c=l("initial_load",Bn(),a);function l(i,o,a){var s=function(e,t,n,r,i,o,a){void 0===o&&(o=bn());var s,A,c,l,u=En(),d=new en,h={},f=0,p=cr(r),m=!0;a&&(A=a.name,c=a.service,l=a.version);e.notify(2,{id:u,name:A,startClocks:o,service:c,version:l});var g=zt(T,3e3,{leading:!1}),v=g.throttled,y=g.cancel,w=Xa(e,t,n,v,i,o),b=w.setLoadEvent,B=w.stop,_=w.getCommonViewMetrics,x="initial_load"===i?Pa(e,n,b,v):{stop:Vt,initialViewMetrics:{}},C=x.stop,S=x.initialViewMetrics,E=function(e,t,n){var r=Lo({lifeCycle:e,isChildEvent:function(e){return e.view.id===t},onChange:n});return{stop:r.stop,eventCounts:r.eventCounts}}(e,u,v),M=E.stop,U=E.eventCounts,F=Rt(T,Ja);function T(){y(),f+=1;var t=void 0===s?yn():s.timeStamp;e.notify(3,{customTimings:h,documentVersion:f,id:u,name:A,service:c,version:l,loadingType:i,location:p,startClocks:o,commonViewMetrics:_(),initialViewMetrics:S,duration:_n(o.timeStamp,t),isActive:void 0===s,sessionIsActive:m,eventCounts:U})}return T(),{name:A,service:c,version:l,stopObservable:d,end:function(t){var n,r,i=this;void 0===t&&(t={}),s||(s=null!==(n=t.endClocks)&&void 0!==n?n:bn(),m=null===(r=t.sessionIsActive)||void 0===r||r,e.notify(4,{endClocks:s}),Nt(F),B(),T(),Dt((function(){i.stop()}),Ya))},stop:function(){C(),M(),d.notify()},addTiming:function(e,t){if(!s){var n=function(e){return e<31536e6}(t)?t:_n(o.timeStamp,t);h[function(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");t!==e&&gt.warn("Invalid timing name: ".concat(e,", sanitized to: ").concat(t));return t}(e)]=n,v()}}}}(t,n,r,e,i,o,a);return A.add(s),s.stopObservable.subscribe((function(){A.delete(s)})),s}return t.subscribe(8,(function(){c=l("route_change",void 0,{name:c.name,service:c.service,version:c.version})})),t.subscribe(7,(function(){c.end({sessionIsActive:!1})})),t.subscribe(9,(function(e){e.reason!==_i.UNLOADING&&e.reason!==_i.PAGEHIDE||c.end()})),o&&(s=function(e){return e.subscribe((function(e){var t,n,r,i,o=e.oldLocation,a=e.newLocation;n=a,(t=o).pathname===n.pathname&&(r=n.hash,i=r.substr(1),document.getElementById(i)||$a(n.hash)===$a(t.hash))||(c.end(),c=l("route_change"))}))}(i)),{addTiming:function(e,t){void 0===t&&(t=yn()),c.addTiming(e,t)},startView:function(e,t){c.end({endClocks:t}),c=l("route_change",t,e)},stop:function(){null==s||s.unsubscribe(),c.end(),A.forEach((function(e){return e.stop()}))}}}function $a(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function es(e,t,n,r,i,o,a,s,A){return e.subscribe(3,(function(n){return e.notify(10,function(e,t,n,r,i){var o,a,s,A,c,l,u,d,h,f,p,m,g,v,y=r.getReplayStats(e.id),w=n.findFeatureFlagEvaluations(e.startClocks.relative),b=sr(Zn.PAGE_STATES),B=i.findAll(e.startClocks.relative,e.duration),_={_dd:{document_version:e.documentVersion,replay_stats:y,page_states:b?B:void 0},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:null===(o=e.commonViewMetrics.cumulativeLayoutShift)||void 0===o?void 0:o.value,cumulative_layout_shift_target_selector:null===(a=e.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:gn(null===(s=e.initialViewMetrics.navigationTimings)||void 0===s?void 0:s.firstByte),dom_complete:gn(null===(A=e.initialViewMetrics.navigationTimings)||void 0===A?void 0:A.domComplete),dom_content_loaded:gn(null===(c=e.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.domContentLoaded),dom_interactive:gn(null===(l=e.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:gn(e.initialViewMetrics.firstContentfulPaint),first_input_delay:gn(null===(u=e.initialViewMetrics.firstInput)||void 0===u?void 0:u.delay),first_input_time:gn(null===(d=e.initialViewMetrics.firstInput)||void 0===d?void 0:d.time),first_input_target_selector:null===(h=e.initialViewMetrics.firstInput)||void 0===h?void 0:h.targetSelector,interaction_to_next_paint:gn(null===(f=e.commonViewMetrics.interactionToNextPaint)||void 0===f?void 0:f.value),interaction_to_next_paint_target_selector:null===(p=e.commonViewMetrics.interactionToNextPaint)||void 0===p?void 0:p.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:gn(null===(m=e.initialViewMetrics.largestContentfulPaint)||void 0===m?void 0:m.value),largest_contentful_paint_target_selector:null===(g=e.initialViewMetrics.largestContentfulPaint)||void 0===g?void 0:g.targetSelector,load_event:gn(null===(v=e.initialViewMetrics.navigationTimings)||void 0===v?void 0:v.loadEvent),loading_time:ts(gn(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:gn(e.duration),in_foreground_periods:!b&&B?Ia(B,e.duration):void 0},feature_flags:w&&!ur(w)?w:void 0,display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:gn(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:!!y||void 0,is_active:!!e.sessionIsActive&&void 0},privacy:{replay_level:t.defaultPrivacyLevel}};ur(e.customTimings)||(_.view.custom_timings=function(e,t){for(var n={},r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];n[o]=t(e[o])}return n}(e.customTimings,gn));return{rawRumEvent:_,startTime:e.startClocks.relative,domainContext:{location:e.location}}}(n,t,o,s,a))})),Za(n,e,r,t,i,!t.trackViewsManually,A)}function ts(e){return ln(e)&&e<0?void 0:e}var ns=[];function rs(e,t,n){var r=Or(e.sessionStoreStrategyType,t,n);ns.push((function(){return r.stop()}));var i,o=new go(144e5);function a(){return{id:r.getSession().id,trackingType:r.getSession()[t]}}return ns.push((function(){return o.stop()})),r.renewObservable.subscribe((function(){o.add(a(),wn())})),r.expireObservable.subscribe((function(){o.closeActive(wn())})),r.expandOrRenewSession(),o.add(a(),Bn().relative),i=On(0,window,["click","touchstart","keydown","scroll"],(function(){return r.expandOrRenewSession()}),{capture:!0,passive:!0}).stop,ns.push(i),function(e,t){var n=function(){"visible"===document.visibilityState&&t()},r=Pn(e,document,"visibilitychange",n).stop;ns.push(r);var i=Rt(n,6e4);ns.push((function(){Nt(i)}))}(e,(function(){return r.expandSession()})),{findActiveSession:function(e){return o.find(e)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}}function is(e,t){var n=rs(e,"rum",(function(t){return function(e,t){var n;n=function(e){return"0"===e||"1"===e||"2"===e}(t)?t:sn(e.sessionSampleRate)?sn(e.sessionReplaySampleRate)?"1":"2":"0";return{trackingType:n,isTracked:os(n)}}(e,t)}));return n.expireObservable.subscribe((function(){t.notify(7)})),n.renewObservable.subscribe((function(){t.notify(8)})),{findTrackedSession:function(t){var r=n.findActiveSession(t);if(r&&os(r.trackingType)){var i="1"===r.trackingType?2:1;return{id:r.id,plan:i,sessionReplayAllowed:2===i,longTaskAllowed:void 0!==e.trackLongTasks?e.trackLongTasks:e.oldPlansBehavior&&2===i,resourceAllowed:void 0!==e.trackResources?e.trackResources:e.oldPlansBehavior&&2===i}}},expire:n.expire,expireObservable:n.expireObservable}}function os(e){return"2"===e||"1"===e}var as=function(){function e(e,t,n){var r=this;this.request=e,this.flushController=t,this.messageBytesLimit=n,this.pushOnlyBuffer=[],this.upsertBuffer={},this.flushSubscription=this.flushController.flushObservable.subscribe((function(e){return r.flush(e)}))}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.stop=function(){this.flushSubscription.unsubscribe()},e.prototype.flush=function(e){var t=this.pushOnlyBuffer.concat(Ut(this.upsertBuffer));this.pushOnlyBuffer=[],this.upsertBuffer={};var n={data:t.join("\n"),bytesCount:e.bytesCount,flushReason:e.reason};xi(e.reason)?this.request.sendOnExit(n):this.request.send(n)},e.prototype.addOrUpdate=function(e,t){var n=this.process(e),r=n.processedMessage,i=n.messageBytesCount;i>=this.messageBytesLimit?gt.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(t)&&this.remove(t),this.push(r,i,t))},e.prototype.process=function(e){var t=qt(e);return{processedMessage:t,messageBytesCount:Pt(t)}},e.prototype.push=function(e,t,n){var r=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(t+r),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.flushController.notifyAfterAddMessage()},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=Pt(t),r=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e}(),ss=3145728;function As(e,t,n,r,i){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?ls(e,t,n,{onSuccess:function(){return us(0,t,n,r,i)},onFailure:function(){t.queuedPayloads.enqueue(e),cs(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function cs(e,t,n,r){2===e.transportStatus&&Dt((function(){ls(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=1e3,us(1,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(6e4,2*e.currentBackoffTime),cs(e,t,n,r)}})}),e.currentBackoffTime)}function ls(e,t,n,r){var i=r.onSuccess,o=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||(t=e.status,t>=500));var t}(n)?(t.transportStatus=0,i()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},o())}))}function us(e,t,n,r,i){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:"Reached max ".concat(r," events size queued for upload: ").concat(3,"MiB"),source:Zi,startClocks:bn()}),t.queueFullReported=!0);var o=t.queuedPayloads;for(t.queuedPayloads=ds();o.size()>0;)As(o.dequeue(),t,n,r,i)}function ds(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=ss}}}function hs(e,t,n,r){var i={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:ds(),queueFullReported:!1},o=function(r,i){return function(e,t,n,r,i){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&r.bytesCount<n){var o=t.build("fetch",r);fetch(o,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(_t((function(e){return null==i?void 0:i({status:e.status,type:e.type})})),_t((function(){var n=t.build("xhr",r);ps(e,n,r.data,i)})))}else{var a=t.build("xhr",r);ps(e,a,r.data,i)}}(e,t,n,r,i)};return{send:function(e){As(e,i,o,t.endpointType,r)},sendOnExit:function(r){!function(e,t,n,r){if(navigator.sendBeacon&&r.bytesCount<n)try{var i=t.build("beacon",r);if(navigator.sendBeacon(i,r.data))return}catch(e){!function(e){fs||(fs=!0,wi(e))}(e)}var o=t.build("xhr",r);ps(e,o,r.data)}(e,t,n,r)}}}var fs=!1;function ps(e,t,n,r){var i=new XMLHttpRequest;i.open("POST",t,!0),Pn(e,i,"loadend",(function(){null==r||r({status:i.status})}),{once:!0}),i.send(n)}function ms(e){var t,n=e.messagesLimit,r=e.bytesLimit,i=e.durationLimit,o=e.pageExitObservable,a=e.sessionExpireObservable,s=o.subscribe((function(e){return d(e.reason)})),A=a.subscribe((function(){return d("session_expire")})),c=new en((function(){return function(){s.unsubscribe(),A.unsubscribe()}})),l=0,u=0;function d(e){if(0!==u){var t=u,n=l;u=0,l=0,h(),c.notify({reason:e,messagesCount:t,bytesCount:n})}}function h(){Ht(t),t=void 0}return{flushObservable:c,get messagesCount(){return u},notifyBeforeAddMessage:function(e){l+e>=r&&d("bytes_limit"),u+=1,l+=e,void 0===t&&(t=Dt((function(){d("duration_limit")}),i))},notifyAfterAddMessage:function(){u>=n?d("messages_limit"):l>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(e){l-=e,0===(u-=1)&&h()}}}function gs(e,t,n,r,i,o){var a=e.replica,s=function(e,t,n,r,i,o){var a=A(e,t.endpoint),s=n&&A(e,n.endpoint);function A(e,t){return new as(hs(e,t,e.batchBytesLimit,r),ms({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:i,sessionExpireObservable:o}),e.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(e,t){void 0===t&&(t=!0),a.add(e),s&&t&&s.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){a.upsert(e,t),s&&s.upsert(n.transformMessage?n.transformMessage(e):e,t)},stop:function(){a.stop(),null==s||s.stop()}}}(e,{endpoint:e.rumEndpointBuilder},a&&{endpoint:a.rumEndpointBuilder,transformMessage:function(e){return Wt(e,{application:{id:a.applicationId}})}},r,i,o);return t.subscribe(11,(function(e){"view"===e.type?s.upsert(e,e.view.id):s.add(e)})),n.subscribe((function(t){return s.add(t,function(e){return e.site===jr}(e))})),s}function vs(e,t){var n=cr(t),r=new en((function(){var t=function(e,t){var n=yo(history,"pushState",{after:t}).stop,r=yo(history,"replaceState",{after:t}).stop,i=Pn(e,window,"popstate",t).stop;return{stop:function(){n(),r(),i()}}}(e,i).stop,n=function(e,t){return Pn(e,window,"hashchange",t)}(e,i).stop;return function(){t(),n()}}));function i(){if(n.href!==t.href){var e=cr(t);r.notify({newLocation:e,oldLocation:n}),n=e}}return r}var ys,ws,bs;function Bs(){0!==ys.batchCount&&(yi("Customer data measures",ys),Cs())}function _s(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function xs(e,t){e.sum+=t.sum,e.min=Math.min(e.min,t.min),e.max=Math.max(e.max,t.max)}function Cs(){ys={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0},globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function Ss(){bs=!1,ws={globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function Es(e,t){void 0===t&&(t=500);var n,r=new go(144e5,4e3);o(Ms(),wn());var i=On(0,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],(function(e){e.isTrusted&&o(function(e){if("freeze"===e.type)return"frozen";if("pagehide"===e.type)return e.persisted?"frozen":"terminated";return Ms()}(e),e.timeStamp)}),{capture:!0}).stop;function o(e,t){void 0===t&&(t=wn()),e!==n&&(n=e,r.closeActive(t),r.add({state:n,startTime:t},t))}return{findAll:function(e,n){var i=r.findAll(e,n);if(0!==i.length){for(var o=[],a=Math.max(0,i.length-t),s=i.length-1;s>=a;s--){var A=i[s],c=_n(e,A.startTime);o.push({state:A.state,start:gn(c)})}return o}},isInActivePageStateAt:function(e){var t=r.find(e);return void 0!==t&&"active"===t.state},addPageState:o,stop:function(){i(),r.stop()}}}function Ms(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function Us(e,t){var n=t.session,r=t.viewContext,i=t.errorType,o=n?n.id:"no-session-id",a=[];void 0!==i&&a.push("error-type=".concat(i)),r&&(a.push("seed=".concat(r.id)),a.push("from=".concat(r.startClocks.timeStamp)));var s,A,c,l=(A=(s=e).site,c=s.subdomain||function(e){switch(e.site){case Kr:case Gr:return"app";case jr:return"dd";default:return}}(s),"https://".concat(c?"".concat(c,"."):"").concat(A)),u="/rum/replay/sessions/".concat(o);return"".concat(l).concat(u,"?").concat(a.join("&"))}var Fs=2,Ts=3,Qs=4,Ls=6,Is=7,ks=8,Ps=9,Os=0,Ds=1,Hs=2,Rs=3,Ns=4,zs=11,Vs=0,js=1,Ks=2,Gs=3,Ws=4,qs=5,Xs=6,Js=7,Ys=8,Zs=0,$s=1,eA=2,tA=3,nA=4,rA=5,iA=6,oA=7,aA=9,sA=0,AA=1;function cA(e,t){return{data:Lt({source:e},t),type:Ts,timestamp:yn()}}var lA={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:ei.ALLOW,MASK:ei.MASK,MASK_USER_INPUT:ei.MASK_USER_INPUT},uA="data-dd-privacy",dA="hidden",hA="***",fA={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function pA(e,t){var n=zi(e),r=n?pA(n,t):t;return mA(gA(e),r)}function mA(e,t){switch(t){case lA.HIDDEN:case lA.IGNORE:return t}switch(e){case lA.ALLOW:case lA.MASK:case lA.MASK_USER_INPUT:case lA.HIDDEN:case lA.IGNORE:return e;default:return t}}function gA(e){if(Di(e)){var t=e.getAttribute(uA);if("BASE"===e.tagName)return lA.ALLOW;if("INPUT"===e.tagName){var n=e;if("password"===n.type||"email"===n.type||"tel"===n.type)return lA.MASK;if("hidden"===n.type)return lA.MASK;var r=n.getAttribute("autocomplete");if(r&&0===r.indexOf("cc-"))return lA.MASK}return t===dA||e.classList.contains("dd-privacy-hidden")?lA.HIDDEN:"mask"===t||e.classList.contains("dd-privacy-mask")?lA.MASK:"mask-user-input"===t||e.classList.contains("dd-privacy-mask-user-input")?lA.MASK_USER_INPUT:"allow"===t||e.classList.contains("dd-privacy-allow")?lA.ALLOW:function(e){if("SCRIPT"===e.nodeName)return!0;if("LINK"===e.nodeName){var t=i("rel");return/preload|prefetch/i.test(t)&&"script"===i("as")||"shortcut icon"===t||"icon"===t}if("META"===e.nodeName){var n=i("name"),r=(t=i("rel"),i("property"));return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===t||"apple-touch-icon"===t||"shortcut icon"===t||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||e.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(r)||/^product:/.test(r)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function i(t){return(e.getAttribute(t)||"").toLowerCase()}return!1}(e)?lA.IGNORE:void 0}}function vA(e,t){switch(t){case lA.MASK:case lA.HIDDEN:case lA.IGNORE:return!0;case lA.MASK_USER_INPUT:return Oi(e)?yA(e.parentNode):yA(e);default:return!1}}function yA(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;var t=e;if("INPUT"===t.tagName)switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!fA[t.tagName]}function wA(e,t,n){var r,i=null===(r=e.parentElement)||void 0===r?void 0:r.tagName,o=e.textContent||"";if(!t||o.trim()){if("SCRIPT"===i)o=hA;else if(n===lA.HIDDEN)o=hA;else if(vA(e,n))if("DATALIST"===i||"SELECT"===i||"OPTGROUP"===i){if(!o.trim())return}else o="OPTION"===i?hA:o.replace(/\S/g,"x");return o}}var bA=new WeakMap;function BA(e){return bA.has(e)}function _A(e){return bA.get(e)}function xA(e,t){var n=e.tagName,r=e.value;if(vA(e,t)){var i=e.type;if("INPUT"===n&&("button"===i||"submit"===i||"reset"===i))return r;if(!r||"OPTION"===n)return;return hA}return"OPTION"===n||"SELECT"===n?e.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}var CA=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,SA=/^[A-Za-z]+:|^\/\//,EA=/^data:.*,/i;function MA(e,t){return e.replace(CA,(function(e,n,r,i,o,a){var s=r||o||a;if(!t||!s||SA.test(s)||EA.test(s))return e;var A=n||i||"";return"url(".concat(A).concat(function(e,t){try{return Rr(e,t).href}catch(t){return e}}(s,t)).concat(A,")")}))}var UA=/[^a-z1-6-_]/;function FA(e){var t=e.toLowerCase().trim();return UA.test(t)?"div":t}function TA(e){if(void 0!==e&&0!==e.length)return e.map((function(e){var t=e.cssRules||e.rules;return{cssRules:Array.from(t,(function(e){return e.cssText})),disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0}}))}function QA(e,t,n,r){if(t===lA.HIDDEN)return null;var i=e.getAttribute(n);if(t===lA.MASK&&n!==uA&&!Xo.includes(n)&&n!==r.actionNameAttribute){var o=e.tagName;switch(n){case"title":case"alt":case"placeholder":return hA}if(!("IMG"!==o&&"SOURCE"!==o||"src"!==n&&"srcset"!==n))return"data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";if("A"===o&&"href"===n)return hA;if(i&&Tt(n,"data-"))return hA}return i&&"string"==typeof i&&i.length>1e5&&"data:"===i.slice(0,5)?"data:truncated":i}function LA(e){if(!e)return null;var t;try{t=e.rules||e.cssRules}catch(e){}return t?MA(Array.from(t,(null!=fr?fr:fr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent))?IA:kA).join(""),e.href):null}function IA(e){if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")){return e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,"$1\\$2")}return kA(e)}function kA(e){return function(e){return"styleSheet"in e}(e)&&LA(e.styleSheet)||e.cssText}function PA(e,t){var n=function(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return function(e,t){return{type:Os,childNodes:DA(e,t),adoptedStyleSheets:TA(e.adoptedStyleSheets)}}(e,t);case e.DOCUMENT_FRAGMENT_NODE:return function(e,t){var n=Ri(e);n&&t.serializationContext.shadowRootsController.addShadowRoot(e);return{type:zs,childNodes:DA(e,t),isShadowRoot:n,adoptedStyleSheets:n?TA(e.adoptedStyleSheets):void 0}}(e,t);case e.DOCUMENT_TYPE_NODE:return{type:Ds,name:(n=e).name,publicId:n.publicId,systemId:n.systemId};case e.ELEMENT_NODE:return function(e,t){var n,r=FA(e.tagName),i=(a=e,"svg"===a.tagName||a instanceof SVGElement||void 0),o=mA(gA(e),t.parentNodePrivacyLevel);var a;if(o===lA.HIDDEN){var s=e.getBoundingClientRect(),A=s.width,c=s.height;return{type:Hs,tagName:r,attributes:(n={rr_width:"".concat(A,"px"),rr_height:"".concat(c,"px")},n[uA]=dA,n),childNodes:[],isSVG:i}}if(o===lA.IGNORE)return;var l=function(e,t,n){var r;if(t===lA.HIDDEN)return{};for(var i={},o=FA(e.tagName),a=e.ownerDocument,s=0;s<e.attributes.length;s+=1){var A=e.attributes.item(s).name,c=QA(e,t,A,n.configuration);null!==c&&(i[A]=c)}if(e.value&&("textarea"===o||"select"===o||"option"===o||"input"===o)){var l=xA(e,t);void 0!==l&&(i.value=l)}if("option"===o&&t===lA.ALLOW){var u=e;u.selected&&(i.selected=u.selected)}if("link"===o){var d,h=Array.from(a.styleSheets).find((function(t){return t.href===e.href}));(d=LA(h))&&h&&!sr(Zn.DISABLE_REPLAY_INLINE_CSS)&&(i._cssText=d)}"style"===o&&e.sheet&&(d=LA(e.sheet))&&(i._cssText=d);var f,p,m=e;if("input"!==o||"radio"!==m.type&&"checkbox"!==m.type||(t===lA.ALLOW?i.checked=!!m.checked:vA(m,t)&&delete i.checked),"audio"===o||"video"===o){var g=e;i.rr_mediaState=g.paused?"paused":"played"}var v=n.serializationContext;switch(v.status){case 0:f=Math.round(e.scrollTop),p=Math.round(e.scrollLeft),(f||p)&&v.elementsScrollPositions.set(e,{scrollTop:f,scrollLeft:p});break;case 1:v.elementsScrollPositions.has(e)&&(f=(r=v.elementsScrollPositions.get(e)).scrollTop,p=r.scrollLeft)}return p&&(i.rr_scrollLeft=p),f&&(i.rr_scrollTop=f),i}(e,o,t),u=[];if(function(e){return e.childNodes.length>0||Hi(e)}(e)&&"style"!==r){u=DA(e,t.parentNodePrivacyLevel===o&&t.ignoreWhiteSpace===("head"===r)?t:Lt({},t,{parentNodePrivacyLevel:o,ignoreWhiteSpace:"head"===r}))}return{type:Hs,tagName:r,attributes:l,childNodes:u,isSVG:i}}(e,t);case e.TEXT_NODE:return function(e,t){var n=wA(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(void 0===n)return;return{type:Rs,textContent:n}}(e,t);case e.CDATA_SECTION_NODE:return{type:Ns,textContent:""}}var n}(e,t);if(!n)return null;var r=_A(e)||OA++,i=n;return i.id=r,function(e,t){bA.set(e,t)}(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}var OA=1;function DA(e,t){var n=[];return Ni(e,(function(e){var r=PA(e,t);r&&n.push(r)})),n}function HA(e,t,n){return PA(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function RA(e){return Boolean(e.changedTouches)}function NA(e){return!0===e.composed&&Hi(e.target)?e.composedPath()[0]:e.target}var zA=function(e,t){var n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};return n?(!function(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>25||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>25}(n)?(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop)):(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)),r):r},VA=function(e){return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}};function jA(e){var t=RA(e)?e.changedTouches[0]:e,n=t.clientX,r=t.clientY;if(window.visualViewport){var i=zA(n,r);n=i.visualViewportX,r=i.visualViewportY}if(Number.isFinite(n)&&Number.isFinite(r))return{x:n,y:r};e.isTrusted&&yi("mouse/touch event without x/y")}var KA;var GA=((KA={}).pointerup=Zs,KA.mousedown=$s,KA.click=eA,KA.contextmenu=tA,KA.dblclick=nA,KA.focus=rA,KA.blur=iA,KA.touchstart=oA,KA.touchend=aA,KA);function WA(e,t,n){void 0===n&&(n=document);var r,i=e.defaultPrivacyLevel,o=new WeakMap,a=n!==document,s=On(0,n,a?["change"]:["input","change"],(function(e){var t=NA(e);(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&c(t)}),{capture:!0,passive:!0}).stop;if(a)r=Vt;else{var A=[wo(HTMLInputElement.prototype,"value",c),wo(HTMLInputElement.prototype,"checked",c),wo(HTMLSelectElement.prototype,"value",c),wo(HTMLTextAreaElement.prototype,"value",c),wo(HTMLSelectElement.prototype,"selectedIndex",c)];r=function(){A.forEach((function(e){return e.stop()}))}}return function(){r(),s()};function c(e){var t=pA(e,i);if(t!==lA.HIDDEN){var n,r=e.type;if("radio"===r||"checkbox"===r){if(vA(e,t))return;n={isChecked:e.checked}}else{var o=xA(e,t);if(void 0===o)return;n={text:o}}l(e,n);var a,s,A=e.name;"radio"===r&&A&&e.checked&&(a=document.querySelectorAll('input[type="radio"][name="'.concat(Qt(A),'"]')),s=function(t){t!==e&&l(t,{isChecked:!1})},Array.prototype.forEach.call(a,s))}}function l(e,n){if(BA(e)){var r=o.get(e);r&&r.text===n.text&&r.isChecked===n.isChecked||(o.set(e,n),t(Lt({id:_A(e)},n)))}}}function qA(e){for(var t=[],n=e;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(r),n=n.parentRule}if(n.parentStyleSheet){var i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(i),t}}function XA(e){var t=Vt,n=[];function r(){t(),e(n),n=[]}return{addMutations:function(e){0===n.length&&(t=function(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){var n=window.requestIdleCallback(_t(e),t);return function(){return window.cancelIdleCallback(n)}}var r=window.requestAnimationFrame(_t(e));return function(){return window.cancelAnimationFrame(r)}}(r,{timeout:100})),n.push.apply(n,e)},flush:r,stop:function(){t()}}}function JA(e,t,n,r){var i=Ci();if(!i)return{stop:Vt,flush:Vt};var o=XA((function(r){!function(e,t,n,r){e.filter((function(e){return"childList"===e.type})).forEach((function(e){e.removedNodes.forEach((function(e){YA(e,r.removeShadowRoot)}))}));var i=e.filter((function(e){return e.target.isConnected&&function(e){for(var t=e;t;){if(!BA(t)&&!Ri(t))return!1;t=zi(t)}return!0}(e.target)&&pA(e.target,n.defaultPrivacyLevel)!==lA.HIDDEN})),o=function(e,t,n){for(var r=new Set,i=new Map,o=function(e){e.addedNodes.forEach((function(e){r.add(e)})),e.removedNodes.forEach((function(t){r.has(t)||i.set(t,e.target),r.delete(t)}))},a=0,s=e;a<s.length;a++){o(s[a])}var A=Array.from(r);c=A,c.sort((function(e,t){var n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0}));var c;for(var l=new Set,u=[],d=0,h=A;d<h.length;d++){var f=h[d];if(!y(f)){var p=pA(f.parentNode,t.defaultPrivacyLevel);if(p!==lA.HIDDEN&&p!==lA.IGNORE){var m=PA(f,{serializedNodeIds:l,parentNodePrivacyLevel:p,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(m){var g=zi(f);u.push({nextId:w(f),parentId:_A(g),node:m})}}}}var v=[];return i.forEach((function(e,t){BA(t)&&v.push({parentId:_A(e),id:_A(t)})})),{adds:u,removes:v,hasBeenSerialized:y};function y(e){return BA(e)&&l.has(_A(e))}function w(e){for(var t=e.nextSibling;t;){if(BA(t))return _A(t);t=t.nextSibling}return null}}(i.filter((function(e){return"childList"===e.type})),n,r),a=o.adds,s=o.removes,A=o.hasBeenSerialized,c=function(e,t){for(var n,r=[],i=new Set,o=e.filter((function(e){return!i.has(e.target)&&(i.add(e.target),!0)})),a=0,s=o;a<s.length;a++){var A=s[a];if(A.target.textContent!==A.oldValue){var c=pA(zi(A.target),t.defaultPrivacyLevel);c!==lA.HIDDEN&&c!==lA.IGNORE&&r.push({id:_A(A.target),value:null!==(n=wA(A.target,!1,c))&&void 0!==n?n:null})}}return r}(i.filter((function(e){return"characterData"===e.type&&!A(e.target)})),n),l=function(e,t){for(var n=[],r=new Map,i=e.filter((function(e){var t=r.get(e.target);return!(null==t?void 0:t.has(e.attributeName))&&(t?t.add(e.attributeName):r.set(e.target,new Set([e.attributeName])),!0)})),o=new Map,a=0,s=i;a<s.length;a++){var A=s[a];if(A.target.getAttribute(A.attributeName)!==A.oldValue){var c=pA(A.target,t.defaultPrivacyLevel),l=QA(A.target,c,A.attributeName,t),u=void 0;if("value"===A.attributeName){var d=xA(A.target,c);if(void 0===d)continue;u=d}else u="string"==typeof l?l:null;var h=o.get(A.target);h||(h={id:_A(A.target),attributes:{}},n.push(h),o.set(A.target,h)),h.attributes[A.attributeName]=u}}return n}(i.filter((function(e){return"attributes"===e.type&&!A(e.target)})),n);if(!(c.length||l.length||s.length||a.length))return;t({adds:a,removes:s,texts:c,attributes:l})}(r.concat(a.takeRecords()),e,t,n)})),a=new i(_t(o.addMutations));return a.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){a.disconnect(),o.stop()},flush:function(){o.flush()}}}function YA(e,t){Hi(e)&&t(e.shadowRoot),Ni(e,(function(e){return YA(e,t)}))}function ZA(e,t){var n,r,i,o,a,s=function(){var e=new WeakMap,t=1;return{getIdForEvent:function(n){return e.has(n)||e.set(n,t++),e.get(n)}}}(),A=JA(t.mutationCb,t.configuration,t.shadowRootsController,document),c=(n=t.mousemoveCb,r=zt((function(e){var t=NA(e);if(BA(t)){var r=jA(e);if(!r)return;var i={id:_A(t),timeOffset:0,x:r.x,y:r.y};n([i],RA(e)?Xs:js)}}),50,{trailing:!1}).throttled,On(0,document,["mousemove","touchmove"],r,{capture:!0,passive:!0}).stop),l=function(e,t,n){return On(0,document,Object.keys(GA),(function(r){var i=NA(r);if(pA(i,e.defaultPrivacyLevel)!==lA.HIDDEN&&BA(i)){var o,a=_A(i),s=GA[r.type];if(s!==iA&&s!==rA){var A=jA(r);if(!A)return;o={id:a,type:s,x:A.x,y:A.y}}else o={id:a,type:s};var c=Lt({id:n.getIdForEvent(r)},cA(Ks,o));t(c)}}),{capture:!0,passive:!0}).stop}(e,t.mouseInteractionCb,s),u=function(e,t,n,r){var i=zt((function(e){var i=NA(e);if(i&&pA(i,n)!==lA.HIDDEN&&BA(i)){var o=_A(i),a=i===document?{scrollTop:Ka(),scrollLeft:ja()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};r.set(i,a),t({id:o,x:a.scrollLeft,y:a.scrollTop})}}),100).throttled;return Pn(e,document,"scroll",i,{capture:!0,passive:!0}).stop}(e,t.scrollCb,t.configuration.defaultPrivacyLevel,t.elementsScrollPositions),d=function(e,t){return Ga(e).subscribe(t).unsubscribe}(e,t.viewportResizeCb),h=WA(e,t.inputCb),f=(i=t.mediaInteractionCb,o=t.configuration.defaultPrivacyLevel,On(0,document,["play","pause"],(function(e){var t=NA(e);t&&pA(t,o)!==lA.HIDDEN&&BA(t)&&i({id:_A(t),type:"play"===e.type?sA:AA})}),{capture:!0,passive:!0}).stop),p=function(e){function t(e,t){e&&BA(e.ownerNode)&&t(_A(e.ownerNode))}var n=[yo(CSSStyleSheet.prototype,"insertRule",{before:function(n,r){t(this,(function(t){return e({id:t,adds:[{rule:n,index:r}]})}))}}),yo(CSSStyleSheet.prototype,"deleteRule",{before:function(n){t(this,(function(t){return e({id:t,removes:[{index:n}]})}))}})];function r(r){n.push(yo(r.prototype,"insertRule",{before:function(n,r){var i=this;t(this.parentStyleSheet,(function(t){var o=qA(i);o&&(o.push(r||0),e({id:t,adds:[{rule:n,index:o}]}))}))}}),yo(r.prototype,"deleteRule",{before:function(n){var r=this;t(this.parentStyleSheet,(function(t){var i=qA(r);i&&(i.push(n),e({id:t,removes:[{index:i}]}))}))}}))}return"undefined"!=typeof CSSGroupingRule?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule)),function(){return n.forEach((function(e){return e.stop()}))}}(t.styleSheetCb),m=(a=t.focusCb,On(0,window,["focus","blur"],(function(){a({has_focus:document.hasFocus()})})).stop),g=function(e,t){var n=window.visualViewport;if(!n)return Vt;var r=zt((function(){t(VA(n))}),200,{trailing:!1}),i=r.throttled,o=r.cancel,a=On(0,n,["resize","scroll"],i,{capture:!0,passive:!0}).stop;return function(){a(),o()}}(0,t.visualViewportResizeCb),v=function(e,t,n){return e.subscribe(10,(function(e){var r,i,o;"action"===e.rawRumEvent.type&&"click"===e.rawRumEvent.action.type&&(null===(i=null===(r=e.rawRumEvent.action.frustration)||void 0===r?void 0:r.type)||void 0===i?void 0:i.length)&&"events"in e.domainContext&&(null===(o=e.domainContext.events)||void 0===o?void 0:o.length)&&t({timestamp:e.rawRumEvent.date,type:Ps,data:{frustrationTypes:e.rawRumEvent.action.frustration.type,recordIds:e.domainContext.events.map((function(e){return n.getIdForEvent(e)}))}})})).unsubscribe}(t.lifeCycle,t.frustrationCb,s);return{flush:function(){A.flush()},stop:function(){A.stop(),c(),l(),u(),d(),h(),f(),p(),m(),g(),v()}}}function $A(e){var t=e.emit,n=e.configuration;if(!t)throw new Error("emit function is required");var r,i=(r=new WeakMap,{set:function(e,t){(e!==document||document.scrollingElement)&&r.set(e===document?document.scrollingElement:e,t)},get:function(e){return r.get(e)},has:function(e){return r.has(e)}}),o=function(e){t(cA(Vs,e))},a=function(e){return t(cA(qs,e))},s=function(e,t){var n=t.mutationCb,r=t.inputCb,i=new Map,o={addShadowRoot:function(t){var a=JA(n,e,o,t),s=a.stop,A=a.flush,c=WA(e,r,t);i.set(t,{flush:A,stop:function(){s(),c()}})},removeShadowRoot:function(e){var t=i.get(e);t&&(t.stop(),i.delete(e))},stop:function(){i.forEach((function(e){return(0,e.stop)()}))},flush:function(){i.forEach((function(e){return(0,e.flush)()}))}};return o}(n,{mutationCb:o,inputCb:a}),A=function(e,r){void 0===e&&(e=yn()),void 0===r&&(r={status:0,elementsScrollPositions:i,shadowRootsController:s});var o=Wa(),a=o.width,A=o.height;t({data:{height:A,href:window.location.href,width:a},type:Qs,timestamp:e}),t({data:{has_focus:document.hasFocus()},type:Ls,timestamp:e}),t({data:{node:HA(document,n,r),initialOffset:{left:ja(),top:Ka()}},type:Fs,timestamp:e}),window.visualViewport&&t({data:VA(window.visualViewport),type:ks,timestamp:e})};A();var c=ZA(n,{lifeCycle:e.lifeCycle,configuration:n,elementsScrollPositions:i,inputCb:a,mediaInteractionCb:function(e){return t(cA(Js,e))},mouseInteractionCb:function(e){return t(e)},mousemoveCb:function(e,n){return t(cA(n,{positions:e}))},mutationCb:o,scrollCb:function(e){return t(cA(Gs,e))},styleSheetCb:function(e){return t(cA(Ys,e))},viewportResizeCb:function(e){return t(cA(Ws,e))},frustrationCb:function(e){return t(e)},focusCb:function(e){return t({data:e,type:Ls,timestamp:yn()})},visualViewportResizeCb:function(e){t({data:e,type:ks,timestamp:yn()})},shadowRootsController:s}),l=c.stop,u=c.flush;function d(){s.flush(),u()}return{stop:function(){s.stop(),l()},takeSubsequentFullSnapshot:function(e){d(),A(e,{shadowRootsController:s,status:1,elementsScrollPositions:i})},flushMutations:d,shadowRootsController:s}}var ec;function tc(e){return nc(e).segments_count}function nc(e){var t;return ec||(ec=new Map),ec.has(e)?t=ec.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},ec.set(e,t),ec.size>10&&function(){if(!ec)return;if(ec.keys)ec.delete(ec.keys().next().value);else{var e=!0;ec.forEach((function(t,n){e&&(ec.delete(n),e=!1)}))}}()),t}var rc=function(){function e(e,t,n){this.encoder=e;var r=t.view.id;this.metadata=Lt({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:tc(r),source:"browser"},t),function(e){nc(e).segments_count+=1}(r)}return e.prototype.addRecord=function(e,t){var n;this.metadata.start=Math.min(this.metadata.start,e.timestamp),this.metadata.end=Math.max(this.metadata.end,e.timestamp),this.metadata.records_count+=1,(n=this.metadata).has_full_snapshot||(n.has_full_snapshot=e.type===Fs),ui("record",{record:e,segment:this.metadata}),nc(this.metadata.view.id).records_count+=1;var r=1===this.metadata.records_count?'{"records":[':",";this.encoder.write(r+JSON.stringify(e),t)},e.prototype.flush=function(e){var t=this;if(0===this.metadata.records_count)throw new Error("Empty segment flushed");this.encoder.write("],".concat(JSON.stringify(this.metadata).slice(1),"\n"),(function(){var n,r;n=t.metadata.view.id,r=t.encoder.rawBytesCount,nc(n).segments_total_raw_size+=r,e(t.metadata)})),this.encoder.reset()},e}(),ic=6e4;function oc(e,t,n,r,i,o){return function(e,t,n,r){var i={status:0,nextSegmentCreationReason:"init"},o=e.subscribe(2,(function(){s("view_change")})).unsubscribe,a=e.subscribe(9,(function(e){s(e.reason)})).unsubscribe;function s(e){1===i.status&&(i.segment.flush((function(t){var i=function(e,t,n){var r=new FormData;r.append("segment",new Blob([e],{type:"application/octet-stream"}),"".concat(t.session.id,"-").concat(t.start));var i=Lt({raw_segment_size:n,compressed_segment_size:e.byteLength},t),o=JSON.stringify(i);return r.append("event",new Blob([o],{type:"application/json"})),{data:r,bytesCount:e.byteLength}}(r.encodedBytes,t,r.rawBytesCount);xi(e)?n.sendOnExit(i):n.send(i)})),Ht(i.expirationTimeoutId)),i="stop"!==e?{status:0,nextSegmentCreationReason:e}:{status:2}}return{addRecord:function(e){if(2!==i.status){if(0===i.status){var n=t();if(!n)return;i={status:1,segment:new rc(r,n,i.nextSegmentCreationReason),expirationTimeoutId:Dt((function(){s("segment_duration_limit")}),3e4)}}var o=i.segment;o.addRecord(e,(function(){1===i.status&&i.segment===o&&r.encodedBytesCount>ic&&s("segment_bytes_limit")}))}},stop:function(){s("stop"),o(),a()}}}(e,(function(){return function(e,t,n){var r=t.findTrackedSession(),i=n.findView();if(!r||!i)return;return{application:{id:e},session:{id:r.id},view:{id:i.id}}}(t.applicationId,n,r)}),i,o)}function ac(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function sc(e,t,n,r){var i=t.findTrackedSession(),o=function(e,t){if(!ac())return"browser-not-supported";if(!e)return"rum-not-tracked";if(!e.sessionReplayAllowed)return"incorrect-session-plan";if(!t)return"replay-not-started"}(i,r);return Us(e,{viewContext:n.findView(),errorType:o,session:i})}function Ac(e,t,n){var r,i=0,o=[],a=0,s=[],A=Pn(e,t,"message",(function(e){var t=e.data;if("wrote"===t.type&&t.streamId===n){var a=s.shift();a&&a.id===t.id?(0===t.id?(i=t.additionalBytesCount,o=[t.result]):(i+=t.additionalBytesCount,o.push(t.result)),r=t.trailer,a.callback()):(A(),yi("Worker responses received out of order."))}})).stop;return{get encodedBytes(){return o.length?function(e){for(var t=e.reduce((function(e,t){return e+t.length}),0),n=new Uint8Array(t),r=0,i=0,o=e;i<o.length;i++){var a=o[i];n.set(a,r),r+=a.length}return n}(o.concat(r)):new Uint8Array(0)},get encodedBytesCount(){return o.length?o.reduce((function(e,t){return e+t.length}),0)+r.length:0},get rawBytesCount(){return i},write:function(e,r){t.postMessage({action:"write",id:a,data:e,streamId:n}),s.push({id:a,callback:r}),a+=1},reset:function(){t.postMessage({action:"reset",streamId:n}),a=0},stop:function(){A()}}}function cc(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r<i.length;r++){var s=i[r];a.set(s,n),n+=s.length}return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=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]),_=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]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=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);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},U=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},R=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&S(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!S(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},L=function(t,e,n){var r,i,h,l,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(l=s[h])&&(i-=c[h],z(t,i,l)),r--,h=y(r),x(t,h,n),0!==(l=_[h])&&(r-=v[h],z(t,r,l)))}while(o<t.last_lit);x(t,256,e)},F=function(t,e){var a,n,r,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=_[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},I=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{x(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),_--),x(t,16,t.bl_tree),z(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),z(t,_-3,3)):(x(t,18,t.bl_tree),z(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},N=!1,O=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){U(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},D=function(t,e,n,r){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),_=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*l[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),L(t,t.dyn_ltree,t.dyn_dtree)),Z(t),r&&U(t)},B={_tr_init:function(t){N||(!function(){var t,e,a,l,m,y=new Array(16);for(a=0,l=0;l<28;l++)for(c[l]=a,t=0;t<1<<s[l];t++)f[a++]=l;for(f[a-1]=l,m=0,l=0;l<16;l++)for(v[l]=m,t=0;t<1<<_[l];t++)u[m++]=l;for(m>>=7;l<r;l++)for(v[l]=m<<7,t=0;t<1<<_[l]-7;t++)u[256+m++]=l;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(E(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,_,0,r,i),w=new b(new Array(0),h,0,19,7)}(),N=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,Z(t)},_tr_stored_block:O,_tr_flush_block:D,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},Y={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"},K={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},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},kt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=ft-(u-i),i=u-ft,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){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=ut,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),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(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),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,It(t)},Ot={deflateInit:function(t,e){return Nt(t,e,ut,15,8,ot)},deflateInit2:Nt,deflateReset:It,deflateResetKeep:Tt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,tt):at},deflate:function(t,e){var a,n;if(!t||!t.state||e>$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=ft-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=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},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};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 Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e){void 0===e&&(e=self);try{var a=new Map;e.addEventListener("message",(function(n){try{var r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"4.50.1"};case"write":var n=e.get(a.streamId);n||(n=new Jt,e.set(a.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();'])))}var lc={status:0};function uc(e,t,n,r){switch(void 0===r&&(r=cc),0===lc.status&&function(e,t,n){void 0===n&&(n=cc);try{var r=n(e),i=Pn(e,r,"error",(function(n){hc(e,t,n)})).stop,o=Pn(e,r,"message",(function(n){var r,i=n.data;"errored"===i.type?hc(e,t,i.error,i.streamId):"initialized"===i.type&&(r=i.version,1===lc.status&&(lc={status:3,worker:lc.worker,stop:lc.stop,version:r}))})).stop;r.postMessage({action:"init"}),Dt((function(){return function(e){1===lc.status&&(gt.error("".concat(e," failed to start: a timeout occurred while initializing the Worker")),lc.initializationFailureCallbacks.forEach((function(e){return e()})),lc={status:2})}(t)}),1e4),lc={status:1,worker:r,stop:function(){i(),o()},initializationFailureCallbacks:[]}}catch(n){hc(e,t,n)}}(e,t,r),lc.status){case 1:return lc.initializationFailureCallbacks.push(n),lc.worker;case 3:return lc.worker}}function dc(){return lc.status}function hc(e,t,n,r){if(1===lc.status||0===lc.status){if(gt.error("".concat(t," failed to start: an error occurred while creating the Worker:"),n),n instanceof Event||n instanceof Error&&(St(o=n.message,"Content Security Policy")||St(o,"requires 'TrustedScriptURL'"))){var i=void 0;i=e.workerUrl?"Please make sure the Worker URL ".concat(e.workerUrl," is correct and CSP is correctly configured."):"Please make sure CSP is correctly configured.",gt.error("".concat(i," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else wi(n);1===lc.status&&lc.initializationFailureCallbacks.forEach((function(e){return e()})),lc={status:2}}else wi(n,{worker_version:3===lc.status&&lc.version,stream_id:r});var o}var fc=function(e,t){if(kn()||!ac())return{start:Vt,stop:Vt,getReplayStats:function(){},onRumStart:Vt,isRecording:function(){return!1},getSessionReplayLink:function(){}};var n={status:0},r=function(){n={status:1}},i=function(){n={status:0}};return{start:function(){return r()},stop:function(){return i()},getSessionReplayLink:function(e,t,r){return sc(e,t,r,0!==n.status)},onRumStart:function(o,a,s,A){o.subscribe(7,(function(){2!==n.status&&3!==n.status||(i(),n={status:1})})),o.subscribe(8,(function(){1===n.status&&r()})),r=function(){var r=s.findTrackedSession();r&&r.sessionReplayAllowed?2!==n.status&&3!==n.status&&(n={status:2},Si(a,"interactive",(function(){if(2===n.status){var r=uc(a,"Datadog Session Replay",(function(){i()}),t);if(r){var c=e(o,a,s,A,Ac(a,r,1)).stop;n={status:3,stopRecording:c}}else n={status:0}}}))):n={status:1}},i=function(){0!==n.status&&(3===n.status&&n.stopRecording(),n={status:0})},1===n.status&&r()},isRecording:function(){return 3===dc()&&3===n.status},getReplayStats:function(e){return 3===dc()?function(e){return null==ec?void 0:ec.get(e)}(e):void 0}}}((function(e,t,n,r,i,o){var a=o||hs(t,t.sessionReplayEndpointBuilder,ic,(function(t){e.notify(12,{error:t}),yi("Error reported to customer",{"error.message":t.message})})),s=oc(e,t,n,r,a,i),A=s.addRecord,c=s.stop,l=$A({emit:A,configuration:t,lifeCycle:e}),u=l.stop,d=l.takeSubsequentFullSnapshot,h=l.flushMutations,f=e.subscribe(4,(function(){h(),A({timestamp:yn(),type:Is})})).unsubscribe,p=e.subscribe(2,(function(e){d(e.startClocks.timeStamp)})).unsubscribe;return{stop:function(){f(),p(),u(),c()}}})),pc=function(e,t,n){var r=(void 0===n?{}:n).ignoreInitIfSyntheticsWillInjectRum,i=void 0===r||r,o=!1,a=on(2),s=on(1),A=function(){},c=function(){},l=Vt,u=function(){},d=new an,h=function(e,t){void 0===t&&(t=yn()),d.add((function(){return h(e,t)}))},f=function(e,t){void 0===t&&(t=bn()),d.add((function(){return f(e,t)}))},p=function(e,n){void 0===n&&(n=li(a,s,t)),d.add((function(){return p(e,n)}))},m=function(e,n){void 0===n&&(n=li(a,s,t)),d.add((function(){return m(e,n)}))},g=function(e,t){d.add((function(){return g(e,t)}))};function v(n,r,i){if(n.storeContextsAcrossPages){var o=a.getContext();(a=Rn(r,"rum",2)).setContext(Wt(a.getContext(),o));var c=s.getContext();(s=Rn(r,"rum",1)).setContext(Wt(s.getContext(),c))}var v=e(n,r,t,a,s,i);u=function(){return t.getSessionReplayLink(r,v.session,v.viewContexts)},f=v.startView,p=v.addAction,m=v.addError,h=v.addTiming,g=v.addFeatureFlagEvaluation,A=v.getInternalContext,l=v.stopSession,d.drain(),t.onRumStart(v.lifeCycle,r,v.session,v.viewContexts)}var y,w,b=_t((function(e){f("object"==typeof e?e:{name:e})})),B=(y={init:_t((function(e){if(e){if(c=function(){return Gt(e)},!i||!Ln()){var t=kn();if(t&&(e=function(e){return Lt({},e,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(e)),function(e){return!o||(e.silentMultipleInit||gt.error("DD_RUM is already initialized."),!1)}(e)){var n=Ai(e);if(n)if(t||n.sessionStoreStrategyType){if(n.trackViewsManually){var r=d;d=new an,f=function(t){v(e,n,t)},r.drain()}else v(e,n);o=!0}else gt.warn("No storage available for session. We will not send any data.")}}}else gt.error("Missing configuration")})),addRumGlobalContext:_t((function(e,t){return a.add(e,t)})),setGlobalContextProperty:_t((function(e,t){return a.setContextProperty(e,t)})),removeRumGlobalContext:_t((function(e){return a.remove(e)})),removeGlobalContextProperty:_t((function(e){return a.removeContextProperty(e)})),getRumGlobalContext:_t((function(){return a.get()})),getGlobalContext:_t((function(){return a.getContext()})),setRumGlobalContext:_t((function(e){return a.set(e)})),setGlobalContext:_t((function(e){return a.setContext(e)})),clearGlobalContext:_t((function(){return a.clearContext()})),getInternalContext:_t((function(e){return A(e)})),getInitConfiguration:_t((function(){return c()})),addAction:_t((function(e,t){p({name:Jt(e),context:Jt(t),startClocks:bn(),type:"custom"})})),addError:function(e,t){var n=ir();xt((function(){m({error:e,handlingStack:n,context:Jt(t),startClocks:bn()})}))},addTiming:_t((function(e,t){h(Jt(e),t)})),setUser:_t((function(e){(function(e){var t="object"===jt(e);return t||gt.error("Unsupported user:",e),t})(e)&&s.setContext(or(e))})),getUser:_t((function(){return s.getContext()})),setUserProperty:_t((function(e,t){var n,r=or((n={},n[e]=t,n))[e];s.setContextProperty(e,r)})),removeUserProperty:_t((function(e){return s.removeContextProperty(e)})),removeUser:_t((function(){return s.clearContext()})),clearUser:_t((function(){return s.clearContext()})),startView:b,stopSession:_t((function(){l()})),startSessionReplayRecording:_t(t.start),stopSessionReplayRecording:_t(t.stop),addFeatureFlagEvaluation:_t((function(e,t){g(Jt(e),Jt(t))})),getSessionReplayLink:_t((function(){return u()}))},w=Lt({version:"4.50.1",onReady:function(e){e()}},y),Object.defineProperty(w,"_setDebug",{get:function(){return Bt},enumerable:!1}),w);return B}((function(e,t,n,r,i,o){var a=[],s=new po;s.subscribe(11,(function(e){return ui("rum",e)}));var A=function(e){var t=vi("browser-rum-sdk",e);if(kn()){var n=In();t.observable.subscribe((function(e){return n.send("internal_telemetry",e)}))}return t}(t);A.setContextProvider((function(){var e,n;return{application:{id:t.applicationId},session:{id:null===(e=h.findTrackedSession())||void 0===e?void 0:e.id},view:{id:null===(n=w.findView())||void 0===n?void 0:n.id},action:{id:_.findActionId()}}}));var c=function(e){s.notify(12,{error:e}),yi("Error reported to customer",{"error.message":e.message})},l=function(e,t){if(void 0===t&&(t=Pt),!sr(Zn.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:Vt,stop:Vt};var n=new go(144e5),r=0,i=!1;e.subscribe(4,(function(e){var t=e.endClocks;n.closeActive(t.relative)})),e.subscribe(2,(function(e){var t=e.startClocks;n.add({},t.relative),r=0}));var o=zt((function(e){r=t(qt(e)),i||(i=rn(r,0))}),200),a=o.throttled;return{findFeatureFlagEvaluations:function(e){return n.find(e)},getFeatureFlagBytesCount:function(){return n.find()?r:0},addFeatureFlagEvaluation:function(e,t){var r=n.find();r&&(r[e]=t,a(r))},stop:o.cancel}}(s),u=function(e){var t=new en((function(){var n=sr(Zn.PAGEHIDE),r=On(0,window,["visibilitychange","freeze","pagehide"],(function(e){"pagehide"===e.type&&n?t.notify({reason:_i.PAGEHIDE}):"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:_i.HIDDEN}):"freeze"===e.type&&t.notify({reason:_i.FROZEN})}),{capture:!0}).stop,i=Vt;return n||(i=Pn(e,window,"beforeunload",(function(){t.notify({reason:_i.UNLOADING})})).stop),function(){r(),i()}}));return t}(t),d=u.subscribe((function(e){s.notify(9,e)}));a.push((function(){return d.unsubscribe()}));var h=kn()?function(){var e={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return e},expire:Vt,expireObservable:new en}}():is(t,s);if(kn())!function(e){var t=In();e.subscribe(11,(function(e){t.send("rum",e)}))}(s);else{var f=gs(t,s,A.observable,c,u,h.expireObservable);a.push((function(){return f.stop()})),function(e,t,n,r,i,o,a){t.enabled&&sn(e.customerDataTelemetrySampleRate)&&(Cs(),Ss(),n.subscribe(11,(function(e){bs=!0,_s(ws.globalContextBytes,ur(r.get())?0:r.getBytesCount()),_s(ws.userContextBytes,ur(i.get())?0:i.getBytesCount());var t=o.findFeatureFlagEvaluations(),n=St(["view","error"],e.type)&&t&&!ur(t);_s(ws.featureFlagBytes,n?o.getFeatureFlagBytesCount():0)})),a.subscribe((function(e){var t=e.bytesCount,n=e.messagesCount;bs&&(ys.batchCount+=1,_s(ys.batchBytesCount,t),_s(ys.batchMessagesCount,n),xs(ys.globalContextBytes,ws.globalContextBytes),xs(ys.userContextBytes,ws.userContextBytes),xs(ys.featureFlagBytes,ws.featureFlagBytes),Ss())})),Rt(Bs,1e4))}(t,A,s,r,i,l,f.flushObservable)}var p,m,g=(p=Ci(),m=new en((function(){if(p){var e=new p(_t((function(){return m.notify()})));return e.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return e.disconnect()}}})),m),v=vs(t,location),y=function(e,t,n,r,i,o,a,s){var A=function(e){var t=new go(144e5);return e.subscribe(2,(function(e){t.add(function(e){return{service:e.service,version:e.version,id:e.id,name:e.name,startClocks:e.startClocks}}(e),e.startClocks.relative)})),e.subscribe(4,(function(e){var n=e.endClocks;t.closeActive(n.relative)})),e.subscribe(8,(function(){t.reset()})),{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}(e),c=function(e,t,n){var r,i=new go(144e5);e.subscribe(4,(function(e){var t=e.endClocks;i.closeActive(t.relative)})),e.subscribe(2,(function(e){var t=e.startClocks,o=n.href;i.add(a({url:o,referrer:r||document.referrer}),t.relative),r=o}));var o=t.subscribe((function(e){var t=e.newLocation,n=i.find();if(n){var r=wn();i.closeActive(r),i.add(a({url:t.href,referrer:n.referrer}),r)}}));function a(e){return{url:e.url,referrer:e.referrer}}return{findUrl:function(e){return i.find(e)},stop:function(){o.unsubscribe(),i.stop()}}}(e,i,n),l=Es(),u=function(e,t,n,r){e.subscribe(1,(function(t){return e.notify(10,fa(t,r))}));var i={findActionId:Vt};return n.trackUserInteractions&&(i=da(e,t,n).actionContexts),{addAction:function(t,n){e.notify(10,Lt({savedCommonContext:n},fa(t,r)))},actionContexts:i}}(e,o,t,l),d=u.addAction,h=u.actionContexts,f=function(e){var t=Wa();return{get:function(){return{viewport:t}},stop:Ga(e).subscribe((function(e){t=e})).unsubscribe}}(t);return ho(t,e,r,A,c,h,f,a,s),{viewContexts:A,pageStateHistory:l,urlContexts:c,addAction:d,actionContexts:h,stop:function(){f.stop(),l.stop(),c.stop(),A.stop(),l.stop()}}}(s,t,location,h,v,g,(function(){return li(r,i,n)}),c),w=y.viewContexts,b=y.pageStateHistory,B=y.urlContexts,_=y.actionContexts,x=y.addAction,C=y.stop;a.push(C),function(e){gi.telemetryConfigurationEnabled&&bi({type:fi,configuration:e})}(function(e){var t,n,r=function(e){var t,n,r=null!==(t=e.proxy)&&void 0!==t?t:e.proxyUrl;return{session_sample_rate:null!==(n=e.sessionSampleRate)&&void 0!==n?n:e.sampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:void 0!==r?!!r:void 0,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_resources:e.trackResources,track_long_task:e.trackLongTasks,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages}}(e);return Lt({premium_sample_rate:e.premiumSampleRate,replay_sample_rate:e.replaySampleRate,session_replay_sample_rate:e.sessionReplaySampleRate,trace_sample_rate:null!==(t=e.traceSampleRate)&&void 0!==t?t:e.tracingSampleRate,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:ci(e),default_privacy_level:e.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,track_frustrations:e.trackFrustrations,track_views_manually:e.trackViewsManually,track_user_interactions:null!==(n=e.trackUserInteractions)&&void 0!==n?n:e.trackInteractions},r)}(e)),function(e,t){e.subscribe(0,(function(n){for(var r=0,i=n;r<i.length;r++){var o=i[r];if(o.entryType!==Vi.LONG_TASK)break;var a=t.findTrackedSession(o.startTime);if(!a||!a.longTaskAllowed)break;var s=pn(o.startTime),A={date:s.timeStamp,long_task:{id:En(),duration:gn(o.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(10,{rawRumEvent:A,startTime:s.relative,domainContext:{performanceEntry:o.toJSON()}})}}))}(s,h),Ma(s,t,h,b);var S=es(s,t,location,g,v,l,b,n,o),E=S.addTiming,M=S.startView,U=S.stop;a.push(U);var F=Ca(s,t,b,l).addError;To(s,t,h),Xi(s,t);var T=function(e,t,n,r,i){return{get:function(o){var a=n.findView(o),s=i.findUrl(o),A=t.findTrackedSession(o);if(A&&a&&s){var c=r.findActionId(o);return{application_id:e,session_id:A.id,user_action:c?{id:c}:void 0,view:{id:a.id,name:a.name,referrer:s.referrer,url:s.url}}}}}}(t.applicationId,h,w,_,B);return{addAction:x,addError:F,addTiming:E,addFeatureFlagEvaluation:l.addFeatureFlagEvaluation,startView:M,lifeCycle:s,viewContexts:w,session:h,stopSession:function(){return h.expire()},getInternalContext:T.get,stop:function(){a.forEach((function(e){return e()}))}}}),fc);function mc(e,t,n,r,i,o,a){try{var s=e[o](a),A=s.value}catch(e){return void n(e)}s.done?t(A):Promise.resolve(A).then(r,i)}!function(e,t,n){var r=e[t];e[t]=n,r&&r.q&&r.q.forEach((function(e){return vt(e,"onReady callback threw an error:")()}))}(It(),"DD_RUM",pc);var gc=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){mc(o,r,i,a,s,"next",e)}function s(e){mc(o,r,i,a,s,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.play();case 3:e.next=9;break;case 5:throw e.prev=5,e.t0=e.catch(0),new Error("Error playing media: ".concat(e.t0));case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}();function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wc="is-playing",bc="is-ended",Bc=function(){function e(t,n,r,i,o,a,s){var A=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yc(this,"container",void 0),yc(this,"child",void 0),yc(this,"videoContainer",void 0),yc(this,"video",void 0),yc(this,"trigger",void 0),yc(this,"triggerTarget",void 0),yc(this,"speed",void 0),yc(this,"timingFunc",void 0),yc(this,"effects",void 0),this.container=t,this.child=n,this.trigger=r,this.triggerTarget=i,this.speed=o,this.timingFunc=a,this.effects=s;["hover","click","inView"].includes(this.trigger)&&(this.speed<=0||this.effects.length<=0||(this.child.style.setProperty("--fx-animation-speed","".concat(this.speed,"ms")),this.child.style.setProperty("--fx-animation-timing-function","".concat(this.timingFunc)),this.child.classList.add("fx-animation"),"hover"===this.trigger&&(this.triggerTarget.addEventListener("mouseenter",(function(){A.handleMouseEnter()})),this.triggerTarget.addEventListener("mouseleave",(function(){A.handleMouseLeave()}))),"click"===this.trigger&&this.triggerTarget.addEventListener("click",(function(){A.handleClick()})),"inView"===this.trigger&&this.handleInView(),this.handleEffects()))}var t,n,r;return t=e,(n=[{key:"handleMouseEnter",value:function(){this.child.classList.add("fx-active"),this.video&&this.video.paused&&(gc(this.video),this.videoContainer.classList.add(wc),this.videoContainer.classList.remove(bc))}},{key:"handleMouseLeave",value:function(){this.child.classList.remove("fx-active"),this.video&&(this.video.paused||(this.video.pause(),this.videoContainer.classList.remove(wc)))}},{key:"handleClick",value:function(){this.child.classList.contains("fx-active")?this.child.classList.remove("fx-active"):this.child.classList.add("fx-active"),this.video&&(this.video.paused?(gc(this.video),this.videoContainer.classList.add(wc),this.videoContainer.classList.remove(bc)):(this.video.pause(),this.videoContainer.classList.remove(wc)))}},{key:"handleEffects",value:function(){var e=this,t=[];this.effects.forEach((function(n){if(e.child.classList.add("fx-".concat(n.fx)),"scale"===n.fx&&t.push("transform"),"bg-color"===n.fx&&t.push("background-color"),n.size&&e.child.style.setProperty("--fx-size",n.size),n.before_color&&n.after_color&&(e.child.style.setProperty("--fx-color-before",n.before_color),e.child.style.setProperty("--fx-color-after",n.after_color)),n.is_play_video){var r=e.container.querySelector(".video"),i=e.container.querySelector("video");r instanceof HTMLElement&&i instanceof HTMLVideoElement&&(e.videoContainer=r,e.video=i),e.video&&e.video.setAttribute("data-video-type","parentAnimation")}})),this.child.style.setProperty("--fx-will-change",t.toString())}},{key:"handleInView",value:function(){var e=this;new Waypoint({element:this.container,offset:"bottom-in-view",handler:function(t){"down"===t&&e.child.classList.add("fx-active")}}),new Waypoint({element:this.container,offset:function(){return e.container.clientHeight},handler:function(t){"up"===t&&e.child.classList.add("fx-active")}}),new Waypoint({element:this.container,offset:function(){return-e.container.clientHeight},handler:function(t){"down"===t&&e.child.classList.remove("fx-active")}}),new Waypoint({element:this.container,offset:"bottom-in-view",handler:function(t){"up"===t&&e.child.classList.remove("fx-active")}})}}])&&vc(t.prototype,n),r&&vc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_c=r("../../node_modules/big.js/big.js"),xc=r.n(_c);function Cc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sc(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ec(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uc=new RegExp("((?:'[^']*'|[^0-9@#.,])*)([0-9@#.,E+]*)(.*)"),Fc=function(){function e(t,n,r,i,o,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Mc(this,"pattern",void 0),Mc(this,"positive",void 0),Mc(this,"negative",void 0),Mc(this,"grouping",void 0),Mc(this,"int",void 0),Mc(this,"frac",void 0),Mc(this,"rounding",void 0),this.pattern=t,this.positive=n,this.negative=r,this.grouping=i,this.int=o,this.frac=a,this.rounding=2}var t,n,r;return t=e,r=[{key:"parse",value:function(t){if(t instanceof e)return t;var n,r,i,o,a;if(t.includes(";")){var s=Cc(t.split(";",2),2),A=s[0],c=s[1],l=this.parseNumber(A);r=l.template,n=l.number,i=this.parseNumber(c).template}else{var u=this.parseNumber(t);r=u.template,n=u.number,i=this.parseNumber("-".concat(t)).template}if(n.includes(".")){var d=n.split(".");o=d.slice(0,-1).join("."),a=d.slice(-1).join()}else o=n,a="";var h=this.parsePrecision(o),f=this.parsePrecision(a);return new e(t,r,i,this.parseGrouping(o),h,f)}},{key:"parseNumber",value:function(e){var t="",n="",r="",i=e.match(Uc);if(null!=i&&4===i.length){var o=Cc(i,4);t=o[1],n=o[2],r=o[3]}return""===n&&(n="#,##0.00"),{template:"".concat(t,"{}").concat(r),number:n}}},{key:"parsePrecision",value:function(e){for(var t=0,n=0,r=0;r<e.length;r+=1){var i=e.charAt(r);if("0"===i)t+=1,n+=1;else if("#"===i)n+=1;else if(","!==i)break}return{min:t,max:n}}},{key:"parseGrouping",value:function(e){var t=e.length,n=e.lastIndexOf(",");if(-1===n)return{first:1/0,rest:1/0};var r=e.substring(0,n).lastIndexOf(",");return n=t-n-1,-1===r?{first:n,rest:n}:{first:n,rest:r=t-n-r-2}}}],(n=[{key:"apply",value:function(e,t,n,r,i){var o=xc()(e.toString()),a=Cc(o.round(this.frac.max,this.rounding).abs().toFixed(this.frac.max).split(".",2),2),s=a[0],A=a[1],c=this.formatInteger(s,n),l=this.formatFraction(A,r),u=o.gte(0)?this.positive:this.negative,d=u.replace("{}",c+l);return 0===i&&(d=u.replace("{}",c)),d.includes("¤")&&(d=d.replace("¤",t)),d}},{key:"formatInteger",value:function(e,t){var n=e.length,r=e;n<this.int.min&&(r="0".repeat(this.int.min-n)+r);for(var i=this.grouping.first,o="";r.length>i;)o=t+r.slice(-i)+o,r=r.slice(0,-i),i=this.grouping.rest;return r+o}},{key:"formatFraction",value:function(e,t){var n=e;if(void 0===e&&(n="0"),n.length<this.frac.min&&(n+="0".repeat(this.frac.min-n.length)),0===this.frac.max||0===this.frac.min&&0===parseInt(n,10))return"";for(;n.length>this.frac.min&&"0"===n.slice(n.length-1);)n=n.substring(0,n.length-1);return t+n}}])&&Ec(t.prototype,n),r&&Ec(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ic=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Tc(this,e),Lc(this,"pattern",void 0),Lc(this,"decimalSymbol",void 0),Lc(this,"groupSymbol",void 0),Lc(this,"currencies",void 0),Lc(this,"noDecimals",void 0),this.pattern=Fc.parse(t.pattern||"¤#,##0.00"),this.decimalSymbol=t.decimal||".",this.groupSymbol=t.group||",",this.currencies=t.currencies||{},this.noDecimals=t.noDecimals||!1}var t,n,r;return t=e,(n=[{key:"format",value:function(e,t){var n,r=this.noDecimals?0:2;return Object.prototype.hasOwnProperty.call(this.currencies,t)?(n=this.currencies[t]).precision=r:n={symbol:t,precision:r},this.pattern.apply(e,n.symbol,this.groupSymbol,this.decimalSymbol,n.precision)}}])&&Qc(t.prototype,n),r&&Qc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),kc=r("../../node_modules/axios/index.js"),Pc=r.n(kc);function Oc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rc=["name_line","organization","address_line1","address_line2","locality","sub_locality","postal_code","sorting_code","administrative_area"],Nc=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.formatURL,o=void 0===i?"/api/v1/addressing/":i;Oc(this,e),Hc(this,"addressContainer",void 0),Hc(this,"unusedContainer",void 0),Hc(this,"rows",void 0),Hc(this,"formatURL",void 0),Hc(this,"requiredHTML",void 0),Hc(this,"fields",void 0),this.formatURL=o,this.addressContainer=t;var a=t.querySelector(".js-address-unused");if(!(a instanceof HTMLElement))throw Error("No unused field container on address");this.unusedContainer=a,this.unusedContainer.setAttribute("aria-hidden","true"),Array.from(this.unusedContainer.querySelectorAll("input, select")).forEach((function(e){return e.setAttribute("tabindex","-1")})),this.rows=Array.from(t.querySelectorAll(".js-address-row")),this.fields={};var s=t.querySelectorAll(".form-field");Array.from(s).forEach((function(e){var t=e.getAttribute("data-field-name");t&&Rc.includes(t)&&(n.fields[t]=e)}));var A=t.querySelector('.form-field[data-field-name="country"] select');A instanceof HTMLSelectElement&&A.addEventListener("change",(function(){return n.update(A.value)}))}var t,n,r;return t=e,n=[{key:"update",value:function(e){var t=this;this.getFormat(e).then((function(e){var n=e.data,r=n.address_format,i=n.subdivisions;t.updateSubdivisions(i),t.updateLayout(r.grouped_fields),t.updateRequired(r.required),t.updateLabels(r)})).catch((function(e){}))}},{key:"getFormat",value:function(e){var t=this.formatURL+e;return Pc().get(t)}},{key:"updateSubdivisions",value:function(e){var t=this.fields.administrative_area.querySelector("select");t instanceof HTMLSelectElement&&(Array.from(t.querySelectorAll("option")).filter((function(e){return e instanceof HTMLOptionElement&&""!==e.value})).forEach((function(e){return t.removeChild(e)})),e.forEach((function(e){var n=document.createElement("option");n.setAttribute("value",e.id),n.innerHTML=e.name,t.appendChild(n)})),t.selectedIndex=0)}},{key:"updateLayout",value:function(e){var t=this;this.rows.forEach((function(e){var n=e.querySelectorAll(".form-field");Array.from(n).forEach((function(e){Array.from(e.querySelectorAll("input, select")).forEach((function(e){return e.setAttribute("tabindex","-1")})),t.unusedContainer.appendChild(e)}))}));var n=0;e.forEach((function(e){var r=0,i=t.rows[n];void 0!==i&&e.forEach((function(e){var n=t.getField(e);void 0!==n&&(i.appendChild(n),Array.from(n.querySelectorAll("input, select")).forEach((function(e){return e.removeAttribute("tabindex")})),r+=1)})),r>0&&(n+=1)}))}},{key:"updateRequired",value:function(e){var t=this;Object.keys(this.fields).forEach((function(n){var r=t.fields[n];"name_line"===n||e.includes(n)?t.updateFieldRequired(r,!0):t.updateFieldRequired(r,!1)}));var n=this.unusedContainer.querySelectorAll(".form-field");Array.from(n).forEach((function(e){t.updateFieldRequired(e,!1)}))}},{key:"updateFieldRequired",value:function(e,t){var n=e.querySelector("label");if(n instanceof HTMLElement){var r=n.querySelector(".form-field__required-mark");if(r instanceof HTMLElement)!1===t&&n.removeChild(r);else if(!0===t){(r=document.createElement("span")).className="form-field__required-mark",r.innerHTML="(Required)";var i=n.firstChild;if(null!=i){var o=i.nextSibling;null!=o?n.insertBefore(r,o.nextSibling):n.appendChild(r)}}}var a=e.querySelectorAll("input, select");Array.from(a).forEach((function(e){(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&(!0===t?e.setAttribute("required",""):e.removeAttribute("required"))}))}},{key:"updateLabels",value:function(e){this.updateFieldLabel(this.fields.locality,e.locality_label),this.updateFieldLabel(this.fields.sub_locality,e.sub_locality_label),this.updateFieldLabel(this.fields.postal_code,e.postal_code_label),this.updateFieldLabel(this.fields.administrative_area,e.administrative_area_label)}},{key:"updateFieldLabel",value:function(e,t){var n=e.querySelector("label");if(n instanceof HTMLElement){var r=n.firstChild;r instanceof Node&&r.nodeType===Node.TEXT_NODE&&(r.nodeValue=t)}}},{key:"getField",value:function(e){return this.fields[e]}}],n&&Dc(t.prototype,n),r&&Dc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),zc=r("../../node_modules/form-serialize/index.js"),Vc=r.n(zc);function jc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kc(e,t,n){return t&&jc(e.prototype,t),n&&jc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wc=Kc((function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Gc(this,"isValid",void 0),Gc(this,"code",void 0),Gc(this,"message",void 0),this.isValid=t,this.code=n,this.message=r}));function qc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yc="This field is required.",Zc=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.dirtyAttribute,o=void 0===i?"data-dirty":i,a=r.errorSelector,s=void 0===a?".form-field__error-list":a,A=r.errorElement,c=void 0===A?"span":A,l=r.errorTitleClass,u=void 0===l?"form-field__error-title":l,d=r.errorClass,h=void 0===d?"form-field__error":d,f=r.errorTimeout,p=void 0===f?400:f;qc(this,e),Jc(this,"field",void 0),Jc(this,"errorSelector",void 0),Jc(this,"errorElement",void 0),Jc(this,"errorClass",void 0),Jc(this,"errorTitleClass",void 0),Jc(this,"errorTimeout",void 0),Jc(this,"dirtyAttribute",void 0),this.dirtyAttribute=o,this.errorSelector=s,this.errorElement=c,this.errorTitleClass=u,this.errorClass=h,this.errorTimeout=p,this.field=t,this.field.addEventListener("keyup",(function(e){return n.onKeyUp(e)}),!0),this.field.addEventListener("blur",(function(e){return n.onBlur(e)}),!0),this.field.addEventListener("change",(function(e){return n.onChange(e)}),!0)}var t,n,r;return t=e,(n=[{key:"validate",value:function(){var e=this.field.querySelector("input, select"),t=new Wc(!0,"required","");return(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&(t=this.getValidationResult(e),this.updateErrors(e,t)),t}},{key:"getValidationResult",value:function(e){if(e.disabled||"hidden"===e.type||"file"===e.type||"input"===e.type||"submit"===e.type||"button"===e.type)return new Wc(!0,"required","");var t=e.validity;return t instanceof ValidityState&&!t.valid&&t.valueMissing?new Wc(!1,"required",Yc):new Wc(!0,"required","")}},{key:"onKeyUp",value:function(e){var t=e.target;if(t instanceof HTMLInputElement){var n=t.hasAttribute(this.dirtyAttribute),r=this.getValidationResult(t);if(r.isValid&&this.updateErrors(t,r),!n){var i=t.getAttribute("value"),o=t.value;((null===i||""===i)&&o.length>0||null!==i&&o!==i)&&t.setAttribute(this.dirtyAttribute,"")}}}},{key:"onBlur",value:function(e){var t=e.target;if(t instanceof HTMLInputElement){var n=t.hasAttribute(this.dirtyAttribute),r=this.getValidationResult(t);(r.isValid||n)&&this.updateErrors(t,r)}}},{key:"onChange",value:function(e){var t=e.target;if(t instanceof HTMLSelectElement){var n=this.getValidationResult(t);this.updateErrors(t,n)}}},{key:"updateErrors",value:function(e,t){var n=this,r=this.field.querySelector(this.errorSelector);if(r instanceof HTMLElement){var i=Array.from(r.querySelectorAll(".".concat(this.errorTitleClass))),o=Array.from(r.querySelectorAll(".".concat(this.errorClass))),a=o.filter((function(e){return e.getAttribute("data-code")===t.code})),s=o.filter((function(e){return e.getAttribute("data-code")!==t.code}));if(t.isValid)a.map((function(e){return setTimeout((function(){e.parentNode===r&&r.removeChild(e)}),n.errorTimeout)})),0===s.length&&(i.map((function(e){return setTimeout((function(){e.parentNode===r&&r.removeChild(e)}),n.errorTimeout)})),r.classList.add("is-empty"),e.setAttribute("aria-invalid","false"),this.field.classList.remove("is-invalid"));else{if(0===a.length){var A=this.createError(t.code,t.message);if(0===s.length){var c=this.createTitle();r.appendChild(c),r.appendChild(A)}else r.insertBefore(A,s[0])}r.classList.remove("is-empty"),e.setAttribute("aria-invalid","true"),this.field.classList.add("is-invalid")}}}},{key:"createTitle",value:function(){var e=this.field.getAttribute("data-label"),t=e?"Errors for ".concat(e,":"):"Errors:",n=document.createElement(this.errorElement);return n.className="".concat(this.errorTitleClass," sr-only"),n.innerHTML=t,n}},{key:"createError",value:function(e,t){var n=document.createElement(this.errorElement);return n.setAttribute("data-code",e),n.className=this.errorClass,n.innerHTML=t,n}}])&&Xc(t.prototype,n),r&&Xc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function $c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return el(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return el(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var il=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.fieldSelector,o=void 0===i?".form-field":i,a=r.focusFirstInvalidField,s=void 0===a||a,A=r.onValid,c=r.onInvalid;if(tl(this,e),rl(this,"form",void 0),rl(this,"fields",void 0),rl(this,"focusFirstInvalidField",void 0),rl(this,"onValid",void 0),rl(this,"onInvalid",void 0),this.form="string"==typeof t?document.querySelector(t):t,!(this.form instanceof HTMLFormElement))throw Error("FormValidator must be instantiated with a form");this.focusFirstInvalidField=s,this.onValid=A,this.onInvalid=c,this.form.setAttribute("novalidate",""),this.form.addEventListener("submit",(function(e){n.onSubmit(e)}));var l=Array.from(this.form.querySelectorAll(o));this.fields=l.filter((function(e){return!e.hasAttribute("data-novalidate")})).map((function(e){return new Zc(e)}))}var t,n,r;return t=e,n=[{key:"validate",value:function(){var e=this.fields.map((function(e){return e.validate()}));return e.every((function(e){return e.isValid}))}},{key:"focusFirstField",value:function(){var e,t=$c(this.fields);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.field.classList.contains("is-invalid"))return void n.field.querySelector(".form-field__widget").focus()}}catch(e){t.e(e)}finally{t.f()}}},{key:"onSubmit",value:function(e){if(!this.validate())return e.preventDefault(),this.focusFirstInvalidField&&this.focusFirstField(),void(this.onInvalid&&this.onInvalid(e));var t=Vc()(this.form,{hash:!0});this.onValid&&!1===this.onValid(e,t)&&e.preventDefault()}}],n&&nl(t.prototype,n),r&&nl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function al(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Al={classes:{base:"form-field__widget--stripe",complete:"is-complete",empty:"is-empty",focus:"is-focused",invalid:"is-invalid"},style:{base:{color:"#161616",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeight:"400",fontSize:"16px",fontSmoothing:"antialiased","::placeholder":{color:"#999999"}},invalid:{color:"#444444"}}},cl=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:992;ol(this,e),sl(this,"fontBreakpoint",void 0),sl(this,"stripe",void 0),sl(this,"cardNumberErrors",void 0),sl(this,"cardNumberField",void 0),sl(this,"cardNumber",void 0),sl(this,"cardExpiryErrors",void 0),sl(this,"cardExpiryField",void 0),sl(this,"cardExpiry",void 0),sl(this,"cardCvcErrors",void 0),sl(this,"cardCvcField",void 0),sl(this,"cardCvc",void 0),sl(this,"sourceInput",void 0),sl(this,"icons",void 0),this.fontBreakpoint=i,this.icons=[];var o=Array.from(document.querySelectorAll(".".concat(n,"-icons")));o.forEach((function(e){e instanceof HTMLElement&&Array.from(e.querySelectorAll("[data-brand]")).forEach((function(e){r.icons.push(e)}))}));var a=document.querySelector("#id_".concat(n,"-stripe_source"));if(!(a instanceof HTMLInputElement))throw Error("Missing stripe source input. Expected '#id_".concat(n,"-stripe_source'"));this.sourceInput=a,this.cardNumberErrors=document.querySelector("#".concat(n,"-card_number-errors")),this.cardNumberField=document.querySelector("#".concat(n,"-card_number")),this.cardExpiryErrors=document.querySelector("#".concat(n,"-card_expiry-errors")),this.cardExpiryField=document.querySelector("#".concat(n,"-card_expiry")),this.cardCvcErrors=document.querySelector("#".concat(n,"-card_cvc-errors")),this.cardCvcField=document.querySelector("#".concat(n,"-card_cvc")),this.stripe=Stripe(t);var s=this.stripe.elements();this.cardNumber=s.create("cardNumber",Al),this.cardNumber.mount(this.cardNumberField),this.cardNumber.on("change",(function(e){return r.cardNumberChanged(e)})),this.cardNumber.on("change",(function(e){r.fieldChanged(r.cardNumber,r.cardNumberErrors,e)})),this.cardExpiry=s.create("cardExpiry",Al),this.cardExpiry.mount(this.cardExpiryField),this.cardExpiry.on("change",(function(e){r.fieldChanged(r.cardExpiry,r.cardExpiryErrors,e)})),this.cardCvc=s.create("cardCvc",Al),this.cardCvc.mount(this.cardCvcField),this.cardCvc.on("change",(function(e){r.fieldChanged(r.cardCvc,r.cardCvcErrors,e)})),window.addEventListener("resize",this.windowResized.bind(this))}var t,n,r;return t=e,n=[{key:"focus",value:function(){this.focusFirstIncompleteField()}},{key:"submit",value:function(e){var t=this;return new Promise((function(e,n){t.stripe.createSource(t.cardNumber).then((function(r){return r.error?(t.focusFirstIncompleteField(),n(new Error("Error at Stripe createSource Promise"))):(t.sourceInput.value=r.source.id,e())}))}))}},{key:"focusFirstIncompleteField",value:function(){this.cardNumberField.classList.contains("is-complete")?this.cardExpiryField.classList.contains("is-complete")?this.cardCvcField.classList.contains("is-complete")||this.cardCvc.focus():this.cardExpiry.focus():this.cardNumber.focus()}},{key:"cardNumberChanged",value:function(e){null!==this.icons&&void 0!==this.icons&&(e.brand&&"unknown"!==e.brand?this.icons.forEach((function(t){t.getAttribute("data-brand")===e.brand?t.classList.remove("is-dimmed"):t.classList.add("is-dimmed")})):this.icons.forEach((function(e){return e.classList.remove("is-dimmed")})))}},{key:"fieldChanged",value:function(e,t,n){t instanceof HTMLElement&&(n.error?this.addMessage(e,t,n.error.message):this.removeMessage(t))}},{key:"windowResized",value:function(){var e="16px";window.innerWidth<=this.fontBreakpoint&&(e="14px");var t={style:{base:{fontSize:e}}};this.cardNumber.update(t),this.cardExpiry.update(t),this.cardCvc.update(t)}},{key:"addMessage",value:function(e,t,n){this.removeMessage(t);var r=document.createElement("li");r.textContent=n,r.addEventListener("click",(function(){return e.focus()})),t.appendChild(r),t.classList.remove("is-empty")}},{key:"removeMessage",value:function(e){e.classList.add("is-empty");var t=Array.from(e.querySelectorAll("li"));setTimeout((function(){return t.forEach((function(t){t.parentNode===e&&e.removeChild(t)}))}),400)}}],n&&al(t.prototype,n),r&&al(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ll(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hl={classes:{base:"form-field__widget--stripe",complete:"is-complete",empty:"is-empty",focus:"is-focused",invalid:"is-invalid"},style:{base:{color:"#161616",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeight:"400",fontSize:"16px",fontSmoothing:"antialiased","::placeholder":{color:"#999999"}},invalid:{color:"#444444"}}},fl=function(){function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:992;ll(this,e),dl(this,"fontBreakpoint",void 0),dl(this,"stripe",void 0),dl(this,"cardNumberErrors",void 0),dl(this,"cardNumberField",void 0),dl(this,"cardNumber",void 0),dl(this,"cardExpiryErrors",void 0),dl(this,"cardExpiryField",void 0),dl(this,"cardExpiry",void 0),dl(this,"cardCvcErrors",void 0),dl(this,"cardCvcField",void 0),dl(this,"cardCvc",void 0),dl(this,"paymentMethodInput",void 0),dl(this,"icons",void 0),dl(this,"methodCode",void 0),this.methodCode=n,this.fontBreakpoint=o,this.icons=[];var a=Array.from(document.querySelectorAll(".".concat(n,"-icons")));a.forEach((function(e){e instanceof HTMLElement&&Array.from(e.querySelectorAll("[data-brand]")).forEach((function(e){i.icons.push(e)}))}));var s=document.querySelector("#id_".concat(n,"-stripe_payment_method_id"));if(!(s instanceof HTMLInputElement))throw Error("Missing stripe method input. Expected '#id_".concat(n,"-stripe_payment_method_id'"));this.paymentMethodInput=s,this.cardNumberErrors=document.querySelector("#".concat(n,"-card_number-errors")),this.cardNumberField=document.querySelector("#".concat(n,"-card_number")),this.cardExpiryErrors=document.querySelector("#".concat(n,"-card_expiry-errors")),this.cardExpiryField=document.querySelector("#".concat(n,"-card_expiry")),this.cardCvcErrors=document.querySelector("#".concat(n,"-card_cvc-errors")),this.cardCvcField=document.querySelector("#".concat(n,"-card_cvc")),this.stripe=Stripe(t);var A=this.stripe.elements();this.cardNumber=A.create("cardNumber",hl),this.cardNumber.on("change",(function(e){return i.cardNumberChanged(e)})),this.cardNumber.on("change",(function(e){i.fieldChanged(i.cardNumber,i.cardNumberErrors,e)})),this.cardExpiry=A.create("cardExpiry",hl),this.cardExpiry.on("change",(function(e){i.fieldChanged(i.cardExpiry,i.cardExpiryErrors,e)})),this.cardCvc=A.create("cardCvc",hl),this.cardCvc.on("change",(function(e){i.fieldChanged(i.cardCvc,i.cardCvcErrors,e)})),window.addEventListener("resize",this.windowResized.bind(this)),r&&this.mountElements()}var t,n,r;return t=e,n=[{key:"mountElements",value:function(){this.cardNumber.mount(this.cardNumberField),this.cardExpiry.mount(this.cardExpiryField),this.cardCvc.mount(this.cardCvcField)}},{key:"unmountElements",value:function(){this.cardNumber.unmount(this.cardNumberField),this.cardExpiry.unmount(this.cardExpiryField),this.cardCvc.unmount(this.cardCvcField)}},{key:"focus",value:function(){this.mountElements(),this.focusFirstIncompleteField()}},{key:"blur",value:function(){this.unmountElements()}},{key:"submit",value:function(e){var t=this;return new Promise((function(n,r){t.stripe.createPaymentMethod({type:"card",card:t.cardNumber,billing_details:e.billing_details}).then((function(e){return e.error?(t.focusFirstIncompleteField(),r(new Error("Error at Stripe createPaymentMethod Promise"))):(t.paymentMethodInput.value=e.paymentMethod.id,n())}))}))}},{key:"focusFirstIncompleteField",value:function(){this.cardNumberField.classList.contains("is-complete")?this.cardExpiryField.classList.contains("is-complete")?this.cardCvcField.classList.contains("is-complete")||this.cardCvc.focus():this.cardExpiry.focus():this.cardNumber.focus()}},{key:"cardNumberChanged",value:function(e){null!==this.icons&&void 0!==this.icons&&(e.brand&&"unknown"!==e.brand?this.icons.forEach((function(t){t.getAttribute("data-brand")===e.brand?t.classList.remove("is-dimmed"):t.classList.add("is-dimmed")})):this.icons.forEach((function(e){return e.classList.remove("is-dimmed")})))}},{key:"fieldChanged",value:function(e,t,n){t instanceof HTMLElement&&(n.error?this.addMessage(e,t,n.error.message):this.removeMessage(t))}},{key:"windowResized",value:function(){var e="16px";window.innerWidth<=this.fontBreakpoint&&(e="14px");var t={style:{base:{fontSize:e}}};this.cardNumber.update(t),this.cardExpiry.update(t),this.cardCvc.update(t)}},{key:"addMessage",value:function(e,t,n){this.removeMessage(t);var r=document.createElement("li");r.textContent=n,r.addEventListener("click",(function(){return e.focus()})),t.appendChild(r),t.classList.remove("is-empty")}},{key:"removeMessage",value:function(e){e.classList.add("is-empty");var t=Array.from(e.querySelectorAll("li"));setTimeout((function(){return t.forEach((function(t){t.parentNode===e&&e.removeChild(t)}))}),400)}}],n&&ul(t.prototype,n),r&&ul(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();var pl=r("../../node_modules/lodash.debounce/index.js"),ml=r.n(pl);function gl(e){return gl="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},gl(e)}function vl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wl(e,t,n){return t&&yl(e.prototype,t),n&&yl(e,n),e}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},bl(e)}function Bl(e,t){return Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bl(e,t)}function _l(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bl(e);if(t){var i=bl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _l(this,n)}}function Cl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bl(e)););return e}function Sl(){return Sl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Cl(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Sl.apply(this,arguments)}var El={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function Ml(e){return parseInt(e)}function Ul(e){return"string"==typeof e}function Fl(e){var t=gl(e);return"function"===t||"object"===t&&!!e}function Tl(e){return"function"==typeof e}function Ql(e){return void 0===e}function Ll(e){return e.constructor===Array}function Il(e,t,n){var r={};for(var i in t)Tl(t[i])&&(r[i]=t[i](e,r,n));for(var o in r)Tl(r[o].mount)&&r[o].mount();return r}function kl(e,t,n){Object.defineProperty(e,t,n)}function Pl(e,t){var n=Object.assign({},e,t);return t.hasOwnProperty("classes")&&(n.classes=Object.assign({},e.classes,t.classes),t.classes.hasOwnProperty("direction")&&(n.classes.direction=Object.assign({},e.classes.direction,t.classes.direction)),t.classes.hasOwnProperty("type")&&(n.classes.type=Object.assign({},e.classes.type,t.classes.type)),t.classes.hasOwnProperty("slide")&&(n.classes.slide=Object.assign({},e.classes.slide,t.classes.slide)),t.classes.hasOwnProperty("arrow")&&(n.classes.arrow=Object.assign({},e.classes.arrow,t.classes.arrow)),t.classes.hasOwnProperty("nav")&&(n.classes.nav=Object.assign({},e.classes.nav,t.classes.nav))),t.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},e.breakpoints,t.breakpoints)),n}var Ol=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vl(this,e),this.events=t,this.hop=t.hasOwnProperty}return wl(e,[{key:"on",value:function(e,t){if(!Ll(e)){this.hop.call(this.events,e)||(this.events[e]=[]);var n=this.events[e].push(t)-1;return{remove:function(){delete this.events[e][n]}}}for(var r=0;r<e.length;r++)this.on(e[r],t)}},{key:"emit",value:function(e,t){if(Ll(e))for(var n=0;n<e.length;n++)this.emit(e[n],t);else this.hop.call(this.events,e)&&this.events[e].forEach((function(e){e(t||{})}))}}]),e}(),Dl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vl(this,e),this._c={},this._t=[],this._e=new Ol,this.disabled=!1,this.selector=t,this.settings=Pl(El,n),this.index=this.settings.startAt}return wl(e,[{key:"mount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._e.emit("mount.before"),Fl(e)&&(this._c=Il(this,e,this._e)),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Ll(e)&&(this._t=e),this}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.settings=Pl(this.settings,e),e.hasOwnProperty("startAt")&&(this.index=e.startAt),this._e.emit("update"),this}},{key:"go",value:function(e){return this._c.Run.make(e),this}},{key:"move",value:function(e){return this._c.Transition.disable(),this._c.Move.make(e),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&(this.settings.autoplay=e),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(e,t){return this._e.on(e,t),this}},{key:"isType",value:function(e){return this.settings.type===e}},{key:"settings",get:function(){return this._o},set:function(e){Fl(e)&&(this._o=e)}},{key:"index",get:function(){return this._i},set:function(e){this._i=Ml(e)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(e){this._d=!!e}}]),e}();function Hl(){return(new Date).getTime()}function Rl(e,t,n){var r,i,o,a,s=0;n||(n={});var A=function(){s=!1===n.leading?0:Hl(),r=null,a=e.apply(i,o),r||(i=o=null)},c=function(){var c=Hl();s||!1!==n.leading||(s=c);var l=t-(c-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(A,l)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}var Nl={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function zl(e){if(e&&e.parentNode){for(var t=e.parentNode.firstChild,n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}return[]}function Vl(e){return!!(e&&e instanceof window.HTMLElement)}var jl='[data-glide-el="track"]';var Kl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vl(this,e),this.listeners=t}return wl(e,[{key:"on",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Ul(e)&&(e=[e]);for(var i=0;i<e.length;i++)this.listeners[e[i]]=n,t.addEventListener(e[i],this.listeners[e[i]],r)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Ul(e)&&(e=[e]);for(var r=0;r<e.length;r++)t.removeEventListener(e[r],this.listeners[e[r]],n)}},{key:"destroy",value:function(){delete this.listeners}}]),e}();var Gl=["ltr","rtl"],Wl={">":"<","<":">","=":"="};function ql(e,t){return{modify:function(e){return t.Direction.is("rtl")?-e:e}}}function Xl(e,t){return{modify:function(e){var n=Math.floor(e/t.Sizes.slideWidth);return e+t.Gaps.value*n}}}function Jl(e,t){return{modify:function(e){return e+t.Clones.grow/2}}}function Yl(e,t){return{modify:function(n){if(e.settings.focusAt>=0){var r=t.Peek.value;return Fl(r)?n-r.before:n-r}return n}}}function Zl(e,t){return{modify:function(n){var r=t.Gaps.value,i=t.Sizes.width,o=e.settings.focusAt,a=t.Sizes.slideWidth;return"center"===o?n-(i/2-a/2):n-a*o-r*o}}}var $l=!1;try{var eu=Object.defineProperty({},"passive",{get:function(){$l=!0}});window.addEventListener("testPassive",null,eu),window.removeEventListener("testPassive",null,eu)}catch(e){}var tu=$l,nu=["touchstart","mousedown"],ru=["touchmove","mousemove"],iu=["touchend","touchcancel","mouseup","mouseleave"],ou=["mousedown","mousemove","mouseup","mouseleave"];var au='[data-glide-el^="controls"]',su="".concat(au,' [data-glide-dir*="<"]'),Au="".concat(au,' [data-glide-dir*=">"]');function cu(e){return Fl(e)?(t=e,Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e[n],e}),{})):{};var t}var lu={Html:function(e,t,n){var r={mount:function(){this.root=e.selector,this.track=this.root.querySelector(jl),this.collectSlides()},collectSlides:function(){this.slides=Array.prototype.slice.call(this.wrapper.children).filter((function(t){return!t.classList.contains(e.settings.classes.slide.clone)}))}};return kl(r,"root",{get:function(){return r._r},set:function(e){Ul(e)&&(e=document.querySelector(e)),Vl(e)&&(r._r=e)}}),kl(r,"track",{get:function(){return r._t},set:function(e){Vl(e)?r._t=e:"Could not find track element. Please use ".concat(jl," attribute.")}}),kl(r,"wrapper",{get:function(){return r.track.children[0]}}),n.on("update",(function(){r.collectSlides()})),r},Translate:function(e,t,n){var r={set:function(n){var r=function(e,t,n){var r=[Xl,Jl,Yl,Zl].concat(e._t,[ql]);return{mutate:function(i){for(var o=0;o<r.length;o++){var a=r[o];Tl(a)&&Tl(a().modify)&&(i=a(e,t,n).modify(i))}return i}}}(e,t).mutate(n),i="translate3d(".concat(-1*r,"px, 0px, 0px)");t.Html.wrapper.style.mozTransform=i,t.Html.wrapper.style.webkitTransform=i,t.Html.wrapper.style.transform=i},remove:function(){t.Html.wrapper.style.transform=""},getStartIndex:function(){var n=t.Sizes.length,r=e.index,i=e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?n+(r-i):(r+i)%n},getTravelDistance:function(){var n=t.Sizes.slideWidth*e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?-1*n:n}};return n.on("move",(function(i){if(!e.isType("carousel")||!t.Run.isOffset())return r.set(i.movement);t.Transition.after((function(){n.emit("translate.jump"),r.set(t.Sizes.slideWidth*e.index)}));var o=t.Sizes.slideWidth*t.Translate.getStartIndex();return r.set(o-t.Translate.getTravelDistance())})),n.on("destroy",(function(){r.remove()})),r},Transition:function(e,t,n){var r=!1,i={compose:function(t){var n=e.settings;return r?"".concat(t," 0ms ").concat(n.animationTimingFunc):"".concat(t," ").concat(this.duration,"ms ").concat(n.animationTimingFunc)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";t.Html.wrapper.style.transition=this.compose(e)},remove:function(){t.Html.wrapper.style.transition=""},after:function(e){setTimeout((function(){e()}),this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return kl(i,"duration",{get:function(){var n=e.settings;return e.isType("slider")&&t.Run.offset?n.rewindDuration:n.animationDuration}}),n.on("move",(function(){i.set()})),n.on(["build.before","resize","translate.jump"],(function(){i.disable()})),n.on("run",(function(){i.enable()})),n.on("destroy",(function(){i.remove()})),i},Direction:function(e,t,n){var r={mount:function(){this.value=e.settings.direction},resolve:function(e){var t=e.slice(0,1);return this.is("rtl")?e.split(t).join(Wl[t]):e},is:function(e){return this.value===e},addClass:function(){t.Html.root.classList.add(e.settings.classes.direction[this.value])},removeClass:function(){t.Html.root.classList.remove(e.settings.classes.direction[this.value])}};return kl(r,"value",{get:function(){return r._v},set:function(e){Gl.indexOf(e)>-1&&(r._v=e)}}),n.on(["destroy","update"],(function(){r.removeClass()})),n.on("update",(function(){r.mount()})),n.on(["build.before","update"],(function(){r.addClass()})),r},Peek:function(e,t,n){var r={mount:function(){this.value=e.settings.peek}};return kl(r,"value",{get:function(){return r._v},set:function(e){Fl(e)?(e.before=Ml(e.before),e.after=Ml(e.after)):e=Ml(e),r._v=e}}),kl(r,"reductor",{get:function(){var t=r.value,n=e.settings.perView;return Fl(t)?t.before/n+t.after/n:2*t/n}}),n.on(["resize","update"],(function(){r.mount()})),r},Sizes:function(e,t,n){var r={setupSlides:function(){for(var e="".concat(this.slideWidth,"px"),n=t.Html.slides,r=0;r<n.length;r++)n[r].style.width=e},setupWrapper:function(){t.Html.wrapper.style.width="".concat(this.wrapperSize,"px")},remove:function(){for(var e=t.Html.slides,n=0;n<e.length;n++)e[n].style.width="";t.Html.wrapper.style.width=""}};return kl(r,"length",{get:function(){return t.Html.slides.length}}),kl(r,"width",{get:function(){return t.Html.track.offsetWidth}}),kl(r,"wrapperSize",{get:function(){return r.slideWidth*r.length+t.Gaps.grow+t.Clones.grow}}),kl(r,"slideWidth",{get:function(){return r.width/e.settings.perView-t.Peek.reductor-t.Gaps.reductor}}),n.on(["build.before","resize","update"],(function(){r.setupSlides(),r.setupWrapper()})),n.on("destroy",(function(){r.remove()})),r},Gaps:function(e,t,n){var r={apply:function(e){for(var n=0,r=e.length;n<r;n++){var i=e[n].style,o=t.Direction.value;i[Nl[o][0]]=0!==n?"".concat(this.value/2,"px"):"",n!==e.length-1?i[Nl[o][1]]="".concat(this.value/2,"px"):i[Nl[o][1]]=""}},remove:function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t].style;r.marginLeft="",r.marginRight=""}}};return kl(r,"value",{get:function(){return Ml(e.settings.gap)}}),kl(r,"grow",{get:function(){return r.value*t.Sizes.length}}),kl(r,"reductor",{get:function(){var t=e.settings.perView;return r.value*(t-1)/t}}),n.on(["build.after","update"],Rl((function(){r.apply(t.Html.wrapper.children)}),30)),n.on("destroy",(function(){r.remove(t.Html.wrapper.children)})),r},Move:function(e,t,n){var r={mount:function(){this._o=0},make:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.offset=r,n.emit("move",{movement:this.value}),t.Transition.after((function(){n.emit("move.after",{movement:e.value})}))}};return kl(r,"offset",{get:function(){return r._o},set:function(e){r._o=Ql(e)?0:Ml(e)}}),kl(r,"translate",{get:function(){return t.Sizes.slideWidth*e.index}}),kl(r,"value",{get:function(){var e=this.offset,n=this.translate;return t.Direction.is("rtl")?n+e:n-e}}),n.on(["build.before","run"],(function(){r.make()})),r},Clones:function(e,t,n){var r={mount:function(){this.items=[],e.isType("carousel")&&(this.items=this.collect())},collect:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=t.Html.slides,i=e.settings,o=i.perView,a=i.classes,s=i.cloningRatio;if(0!==r.length)for(var A=+!!e.settings.peek,c=o+A+Math.round(o/2),l=r.slice(0,c).reverse(),u=r.slice(-1*c),d=0;d<Math.max(s,Math.floor(o/r.length));d++){for(var h=0;h<l.length;h++){var f=l[h].cloneNode(!0);f.classList.add(a.slide.clone),n.push(f)}for(var p=0;p<u.length;p++){var m=u[p].cloneNode(!0);m.classList.add(a.slide.clone),n.unshift(m)}}return n},append:function(){for(var e=this.items,n=t.Html,r=n.wrapper,i=n.slides,o=Math.floor(e.length/2),a=e.slice(0,o).reverse(),s=e.slice(-1*o).reverse(),A="".concat(t.Sizes.slideWidth,"px"),c=0;c<s.length;c++)r.appendChild(s[c]);for(var l=0;l<a.length;l++)r.insertBefore(a[l],i[0]);for(var u=0;u<e.length;u++)e[u].style.width=A},remove:function(){for(var e=this.items,n=0;n<e.length;n++)t.Html.wrapper.removeChild(e[n])}};return kl(r,"grow",{get:function(){return(t.Sizes.slideWidth+t.Gaps.value)*r.items.length}}),n.on("update",(function(){r.remove(),r.mount(),r.append()})),n.on("build.before",(function(){e.isType("carousel")&&r.append()})),n.on("destroy",(function(){r.remove()})),r},Resize:function(e,t,n){var r=new Kl,i={mount:function(){this.bind()},bind:function(){r.on("resize",window,Rl((function(){n.emit("resize")}),e.settings.throttle))},unbind:function(){r.off("resize",window)}};return n.on("destroy",(function(){i.unbind(),r.destroy()})),i},Build:function(e,t,n){var r={mount:function(){n.emit("build.before"),this.typeClass(),this.activeClass(),n.emit("build.after")},typeClass:function(){t.Html.root.classList.add(e.settings.classes.type[e.settings.type])},activeClass:function(){var n=e.settings.classes,r=t.Html.slides[e.index];r&&(r.classList.add(n.slide.active),zl(r).forEach((function(e){e.classList.remove(n.slide.active)})))},removeClasses:function(){var n=e.settings.classes,r=n.type,i=n.slide;t.Html.root.classList.remove(r[e.settings.type]),t.Html.slides.forEach((function(e){e.classList.remove(i.active)}))}};return n.on(["destroy","update"],(function(){r.removeClasses()})),n.on(["resize","update"],(function(){r.mount()})),n.on("move.after",(function(){r.activeClass()})),r},Run:function(e,t,n){var r={mount:function(){this._o=!1},make:function(r){var i=this;e.disabled||(!e.settings.waitForTransition||e.disable(),this.move=r,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),t.Transition.after((function(){i.isStart()&&n.emit("run.start",i.move),i.isEnd()&&n.emit("run.end",i.move),i.isOffset()&&(i._o=!1,n.emit("run.offset",i.move)),n.emit("run.after",i.move),e.enable()})))},calculate:function(){var t=this.move,n=this.length,i=t.steps,o=t.direction,a=1;if("="===o)return e.settings.bound&&Ml(i)>n?void(e.index=n):void(e.index=i);if(">"!==o||">"!==i)if("<"!==o||"<"!==i){if("|"===o&&(a=e.settings.perView||1),">"===o||"|"===o&&">"===i){var s=function(t){var n=e.index;if(e.isType("carousel"))return n+t;return n+(t-n%t)}(a);return s>n&&(this._o=!0),void(e.index=function(t,n){var i=r.length;if(t<=i)return t;if(e.isType("carousel"))return t-(i+1);if(e.settings.rewind)return r.isBound()&&!r.isEnd()?i:0;if(r.isBound())return i;return Math.floor(i/n)*n}(s,a))}if("<"===o||"|"===o&&"<"===i){var A=function(t){var n=e.index;if(e.isType("carousel"))return n-t;return(Math.ceil(n/t)-1)*t}(a);return A<0&&(this._o=!0),void(e.index=function(t,n){var i=r.length;if(t>=0)return t;if(e.isType("carousel"))return t+(i+1);if(e.settings.rewind)return r.isBound()&&r.isStart()?i:Math.floor(i/n)*n;return 0}(A,a))}"Invalid direction pattern [".concat(o).concat(i,"] has been used")}else e.index=0;else e.index=n},isStart:function(){return e.index<=0},isEnd:function(){return e.index>=this.length},isOffset:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?!!this._o&&("|>"===e?"|"===this.move.direction&&">"===this.move.steps:"|<"===e?"|"===this.move.direction&&"<"===this.move.steps:this.move.direction===e):this._o},isBound:function(){return e.isType("slider")&&"center"!==e.settings.focusAt&&e.settings.bound}};return kl(r,"move",{get:function(){return this._m},set:function(e){var t=e.substr(1);this._m={direction:e.substr(0,1),steps:t?Ml(t)?Ml(t):t:0}}}),kl(r,"length",{get:function(){var n=e.settings,r=t.Html.slides.length;return this.isBound()?r-1-(Ml(n.perView)-1)+Ml(n.focusAt):r-1}}),kl(r,"offset",{get:function(){return this._o}}),r},Swipe:function(e,t,n){var r=new Kl,i=0,o=0,a=0,s=!1,A=!!tu&&{passive:!0},c={mount:function(){this.bindSwipeStart()},start:function(t){if(!s&&!e.disabled){this.disable();var r=this.touches(t);i=null,o=Ml(r.pageX),a=Ml(r.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),n.emit("swipe.start")}},move:function(r){if(!e.disabled){var s=e.settings,A=s.touchAngle,c=s.touchRatio,l=s.classes,u=this.touches(r),d=Ml(u.pageX)-o,h=Ml(u.pageY)-a,f=Math.abs(d<<2),p=Math.abs(h<<2),m=Math.sqrt(f+p),g=Math.sqrt(p);if(!(180*(i=Math.asin(g/m))/Math.PI<A))return!1;r.stopPropagation(),t.Move.make(d*parseFloat(c)),t.Html.root.classList.add(l.dragging),n.emit("swipe.move")}},end:function(r){if(!e.disabled){var a=e.settings,s=a.perSwipe,A=a.touchAngle,c=a.classes,l=this.touches(r),u=this.threshold(r),d=l.pageX-o,h=180*i/Math.PI;this.enable(),d>u&&h<A?t.Run.make(t.Direction.resolve("".concat(s,"<"))):d<-u&&h<A?t.Run.make(t.Direction.resolve("".concat(s,">"))):t.Move.make(),t.Html.root.classList.remove(c.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),n.emit("swipe.end")}},bindSwipeStart:function(){var n=this,i=e.settings,o=i.swipeThreshold,a=i.dragThreshold;o&&r.on(nu[0],t.Html.wrapper,(function(e){n.start(e)}),A),a&&r.on(nu[1],t.Html.wrapper,(function(e){n.start(e)}),A)},unbindSwipeStart:function(){r.off(nu[0],t.Html.wrapper,A),r.off(nu[1],t.Html.wrapper,A)},bindSwipeMove:function(){var n=this;r.on(ru,t.Html.wrapper,Rl((function(e){n.move(e)}),e.settings.throttle),A)},unbindSwipeMove:function(){r.off(ru,t.Html.wrapper,A)},bindSwipeEnd:function(){var e=this;r.on(iu,t.Html.wrapper,(function(t){e.end(t)}))},unbindSwipeEnd:function(){r.off(iu,t.Html.wrapper)},touches:function(e){return ou.indexOf(e.type)>-1?e:e.touches[0]||e.changedTouches[0]},threshold:function(t){var n=e.settings;return ou.indexOf(t.type)>-1?n.dragThreshold:n.swipeThreshold},enable:function(){return s=!1,t.Transition.enable(),this},disable:function(){return s=!0,t.Transition.disable(),this}};return n.on("build.after",(function(){t.Html.root.classList.add(e.settings.classes.swipeable)})),n.on("destroy",(function(){c.unbindSwipeStart(),c.unbindSwipeMove(),c.unbindSwipeEnd(),r.destroy()})),c},Images:function(e,t,n){var r=new Kl,i={mount:function(){this.bind()},bind:function(){r.on("dragstart",t.Html.wrapper,this.dragstart)},unbind:function(){r.off("dragstart",t.Html.wrapper)},dragstart:function(e){e.preventDefault()}};return n.on("destroy",(function(){i.unbind(),r.destroy()})),i},Anchors:function(e,t,n){var r=new Kl,i=!1,o=!1,a={mount:function(){this._a=t.Html.wrapper.querySelectorAll("a"),this.bind()},bind:function(){r.on("click",t.Html.wrapper,this.click)},unbind:function(){r.off("click",t.Html.wrapper)},click:function(e){o&&(e.stopPropagation(),e.preventDefault())},detach:function(){if(o=!0,!i){for(var e=0;e<this.items.length;e++)this.items[e].draggable=!1;i=!0}return this},attach:function(){if(o=!1,i){for(var e=0;e<this.items.length;e++)this.items[e].draggable=!0;i=!1}return this}};return kl(a,"items",{get:function(){return a._a}}),n.on("swipe.move",(function(){a.detach()})),n.on("swipe.end",(function(){t.Transition.after((function(){a.attach()}))})),n.on("destroy",(function(){a.attach(),a.unbind(),r.destroy()})),a},Controls:function(e,t,n){var r=new Kl,i=!!tu&&{passive:!0},o={mount:function(){this._n=t.Html.root.querySelectorAll('[data-glide-el="controls[nav]"]'),this._c=t.Html.root.querySelectorAll(au),this._arrowControls={previous:t.Html.root.querySelectorAll(su),next:t.Html.root.querySelectorAll(Au)},this.addBindings()},setActive:function(){for(var e=0;e<this._n.length;e++)this.addClass(this._n[e].children)},removeActive:function(){for(var e=0;e<this._n.length;e++)this.removeClass(this._n[e].children)},addClass:function(t){var n=e.settings,r=t[e.index];r&&r&&(r.classList.add(n.classes.nav.active),zl(r).forEach((function(e){e.classList.remove(n.classes.nav.active)})))},removeClass:function(t){var n=t[e.index];n&&n.classList.remove(e.settings.classes.nav.active)},setArrowState:function(){if(!e.settings.rewind){var n=o._arrowControls.next,r=o._arrowControls.previous;this.resetArrowState(n,r),0===e.index&&this.disableArrow(r),e.index===t.Run.length&&this.disableArrow(n)}},resetArrowState:function(){for(var t=e.settings,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r.forEach((function(e){e.forEach((function(e){e.classList.remove(t.classes.arrow.disabled)}))}))},disableArrow:function(){for(var t=e.settings,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r.forEach((function(e){e.forEach((function(e){e.classList.add(t.classes.arrow.disabled)}))}))},addBindings:function(){for(var e=0;e<this._c.length;e++)this.bind(this._c[e].children)},removeBindings:function(){for(var e=0;e<this._c.length;e++)this.unbind(this._c[e].children)},bind:function(e){for(var t=0;t<e.length;t++)r.on("click",e[t],this.click),r.on("touchstart",e[t],this.click,i)},unbind:function(e){for(var t=0;t<e.length;t++)r.off(["click","touchstart"],e[t])},click:function(e){tu||"touchstart"!==e.type||e.preventDefault();var n=e.currentTarget.getAttribute("data-glide-dir");t.Run.make(t.Direction.resolve(n))}};return kl(o,"items",{get:function(){return o._c}}),n.on(["mount.after","move.after"],(function(){o.setActive()})),n.on(["mount.after","run"],(function(){o.setArrowState()})),n.on("destroy",(function(){o.removeBindings(),o.removeActive(),r.destroy()})),o},Keyboard:function(e,t,n){var r=new Kl,i={mount:function(){e.settings.keyboard&&this.bind()},bind:function(){r.on("keyup",document,this.press)},unbind:function(){r.off("keyup",document)},press:function(n){var r=e.settings.perSwipe;39===n.keyCode&&t.Run.make(t.Direction.resolve("".concat(r,">"))),37===n.keyCode&&t.Run.make(t.Direction.resolve("".concat(r,"<")))}};return n.on(["destroy","update"],(function(){i.unbind()})),n.on("update",(function(){i.mount()})),n.on("destroy",(function(){r.destroy()})),i},Autoplay:function(e,t,n){var r=new Kl,i={mount:function(){this.enable(),this.start(),e.settings.hoverpause&&this.bind()},enable:function(){this._e=!0},disable:function(){this._e=!1},start:function(){var r=this;this._e&&(this.enable(),e.settings.autoplay&&Ql(this._i)&&(this._i=setInterval((function(){r.stop(),t.Run.make(">"),r.start(),n.emit("autoplay")}),this.time)))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var e=this;r.on("mouseover",t.Html.root,(function(){e._e&&e.stop()})),r.on("mouseout",t.Html.root,(function(){e._e&&e.start()}))},unbind:function(){r.off(["mouseover","mouseout"],t.Html.root)}};return kl(i,"time",{get:function(){var n=t.Html.slides[e.index].getAttribute("data-glide-autoplay");return Ml(n||e.settings.autoplay)}}),n.on(["destroy","update"],(function(){i.unbind()})),n.on(["run.before","swipe.start","update"],(function(){i.stop()})),n.on(["pause","destroy"],(function(){i.disable(),i.stop()})),n.on(["run.after","swipe.end"],(function(){i.start()})),n.on(["play"],(function(){i.enable(),i.start()})),n.on("update",(function(){i.mount()})),n.on("destroy",(function(){r.destroy()})),i},Breakpoints:function(e,t,n){var r=new Kl,i=e.settings,o=cu(i.breakpoints),a=Object.assign({},i),s={match:function(e){if(void 0!==window.matchMedia)for(var t in e)if(e.hasOwnProperty(t)&&window.matchMedia("(max-width: ".concat(t,"px)")).matches)return e[t];return a}};return Object.assign(i,s.match(o)),r.on("resize",window,Rl((function(){e.settings=Pl(i,s.match(o))}),e.settings.throttle)),n.on("update",(function(){o=cu(o),a=Object.assign({},i)})),n.on("destroy",(function(){r.off("resize",window)})),s}},uu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bl(e,t)}(n,e);var t=xl(n);function n(){return vl(this,n),t.apply(this,arguments)}return wl(n,[{key:"mount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Sl(bl(n.prototype),"mount",this).call(this,Object.assign({},lu,e))}}]),n}(Dl);var du=!1;if("undefined"!=typeof window){var hu={get passive(){du=!0}};window.addEventListener("testPassive",null,hu),window.removeEventListener("testPassive",null,hu)}var fu="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),pu=[],mu=!1,gu=-1,vu=void 0,yu=void 0,wu=void 0,bu=function(e){return pu.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Bu=function(e){var t=e||window.event;return!!bu(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},_u=function(){void 0!==wu&&(document.body.style.paddingRight=wu,wu=void 0),void 0!==vu&&(document.body.style.overflow=vu,vu=void 0)},xu=function(){if(void 0!==yu){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=yu.position,document.body.style.top=yu.top,document.body.style.left=yu.left,window.scrollTo(t,e),yu=void 0}},Cu=function(e,t){if(e&&!pu.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};pu=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(pu),[n]),fu?window.requestAnimationFrame((function(){if(void 0===yu){yu={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var e=r-window.innerHeight;e&&t>=r&&(document.body.style.top=-(t+e))}))}),300)}})):function(e){if(void 0===wu){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(t&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);wu=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===vu&&(vu=document.body.style.overflow,document.body.style.overflow="hidden")}(t),fu&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(gu=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-gu;!bu(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Bu(e):e.stopPropagation())}(t,e)},mu||(document.addEventListener("touchmove",Bu,du?{passive:!1}:void 0),mu=!0))}},Su=r("../../node_modules/query-string/index.js");function Eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Eu(Object(n),!0).forEach((function(t){Fu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tu=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Fu(this,"path",void 0),Fu(this,"query",void 0),this.path=t,this.query=n}var t,n,r;return t=e,r=[{key:"unparse",value:function(e,t){var n=Su.stringify(t,{arrayFormat:"comma"});return"".concat(e).concat(n.length>0?"?".concat(n):"")}}],(n=[{key:"partial",value:function(){var t=Mu(Mu({},this.query),{},{partial:!0});return e.unparse(this.path,t)}},{key:"stringify",value:function(){return e.unparse(this.path,this.query)}},{key:"withQuery",value:function(t){var n=Mu(Mu({},this.query),t);return new e(this.path,n)}}])&&Uu(t.prototype,n),r&&Uu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Qu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(n),!0).forEach((function(t){Hu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Iu(e){return function(e){if(Array.isArray(e))return Pu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ku(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ku(e,t){if(e){if("string"==typeof e)return Pu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pu(e,t):void 0}}function Pu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ou(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Du(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ru=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";Ou(this,e),Hu(this,"basePath",void 0),Hu(this,"facets",void 0),Hu(this,"baseFacets",void 0),Hu(this,"page",void 0),Hu(this,"sort",void 0),Hu(this,"phrase",void 0),Hu(this,"constraintIndex",void 0),Hu(this,"facetIndex",void 0),this.basePath=t,this.facets=n,this.page=r,this.sort=i,this.phrase=a,this.constraintIndex={},this.facets.forEach((function(e){e.constraints.forEach((function(t){o.constraintIndex["".concat(e.slug,"/").concat(t.slug)]=t}))})),this.facetIndex={},this.facets.forEach((function(e){o.facetIndex[e.slug]=e}))}var t,n,r;return t=e,n=[{key:"getUrl",value:function(){for(var e=this,t=[],n=window.location.search,r="on"===new URLSearchParams(n).get("in_stock"),i=function(n){var r=e.facets[n].slug,i=e.facets[n].constraints.filter((function(e){return e.selected&&e.slug})).map((function(e){return[r,e.slug]}));t.push.apply(t,Iu(i))},o=0;o<this.facets.length;o++)i(o);var a=t.shift();if(r&&t.push(["in_stock","on"]),void 0!==a||r){for(var s=this.getQuery(),A=new Map,c=0;c<t.length;c++){var l=t[c][0],u=t[c][1];A.has(l)?A.get(l).push(u):A.set(l,[u])}var d,h=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ku(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(A.entries());try{for(h.s();!(d=h.n()).done;){var f=d.value;s[f[0]]=f[1].join("-")}}catch(e){h.e(e)}finally{h.f()}return new Tu("".concat(this.basePath,"/").concat(a[1]),s)}return new Tu("".concat(this.basePath),this.getQuery())}},{key:"getQuery",value:function(){var e={collapsed:this.getCollapsedFacets()};return this.phrase&&(e.phrase=this.phrase),this.page>1&&(e.page=this.page),this.sort&&(e.sort=this.sort),e}},{key:"copy",value:function(){return new e(this.basePath,this.facets,this.page,this.sort,this.phrase)}},{key:"clearSelection",value:function(){return this.facets.forEach((function(e){return e.constraints.filter((function(e){return e.selected&&e.slug})).forEach((function(e){return e.selected=!1}))})),new e(this.basePath,this.facets,this.page,this.sort,this.phrase)}},{key:"withPage",value:function(t){return new e(this.basePath,this.facets,t,this.sort,this.phrase)}},{key:"withSort",value:function(t){return new e(this.basePath,this.facets,this.page,t,this.phrase)}},{key:"withPhrase",value:function(t){return new e(this.basePath,this.facets,null,null,t)}},{key:"withFacetToggled",value:function(t){var n=this.facets.map((function(e){return Lu(Lu({},e),{},{collapsed:e.slug===t?!e.collapsed:e.collapsed})}));return new e(this.basePath,n,this.page,this.sort,this.phrase)}},{key:"withConstraintToggled",value:function(e,t){return this.withConstraintUpdated(e,t,(function(e){return!e.selected}))}},{key:"trackConstraintEvents",value:function(e,t){if("dataLayer"in window&&"function"==typeof window.dataLayer.push){var n=window.location.pathname.split("/")[1].replace("-","_");window.dataLayer.push({event:"filter_"+n,filter_type:e+"_"+t})}}},{key:"withConstraintRemoved",value:function(e,t){return this.withConstraintUpdated(e,t,(function(){return!1}))}},{key:"withConstraintApplied",value:function(e,t){return this.withConstraintUpdated(e,t,(function(){return!0}))}},{key:"withConstraintUpdated",value:function(t,n,r){var i=!1,o=this.facets.map((function(e){return Lu(Lu({},e),{},{constraints:e.constraints.map((function(o){return e.slug===t&&o.slug===n&&(i=r(o)),Lu(Lu({},o),{},{selected:e.slug===t&&o.slug===n?r(o):o.selected})}))})}));return i&&this.trackConstraintEvents(t,n),new e(this.basePath,o,this.page,this.sort,this.phrase)}},{key:"isConstraintSelected",value:function(e,t){return void 0!==this.constraintIndex["".concat(e,"/").concat(t)]&&this.constraintIndex["".concat(e,"/").concat(t)].selected}},{key:"getConstraintCount",value:function(e,t){if(null==this.constraintIndex["".concat(e,"/").concat(t)])return 0;var n=this.constraintIndex["".concat(e,"/").concat(t)].docs,r=new Set(n);return this.facets.forEach((function(t){if(t.slug!==e){var n=!1,i=new Set([]);t.constraints.forEach((function(e){e.selected&&(i=new Set([].concat(Iu(i),Iu(e.docs))),n=!0)})),n&&(r=new Set(Iu(r).filter((function(e){return i.has(e)}))))}})),r.size}},{key:"isFacetCollapsed",value:function(e){return this.facetIndex[e].collapsed}},{key:"getCollapsedFacets",value:function(){return this.facets.filter((function(e){return e.collapsed})).map((function(e){return e.slug})).sort()}}],r=[{key:"getFacetSegment",value:function(e){return e.constraints.filter((function(e){return e.selected&&e.slug})).map((function(e){return e.slug})).join("-")}}],n&&Du(t.prototype,n),r&&Du(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ju=r("../../node_modules/focus-trap/dist/focus-trap.esm.js"),Ku=function(){function e(t,n,r,i,o){var a=this,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";Nu(this,e),Vu(this,"container",void 0),Vu(this,"facets",void 0),Vu(this,"temporaryFacets",void 0),Vu(this,"isOverlay",void 0),Vu(this,"cancel",void 0),Vu(this,"debouncedLoad",void 0),Vu(this,"deactivateFocusTrap",void 0),Vu(this,"basePath",void 0),this.container=t,this.container.classList.add("has-js"),this.basePath=r,this.facets=new Ru(r,n,i,o,s),this.temporaryFacets=this.facets.copy(),this.debouncedLoad=ml()((function(e){return a.load(e)}),200),this.container.addEventListener("click",(function(e){return a.handleClick(e)})),this.container.addEventListener("submit",(function(e){return a.handleSubmit(e)})),this.container.addEventListener("change",(function(e){return a.handleChange(e)})),Array.from(this.container.querySelectorAll(".catalog-list-product__wrapper")).forEach((function(e){if(e){var t=e.querySelector(".glide");t&&(e.addEventListener("mouseenter",(function(){return a.initGlide(t)})),e.addEventListener("focus",(function(){a.initGlide(t)})))}})),this.initTooltips()}var t,n,r;return t=e,(n=[{key:"handleClick",value:function(e){var t=e.target;if(t instanceof Element){var n=t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement?t:t.closest("a, button");if(n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement)switch(n.dataset.action){case"toggleConstraint":this.toggleConstraint(e,n);break;case"removeConstraint":this.removeConstraint(e,n);break;case"applyConstraints":this.applyConstraints(e);break;case"toggleFacet":this.toggleFacet(e,n);break;case"paginate":this.paginate(e,n);break;case"openMobileFilter":this.openMobileFilter(e);break;case"closeMobileFilter":this.closeMobileFilter(e)}}}},{key:"handleSubmit",value:function(e){var t=e.target;if(t instanceof HTMLFormElement)return t.matches(".js-search-phrase-form")?this.handlePhraseSubmit(e):void(t.matches(".js-sorting-form")&&this.sort(e,t))}},{key:"handleChange",value:function(e){var t=e.target;if(t instanceof HTMLSelectElement&&"js-sorting-select"===t.id){var n=t.closest("form");n instanceof HTMLFormElement&&this.sort(e,n)}}},{key:"handlePhraseSubmit",value:function(e){e.preventDefault();var t=e.target.querySelector(".js-search-phrase-input");this.temporaryFacets=this.temporaryFacets.clearSelection().withPhrase(t.value),this.facets=this.temporaryFacets.copy(),this.load(!0)}},{key:"sort",value:function(e,t){var n=Vc()(t,{hash:!0}).sort;null!=n&&(this.temporaryFacets=this.facets.withSort(n.toString()),this.facets=this.temporaryFacets.copy(),this.load(!0),e.preventDefault())}},{key:"paginate",value:function(e,t){var n=t.dataset.page,r=parseInt(n,10);Number.isNaN(r)||(this.temporaryFacets=this.facets.withPage(r),this.facets=this.temporaryFacets.copy(),this.load(!0),e.preventDefault())}},{key:"toggleConstraint",value:function(e,t){var n=t.dataset,r=n.facet,i=n.constraint;void 0!==r&&void 0!==i&&(this.temporaryFacets=this.temporaryFacets.withConstraintToggled(r,i).withPage(1),this.isOverlay?this.updateConstraints(this.temporaryFacets):(this.facets=this.temporaryFacets.copy(),this.updateConstraints(this.facets),this.debouncedLoad(!1)),e.preventDefault())}},{key:"removeConstraint",value:function(e,t){var n=t.dataset,r=n.facet,i=n.constraint;void 0!==r&&void 0!==i&&(this.temporaryFacets=this.facets.withConstraintRemoved(r,i).withPage(1),this.facets=this.temporaryFacets.copy(),this.updateConstraints(this.facets),this.load(!1),e.preventDefault())}},{key:"applyConstraints",value:function(e){var t=e.target;if(t instanceof HTMLElement){t.classList.add("is-loading");var n=this.container.querySelector(".js-search-phrase-input");n&&(this.temporaryFacets=this.temporaryFacets.clearSelection().withPhrase(n.value)),this.facets=this.temporaryFacets.copy(),this.debouncedLoad(!1),this.closeMobileFilter(),e.preventDefault()}}},{key:"openMobileFilter",value:function(e){var t=this;this.container.classList.add("has-sidebar-overlay"),this.isOverlay=!0;var n=this.container.querySelector(".js-faceted-product-list-overlay");n instanceof HTMLElement&&Cu(n);var r=ju(n,{escapeDeactivates:!1});r.activate(),this.deactivateFocusTrap=function(){r.deactivate(),t.deactivateFocusTrap=null},e&&e.preventDefault()}},{key:"closeMobileFilter",value:function(e){this.container.classList.remove("has-sidebar-overlay"),this.isOverlay=!1,this.deactivateFocusTrap&&this.deactivateFocusTrap(),fu&&(pu.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),mu&&(document.removeEventListener("touchmove",Bu,du?{passive:!1}:void 0),mu=!1),gu=-1),fu?xu():_u(),pu=[],e&&e.preventDefault()}},{key:"toggleFacet",value:function(e,t){var n=t.closest(".facet--collapsible");if(n instanceof HTMLElement){var r=n.dataset.facet;this.temporaryFacets=this.facets.withFacetToggled(r),this.facets=this.temporaryFacets.copy(),this.updateAllFacets(),this.replaceState(this.facets.getUrl().stringify()),e.preventDefault()}}},{key:"updateAllFacets",value:function(){var e=this;Array.from(this.container.querySelectorAll(".facet")).forEach((function(t){var n=t.dataset.facet,r=e.facets.isFacetCollapsed(n),i=t.querySelector(".js-facet-toggle");if(i instanceof HTMLAnchorElement||i instanceof HTMLButtonElement){var o=i.getAttribute("aria-controls");if(o){var a=document.getElementById(o);a instanceof HTMLElement&&(r?(t.classList.add("is-collapsed"),i.setAttribute("aria-expanded","false"),a.setAttribute("aria-hidden","true"),Array.from(a.querySelectorAll("a")).forEach((function(e){return e.setAttribute("tabindex","-1")}))):(t.classList.remove("is-collapsed"),i.setAttribute("aria-expanded","true"),a.setAttribute("aria-hidden","false"),Array.from(a.querySelectorAll("a")).forEach((function(e){return e.removeAttribute("tabindex")}))))}}}))}},{key:"updateConstraints",value:function(e){var t=this;Array.from(this.container.querySelectorAll(".constraint")).forEach((function(n){return t.updateConstraint(n,e)}))}},{key:"updateConstraint",value:function(e,t){var n=e.dataset,r=n.facet,i=n.constraint;t.isConstraintSelected(r,i)?e.classList.add("is-selected"):e.classList.remove("is-selected");var o=t.getConstraintCount(r,i);o>0?e.classList.remove("is-disabled"):e.classList.add("is-disabled");var a=e.querySelector(".constraint__count");a instanceof HTMLElement&&(a.innerText="(".concat(o,")"))}},{key:"load",value:function(e){var t=this;this.cancel&&this.cancel();var n=this.facets.getUrl(),r={cancelToken:new(Pc().CancelToken)((function(e){t.cancel=e}))};this.container.classList.add("is-loading"),Pc().get(n.partial(),r).then((function(r){t.cancel=null,document.querySelector(".js-search-phrase-input")?(t.facets=new Ru(t.basePath,r.data.new_facets,1,r.data.sort,r.data.phrase),t.temporaryFacets=t.facets.copy(),t.container.innerHTML=r.data.body):t.container.innerHTML=r.data,t.container.classList.remove("is-loading"),t.replaceState(n.stringify());var i=document.querySelector('link[rel="canonical"]');if(i instanceof HTMLElement){var o=i.getAttribute("data-domain"),a="".concat(location.protocol,"//").concat(o).concat(location.pathname);i.setAttribute("href",a),Array.from(document.querySelectorAll('link[rel="alternate"]')).forEach((function(e){var t=e.getAttribute("data-domain"),n="".concat(location.protocol,"//").concat(t).concat(location.pathname).concat(location.search);e.setAttribute("href",n)})),t.initTooltips(),e&&window.scrollTo(0,0)}})).catch((function(e){Pc().isCancel(e)}))}},{key:"replaceState",value:function(e){window.history.replaceState({},document.title,e)}},{key:"initTooltips",value:function(){Array.from(this.container.querySelectorAll(".glide__slides .js-product-list-tooltip")).forEach((function(e){var t=e.getAttribute("data-title");t&&(new ct(e,{title:t,placement:"top",offset:"0, 8px",delay:{show:250,hide:0},container:document.body,boundariesElement:document.body,arrowSelector:".tooltip__arrow",innerSelector:".tooltip__inner",template:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>'}),e.removeAttribute("data-title"))}))}},{key:"initGlide",value:function(e){var t=Array.from(e.querySelectorAll(".glide__slide")),n=e.querySelector(".glide__arrows"),r=e.querySelector(".glide__arrow--right"),i=e.querySelector(".glide__arrow--left");if(null!==n&&null!==r&&null!==i){t.length<=4?n.classList.add("hidden"):n.classList.remove("hidden");var o=new uu(e,{perView:4,gap:2,bound:!0,rewind:!1,dragThreshold:!1,swipeThreshold:!1});o.on(["mount.after","run"],(function(){t.length>4&&(0===o.index?(i.classList.add("hidden"),r.classList.remove("hidden")):o.index>=t.length-4?(r.classList.add("hidden"),i.classList.remove("hidden")):(r.classList.remove("hidden"),i.classList.remove("hidden")))})),o.mount()}}}])&&zu(t.prototype,n),r&&zu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qu=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wu(this,"option",void 0),Wu(this,"element",void 0),Wu(this,"selectHandler",void 0),Wu(this,"select",void 0),this.option=t,this.element=n,this.selectHandler=r;var o=this.element.querySelector("select");if(!(o instanceof HTMLSelectElement))throw Error("Unable to find select element");this.select=o,this.select.addEventListener("change",(function(e){return i.handleChange(e)}))}var t,n,r;return t=e,(n=[{key:"handleChange",value:function(e){var t=e.target;if(t instanceof HTMLSelectElement){var n=""!==t.value?t.value:null;this.selectHandler(this.option,n),e.preventDefault()}}},{key:"update",value:function(e,t){t?this.select.classList.add("has-selection"):this.select.classList.remove("has-selection"),Array.from(this.select.querySelectorAll("option")).forEach((function(e){e instanceof HTMLOptionElement&&e.value}))}},{key:"getInitialSelected",value:function(){var e=this.element.getAttribute("data-initial");return""!==e?e:null}},{key:"clearError",value:function(){}},{key:"showError",value:function(){}}])&&Gu(t.prototype,n),r&&Gu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ju(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yu=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ju(this,"option",void 0),Ju(this,"element",void 0),Ju(this,"errorText",void 0),Ju(this,"errorElement",void 0),Ju(this,"selectHandler",void 0),Ju(this,"links",void 0),this.option=t,this.element=n,this.selectHandler=r,this.links=Array.from(this.element.querySelectorAll("a.js-option-value-link")),this.errorElement=this.element.querySelector(".js-buy-section-option-error"),this.errorText=this.element.getAttribute("data-error-text"),this.links.forEach((function(e){if(e.hasAttribute("data-tooltip-header")&&e.hasAttribute("data-tooltip-body")){var t=e.parentElement;if(!(t instanceof HTMLElement))return;var n=t.querySelector(".js-info-tooltip");if(!(n instanceof HTMLElement))return;var r=n.querySelector(".buy-section-option__value__info-tooltip");if(!(r instanceof HTMLElement))return;var o=r.querySelector("button");if(!(o instanceof HTMLButtonElement))return;var a=e.getAttribute("data-tooltip-header"),s=e.getAttribute("data-tooltip-body");if(!a||!s)return;var A=r.querySelector(".value__info-tooltip__header-content"),c=r.querySelector(".value__info-tooltip__body");if(!(A instanceof HTMLElement&&c instanceof HTMLElement))return;A.textContent=a,c.textContent=s;var l=n.offsetHeight;e.addEventListener("click",(function(e){i.handleTooltip(e,n,l,o)}))}e.addEventListener("click",(function(e){i.handleClick(e)}))}))}var t,n,r;return t=e,(n=[{key:"handleClick",value:function(e){var t=e.target;if(t instanceof HTMLAnchorElement){var n=t.getAttribute("data-value");if(!n)throw Error("Missing value on element");var r=this.element.getAttribute("data-widget"),i=this.element.querySelector(".js-swatch-label");r&&"swatches"===r&&i instanceof HTMLElement&&(i.classList.add("is-selected"),i.textContent=n),this.selectHandler(this.option,n),e.preventDefault()}}},{key:"handleTooltip",value:function(e,t,n,r){var i=this,o=e.target;if(o instanceof HTMLAnchorElement){this.element.querySelectorAll(".js-info-tooltip").forEach((function(e){e.classList.contains("is-active")&&(e.classList.remove("is-active"),i.element.style.setProperty("--height","unset"),i.element.style.setProperty("--cursor-left","0"),i.element.style.setProperty("--cursor-right","0"),i.element.style.setProperty("--link-bottom","0"))})),this.links.forEach((function(e){var t=e.parentElement;t instanceof HTMLElement&&t.classList.contains("tooltip-active")&&t.classList.remove("tooltip-active")})),this.element.style.setProperty("--height","".concat(n.toString(),"px"));var a=this.element.getBoundingClientRect(),s=a.width/2,A=s/2-16,c=e.clientX-a.left;c<s?(this.element.style.setProperty("--cursor-left","".concat(A.toString(),"px")),this.element.style.setProperty("--cursor-right","unset")):c>s&&(this.element.style.setProperty("--cursor-right","".concat(A.toString(),"px")),this.element.style.setProperty("--cursor-left","unset"));var l=o.offsetTop+o.offsetHeight;this.element.style.setProperty("--link-bottom","".concat(l.toString(),"px"));var u=o.parentElement;u instanceof HTMLElement&&(u.classList.add("tooltip-active"),t.classList.add("is-active"),r.addEventListener("click",(function(){u.classList.remove("tooltip-active"),t.classList.remove("is-active"),i.element.style.setProperty("--height","unset"),i.element.style.setProperty("--cursor-left","0"),i.element.style.setProperty("--link-bottom","0")})),e.preventDefault())}}},{key:"update",value:function(e,t){e&&this.clearError(),this.links.forEach((function(n){var r=n.getAttribute("data-value");r&&r===e?n.classList.add("is-selected"):n.classList.remove("is-selected"),r&&t.has(r)?(n.setAttribute("data-state",""),n.setAttribute("tabindex","0")):(n.setAttribute("data-state","unavailable"),n.setAttribute("tabindex","-1"))}))}},{key:"showError",value:function(){this.errorElement instanceof HTMLElement&&null!==this.errorText&&void 0!==this.errorText&&(this.element.classList.add("is-error"),this.errorElement.innerText=this.errorText)}},{key:"clearError",value:function(){this.errorElement instanceof HTMLElement&&null!==this.errorText&&void 0!==this.errorText&&(this.element.classList.remove("is-error"),this.errorElement.innerText="")}},{key:"getInitialSelected",value:function(){var e=this.element.getAttribute("data-initial");return""!==e?e:null}}])&&Xu(t.prototype,n),r&&Xu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ed="buy-form-default",td="buy-price-default",nd="buy-user-default",rd="buy-user-message-default",id="buy-description-default",od=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$u(this,"container",void 0),$u(this,"items",void 0),$u(this,"selected",void 0),$u(this,"options",void 0),$u(this,"descriptions",void 0),$u(this,"forms",void 0),$u(this,"addonContainers",void 0),$u(this,"addons",void 0),$u(this,"prices",void 0),$u(this,"historicalPrices",void 0),$u(this,"userExclusive",void 0),$u(this,"userExclusiveMessage",void 0),$u(this,"mediaSets",void 0),$u(this,"valueAdds",void 0),this.container=t,this.items=n,this.descriptions=Array.from(this.container.querySelectorAll(".js-buy-description")),this.forms=Array.from(this.container.querySelectorAll(".js-buy-section-form")),this.addonContainers=Array.from(this.container.querySelectorAll(".js-buy-section-addons")),this.addons=Array.from(this.container.querySelectorAll(".js-buy-section-addon")),this.prices=Array.from(this.container.querySelectorAll(".js-buy-section-price")),this.historicalPrices=Array.from(this.container.querySelectorAll(".js-buy-section-price-history")),this.userExclusive=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive")),this.userExclusiveMessage=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive-message")),this.mediaSets=Array.from(this.container.querySelectorAll(".js-media-set")),this.valueAdds=Array.from(this.container.querySelectorAll(".js-buy-section-value-adds")),this.options=this.getOptions(".js-buy-section-option"),this.selected=this.getInitialSelected(this.options),Array.from(this.container.querySelectorAll(".js-buy-section-default-button")).forEach((function(e){e.addEventListener("click",(function(e){return r.handleDefaultClick(e)}))})),this.initAddons(),this.initShowMoreToggles(),this.initTooltips(),window.addEventListener("DOMContentLoaded",(function(){return r.initBadges()}))}var t,n,r;return t=e,n=[{key:"getOptions",value:function(e){var t=this,n=new Map,r=function(e,n){return t.handleOptionChange(e,n)};return Array.from(this.container.querySelectorAll(e)).forEach((function(e){var t=e.getAttribute("data-option"),i=e.getAttribute("data-widget");if(t&&i)switch(i){case"dropdown":n.set(t,new qu(t,e,r));break;case"buttons":case"swatches":n.set(t,new Yu(t,e,r))}})),n}},{key:"getInitialSelected",value:function(e){var t=new Map;return e.forEach((function(e,n){t.set(n,e.getInitialSelected())})),t}},{key:"handleDefaultClick",value:function(e){var t=this;this.selected.forEach((function(e,n){if(null===e){var r=t.options.get(n);r&&r.showError()}})),e.preventDefault()}},{key:"handleOptionChange",value:function(e,t){var n=this,r=new Map(this.selected);r.set(e,t);var i=0===Array.from(r.values()).filter((function(e){return null===e})).length,o=this.getMatchingItems(r);if(this.options.forEach((function(e,t){var i=r.get(t),o=new Map(r);o.set(t,null);var a=n.getMatchingItems(o),s=n.getAvailableOptionValues(t,a);e.update(i,s)})),1===o.length){var a=o[0];this.showElement(this.mediaSets,a.media_set_id),i?(this.showElement(this.addonContainers,a.addons_id),this.showElement(this.prices,a.price_id),this.historicalPrices&&this.showElement(this.historicalPrices,a.sku),this.showElement(this.userExclusive,a.user_exclusive_class),this.showElement(this.userExclusiveMessage,a.user_exclusive_message_id),this.showElement(this.forms,a.form_id),this.showElement(this.descriptions,a.description_id),this.showElement(this.valueAdds,a.value_adds_id)):(this.showElement(this.prices,td),this.showElement(this.userExclusive,nd),this.showElement(this.userExclusiveMessage,rd),this.showElement(this.forms,ed),this.showElement(this.descriptions,id),this.showElement(this.valueAdds,null))}else if(0===o.length){var s=this.items[0];s&&this.showElement(this.mediaSets,s.media_set_id),this.showElement(this.forms,"buy-form-unavailable"),this.showElement(this.prices,td),this.showElement(this.userExclusive,nd),this.showElement(this.userExclusiveMessage,rd),this.showElement(this.descriptions,id),this.showElement(this.valueAdds,null)}else{var A=o[0];this.showElement(this.mediaSets,A.media_set_id),this.showElement(this.forms,ed),this.showElement(this.prices,td),this.showElement(this.userExclusive,nd),this.showElement(this.userExclusiveMessage,rd),this.showElement(this.descriptions,id),this.showElement(this.valueAdds,null)}var c=this.getUrl(r);this.replaceState(c),this.selected=r}},{key:"getUrl",value:function(e){var t="/".concat(window.location.pathname.replace(/^\//,"")),n=Su.parse(window.location.search);e.forEach((function(e,t){null==e?Object.prototype.hasOwnProperty.call(n,t)&&delete n[t]:n[t]=e}));var r=Su.stringify(n,{arrayFormat:"comma"});return"".concat(t).concat(r.length>0?"?".concat(r):"")}},{key:"replaceState",value:function(e){window.history.replaceState({},document.title,e)}},{key:"getMatchingItems",value:function(e){var t=Array.from(e.keys());return this.items.filter((function(n){return t.filter((function(t){var r=e.get(t);return null===r||r===n.options[t]})).length===e.size}))}},{key:"getAvailableOptionValues",value:function(e,t){return new Set(t.map((function(t){return t.options[e]})))}},{key:"initAddons",value:function(){var e=this;this.addons&&this.addons.forEach((function(t){var n=t.querySelector('input[type="checkbox"]');if(n){var r=n.getAttribute("data-addon-id");n.addEventListener("change",(function(){e.forms.forEach((function(e){if(e.classList.contains("is-visible")){var t=e.querySelector("form");if(!t)return;if(n.checked){var i=document.createElement("input");i.type="hidden",i.name="product_id",i.value=r,i.classList.add("addon-product"),t.insertBefore(i,t.firstChild)}else{var o=t.querySelector(".addon-product");o&&t.removeChild(o)}}}))}))}}))}},{key:"initTooltips",value:function(){Array.from(this.container.querySelectorAll(".js-buy-section-tooltip")).forEach((function(e){var t=e.getAttribute("data-title");t&&(new ct(e,{title:t,placement:"top",offset:"0, 8px",delay:{show:250,hide:0},container:document.body,boundariesElement:document.body,arrowSelector:".tooltip__arrow",innerSelector:".tooltip__inner",template:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>'}),e.removeAttribute("data-title"))}))}},{key:"initBadges",value:function(){this.mediaSets.forEach((function(e){Array.from(e.querySelectorAll(".media-set__media")).forEach((function(e){var t=e.querySelector(".media-set__badges");if(t){var n=e.classList.contains("media-set__media--half"),r=t.getAttribute("data-axis"),i=t.getAttribute("data-align").split("-"),o=i[0],a=i[1];t.style.opacity="1";var s=Array.from(e.querySelectorAll(".media-set__badge")),A=0,c=100;s.forEach((function(e){e.style.zIndex="".concat(c-1),e.style[o]="vertical"===r?"".concat(A,"px"):"0px",e.style[a]="horizontal"===r?"".concat(A,"px"):"0px",A+=n?140:200,c-=1}))}}))}))}},{key:"createShowMoreToggleButton",value:function(){var e=document.querySelector(".js-show-more-toggle-clone"),t=null==e?void 0:e.cloneNode(!0);return t.classList.remove("hidden","js-show-more-toggle-clone"),t.classList.add("is-collapsed"),t.setAttribute("aria-label","Show more bullet points"),t.setAttribute("aria-expanded","false"),t}},{key:"toggleListItemsVisibility",value:function(e,t){e.forEach((function(e){e.classList.contains("is-visible")?e.classList.remove("is-visible"):e.classList.add("is-visible")})),t.classList.contains("is-collapsed")?(t.classList.remove("is-collapsed"),t.setAttribute("aria-label","Show less bullet points"),t.setAttribute("aria-expanded","true")):(t.classList.add("is-collapsed"),t.setAttribute("aria-label","Show more bullet points"),t.setAttribute("aria-expanded","false"))}},{key:"initializeList",value:function(e,t){var n=this;if(!(e.querySelectorAll("li").length<=3)){var r=Array.from(e.querySelectorAll("li:not(:nth-child(-n+3))")),i=this.createShowMoreToggleButton();i.addEventListener("click",(function(){return n.toggleListItemsVisibility(r,i)})),e.appendChild(i)}}},{key:"initializeDescription",value:function(e){var t=this,n=Array.from(e.querySelectorAll("ul"));if(n.length){n.forEach((function(n){t.initializeList(n,e)}));var r=e.querySelector(".js-show-more-toggle-clone");r&&e.removeChild(r)}}},{key:"initShowMoreToggles",value:function(){var e=this;this.descriptions.forEach((function(t){e.initializeDescription(t)}))}},{key:"showElement",value:function(e,t){e.forEach((function(e){t&&(e.id===t||e.classList.contains(t))?e.classList.add("is-visible"):e.classList.remove("is-visible")}))}}],n&&Zu(t.prototype,n),r&&Zu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ad(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return sd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sd(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ad(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ld="buy-form-default",ud="product-sticky-form-default",dd="buy-price-default",hd="product-sticky-price-default",fd="buy-user-default",pd="buy-user-message-default",md="buy-name-default",gd="buy-description-default",vd=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),cd(this,"container",void 0),cd(this,"optionsContainer",void 0),cd(this,"selectedTabContainer",void 0),cd(this,"items",void 0),cd(this,"selected",void 0),cd(this,"options",void 0),cd(this,"names",void 0),cd(this,"descriptions",void 0),cd(this,"forms",void 0),cd(this,"stickyForms",void 0),cd(this,"prices",void 0),cd(this,"stickyPrices",void 0),cd(this,"userExclusive",void 0),cd(this,"userExclusiveMessage",void 0),cd(this,"mediaSets",void 0),cd(this,"valueAdds",void 0),cd(this,"chargerIcons",void 0),cd(this,"activeTab",void 0),cd(this,"isCustomizableProduct",void 0),cd(this,"groups",void 0),cd(this,"groupOptions",void 0),cd(this,"groupLinkClasses",void 0),this.container=t,this.optionsContainer=this.container.querySelector(".buy-section__tab-content.js-buy-tab-panel"),this.container.querySelector("#ready-to-ship-tab")&&(this.optionsContainer=this.container.querySelector("#ready-to-ship-tab")),this.items=n,this.options=this.getOptions(".js-buy-section-option"),this.selected=this.getInitialSelected(this.options),this.names=Array.from(this.container.querySelectorAll(".js-buy-names")),this.descriptions=Array.from(this.container.querySelectorAll(".js-buy-description")),this.forms=Array.from(this.container.querySelectorAll(".js-buy-section-form")),this.stickyForms=Array.from(document.querySelectorAll(".js-product-sticky-nav-form")),this.prices=Array.from(this.container.querySelectorAll(".js-buy-section-price")),this.stickyPrices=Array.from(document.querySelectorAll(".js-product-sticky-nav-price")),this.userExclusive=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive")),this.userExclusiveMessage=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive-message")),this.mediaSets=Array.from(this.container.querySelectorAll(".js-media-set")),this.valueAdds=Array.from(this.container.querySelectorAll(".js-buy-section-value-adds")),this.chargerIcons=Array.from(this.container.querySelectorAll(".js-charger-icon")),this.isCustomizableProduct=this.container.classList.contains("buy-section--customize"),this.activeTab=!1,this.groupLinkClasses=[],this.isCustomizableProduct?(this.activeTab=this.setActiveTab(".js-buy-tab-control"),Array.from(this.container.querySelectorAll(".js-buy-tab-control")).forEach((function(e){e.addEventListener("click",(function(e){r.activeTab=r.setActiveTab(".js-buy-tab-control"),r.activeTab&&r.onTabChange()}))}))):this.activeTab=!0,this.onTabChange(),Array.from(this.optionsContainer.querySelectorAll(".js-buy-section-default-button")).forEach((function(e){e.addEventListener("click",(function(e){r.handleDefaultClick(e)}))})),Array.from(this.optionsContainer.querySelectorAll(".js-buy-section-reset")).forEach((function(e){e.setAttribute("data-original-state",window.location.pathname+window.location.search),e.addEventListener("click",(function(e){}))})),this.initTooltips()}var t,n,r;return t=e,n=[{key:"onTabChange",value:function(){var e=this;if(this.selected.forEach((function(t,n){e.handleOptionChange(n,t)})),this.activeTab){var t=this.getUrl(this.selected);this.replaceState(t)}}},{key:"setActiveTab",value:function(e){var t=Array.from(this.container.querySelectorAll(e)),n="";return t.forEach((function(e){"true"===e.getAttribute("aria-selected")&&(n=e.getAttribute("aria-controls"))})),"ready-to-ship-tab"===n}},{key:"getOptions",value:function(e){var t=this,n=new Map,r=function(e,n){t.handleOptionChange(e,n)};return Array.from(this.optionsContainer.querySelectorAll(e)).forEach((function(e){var t=e.getAttribute("data-option"),i=e.getAttribute("data-widget");if(t&&i)switch(i){case"dropdown":n.set(t,new qu(t,e,r));break;case"buttons":case"swatches":n.set(t,new Yu(t,e,r))}})),n}},{key:"getInitialSelected",value:function(e){var t=this,n=new Map;return e.forEach((function(e,r){n.set(r,e.getInitialSelected()),t.handleOptionChange(r,e.getInitialSelected())})),n}},{key:"handleDefaultClick",value:function(e){var t=this;this.selected.forEach((function(e,n){if(null===e){var r=t.options.get(n);r&&r.showError()}})),e.preventDefault()}},{key:"handleOptionChange",value:function(e,t){var n=this,r=new Map(this.selected);r.set(e,t);var i=0===Array.from(r.values()).filter((function(e){return null===e})).length,o=this.getMatchingItems(r);if(this.options.forEach((function(e,t){var i=r.get(t),o=new Map(r);o.set(t,null);var a=n.getMatchingItems(o),s=n.getAvailableOptionValues(t,a);e.update(i,s)})),this.activeTab){if(1===o.length){var a=o[0];this.showElement(this.mediaSets,a.media_set_id),i?(this.showElement(this.prices,a.price_id),this.stickyPrices&&this.showElement(this.stickyPrices,a.price_id),this.showElement(this.userExclusive,a.user_exclusive_class),this.showElement(this.userExclusiveMessage,a.user_exclusive_message_id),this.showElement(this.forms,a.form_id),this.stickyForms&&this.showElement(this.stickyForms,a.form_id),this.showElement(this.names,a.name_id),this.showElement(this.descriptions,a.description_id),this.showElement(this.valueAdds,a.value_adds_id),this.showElement(this.chargerIcons,"js-charger-icon-"+a.id.toString())):(this.showElement(this.prices,dd),this.stickyPrices&&this.showElement(this.stickyPrices,hd),this.showElement(this.userExclusive,fd),this.showElement(this.userExclusiveMessage,pd),this.showElement(this.forms,ld),this.stickyForms&&this.showElement(this.stickyForms,ud),this.showElement(this.names,md),this.showElement(this.descriptions,gd),this.showElement(this.valueAdds,null))}else if(0===o.length){var s=this.items[0];s&&this.showElement(this.mediaSets,s.media_set_id),this.showElement(this.forms,"buy-form-unavailable"),this.stickyForms&&this.showElement(this.stickyForms,"product-sticky-form-unavailable"),this.showElement(this.prices,dd),this.stickyPrices&&this.showElement(this.stickyPrices,hd),this.showElement(this.userExclusive,fd),this.showElement(this.userExclusiveMessage,pd),this.showElement(this.names,md),this.showElement(this.descriptions,gd),this.showElement(this.valueAdds,null)}else{var A=o[0];this.showElement(this.mediaSets,A.media_set_id),this.showElement(this.forms,ld),this.stickyForms&&this.showElement(this.stickyForms,ud),this.showElement(this.prices,dd),this.stickyPrices&&this.showElement(this.stickyPrices,hd),this.showElement(this.userExclusive,fd),this.showElement(this.userExclusiveMessage,pd),this.showElement(this.names,md),this.showElement(this.descriptions,gd),this.showElement(this.valueAdds,null)}var c=this.getUrl(r);this.replaceState(c)}this.selected=r}},{key:"getUrl",value:function(e){var t,n="/".concat(window.location.pathname.replace(/^\//,"")),r=window.location.search,i=new URLSearchParams(r),o=i.has("edit"),a={},s=ad(i.keys());try{for(s.s();!(t=s.n()).done;){var A=t.value,c=i.get(A);A.startsWith("utm_")&&(null==c?Object.prototype.hasOwnProperty.call(a,A)&&delete a[A]:a[A]=c)}}catch(e){s.e(e)}finally{s.f()}e.forEach((function(e,t){null==e?Object.prototype.hasOwnProperty.call(a,t)&&delete a[t]:a[t]=e}));var l=Su.stringify(a,{arrayFormat:"comma"});return l.length>0&&o&&(l="edit=true&".concat(l)),"".concat(n).concat(l.length>0?"?".concat(l):"")}},{key:"replaceState",value:function(e){window.history.replaceState({},document.title,e)}},{key:"getMatchingItems",value:function(e){var t=Array.from(e.keys());return this.items.filter((function(n){return t.filter((function(t){var r=e.get(t);return null===r||r===n.product_family_options[t]})).length===e.size}))}},{key:"getAvailableOptionValues",value:function(e,t){return new Set(t.map((function(t){return t.product_family_options[e]})))}},{key:"initTooltips",value:function(){Array.from(this.container.querySelectorAll(".js-buy-section-tooltip")).forEach((function(e){var t=e.getAttribute("data-title");t&&(new ct(e,{title:t,placement:"top",offset:"0, 14px",delay:{show:250,hide:0},container:document.body,boundariesElement:document.body,arrowSelector:".tooltip__arrow",innerSelector:".tooltip__inner",template:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>'}),e.removeAttribute("data-title"))}))}},{key:"showElement",value:function(e,t){e.forEach((function(e){t&&(e.id===t||e.classList.contains(t))?e.classList.add("is-visible"):e.classList.remove("is-visible")}))}}],n&&Ad(t.prototype,n),r&&Ad(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yd(Object(n),!0).forEach((function(t){Bd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _d=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Bd(this,"option",void 0),Bd(this,"element",void 0),Bd(this,"errorText",void 0),Bd(this,"errorElement",void 0),Bd(this,"selectHandler",void 0),Bd(this,"links",void 0),Bd(this,"prices",void 0),Bd(this,"formatCurrency",void 0),this.option=t,this.element=n,this.selectHandler=r,this.links=Array.from(this.element.querySelectorAll("a.js-option-value-link")),this.errorElement=this.element.querySelector(".js-buy-section-option-error"),this.errorText=this.element.getAttribute("data-error-text"),this.prices=Array.from(this.element.querySelectorAll(".js-option_upscale-price"));var o=new Ic(wd(wd({},window.currencyFormat),{},{noDecimals:!0}));this.formatCurrency=function(e,t){return o.format(e,t)},this.links.forEach((function(e){if(e.hasAttribute("data-tooltip-header")&&e.hasAttribute("data-tooltip-body")){var t=e.parentElement;if(!(t instanceof HTMLElement))return;var n=t.querySelector(".js-info-tooltip");if(!(n instanceof HTMLElement))return;var r=n.querySelector(".buy-section-option__value__info-tooltip");if(!(r instanceof HTMLElement))return;var o=r.querySelector("button");if(!(o instanceof HTMLButtonElement))return;var a=e.getAttribute("data-tooltip-header"),s=e.getAttribute("data-tooltip-body");if(!a||!s)return;var A=r.querySelector(".value__info-tooltip__header-content"),c=r.querySelector(".value__info-tooltip__body");if(!(A instanceof HTMLElement&&c instanceof HTMLElement))return;A.textContent=a,c.textContent=s;var l=n.offsetHeight;e.addEventListener("click",(function(e){i.handleTooltip(e,n,l,o)}))}e.addEventListener("click",(function(e){i.handleClick(e)}))}))}var t,n,r;return t=e,(n=[{key:"handleClick",value:function(e){var t=e.target;if(t instanceof HTMLAnchorElement){var n=t.getAttribute("data-value");if(!n)throw Error("Missing value on element");var r=this.element.getAttribute("data-widget"),i=this.element.querySelector(".js-swatch-label");r&&"swatches"===r&&i instanceof HTMLElement&&(i.classList.add("is-selected"),i.textContent=n);var o,a=this.element.closest(".js-buy-section-group-option");o=a instanceof HTMLElement?a.getAttribute("data-option"):null,this.selectHandler(this.option,n,o),e.preventDefault()}}},{key:"handleTooltip",value:function(e,t,n,r){var i=this,o=e.target;if(o instanceof HTMLAnchorElement){this.element.querySelectorAll(".js-info-tooltip").forEach((function(e){e.classList.contains("is-active")&&(e.classList.remove("is-active"),i.element.style.setProperty("--height","unset"),i.element.style.setProperty("--cursor-left","0"),i.element.style.setProperty("--cursor-right","0"),i.element.style.setProperty("--link-bottom","0"))})),this.links.forEach((function(e){var t=e.parentElement;t instanceof HTMLElement&&t.classList.contains("tooltip-active")&&t.classList.remove("tooltip-active")})),this.element.style.setProperty("--height","".concat(n.toString(),"px"));var a=this.element.getBoundingClientRect(),s=a.width/2,A=s/2-16,c=e.clientX-a.left;c<=0?(this.element.style.setProperty("--cursor-right","unset"),this.element.style.setProperty("--cursor-left","unset"),this.element.style.setProperty("--caret-visibility","hidden")):c<s?(this.element.style.setProperty("--cursor-left","".concat(A.toString(),"px")),this.element.style.setProperty("--cursor-right","unset"),this.element.style.setProperty("--caret-visibility","visible")):c>s&&(this.element.style.setProperty("--cursor-right","".concat(A.toString(),"px")),this.element.style.setProperty("--cursor-left","unset"),this.element.style.setProperty("--caret-visibility","visible"));var l=o.offsetTop+o.offsetHeight;this.element.style.setProperty("--link-bottom","".concat(l.toString(),"px"));var u=o.parentElement;u instanceof HTMLElement&&(u.classList.add("tooltip-active"),t.classList.add("is-active"),r.addEventListener("click",(function(){u.classList.remove("tooltip-active"),t.classList.remove("is-active"),i.element.style.setProperty("--height","unset"),i.element.style.setProperty("--cursor-left","0"),i.element.style.setProperty("--link-bottom","0")})),e.preventDefault())}}},{key:"updatePrice",value:function(e,t){var n=this;e&&this.clearError(),this.links.forEach((function(r){var i=r.getAttribute("data-value");if(i&&i===e&&r.parentElement instanceof HTMLElement&&r.parentElement.querySelector(".js-option_upscale-price")instanceof HTMLElement){var o=r.parentElement.querySelector(".js-option_upscale-price"),a=o.getAttribute("data-currency"),s=n.formatCurrency(t,a);o.innerText="+".concat(s)}else r.parentElement.querySelector(".js-option_upscale-price").innerText=""}))}},{key:"updateOutOfStock",value:function(e){e&&this.clearError(),this.links.forEach((function(t){var n=t.getAttribute("data-value");n&&n===e&&t.parentElement instanceof HTMLElement&&t.parentElement.querySelector(".js-option_notify-icon")instanceof HTMLElement?t.parentElement.querySelector(".js-option_notify-icon").classList.remove("hidden"):t.parentElement.querySelector(".js-option_notify-icon")instanceof HTMLElement&&t.parentElement.querySelector(".js-option_notify-icon").classList.add("hidden")}))}},{key:"update",value:function(e,t){e&&this.clearError(),this.links.forEach((function(n){var r=n.getAttribute("data-value");r&&r===e?n.classList.add("is-selected"):n.classList.remove("is-selected"),r&&t.has(r)?(n.setAttribute("data-state",""),n.setAttribute("tabindex","0")):(n.setAttribute("data-state","unavailable"),n.setAttribute("tabindex","-1"))}))}},{key:"showError",value:function(){this.errorElement instanceof HTMLElement&&null!==this.errorText&&void 0!==this.errorText&&(this.element.classList.add("is-error"),this.errorElement.innerText=this.errorText)}},{key:"clearError",value:function(){this.errorElement instanceof HTMLElement&&null!==this.errorText&&void 0!==this.errorText&&(this.element.classList.remove("is-error"),this.errorElement.innerText="")}},{key:"getInitialSelected",value:function(){var e=this.element.getAttribute("data-initial");return""!==e?e:null}},{key:"getDefaultSelected",value:function(){var e=this.element.getAttribute("data-default");return""!==e?e:null}}])&&bd(t.prototype,n),r&&bd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xd(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Cd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cd(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Cd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Md=function(){function e(t,n,r,i){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ed(this,"container",void 0),Ed(this,"currency",void 0),Ed(this,"optionsContainer",void 0),Ed(this,"items",void 0),Ed(this,"customProductItem",void 0),Ed(this,"selected",void 0),Ed(this,"options",void 0),Ed(this,"groupedOptions",void 0),Ed(this,"descriptions",void 0),Ed(this,"forms",void 0),Ed(this,"stickyForms",void 0),Ed(this,"prices",void 0),Ed(this,"stickyPrices",void 0),Ed(this,"userExclusive",void 0),Ed(this,"userExclusiveMessage",void 0),Ed(this,"mediaSets",void 0),Ed(this,"valueAdds",void 0),Ed(this,"activeTab",void 0),this.container=t,this.currency=i,this.items=n,this.customProductItem=r,this.optionsContainer=this.container.querySelector("#customize-tab"),this.descriptions=Array.from(this.container.querySelectorAll(".js-buy-description")),this.forms=Array.from(this.container.querySelectorAll(".js-buy-section-form")),this.stickyForms=Array.from(document.querySelectorAll(".js-product-sticky-nav-form")),this.prices=Array.from(this.container.querySelectorAll(".js-buy-section-price")),this.stickyPrices=Array.from(document.querySelectorAll(".js-product-sticky-nav-price")),this.mediaSets=Array.from(this.container.querySelectorAll(".js-media-set")),this.valueAdds=Array.from(this.container.querySelectorAll(".js-buy-section-value-adds")),this.groupedOptions=this.getGroupedOptions(".js-buy-section-group-option"),this.options=this.getOptions(this.groupedOptions),this.selected=this.getInitialSelected(),this.setActiveTab(".js-buy-tab-control"),this.userExclusive=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive")),this.userExclusiveMessage=Array.from(this.container.querySelectorAll(".js-buy-section-user-exclusive-message")),Array.from(this.container.querySelectorAll(".js-buy-tab-control")).forEach((function(e){e.addEventListener("click",(function(e){o.setActiveTab(".js-buy-tab-control")}))})),this.optionsContainer instanceof HTMLElement&&Array.from(this.optionsContainer.querySelectorAll(".js-buy-section-reset")).forEach((function(e){e.setAttribute("data-original-state",window.location.pathname+window.location.search),e.addEventListener("click",(function(e){o.handleResetClick(e)}))}))}var t,n,r;return t=e,n=[{key:"onTabChange",value:function(){if(this.activeTab){this.showElement(this.mediaSets,this.customProductItem.media_set_id),this.handleFormWithSelect(this.selected,this.groupedOptions),this.showElement(this.prices,this.customProductItem.price_id),this.showElement(this.valueAdds,this.customProductItem.value_adds_id),this.showElement(this.descriptions,this.customProductItem.description_id),this.stickyPrices&&this.showElement(this.stickyPrices,this.customProductItem.price_id);var e=this.getUrl(this.selected);this.replaceState(e)}}},{key:"setActiveTab",value:function(e){var t=Array.from(this.container.querySelectorAll(e)),n="";t.forEach((function(e){"true"===e.getAttribute("aria-selected")&&(n=e.getAttribute("aria-controls"))}));var r="customize-tab"===n;this.activeTab=r,this.activeTab&&this.onTabChange()}},{key:"getGroupedOptions",value:function(e){var t=this,n=Array.from(this.optionsContainer.querySelectorAll(e));return this.handleOptionWidgets(n,(function(e,n,r){return t.handleOptionChangeCustomize(e,n,r)}))}},{key:"getOptions",value:function(e){var t=new Map;return e.forEach((function(e){e.forEach((function(e,n){t.set(n,e)}))})),t}},{key:"handleOptionWidgets",value:function(e,t){var n=this,r=new Map;return e.forEach((function(e){var i=e.getAttribute("data-option"),o=e.getAttribute("data-widget");if(i&&o)switch(o){case"dropdown":r.set(i,new qu(i,e,t));break;case"buttons":case"swatches":r.set(i,new _d(i,e,t));break;case"groupOption":var a=Array.from(e.querySelectorAll(".js-buy-section-option")),s=n.handleOptionWidgets(a,t);s instanceof Map&&r.set(i,s)}})),r}},{key:"getInitialSelected",value:function(){var e=new Map;return this.options.forEach((function(t,n){t instanceof Map||e.set(n,t.getInitialSelected())})),e}},{key:"getDefaultSelected",value:function(){var e=new Map;return this.options.forEach((function(t,n){t instanceof Map||e.set(n,t.getDefaultSelected())})),e}},{key:"uiSelectedOptions",value:function(){var e=this;this.selected.forEach((function(t,n){var r=e.optionsContainer.querySelector(".js-buy-section-option[data-option=".concat(n,"] .js-option-value-link[data-value=").concat(t,"]"));r&&r.click()}))}},{key:"handleDefaultClick",value:function(e){var t=this;this.selected.forEach((function(e,n){if(null===e){var r=t.options.get(n);!r||r instanceof Map||r.showError()}})),e.preventDefault()}},{key:"handleFormWithSelect",value:function(e,t){var n=this,r=[],i=!0;t.forEach((function(t,o){var a=!0,s=[];if(t.forEach((function(t,n){null==e.get(n)&&(a=!1),s.push(n)})),a)for(var A=function(t){var i=n.items[t],o=!0;if(s.forEach((function(t){i.options[t]!=e.get(t)&&(o=!1)})),o)return r.push(i),"break"},c=0;c<n.items.length&&"break"!==A(c);c++);else i=!1})),i?(this.showElement(this.forms,this.customProductItem.form_id),this.showElement(this.valueAdds,this.customProductItem.value_adds_id),this.stickyForms&&this.showElement(this.stickyForms,this.customProductItem.form_id),Array.from(document.querySelectorAll("#".concat(this.customProductItem.form_id,", .").concat(this.customProductItem.form_id))).forEach((function(e){if(e instanceof HTMLElement){var t=[];r.forEach((function(e){t.push(e.form_type)})),["add-to-cart","sign-in-to-buy","notify-me","notify-me-authenticated","sign-in-to-notify","out-of-stock"].forEach((function(n){t.includes(n)&&e.setAttribute("data-form-type",n)})),Array.from(e.querySelectorAll("[data-form]")).forEach((function(e){if("add-to-cart"===e.getAttribute("data-form")){var t=e.querySelector("form");if(!(t instanceof HTMLFormElement))return;Array.from(t.querySelectorAll("input")).forEach((function(e){"product_id"===e.getAttribute("name")&&t.removeChild(e)}));var i=0;i+=n.customProductItem.price,r.forEach((function(e){i+=e.price;var n=document.createElement("input");n.type="hidden",n.name="product_id",n.setAttribute("data-relationship","child"),n.value=e.shop_product_id.toString(),t.insertBefore(n,t.firstChild)}));var o=document.createElement("input");o.type="hidden",o.name="product_id",o.setAttribute("data-relationship","parent"),o.value=n.customProductItem.shop_product_id.toString(),t.insertBefore(o,t.firstChild),n.showElement(n.forms,n.customProductItem.form_id);var a=n.container.querySelector("#"+n.customProductItem.price_id+" .js-span-price"),s=document.querySelector(".".concat(n.customProductItem.price_id," .js-sticky-span-price"));a instanceof HTMLElement&&(a.textContent=window.SteelSeries.formatCurrency(i,n.currency)),s instanceof HTMLElement&&(s.textContent=window.SteelSeries.formatCurrency(i,n.currency))}if("notify-me"===e.getAttribute("data-form")){var A=Array.from(document.querySelectorAll(".notify-me__sku-list"));A.forEach((function(e){Array.from(e.querySelectorAll("li")).forEach((function(t){e.removeChild(t)}))})),r.forEach((function(e){"notify-me"===e.form_type&&A.forEach((function(t){var n=document.createElement("li");n.classList.add("notify-me__sku-list-item"),n.innerHTML=e.name,t.appendChild(n)}))}));var c=document.querySelector(".js-notifyme-modal-count");if(c instanceof HTMLElement){var l=0;c.innerHTML=l.toString(),r.forEach((function(e){"notify-me"===e.form_type&&(l+=1,c.innerHTML=l.toString())}))}var u=e.querySelector("form");if(u instanceof HTMLFormElement){if(Array.from(u.querySelectorAll("input")).forEach((function(e){"child_item_id"===e.getAttribute("name")&&u.removeChild(e)})),r.length>0){var d=document.createElement("input");d.type="hidden",d.name="child_item_id";var h=[];r.forEach((function(e,t){h.push(e.notify_me_id.toString())})),d.value=h.toString(),u.insertBefore(d,u.firstChild)}u.setAttribute("action","/notify-me-only/".concat(n.customProductItem.notify_me_id.toString()))}}}))}}))):(this.showElement(this.prices,"buy-price-default"),this.showElement(this.userExclusive,"buy-user-default"),this.showElement(this.userExclusiveMessage,"buy-user-message-default"),this.showElement(this.forms,"buy-form-default"))}},{key:"handleResetClick",value:function(e){this.selected=this.getDefaultSelected(),this.uiSelectedOptions()}},{key:"handleOptionChangeCustomize",value:function(e,t,n){var r=this,i=new Map(this.selected);if(i.set(e,t),this.activeTab){var o,a=xd(this.groupedOptions.get(n).entries());try{for(a.s();!(o=a.n()).done;){var s=o.value,A=i.get(s[0]),c=this.getAvailableOptionValues(s[0],this.items,i,n);this.options.get(s[0]).update(A,c)}}catch(e){a.e(e)}finally{a.f()}}var l,u=new Map(this.groupedOptions.get(n)),d=new Map,h=xd(u.keys());try{for(h.s();!(l=h.n()).done;){var f=l.value;f===e?u.delete(f):d.set(f,i.get(f))}}catch(e){h.e(e)}finally{h.f()}var p=this.items.filter((function(e){var t,n=!0,r=xd(d.keys());try{for(r.s();!(t=r.n()).done;){var i=t.value;if(e.options[i]!==d.get(i)){n=!1;break}}}catch(e){r.e(e)}finally{r.f()}return n})),m=p.sort((function(e,t){return e.price-t.price}))[0].price;if(p.reduce((function(t,n){if(n.price>m&&n.is_upsell){var r={price:n.price};r.key=e,r.value=n.options[e],t.push(r)}return t}),[]).forEach((function(e){r.options.get(e.key).updatePrice(e.value,(parseInt((100*e.price).toFixed())-parseInt((100*m).toFixed()))/100)})),p.reduce((function(t,n){if(n.stock_quantity<=0){var r={};r.key=e,r.value=n.options[e],t.push(r)}return t}),[]).forEach((function(e){r.options.get(e.key).updateOutOfStock(e.value)})),this.activeTab){this.handleFormWithSelect(i,this.groupedOptions);var g=this.getUrl(i);this.replaceState(g)}this.selected=i}},{key:"getUrl",value:function(e){var t,n="/".concat(window.location.pathname.replace(/^\//,"")),r=window.location.search,i=new URLSearchParams(r),o=i.has("edit"),a={},s=xd(i.keys());try{for(s.s();!(t=s.n()).done;){var A=t.value,c=i.get(A);A.startsWith("utm_")&&(null==c?Object.prototype.hasOwnProperty.call(a,A)&&delete a[A]:a[A]=c)}}catch(e){s.e(e)}finally{s.f()}e.forEach((function(e,t){null==e?Object.prototype.hasOwnProperty.call(a,t)&&delete a[t]:a[t]=e}));var l=Su.stringify(a,{arrayFormat:"comma"});return l.length>0&&o&&(l="edit=true&".concat(l)),"".concat(n).concat(l.length>0?"?".concat(l):"")}},{key:"replaceState",value:function(e){window.history.replaceState({},document.title,e)}},{key:"getAvailableOptionValues",value:function(e,t,n,r){var i,o=t.filter((function(t){return void 0!==t.options[e]})),a=xd(this.groupedOptions.get(r).entries());try{var s=function(){var t=i.value;t[0]!==e&&(o=o.filter((function(e){return e.options[t[0]]===n.get(t[0])})))};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return new Set(o.map((function(t){return t.options[e]})))}},{key:"initTooltips",value:function(){Array.from(this.container.querySelectorAll(".js-buy-section-tooltip")).forEach((function(e){var t=e.getAttribute("data-title");t&&(new ct(e,{title:t,placement:"top",offset:"0, 14px",delay:{show:250,hide:0},container:document.body,boundariesElement:document.body,arrowSelector:".tooltip__arrow",innerSelector:".tooltip__inner",template:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>'}),e.removeAttribute("data-title"))}))}},{key:"showElement",value:function(e,t){e.forEach((function(e){t&&(e.id===t||e.classList.contains(t))?e.classList.add("is-visible"):e.classList.remove("is-visible")}))}}],n&&Sd(t.prototype,n),r&&Sd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const Ud="139",Fd=0,Td=1,Qd=2,Ld=0,Id=1,kd=2,Pd=3,Od=100,Dd=301,Hd=302,Rd=303,Nd=304,zd=306,Vd=1e3,jd=1001,Kd=1002,Gd=1003,Wd=1004,qd=1005,Xd=1006,Jd=1007,Yd=1008,Zd=1009,$d=1012,eh=1014,th=1015,nh=1016,rh=1020,ih=1023,oh=1026,ah=1027,sh=33776,Ah=33777,ch=33778,lh=33779,uh=2300,dh=2301,hh=2302,fh=2400,ph=2401,mh=2402,gh=2500,vh=3e3,yh=3001,wh="srgb",bh="srgb-linear",Bh=7680,_h=35044,xh=35048,Ch="300 es",Sh=1035;class Eh{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const Mh=[];for(let e=0;e<256;e++)Mh[e]=(e<16?"0":"")+e.toString(16);let Uh=1234567;const Fh=Math.PI/180,Th=180/Math.PI;function Qh(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Mh[255&e]+Mh[e>>8&255]+Mh[e>>16&255]+Mh[e>>24&255]+"-"+Mh[255&t]+Mh[t>>8&255]+"-"+Mh[t>>16&15|64]+Mh[t>>24&255]+"-"+Mh[63&n|128]+Mh[n>>8&255]+"-"+Mh[n>>16&255]+Mh[n>>24&255]+Mh[255&r]+Mh[r>>8&255]+Mh[r>>16&255]+Mh[r>>24&255]).toLowerCase()}function Lh(e,t,n){return Math.max(t,Math.min(n,e))}function Ih(e,t){return(e%t+t)%t}function kh(e,t,n){return(1-n)*e+n*t}function Ph(e){return 0==(e&e-1)&&0!==e}function Oh(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Dh(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var Hh=Object.freeze({__proto__:null,DEG2RAD:Fh,RAD2DEG:Th,generateUUID:Qh,clamp:Lh,euclideanModulo:Ih,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:kh,damp:function(e,t,n,r){return kh(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(Ih(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(Uh=e);let t=Uh+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*Fh},radToDeg:function(e){return e*Th},isPowerOfTwo:Ph,ceilPowerOfTwo:Oh,floorPowerOfTwo:Dh,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),A=a(n/2),c=o((t+r)/2),l=a((t+r)/2),u=o((t-r)/2),d=a((t-r)/2),h=o((r-t)/2),f=a((r-t)/2);switch(i){case"XYX":e.set(s*l,A*u,A*d,s*c);break;case"YZY":e.set(A*d,s*l,A*u,s*c);break;case"ZXZ":e.set(A*u,A*d,s*l,s*c);break;case"XZX":e.set(s*l,A*f,A*h,s*c);break;case"YXY":e.set(A*h,s*l,A*f,s*c);break;case"ZYZ":e.set(A*f,A*h,s*l,s*c)}},normalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}},denormalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}});class Rh{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?this.addVectors(e,t):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?this.subVectors(e,t):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}Rh.prototype.isVector2=!0;class Nh{constructor(){this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,r,i,o,a,s,A){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=A,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],A=n[1],c=n[4],l=n[7],u=n[2],d=n[5],h=n[8],f=r[0],p=r[3],m=r[6],g=r[1],v=r[4],y=r[7],w=r[2],b=r[5],B=r[8];return i[0]=o*f+a*g+s*w,i[3]=o*p+a*v+s*b,i[6]=o*m+a*y+s*B,i[1]=A*f+c*g+l*w,i[4]=A*p+c*v+l*b,i[7]=A*m+c*y+l*B,i[2]=u*f+d*g+h*w,i[5]=u*p+d*v+h*b,i[8]=u*m+d*y+h*B,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],c=e[8];return t*o*c-t*a*A-n*i*c+n*a*s+r*i*A-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],c=e[8],l=c*o-a*A,u=a*s-c*i,d=A*i-o*s,h=t*l+n*u+r*d;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);const f=1/h;return e[0]=l*f,e[1]=(r*A-c*n)*f,e[2]=(a*n-r*o)*f,e[3]=u*f,e[4]=(c*t-r*s)*f,e[5]=(r*i-a*t)*f,e[6]=d*f,e[7]=(n*s-A*t)*f,e[8]=(o*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),A=Math.sin(i);return this.set(n*s,n*A,-n*(s*o+A*a)+o+e,-r*A,r*s,-r*(-A*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],A=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*A,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*A,r[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function zh(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}Nh.prototype.isMatrix3=!0;Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Vh(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function jh(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Kh(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Gh={[wh]:{[bh]:jh},[bh]:{[wh]:Kh}},Wh={legacyMode:!0,get workingColorSpace(){return bh},set workingColorSpace(e){},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(Gh[t]&&void 0!==Gh[t][n]){const r=Gh[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},qh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xh={r:0,g:0,b:0},Jh={h:0,s:0,l:0},Yh={h:0,s:0,l:0};function Zh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function $h(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class ef{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t="srgb"){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Wh.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r="srgb-linear"){return this.r=e,this.g=t,this.b=n,Wh.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r="srgb-linear"){if(e=Ih(e,1),t=Lh(t,0,1),n=Lh(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Zh(i,r,e+1/3),this.g=Zh(i,r,e),this.b=Zh(i,r,e-1/3)}return Wh.toWorkingColorSpace(this,r),this}setStyle(e,t="srgb"){function n(e){void 0!==e&&parseFloat(e)}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Wh.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Wh.toWorkingColorSpace(this,t),n(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){const r=parseFloat(e[1])/360,i=parseInt(e[2],10)/100,o=parseInt(e[3],10)/100;return n(e[4]),this.setHSL(r,i,o,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=r[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Wh.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Wh.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t="srgb"){const n=qh[e.toLowerCase()];return void 0!==n&&this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=jh(e.r),this.g=jh(e.g),this.b=jh(e.b),this}copyLinearToSRGB(e){return this.r=Kh(e.r),this.g=Kh(e.g),this.b=Kh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e="srgb"){return Wh.fromWorkingColorSpace($h(this,Xh),e),Lh(255*Xh.r,0,255)<<16^Lh(255*Xh.g,0,255)<<8^Lh(255*Xh.b,0,255)<<0}getHexString(e="srgb"){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t="srgb-linear"){Wh.fromWorkingColorSpace($h(this,Xh),t);const n=Xh.r,r=Xh.g,i=Xh.b,o=Math.max(n,r,i),a=Math.min(n,r,i);let s,A;const c=(a+o)/2;if(a===o)s=0,A=0;else{const e=o-a;switch(A=c<=.5?e/(o+a):e/(2-o-a),o){case n:s=(r-i)/e+(r<i?6:0);break;case r:s=(i-n)/e+2;break;case i:s=(n-r)/e+4}s/=6}return e.h=s,e.s=A,e.l=c,e}getRGB(e,t="srgb-linear"){return Wh.fromWorkingColorSpace($h(this,Xh),t),e.r=Xh.r,e.g=Xh.g,e.b=Xh.b,e}getStyle(e="srgb"){return Wh.fromWorkingColorSpace($h(this,Xh),e),e!==wh?`color(${e} ${Xh.r} ${Xh.g} ${Xh.b})`:`rgb(${255*Xh.r|0},${255*Xh.g|0},${255*Xh.b|0})`}offsetHSL(e,t,n){return this.getHSL(Jh),Jh.h+=e,Jh.s+=t,Jh.l+=n,this.setHSL(Jh.h,Jh.s,Jh.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Jh),e.getHSL(Yh);const n=kh(Jh.h,Yh.h,t),r=kh(Jh.s,Yh.s,t),i=kh(Jh.l,Yh.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}let tf;ef.NAMES=qh,ef.prototype.isColor=!0,ef.prototype.r=1,ef.prototype.g=1,ef.prototype.b=1;class nf{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===tf&&(tf=Vh("canvas")),tf.width=e.width,tf.height=e.height;const n=tf.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=tf}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=Vh("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*jh(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*jh(t[e]/255)):t[e]=jh(t[e]);return{data:t,width:e.width,height:e.height}}return e}}class rf{constructor(e=null){this.uuid=Qh(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(of(r[t].image)):e.push(of(r[t]))}else e=of(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function of(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?nf.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:{}}rf.prototype.isSource=!0;let af=0;class sf extends Eh{constructor(e=sf.DEFAULT_IMAGE,t=sf.DEFAULT_MAPPING,n=1001,r=1001,i=1006,o=1008,a=1023,s=1009,A=1,c=3e3){super(),Object.defineProperty(this,"id",{value:af++}),this.uuid=Qh(),this.name="",this.source=new rf(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=A,this.format=a,this.internalFormat=null,this.type=s,this.offset=new Rh(0,0),this.repeat=new Rh(1,1),this.center=new Rh(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Nh,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Vd:e.x=e.x-Math.floor(e.x);break;case jd:e.x=e.x<0?0:1;break;case Kd:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Vd:e.y=e.y-Math.floor(e.y);break;case jd:e.y=e.y<0?0:1;break;case Kd:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}sf.DEFAULT_IMAGE=null,sf.DEFAULT_MAPPING=300,sf.prototype.isTexture=!0;class Af{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?this.addVectors(e,t):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?this.subVectors(e,t):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=.01,a=.1,s=e.elements,A=s[0],c=s[4],l=s[8],u=s[1],d=s[5],h=s[9],f=s[2],p=s[6],m=s[10];if(Math.abs(c-u)<o&&Math.abs(l-f)<o&&Math.abs(h-p)<o){if(Math.abs(c+u)<a&&Math.abs(l+f)<a&&Math.abs(h+p)<a&&Math.abs(A+d+m-3)<a)return this.set(1,0,0,0),this;t=Math.PI;const e=(A+1)/2,s=(d+1)/2,g=(m+1)/2,v=(c+u)/4,y=(l+f)/4,w=(h+p)/4;return e>s&&e>g?e<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=v/n,i=y/n):s>g?s<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=v/r,i=w/r):g<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(g),n=y/i,r=w/i),this.set(n,r,i,t),this}let g=Math.sqrt((p-h)*(p-h)+(l-f)*(l-f)+(u-c)*(u-c));return Math.abs(g)<.001&&(g=1),this.x=(p-h)/g,this.y=(l-f)/g,this.z=(u-c)/g,this.w=Math.acos((A+d+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}Af.prototype.isVector4=!0;class cf extends Eh{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Af(0,0,e,t),this.scissorTest=!1,this.viewport=new Af(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new sf(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Xd,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0,this.texture.image=Object.assign({},e.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}cf.prototype.isWebGLRenderTarget=!0;class lf extends sf{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=Gd,this.minFilter=Gd,this.wrapR=jd,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}lf.prototype.isDataArrayTexture=!0;(class extends cf{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new lf(null,e,t,n),this.texture.isRenderTargetTexture=!0}}).prototype.isWebGLArrayRenderTarget=!0;class uf extends sf{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=Gd,this.minFilter=Gd,this.wrapR=jd,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}uf.prototype.isData3DTexture=!0;(class extends cf{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new uf(null,e,t,n),this.texture.isRenderTargetTexture=!0}}).prototype.isWebGL3DRenderTarget=!0;(class extends cf{constructor(e,t,n,r={}){super(e,t,r);const i=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=i.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class df{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],A=n[r+1],c=n[r+2],l=n[r+3];const u=i[o+0],d=i[o+1],h=i[o+2],f=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=A,e[t+2]=c,void(e[t+3]=l);if(1===a)return e[t+0]=u,e[t+1]=d,e[t+2]=h,void(e[t+3]=f);if(l!==f||s!==u||A!==d||c!==h){let e=1-a;const t=s*u+A*d+c*h+l*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+u*i,A=A*e+d*i,c=c*e+h*i,l=l*e+f*i,e===1-a){const e=1/Math.sqrt(s*s+A*A+c*c+l*l);s*=e,A*=e,c*=e,l*=e}}e[t]=s,e[t+1]=A,e[t+2]=c,e[t+3]=l}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],A=n[r+2],c=n[r+3],l=i[o],u=i[o+1],d=i[o+2],h=i[o+3];return e[t]=a*h+c*l+s*d-A*u,e[t+1]=s*h+c*u+A*l-a*d,e[t+2]=A*h+c*d+a*u-s*l,e[t+3]=c*h-a*l-s*u-A*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,A=a(n/2),c=a(r/2),l=a(i/2),u=s(n/2),d=s(r/2),h=s(i/2);switch(o){case"XYZ":this._x=u*c*l+A*d*h,this._y=A*d*l-u*c*h,this._z=A*c*h+u*d*l,this._w=A*c*l-u*d*h;break;case"YXZ":this._x=u*c*l+A*d*h,this._y=A*d*l-u*c*h,this._z=A*c*h-u*d*l,this._w=A*c*l+u*d*h;break;case"ZXY":this._x=u*c*l-A*d*h,this._y=A*d*l+u*c*h,this._z=A*c*h+u*d*l,this._w=A*c*l-u*d*h;break;case"ZYX":this._x=u*c*l-A*d*h,this._y=A*d*l+u*c*h,this._z=A*c*h-u*d*l,this._w=A*c*l+u*d*h;break;case"YZX":this._x=u*c*l+A*d*h,this._y=A*d*l+u*c*h,this._z=A*c*h-u*d*l,this._w=A*c*l-u*d*h;break;case"XZY":this._x=u*c*l-A*d*h,this._y=A*d*l-u*c*h,this._z=A*c*h+u*d*l,this._w=A*c*l+u*d*h}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],A=t[2],c=t[6],l=t[10],u=n+a+l;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-A)*e,this._z=(o-r)*e}else if(n>a&&n>l){const e=2*Math.sqrt(1+n-a-l);this._w=(c-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+A)/e}else if(a>l){const e=2*Math.sqrt(1+a-n-l);this._w=(i-A)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+l-n-a);this._w=(o-r)/e,this._x=(i+A)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Lh(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?this.multiplyQuaternions(e,t):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,A=t._z,c=t._w;return this._x=n*c+o*a+r*A-i*s,this._y=r*c+o*s+i*a-n*A,this._z=i*c+o*A+n*s-r*a,this._w=o*c-n*a-r*s-i*A,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const A=Math.sqrt(s),c=Math.atan2(A,a),l=Math.sin((1-t)*c)/A,u=Math.sin(t*c)/A;return this._w=o*l+this._w*u,this._x=n*l+this._x*u,this._y=r*l+this._y*u,this._z=i*l+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}df.prototype.isQuaternion=!0;class hf{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?this.addVectors(e,t):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?this.subVectors(e,t):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?this.multiplyVectors(e,t):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return!e||e.isEuler,this.applyQuaternion(pf.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(pf.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,A=s*t+o*r-a*n,c=s*n+a*t-i*r,l=s*r+i*n-o*t,u=-i*t-o*n-a*r;return this.x=A*s+u*-i+c*-a-l*-o,this.y=c*s+u*-o+l*-i-A*-a,this.z=l*s+u*-a+A*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?this.crossVectors(e,t):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ff.copy(this).projectOnVector(e),this.sub(ff)}reflect(e){return this.sub(ff.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Lh(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}hf.prototype.isVector3=!0;const ff=new hf,pf=new df;class mf{constructor(e=new hf(1/0,1/0,1/0),t=new hf(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,A=e.length;s<A;s+=3){const A=e[s],c=e[s+1],l=e[s+2];A<t&&(t=A),c<n&&(n=c),l<r&&(r=l),A>i&&(i=A),c>o&&(o=c),l>a&&(a=l)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,A=e.count;s<A;s++){const A=e.getX(s),c=e.getY(s),l=e.getZ(s);A<t&&(t=A),c<n&&(n=c),l<r&&(r=l),A>i&&(i=A),c>o&&(o=c),l>a&&(a=l)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=vf.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)vf.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(vf)}else null===n.boundingBox&&n.computeBoundingBox(),yf.copy(n.boundingBox),yf.applyMatrix4(e.matrixWorld),this.union(yf);const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,vf),vf.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Sf),Ef.subVectors(this.max,Sf),wf.subVectors(e.a,Sf),bf.subVectors(e.b,Sf),Bf.subVectors(e.c,Sf),_f.subVectors(bf,wf),xf.subVectors(Bf,bf),Cf.subVectors(wf,Bf);let t=[0,-_f.z,_f.y,0,-xf.z,xf.y,0,-Cf.z,Cf.y,_f.z,0,-_f.x,xf.z,0,-xf.x,Cf.z,0,-Cf.x,-_f.y,_f.x,0,-xf.y,xf.x,0,-Cf.y,Cf.x,0];return!!Ff(t,wf,bf,Bf,Ef)&&(t=[1,0,0,0,1,0,0,0,1],!!Ff(t,wf,bf,Bf,Ef)&&(Mf.crossVectors(_f,xf),t=[Mf.x,Mf.y,Mf.z],Ff(t,wf,bf,Bf,Ef)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return vf.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(vf).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(gf[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),gf[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),gf[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),gf[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),gf[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),gf[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),gf[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),gf[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(gf)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}mf.prototype.isBox3=!0;const gf=[new hf,new hf,new hf,new hf,new hf,new hf,new hf,new hf],vf=new hf,yf=new mf,wf=new hf,bf=new hf,Bf=new hf,_f=new hf,xf=new hf,Cf=new hf,Sf=new hf,Ef=new hf,Mf=new hf,Uf=new hf;function Ff(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){Uf.fromArray(e,o);const a=i.x*Math.abs(Uf.x)+i.y*Math.abs(Uf.y)+i.z*Math.abs(Uf.z),s=t.dot(Uf),A=n.dot(Uf),c=r.dot(Uf);if(Math.max(-Math.max(s,A,c),Math.min(s,A,c))>a)return!1}return!0}const Tf=new mf,Qf=new hf,Lf=new hf,If=new hf;class kf{constructor(e=new hf,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Tf.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){If.subVectors(e,this.center);const t=If.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(If.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return!0===this.center.equals(e.center)?Lf.set(0,0,1).multiplyScalar(e.radius):Lf.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Qf.copy(e.center).add(Lf)),this.expandByPoint(Qf.copy(e.center).sub(Lf)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Pf=new hf,Of=new hf,Df=new hf,Hf=new hf,Rf=new hf,Nf=new hf,zf=new hf;class Vf{constructor(e=new hf,t=new hf(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Pf)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Pf.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Pf.copy(this.direction).multiplyScalar(t).add(this.origin),Pf.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Of.copy(e).add(t).multiplyScalar(.5),Df.copy(t).sub(e).normalize(),Hf.copy(this.origin).sub(Of);const i=.5*e.distanceTo(t),o=-this.direction.dot(Df),a=Hf.dot(this.direction),s=-Hf.dot(Df),A=Hf.lengthSq(),c=Math.abs(1-o*o);let l,u,d,h;if(c>0)if(l=o*s-a,u=o*a-s,h=i*c,l>=0)if(u>=-h)if(u<=h){const e=1/c;l*=e,u*=e,d=l*(l+o*u+2*a)+u*(o*l+u+2*s)+A}else u=i,l=Math.max(0,-(o*u+a)),d=-l*l+u*(u+2*s)+A;else u=-i,l=Math.max(0,-(o*u+a)),d=-l*l+u*(u+2*s)+A;else u<=-h?(l=Math.max(0,-(-o*i+a)),u=l>0?-i:Math.min(Math.max(-i,-s),i),d=-l*l+u*(u+2*s)+A):u<=h?(l=0,u=Math.min(Math.max(-i,-s),i),d=u*(u+2*s)+A):(l=Math.max(0,-(o*i+a)),u=l>0?i:Math.min(Math.max(-i,-s),i),d=-l*l+u*(u+2*s)+A);else u=o>0?-i:i,l=Math.max(0,-(o*u+a)),d=-l*l+u*(u+2*s)+A;return n&&n.copy(this.direction).multiplyScalar(l).add(this.origin),r&&r.copy(Df).multiplyScalar(u).add(Of),d}intersectSphere(e,t){Pf.subVectors(e.center,this.origin);const n=Pf.dot(this.direction),r=Pf.dot(Pf)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const A=1/this.direction.x,c=1/this.direction.y,l=1/this.direction.z,u=this.origin;return A>=0?(n=(e.min.x-u.x)*A,r=(e.max.x-u.x)*A):(n=(e.max.x-u.x)*A,r=(e.min.x-u.x)*A),c>=0?(i=(e.min.y-u.y)*c,o=(e.max.y-u.y)*c):(i=(e.max.y-u.y)*c,o=(e.min.y-u.y)*c),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(e.min.z-u.z)*l,s=(e.max.z-u.z)*l):(a=(e.max.z-u.z)*l,s=(e.min.z-u.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Pf)}intersectTriangle(e,t,n,r,i){Rf.subVectors(t,e),Nf.subVectors(n,e),zf.crossVectors(Rf,Nf);let o,a=this.direction.dot(zf);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Hf.subVectors(this.origin,e);const s=o*this.direction.dot(Nf.crossVectors(Hf,Nf));if(s<0)return null;const A=o*this.direction.dot(Rf.cross(Hf));if(A<0)return null;if(s+A>a)return null;const c=-o*Hf.dot(zf);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class jf{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,r,i,o,a,s,A,c,l,u,d,h,f,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=i,m[5]=o,m[9]=a,m[13]=s,m[2]=A,m[6]=c,m[10]=l,m[14]=u,m[3]=d,m[7]=h,m[11]=f,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new jf).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/Kf.setFromMatrixColumn(e,0).length(),i=1/Kf.setFromMatrixColumn(e,1).length(),o=1/Kf.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){!e||e.isEuler;const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),A=Math.sin(r),c=Math.cos(i),l=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*l,r=a*c,i=a*l;t[0]=s*c,t[4]=-s*l,t[8]=A,t[1]=n+r*A,t[5]=e-i*A,t[9]=-a*s,t[2]=i-e*A,t[6]=r+n*A,t[10]=o*s}else if("YXZ"===e.order){const e=s*c,n=s*l,r=A*c,i=A*l;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*A,t[1]=o*l,t[5]=o*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*c,n=s*l,r=A*c,i=A*l;t[0]=e-i*a,t[4]=-o*l,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*c,t[9]=i-e*a,t[2]=-o*A,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*c,n=o*l,r=a*c,i=a*l;t[0]=s*c,t[4]=r*A-n,t[8]=e*A+i,t[1]=s*l,t[5]=i*A+e,t[9]=n*A-r,t[2]=-A,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*A,r=a*s,i=a*A;t[0]=s*c,t[4]=i-e*l,t[8]=r*l+n,t[1]=l,t[5]=o*c,t[9]=-a*c,t[2]=-A*c,t[6]=n*l+r,t[10]=e-i*l}else if("XZY"===e.order){const e=o*s,n=o*A,r=a*s,i=a*A;t[0]=s*c,t[4]=-l,t[8]=A*c,t[1]=e*l+i,t[5]=o*c,t[9]=n*l-r,t[2]=r*l-n,t[6]=a*c,t[10]=i*l+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Wf,e,qf)}lookAt(e,t,n){const r=this.elements;return Yf.subVectors(e,t),0===Yf.lengthSq()&&(Yf.z=1),Yf.normalize(),Xf.crossVectors(n,Yf),0===Xf.lengthSq()&&(1===Math.abs(n.z)?Yf.x+=1e-4:Yf.z+=1e-4,Yf.normalize(),Xf.crossVectors(n,Yf)),Xf.normalize(),Jf.crossVectors(Yf,Xf),r[0]=Xf.x,r[4]=Jf.x,r[8]=Yf.x,r[1]=Xf.y,r[5]=Jf.y,r[9]=Yf.y,r[2]=Xf.z,r[6]=Jf.z,r[10]=Yf.z,this}multiply(e,t){return void 0!==t?this.multiplyMatrices(e,t):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],A=n[12],c=n[1],l=n[5],u=n[9],d=n[13],h=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],y=n[11],w=n[15],b=r[0],B=r[4],_=r[8],x=r[12],C=r[1],S=r[5],E=r[9],M=r[13],U=r[2],F=r[6],T=r[10],Q=r[14],L=r[3],I=r[7],k=r[11],P=r[15];return i[0]=o*b+a*C+s*U+A*L,i[4]=o*B+a*S+s*F+A*I,i[8]=o*_+a*E+s*T+A*k,i[12]=o*x+a*M+s*Q+A*P,i[1]=c*b+l*C+u*U+d*L,i[5]=c*B+l*S+u*F+d*I,i[9]=c*_+l*E+u*T+d*k,i[13]=c*x+l*M+u*Q+d*P,i[2]=h*b+f*C+p*U+m*L,i[6]=h*B+f*S+p*F+m*I,i[10]=h*_+f*E+p*T+m*k,i[14]=h*x+f*M+p*Q+m*P,i[3]=g*b+v*C+y*U+w*L,i[7]=g*B+v*S+y*F+w*I,i[11]=g*_+v*E+y*T+w*k,i[15]=g*x+v*M+y*Q+w*P,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],A=e[13],c=e[2],l=e[6],u=e[10],d=e[14];return e[3]*(+i*s*l-r*A*l-i*a*u+n*A*u+r*a*d-n*s*d)+e[7]*(+t*s*d-t*A*u+i*o*u-r*o*d+r*A*c-i*s*c)+e[11]*(+t*A*l-t*a*d-i*o*l+n*o*d+i*a*c-n*A*c)+e[15]*(-r*a*c-t*s*l+t*a*u+r*o*l-n*o*u+n*s*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],c=e[8],l=e[9],u=e[10],d=e[11],h=e[12],f=e[13],p=e[14],m=e[15],g=l*p*A-f*u*A+f*s*d-a*p*d-l*s*m+a*u*m,v=h*u*A-c*p*A-h*s*d+o*p*d+c*s*m-o*u*m,y=c*f*A-h*l*A+h*a*d-o*f*d-c*a*m+o*l*m,w=h*l*s-c*f*s-h*a*u+o*f*u+c*a*p-o*l*p,b=t*g+n*v+r*y+i*w;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const B=1/b;return e[0]=g*B,e[1]=(f*u*i-l*p*i-f*r*d+n*p*d+l*r*m-n*u*m)*B,e[2]=(a*p*i-f*s*i+f*r*A-n*p*A-a*r*m+n*s*m)*B,e[3]=(l*s*i-a*u*i-l*r*A+n*u*A+a*r*d-n*s*d)*B,e[4]=v*B,e[5]=(c*p*i-h*u*i+h*r*d-t*p*d-c*r*m+t*u*m)*B,e[6]=(h*s*i-o*p*i-h*r*A+t*p*A+o*r*m-t*s*m)*B,e[7]=(o*u*i-c*s*i+c*r*A-t*u*A-o*r*d+t*s*d)*B,e[8]=y*B,e[9]=(h*l*i-c*f*i-h*n*d+t*f*d+c*n*m-t*l*m)*B,e[10]=(o*f*i-h*a*i+h*n*A-t*f*A-o*n*m+t*a*m)*B,e[11]=(c*a*i-o*l*i-c*n*A+t*l*A+o*n*d-t*a*d)*B,e[12]=w*B,e[13]=(c*f*r-h*l*r+h*n*u-t*f*u-c*n*p+t*l*p)*B,e[14]=(h*a*r-o*f*r-h*n*s+t*f*s+o*n*p-t*a*p)*B,e[15]=(o*l*r-c*a*r+c*n*s-t*l*s-o*n*u+t*a*u)*B,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,A=i*o,c=i*a;return this.set(A*o+n,A*a-r*s,A*s+r*a,0,A*a+r*s,c*a+n,c*s-r*o,0,A*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,A=i+i,c=o+o,l=a+a,u=i*A,d=i*c,h=i*l,f=o*c,p=o*l,m=a*l,g=s*A,v=s*c,y=s*l,w=n.x,b=n.y,B=n.z;return r[0]=(1-(f+m))*w,r[1]=(d+y)*w,r[2]=(h-v)*w,r[3]=0,r[4]=(d-y)*b,r[5]=(1-(u+m))*b,r[6]=(p+g)*b,r[7]=0,r[8]=(h+v)*B,r[9]=(p-g)*B,r[10]=(1-(u+f))*B,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=Kf.set(r[0],r[1],r[2]).length();const o=Kf.set(r[4],r[5],r[6]).length(),a=Kf.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Gf.copy(this);const s=1/i,A=1/o,c=1/a;return Gf.elements[0]*=s,Gf.elements[1]*=s,Gf.elements[2]*=s,Gf.elements[4]*=A,Gf.elements[5]*=A,Gf.elements[6]*=A,Gf.elements[8]*=c,Gf.elements[9]*=c,Gf.elements[10]*=c,t.setFromRotationMatrix(Gf),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){const a=this.elements,s=2*i/(t-e),A=2*i/(n-r),c=(t+e)/(t-e),l=(n+r)/(n-r),u=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=A,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),A=1/(n-r),c=1/(o-i),l=(t+e)*s,u=(n+r)*A,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*A,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}jf.prototype.isMatrix4=!0;const Kf=new hf,Gf=new jf,Wf=new hf(0,0,0),qf=new hf(1,1,1),Xf=new hf,Jf=new hf,Yf=new hf,Zf=new jf,$f=new df;class ep{constructor(e=0,t=0,n=0,r=ep.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],A=r[5],c=r[9],l=r[2],u=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Lh(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(u,A),this._z=0);break;case"YXZ":this._x=Math.asin(-Lh(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(s,A)):(this._y=Math.atan2(-l,i),this._z=0);break;case"ZXY":this._x=Math.asin(Lh(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-l,d),this._z=Math.atan2(-o,A)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-Lh(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,A));break;case"YZX":this._z=Math.asin(Lh(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,A),this._y=Math.atan2(-l,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Lh(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,A),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Zf.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Zf,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return $f.setFromEuler(this),this.setFromQuaternion($f,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ep.prototype.isEuler=!0,ep.DefaultOrder="XYZ",ep.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class tp{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let np=0;const rp=new hf,ip=new df,op=new jf,ap=new hf,sp=new hf,Ap=new hf,cp=new df,lp=new hf(1,0,0),up=new hf(0,1,0),dp=new hf(0,0,1),hp={type:"added"},fp={type:"removed"};class pp extends Eh{constructor(){super(),Object.defineProperty(this,"id",{value:np++}),this.uuid=Qh(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=pp.DefaultUp.clone();const e=new hf,t=new ep,n=new df,r=new hf(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new jf},normalMatrix:{value:new Nh}}),this.matrix=new jf,this.matrixWorld=new jf,this.matrixAutoUpdate=pp.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new tp,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ip.setFromAxisAngle(e,t),this.quaternion.multiply(ip),this}rotateOnWorldAxis(e,t){return ip.setFromAxisAngle(e,t),this.quaternion.premultiply(ip),this}rotateX(e){return this.rotateOnAxis(lp,e)}rotateY(e){return this.rotateOnAxis(up,e)}rotateZ(e){return this.rotateOnAxis(dp,e)}translateOnAxis(e,t){return rp.copy(e).applyQuaternion(this.quaternion),this.position.add(rp.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(lp,e)}translateY(e){return this.translateOnAxis(up,e)}translateZ(e){return this.translateOnAxis(dp,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(op.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?ap.copy(e):ap.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),sp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?op.lookAt(sp,ap,this.up):op.lookAt(ap,sp,this.up),this.quaternion.setFromRotationMatrix(op),r&&(op.extractRotation(r.matrixWorld),ip.setFromRotationMatrix(op),this.quaternion.premultiply(ip.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this||e&&e.isObject3D&&(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(hp)),this}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(fp)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(fp)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),op.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),op.multiply(e.parent.matrixWorld)),e.applyMatrix4(op),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sp,e,Ap),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sp,cp,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),A=o(e.skeletons),c=o(e.animations),l=o(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),A.length>0&&(n.skeletons=A),c.length>0&&(n.animations=c),l.length>0&&(n.nodes=l)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}pp.DefaultUp=new hf(0,1,0),pp.DefaultMatrixAutoUpdate=!0,pp.prototype.isObject3D=!0;const mp=new hf,gp=new hf,vp=new hf,yp=new hf,wp=new hf,bp=new hf,Bp=new hf,_p=new hf,xp=new hf,Cp=new hf;class Sp{constructor(e=new hf,t=new hf,n=new hf){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),mp.subVectors(e,t),r.cross(mp);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){mp.subVectors(r,t),gp.subVectors(n,t),vp.subVectors(e,t);const o=mp.dot(mp),a=mp.dot(gp),s=mp.dot(vp),A=gp.dot(gp),c=gp.dot(vp),l=o*A-a*a;if(0===l)return i.set(-2,-1,-1);const u=1/l,d=(A*s-a*c)*u,h=(o*c-a*s)*u;return i.set(1-d-h,h,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,yp),yp.x>=0&&yp.y>=0&&yp.x+yp.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,yp),s.set(0,0),s.addScaledVector(i,yp.x),s.addScaledVector(o,yp.y),s.addScaledVector(a,yp.z),s}static isFrontFacing(e,t,n,r){return mp.subVectors(n,t),gp.subVectors(e,t),mp.cross(gp).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return mp.subVectors(this.c,this.b),gp.subVectors(this.a,this.b),.5*mp.cross(gp).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Sp.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Sp.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return Sp.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Sp.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Sp.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,a;wp.subVectors(r,n),bp.subVectors(i,n),_p.subVectors(e,n);const s=wp.dot(_p),A=bp.dot(_p);if(s<=0&&A<=0)return t.copy(n);xp.subVectors(e,r);const c=wp.dot(xp),l=bp.dot(xp);if(c>=0&&l<=c)return t.copy(r);const u=s*l-c*A;if(u<=0&&s>=0&&c<=0)return o=s/(s-c),t.copy(n).addScaledVector(wp,o);Cp.subVectors(e,i);const d=wp.dot(Cp),h=bp.dot(Cp);if(h>=0&&d<=h)return t.copy(i);const f=d*A-s*h;if(f<=0&&A>=0&&h<=0)return a=A/(A-h),t.copy(n).addScaledVector(bp,a);const p=c*h-d*l;if(p<=0&&l-c>=0&&d-h>=0)return Bp.subVectors(i,r),a=(l-c)/(l-c+(d-h)),t.copy(r).addScaledVector(Bp,a);const m=1/(p+f+u);return o=f*m,a=u*m,t.copy(n).addScaledVector(wp,o).addScaledVector(bp,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Ep=0;class Mp extends Eh{constructor(){super(),Object.defineProperty(this,"id",{value:Ep++}),this.uuid=Qh(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=Od,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Bh,this.stencilZFail=Bh,this.stencilZPass=Bh,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n)continue;if("shading"===t){this.flatShading=1===n;continue}const r=this[t];void 0!==r&&(r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}Mp.prototype.isMaterial=!0,Mp.fromType=function(){return null};class Up extends Mp{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new ef(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}Up.prototype.isMeshBasicMaterial=!0;const Fp=new hf,Tp=new Rh;class Qp{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=_h,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(i=new ef),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(i=new Rh),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(i=new hf),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(i=new Af),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)Tp.fromBufferAttribute(this,t),Tp.applyMatrix3(e),this.setXY(t,Tp.x,Tp.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Fp.fromBufferAttribute(this,t),Fp.applyMatrix3(e),this.setXYZ(t,Fp.x,Fp.y,Fp.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Fp.fromBufferAttribute(this,t),Fp.applyMatrix4(e),this.setXYZ(t,Fp.x,Fp.y,Fp.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Fp.fromBufferAttribute(this,t),Fp.applyNormalMatrix(e),this.setXYZ(t,Fp.x,Fp.y,Fp.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Fp.fromBufferAttribute(this,t),Fp.transformDirection(e),this.setXYZ(t,Fp.x,Fp.y,Fp.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==_h&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}Qp.prototype.isBufferAttribute=!0;class Lp extends Qp{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Ip extends Qp{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends Qp{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class kp extends Qp{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Pp=0;const Op=new jf,Dp=new pp,Hp=new hf,Rp=new mf,Np=new mf,zp=new hf;class Vp extends Eh{constructor(){super(),Object.defineProperty(this,"id",{value:Pp++}),this.uuid=Qh(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(zh(e)?Ip:Lp)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Nh).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Op.makeRotationFromQuaternion(e),this.applyMatrix4(Op),this}rotateX(e){return Op.makeRotationX(e),this.applyMatrix4(Op),this}rotateY(e){return Op.makeRotationY(e),this.applyMatrix4(Op),this}rotateZ(e){return Op.makeRotationZ(e),this.applyMatrix4(Op),this}translate(e,t,n){return Op.makeTranslation(e,t,n),this.applyMatrix4(Op),this}scale(e,t,n){return Op.makeScale(e,t,n),this.applyMatrix4(Op),this}lookAt(e){return Dp.lookAt(e),Dp.updateMatrix(),this.applyMatrix4(Dp.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Hp).negate(),this.translate(Hp.x,Hp.y,Hp.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new kp(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new mf);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)this.boundingBox.set(new hf(-1/0,-1/0,-1/0),new hf(1/0,1/0,1/0));else{if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Rp.setFromBufferAttribute(n),this.morphTargetsRelative?(zp.addVectors(this.boundingBox.min,Rp.min),this.boundingBox.expandByPoint(zp),zp.addVectors(this.boundingBox.max,Rp.max),this.boundingBox.expandByPoint(zp)):(this.boundingBox.expandByPoint(Rp.min),this.boundingBox.expandByPoint(Rp.max))}}else this.boundingBox.makeEmpty();isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new kf);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)this.boundingSphere.set(new hf,1/0);else if(e){const n=this.boundingSphere.center;if(Rp.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Np.setFromBufferAttribute(n),this.morphTargetsRelative?(zp.addVectors(Rp.min,Np.min),Rp.expandByPoint(zp),zp.addVectors(Rp.max,Np.max),Rp.expandByPoint(zp)):(Rp.expandByPoint(Np.min),Rp.expandByPoint(Np.max))}Rp.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)zp.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(zp));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)zp.fromBufferAttribute(o,t),a&&(Hp.fromBufferAttribute(e,t),zp.add(Hp)),r=Math.max(r,n.distanceToSquared(zp))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return;const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Qp(new Float32Array(4*a),4));const s=this.getAttribute("tangent").array,A=[],c=[];for(let e=0;e<a;e++)A[e]=new hf,c[e]=new hf;const l=new hf,u=new hf,d=new hf,h=new Rh,f=new Rh,p=new Rh,m=new hf,g=new hf;function v(e,t,n){l.fromArray(r,3*e),u.fromArray(r,3*t),d.fromArray(r,3*n),h.fromArray(o,2*e),f.fromArray(o,2*t),p.fromArray(o,2*n),u.sub(l),d.sub(l),f.sub(h),p.sub(h);const i=1/(f.x*p.y-p.x*f.y);isFinite(i)&&(m.copy(u).multiplyScalar(p.y).addScaledVector(d,-f.y).multiplyScalar(i),g.copy(d).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(i),A[e].add(m),A[t].add(m),A[n].add(m),c[e].add(g),c[t].add(g),c[n].add(g))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)v(n[e+0],n[e+1],n[e+2])}const w=new hf,b=new hf,B=new hf,_=new hf;function x(e){B.fromArray(i,3*e),_.copy(B);const t=A[e];w.copy(t),w.sub(B.multiplyScalar(B.dot(t))).normalize(),b.crossVectors(_,t);const n=b.dot(c[e])<0?-1:1;s[4*e]=w.x,s[4*e+1]=w.y,s[4*e+2]=w.z,s[4*e+3]=n}for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)x(n[e+0]),x(n[e+1]),x(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new Qp(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new hf,i=new hf,o=new hf,a=new hf,s=new hf,A=new hf,c=new hf,l=new hf;if(e)for(let u=0,d=e.count;u<d;u+=3){const d=e.getX(u+0),h=e.getX(u+1),f=e.getX(u+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,h),o.fromBufferAttribute(t,f),c.subVectors(o,i),l.subVectors(r,i),c.cross(l),a.fromBufferAttribute(n,d),s.fromBufferAttribute(n,h),A.fromBufferAttribute(n,f),a.add(c),s.add(c),A.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(f,A.x,A.y,A.z)}else for(let e=0,a=t.count;e<a;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),l.subVectors(r,i),c.cross(l),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return;void 0===t&&(t=0);const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,A=Math.min(a.length,i.length-s);for(let e=0,t=s;e<A;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)zp.fromBufferAttribute(e,t),zp.normalize(),e.setXYZ(t,zp.x,zp.y,zp.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let i=0,A=t.length;i<A;i++){a=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new Qp(o,r,i)}if(null===this.index)return this;const t=new Vp,n=this.index.array,r=this.attributes;for(const i in r){const o=e(r[i],n);t.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],a=i[r];for(let t=0,r=a.length;t<r;t++){const r=e(a[t],n);o.push(r)}t.morphAttributes[r]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];o.push(r.toJSON(e.data))}o.length>0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}Vp.prototype.isBufferGeometry=!0;const jp=new jf,Kp=new Vf,Gp=new kf,Wp=new hf,qp=new hf,Xp=new hf,Jp=new hf,Yp=new hf,Zp=new hf,$p=new hf,em=new hf,tm=new hf,nm=new Rh,rm=new Rh,im=new Rh,om=new hf,am=new hf;class sm extends pp{constructor(e=new Vp,t=new Up){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Gp.copy(n.boundingSphere),Gp.applyMatrix4(i),!1===e.ray.intersectsSphere(Gp))return;if(jp.copy(i).invert(),Kp.copy(e.ray).applyMatrix4(jp),null!==n.boundingBox&&!1===Kp.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,A=n.morphTargetsRelative,c=n.attributes.uv,l=n.attributes.uv2,u=n.groups,d=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,h=u.length;n<h;n++){const h=u[n],f=r[h.materialIndex];for(let n=Math.max(h.start,d.start),r=Math.min(i.count,Math.min(h.start+h.count,d.start+d.count));n<r;n+=3){const r=i.getX(n),u=i.getX(n+1),d=i.getX(n+2);o=Am(this,f,e,Kp,a,s,A,c,l,r,u,d),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=h.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),u=Math.min(i.count,d.start+d.count);n<u;n+=3){const u=i.getX(n),d=i.getX(n+1),h=i.getX(n+2);o=Am(this,r,e,Kp,a,s,A,c,l,u,d,h),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,i=u.length;n<i;n++){const i=u[n],h=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(a.count,Math.min(i.start+i.count,d.start+d.count));n<r;n+=3){o=Am(this,h,e,Kp,a,s,A,c,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),i=Math.min(a.count,d.start+d.count);n<i;n+=3){o=Am(this,r,e,Kp,a,s,A,c,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry}}function Am(e,t,n,r,i,o,a,s,A,c,l,u){Wp.fromBufferAttribute(i,c),qp.fromBufferAttribute(i,l),Xp.fromBufferAttribute(i,u);const d=e.morphTargetInfluences;if(o&&d){$p.set(0,0,0),em.set(0,0,0),tm.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=d[e],n=o[e];0!==t&&(Jp.fromBufferAttribute(n,c),Yp.fromBufferAttribute(n,l),Zp.fromBufferAttribute(n,u),a?($p.addScaledVector(Jp,t),em.addScaledVector(Yp,t),tm.addScaledVector(Zp,t)):($p.addScaledVector(Jp.sub(Wp),t),em.addScaledVector(Yp.sub(qp),t),tm.addScaledVector(Zp.sub(Xp),t)))}Wp.add($p),qp.add(em),Xp.add(tm)}e.isSkinnedMesh&&(e.boneTransform(c,Wp),e.boneTransform(l,qp),e.boneTransform(u,Xp));const h=function(e,t,n,r,i,o,a,s){let A;if(A=1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s),null===A)return null;am.copy(s),am.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(am);return c<n.near||c>n.far?null:{distance:c,point:am.clone(),object:e}}(e,t,n,r,Wp,qp,Xp,om);if(h){s&&(nm.fromBufferAttribute(s,c),rm.fromBufferAttribute(s,l),im.fromBufferAttribute(s,u),h.uv=Sp.getUV(om,Wp,qp,Xp,nm,rm,im,new Rh)),A&&(nm.fromBufferAttribute(A,c),rm.fromBufferAttribute(A,l),im.fromBufferAttribute(A,u),h.uv2=Sp.getUV(om,Wp,qp,Xp,nm,rm,im,new Rh));const e={a:c,b:l,c:u,normal:new hf,materialIndex:0};Sp.getNormal(Wp,qp,Xp,e.normal),h.face=e}return h}sm.prototype.isMesh=!0;class cm extends Vp{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],A=[],c=[],l=[];let u=0,d=0;function h(e,t,n,r,i,o,h,f,p,m,g){const v=o/p,y=h/m,w=o/2,b=h/2,B=f/2,_=p+1,x=m+1;let C=0,S=0;const E=new hf;for(let o=0;o<x;o++){const a=o*y-b;for(let s=0;s<_;s++){const u=s*v-w;E[e]=u*r,E[t]=a*i,E[n]=B,A.push(E.x,E.y,E.z),E[e]=0,E[t]=0,E[n]=f>0?1:-1,c.push(E.x,E.y,E.z),l.push(s/p),l.push(1-o/m),C+=1}}for(let e=0;e<m;e++)for(let t=0;t<p;t++){const n=u+t+_*e,r=u+t+_*(e+1),i=u+(t+1)+_*(e+1),o=u+(t+1)+_*e;s.push(n,r,o),s.push(r,i,o),S+=6}a.addGroup(d,S,g),d+=S,u+=C}h("z","y","x",-1,-1,n,t,e,o,i,0),h("z","y","x",1,-1,n,t,-e,o,i,1),h("x","z","y",1,1,e,n,t,r,o,2),h("x","z","y",1,-1,e,n,-t,r,o,3),h("x","y","z",1,-1,e,t,n,r,i,4),h("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new kp(A,3)),this.setAttribute("normal",new kp(c,3)),this.setAttribute("uv",new kp(l,2))}static fromJSON(e){return new cm(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function lm(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function um(e){const t={};for(let n=0;n<e.length;n++){const r=lm(e[n]);for(const e in r)t[e]=r[e]}return t}const dm={clone:lm,merge:um};class hm extends Mp{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(e.attributes,this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=lm(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}hm.prototype.isShaderMaterial=!0;class fm extends pp{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new jf,this.projectionMatrix=new jf,this.projectionMatrixInverse=new jf}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}fm.prototype.isCamera=!0;class pm extends fm{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Th*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Fh*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Th*Math.atan(Math.tan(.5*Fh*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Fh*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}pm.prototype.isPerspectiveCamera=!0;const mm=90;class gm extends pp{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return;this.renderTarget=n;const r=new pm(mm,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new hf(1,0,0)),this.add(r);const i=new pm(mm,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new hf(-1,0,0)),this.add(i);const o=new pm(mm,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new hf(0,1,0)),this.add(o);const a=new pm(mm,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new hf(0,-1,0)),this.add(a);const s=new pm(mm,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new hf(0,0,1)),this.add(s);const A=new pm(mm,1,e,t);A.layers=this.layers,A.up.set(0,-1,0),A.lookAt(new hf(0,0,-1)),this.add(A)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,A]=this.children,c=e.getRenderTarget(),l=e.outputEncoding,u=e.toneMapping,d=e.xr.enabled;e.outputEncoding=vh,e.toneMapping=0,e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,A),e.setRenderTarget(c),e.outputEncoding=l,e.toneMapping=u,e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class vm extends sf{constructor(e,t,n,r,i,o,a,s,A,c){super(e=void 0!==e?e:[],t=void 0!==t?t:Dd,n,r,i,o,a,s,A,c),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}vm.prototype.isCubeTexture=!0;class ym extends cf{constructor(e,t={}){super(e,e,t);const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new vm(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Xd}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new cm(5,5,5),i=new hm({name:"CubemapFromEquirect",uniforms:lm(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;const o=new sm(r,i),a=t.minFilter;t.minFilter===Yd&&(t.minFilter=Xd);return new gm(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}ym.prototype.isWebGLCubeRenderTarget=!0;const wm=new hf,bm=new hf,Bm=new Nh;class _m{constructor(e=new hf(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=wm.subVectors(n,t).cross(bm.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(wm),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Bm.getNormalMatrix(e),r=this.coplanarPoint(wm).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}_m.prototype.isPlane=!0;const xm=new kf,Cm=new hf;class Sm{constructor(e=new _m,t=new _m,n=new _m,r=new _m,i=new _m,o=new _m){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],A=n[5],c=n[6],l=n[7],u=n[8],d=n[9],h=n[10],f=n[11],p=n[12],m=n[13],g=n[14],v=n[15];return t[0].setComponents(a-r,l-s,f-u,v-p).normalize(),t[1].setComponents(a+r,l+s,f+u,v+p).normalize(),t[2].setComponents(a+i,l+A,f+d,v+m).normalize(),t[3].setComponents(a-i,l-A,f-d,v-m).normalize(),t[4].setComponents(a-o,l-c,f-h,v-g).normalize(),t[5].setComponents(a+o,l+c,f+h,v+g).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),xm.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(xm)}intersectsSprite(e){return xm.center.set(0,0,0),xm.radius=.7071067811865476,xm.applyMatrix4(e.matrixWorld),this.intersectsSphere(xm)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Cm.x=r.normal.x>0?e.max.x:e.min.x,Cm.y=r.normal.y>0?e.max.y:e.min.y,Cm.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Cm)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Em(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Mm(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();let s;if(e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback(),i instanceof Float32Array)s=5126;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");s=5131}else s=5123;else if(i instanceof Int16Array)s=5122;else if(i instanceof Uint32Array)s=5125;else if(i instanceof Int32Array)s=5124;else if(i instanceof Int8Array)s=5120;else if(i instanceof Uint8Array)s=5121;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);s=5121}return{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class Um extends Vp{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),A=a+1,c=s+1,l=e/a,u=t/s,d=[],h=[],f=[],p=[];for(let e=0;e<c;e++){const t=e*u-o;for(let n=0;n<A;n++){const r=n*l-i;h.push(r,-t,0),f.push(0,0,1),p.push(n/a),p.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<a;t++){const n=t+A*e,r=t+A*(e+1),i=t+1+A*(e+1),o=t+1+A*e;d.push(n,r,o),d.push(r,i,o)}this.setIndex(d),this.setAttribute("position",new kp(h,3)),this.setAttribute("normal",new kp(f,3)),this.setAttribute("uv",new kp(p,2))}static fromJSON(e){return new Um(e.width,e.height,e.widthSegments,e.heightSegments)}}const Fm={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tgl_FragColor = vec4( mix( pow( gl_FragColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), gl_FragColor.rgb * 0.0773993808, vec3( lessThanEqual( gl_FragColor.rgb, vec3( 0.04045 ) ) ) ), gl_FragColor.w );\n\t#endif\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Tm={common:{diffuse:{value:new ef(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Nh},uv2Transform:{value:new Nh},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Rh(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ef(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ef(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Nh}},sprite:{diffuse:{value:new ef(16777215)},opacity:{value:1},center:{value:new Rh(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Nh}}},Qm={basic:{uniforms:um([Tm.common,Tm.specularmap,Tm.envmap,Tm.aomap,Tm.lightmap,Tm.fog]),vertexShader:Fm.meshbasic_vert,fragmentShader:Fm.meshbasic_frag},lambert:{uniforms:um([Tm.common,Tm.specularmap,Tm.envmap,Tm.aomap,Tm.lightmap,Tm.emissivemap,Tm.fog,Tm.lights,{emissive:{value:new ef(0)}}]),vertexShader:Fm.meshlambert_vert,fragmentShader:Fm.meshlambert_frag},phong:{uniforms:um([Tm.common,Tm.specularmap,Tm.envmap,Tm.aomap,Tm.lightmap,Tm.emissivemap,Tm.bumpmap,Tm.normalmap,Tm.displacementmap,Tm.fog,Tm.lights,{emissive:{value:new ef(0)},specular:{value:new ef(1118481)},shininess:{value:30}}]),vertexShader:Fm.meshphong_vert,fragmentShader:Fm.meshphong_frag},standard:{uniforms:um([Tm.common,Tm.envmap,Tm.aomap,Tm.lightmap,Tm.emissivemap,Tm.bumpmap,Tm.normalmap,Tm.displacementmap,Tm.roughnessmap,Tm.metalnessmap,Tm.fog,Tm.lights,{emissive:{value:new ef(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Fm.meshphysical_vert,fragmentShader:Fm.meshphysical_frag},toon:{uniforms:um([Tm.common,Tm.aomap,Tm.lightmap,Tm.emissivemap,Tm.bumpmap,Tm.normalmap,Tm.displacementmap,Tm.gradientmap,Tm.fog,Tm.lights,{emissive:{value:new ef(0)}}]),vertexShader:Fm.meshtoon_vert,fragmentShader:Fm.meshtoon_frag},matcap:{uniforms:um([Tm.common,Tm.bumpmap,Tm.normalmap,Tm.displacementmap,Tm.fog,{matcap:{value:null}}]),vertexShader:Fm.meshmatcap_vert,fragmentShader:Fm.meshmatcap_frag},points:{uniforms:um([Tm.points,Tm.fog]),vertexShader:Fm.points_vert,fragmentShader:Fm.points_frag},dashed:{uniforms:um([Tm.common,Tm.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Fm.linedashed_vert,fragmentShader:Fm.linedashed_frag},depth:{uniforms:um([Tm.common,Tm.displacementmap]),vertexShader:Fm.depth_vert,fragmentShader:Fm.depth_frag},normal:{uniforms:um([Tm.common,Tm.bumpmap,Tm.normalmap,Tm.displacementmap,{opacity:{value:1}}]),vertexShader:Fm.meshnormal_vert,fragmentShader:Fm.meshnormal_frag},sprite:{uniforms:um([Tm.sprite,Tm.fog]),vertexShader:Fm.sprite_vert,fragmentShader:Fm.sprite_frag},background:{uniforms:{uvTransform:{value:new Nh},t2D:{value:null}},vertexShader:Fm.background_vert,fragmentShader:Fm.background_frag},cube:{uniforms:um([Tm.envmap,{opacity:{value:1}}]),vertexShader:Fm.cube_vert,fragmentShader:Fm.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Fm.equirect_vert,fragmentShader:Fm.equirect_frag},distanceRGBA:{uniforms:um([Tm.common,Tm.displacementmap,{referencePosition:{value:new hf},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Fm.distanceRGBA_vert,fragmentShader:Fm.distanceRGBA_frag},shadow:{uniforms:um([Tm.lights,Tm.fog,{color:{value:new ef(0)},opacity:{value:1}}]),vertexShader:Fm.shadow_vert,fragmentShader:Fm.shadow_frag}};function Lm(e,t,n,r,i,o){const a=new ef(0);let s,A,c=!0===i?0:1,l=null,u=0,d=null;function h(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,o)}return{getClearColor:function(){return a},setClearColor:function(e,t=1){a.set(e),c=t,h(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,h(a,c)},render:function(n,i){let o=!1,f=!0===i.isScene?i.background:null;f&&f.isTexture&&(f=t.get(f));const p=e.xr,m=p.getSession&&p.getSession();m&&"additive"===m.environmentBlendMode&&(f=null),null===f?h(a,c):f&&f.isColor&&(h(f,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),f&&(f.isCubeTexture||f.mapping===zd)?(void 0===A&&(A=new sm(new cm(1,1,1),new hm({name:"BackgroundCubeMaterial",uniforms:lm(Qm.cube.uniforms),vertexShader:Qm.cube.vertexShader,fragmentShader:Qm.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),A.geometry.deleteAttribute("normal"),A.geometry.deleteAttribute("uv"),A.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(A.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(A)),A.material.uniforms.envMap.value=f,A.material.uniforms.flipEnvMap.value=f.isCubeTexture&&!1===f.isRenderTargetTexture?-1:1,l===f&&u===f.version&&d===e.toneMapping||(A.material.needsUpdate=!0,l=f,u=f.version,d=e.toneMapping),n.unshift(A,A.geometry,A.material,0,0,null)):f&&f.isTexture&&(void 0===s&&(s=new sm(new Um(2,2),new hm({name:"BackgroundMaterial",uniforms:lm(Qm.background.uniforms),vertexShader:Qm.background.vertexShader,fragmentShader:Qm.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(s)),s.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),s.material.uniforms.uvTransform.value.copy(f.matrix),l===f&&u===f.version&&d===e.toneMapping||(s.material.needsUpdate=!0,l=f,u=f.version,d=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function Im(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},A=h(null);let c=A,l=!1;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){const o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){w(),l=!0,c!==A&&(c=A,u(c.object))}function w(){A.geometry=null,A.program=null,A.wireframe=!1}return{setup:function(i,A,d,y,w){let b=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let A=s[t.id];void 0===A&&(A={},s[t.id]=A);let c=A[n.id];void 0===c&&(c={},A[n.id]=c);let l=c[a];void 0===l&&(l=h(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=l);return l}(y,d,A);c!==t&&(c=t,u(c.object)),b=function(e,t){const n=c.attributes,r=e.attributes;let i=0;for(const e in r){const t=n[e],o=r[e];if(void 0===t)return!0;if(t.attribute!==o)return!0;if(t.data!==o.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,w),b&&function(e,t){const n={},r=e.attributes;let i=0;for(const e in r){const t=r[e],o={};o.attribute=t,t.data&&(o.data=t.data),n[e]=o,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,w)}else{const e=!0===A.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,b=!0)}!0===i.isInstancedMesh&&(b=!0),null!==w&&n.update(w,34963),(b||l)&&(l=!1,function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const A=s.attributes,c=a.getAttributes(),l=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let o=A[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,a=o.itemSize,A=n.get(o);if(void 0===A)continue;const c=A.buffer,l=A.type,u=A.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,A=n.stride,d=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)m(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)p(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)v(r.location+e,a/r.locationSize,l,t,A*u,(d+a/r.locationSize*e)*u)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)m(r.location+e,o.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)}else for(let e=0;e<r.locationSize;e++)p(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)v(r.location+e,a/r.locationSize,l,t,a*u,a/r.locationSize*e*u)}}else if(void 0!==l){const n=l[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}g()}(i,A,d,y),null!==w&&e.bindBuffer(34963,n.get(w).buffer))},reset:y,resetDefaultState:w,dispose:function(){y();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)d(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function km(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let A,c;if(i)A=e,c="drawArraysInstanced";else if(A=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===A)return;A[c](o,r,a,s),n.update(a,o,s)}}function Pm(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(a=s);const A=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,l=e.getParameter(34930),u=e.getParameter(35660),d=e.getParameter(3379),h=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:A,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:l,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:h,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function Om(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new _m,s=new Nh,A={value:null,needsUpdate:!1};function c(){A.value!==n&&(A.value=n,A.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function l(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=A.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=r;t!==o;++t,n+=4)a.copy(e[t]).applyMatrix4(i,s),a.normal.toArray(c,n),c[n+3]=a.constant}A.value=c,A.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=A,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=l(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,l(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){const u=t.clippingPlanes,d=t.clipIntersection,h=t.clipShadows,f=e.get(t);if(!i||null===u||0===u.length||o&&!h)o?l(null):c();else{const e=o?0:r,t=4*e;let i=f.clippingState||null;A.value=i,i=l(u,a,t,s);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function Dm(e){let t=new WeakMap;function n(e,t){return t===Rd?e.mapping=Dd:t===Nd&&(e.mapping=Hd),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const o=i.mapping;if(o===Rd||o===Nd){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=new ym(o.height/2);return a.fromEquirectangularTexture(e,i),t.set(i,a),i.addEventListener("dispose",r),n(a.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}Qm.physical={uniforms:um([Qm.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Rh(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new ef(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Rh},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new ef(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new ef(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Fm.meshphysical_vert,fragmentShader:Fm.meshphysical_frag};class Hm extends fm{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}Hm.prototype.isOrthographicCamera=!0;const Rm=[.125,.215,.35,.446,.526,.582],Nm=20,zm=new Hm,Vm=new ef;let jm=null;const Km=(1+Math.sqrt(5))/2,Gm=1/Km,Wm=[new hf(1,1,1),new hf(-1,1,1),new hf(1,1,-1),new hf(-1,1,-1),new hf(0,Km,Gm),new hf(0,Km,-Gm),new hf(Gm,0,Km),new hf(-Gm,0,Km),new hf(Km,Gm,0),new hf(-Km,Gm,0)];class qm{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){jm=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Zm(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Ym(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(jm),e.scissorTest=!1,Jm(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Dd||e.mapping===Hd?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),jm=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize-32,n={magFilter:Xd,minFilter:Xd,generateMipmaps:!1,type:nh,format:ih,encoding:vh,depthBuffer:!1},r=Xm(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Xm(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const o=e-4+1+Rm.length;for(let a=0;a<o;a++){const o=Math.pow(2,i);n.push(o);let s=1/o;a>e-4?s=Rm[a-e+4-1]:0===a&&(s=0),r.push(s);const A=1/(o-1),c=-A/2,l=1+A/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],d=6,h=6,f=3,p=2,m=1,g=new Float32Array(f*h*d),v=new Float32Array(p*h*d),y=new Float32Array(m*h*d);for(let e=0;e<d;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(r,f*h*e),v.set(u,p*h*e);const i=[e,e,e,e,e,e];y.set(i,m*h*e)}const w=new Vp;w.setAttribute("position",new Qp(g,f)),w.setAttribute("uv",new Qp(v,p)),w.setAttribute("faceIndex",new Qp(y,m)),t.push(w),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(Nm),i=new hf(0,1,0);return new hm({name:"SphericalGaussianBlur",defines:{n:Nm,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:$m(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new sm(this._lodPlanes[0],e);this._renderer.compile(t,zm)}_sceneToCubeUV(e,t,n,r){const i=new pm(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,A=s.autoClear,c=s.toneMapping;s.getClearColor(Vm),s.toneMapping=0,s.autoClear=!1;const l=new Up({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),u=new sm(new cm,l);let d=!1;const h=e.background;h?h.isColor&&(l.color.copy(h),e.background=null,d=!0):(l.color.copy(Vm),d=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,o[t],0),i.lookAt(a[t],0,0)):1===n?(i.up.set(0,0,o[t]),i.lookAt(0,a[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,a[t]));const A=this._cubeSize;Jm(r,n*A,t>2?A:0,A,A),s.setRenderTarget(r),d&&s.render(u,i),s.render(e,i)}u.geometry.dispose(),u.material.dispose(),s.toneMapping=c,s.autoClear=A,e.background=h}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===Dd||e.mapping===Hd;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Zm()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Ym());const i=r?this._cubemapMaterial:this._equirectMaterial,o=new sm(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const a=this._cubeSize;Jm(t,0,0,3*a,2*a),n.setRenderTarget(t),n.render(o,zm)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=Wm[(t-1)%Wm.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,a){const s=this._renderer,A=this._blurMaterial,c=new sm(this._lodPlanes[r],A),l=A.uniforms,u=this._sizeLods[n]-1,d=isFinite(i)?Math.PI/(2*u):2*Math.PI/39,h=i/d,f=isFinite(i)?1+Math.floor(3*h):Nm,p=[];let m=0;for(let e=0;e<Nm;++e){const t=e/h,n=Math.exp(-t*t/2);p.push(n),0===e?m+=n:e<f&&(m+=2*n)}for(let e=0;e<p.length;e++)p[e]=p[e]/m;l.envMap.value=e.texture,l.samples.value=f,l.weights.value=p,l.latitudinal.value="latitudinal"===o,a&&(l.poleAxis.value=a);const{_lodMax:g}=this;l.dTheta.value=d,l.mipInt.value=g-n;const v=this._sizeLods[r];Jm(t,3*v*(r>g-4?r-g+4:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(t),s.render(c,zm)}}function Xm(e,t,n){const r=new cf(e,t,n);return r.texture.mapping=zd,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Jm(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Ym(){return new hm({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:$m(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Zm(){return new hm({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:$m(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function $m(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function eg(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,a=o===Rd||o===Nd,s=o===Dd||o===Hd;if(a||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new qm(e)),r=a?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const o=i.image;if(a&&o&&o.height>0||s&&o&&function(e){let t=0;const n=6;for(let r=0;r<n;r++)void 0!==e[r]&&t++;return t===n}(o)){null===n&&(n=new qm(e));const o=a?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,o),i.addEventListener("dispose",r),o.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function tg(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return t}}}function ng(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener("dispose",a),delete i[s.id];const A=o.get(s);A&&(t.remove(A),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(zh(n)?Ip:Lp)(n,1);s.version=a;const A=o.get(e);A&&t.remove(A),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function rg(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,A,c){if(0===c)return;let l,u;if(i)l=e,u="drawElementsInstanced";else if(l=t.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===l)return;l[u](o,A,a,r*s,c),n.update(A,o,c)}}function ig(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e}}}}function og(e,t){return e[0]-t[0]}function ag(e,t){return Math.abs(t[1])-Math.abs(e[1])}function sg(e,t){let n=1;const r=t.isInterleavedBufferAttribute?t.data.array:t.array;r instanceof Int8Array?n=127:r instanceof Int16Array?n=32767:r instanceof Int32Array&&(n=2147483647),e.divideScalar(n)}function Ag(e,t,n){const r={},i=new Float32Array(8),o=new WeakMap,a=new Af,s=[];for(let e=0;e<8;e++)s[e]=[e,0];return{update:function(A,c,l,u){const d=A.morphTargetInfluences;if(!0===t.isWebGL2){const h=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,f=void 0!==h?h.length:0;let p=o.get(c);if(void 0===p||p.count!==f){void 0!==p&&p.texture.dispose();const v=void 0!==c.morphAttributes.position,y=void 0!==c.morphAttributes.normal,w=void 0!==c.morphAttributes.color,b=c.morphAttributes.position||[],B=c.morphAttributes.normal||[],_=c.morphAttributes.color||[];let x=0;!0===v&&(x=1),!0===y&&(x=2),!0===w&&(x=3);let C=c.attributes.position.count*x,S=1;C>t.maxTextureSize&&(S=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const E=new Float32Array(C*S*4*f),M=new lf(E,C,S,f);M.type=th,M.needsUpdate=!0;const U=4*x;for(let T=0;T<f;T++){const Q=b[T],L=B[T],I=_[T],k=C*S*4*T;for(let P=0;P<Q.count;P++){const O=P*U;!0===v&&(a.fromBufferAttribute(Q,P),!0===Q.normalized&&sg(a,Q),E[k+O+0]=a.x,E[k+O+1]=a.y,E[k+O+2]=a.z,E[k+O+3]=0),!0===y&&(a.fromBufferAttribute(L,P),!0===L.normalized&&sg(a,L),E[k+O+4]=a.x,E[k+O+5]=a.y,E[k+O+6]=a.z,E[k+O+7]=0),!0===w&&(a.fromBufferAttribute(I,P),!0===I.normalized&&sg(a,I),E[k+O+8]=a.x,E[k+O+9]=a.y,E[k+O+10]=a.z,E[k+O+11]=4===I.itemSize?a.w:1)}}function F(){M.dispose(),o.delete(c),c.removeEventListener("dispose",F)}p={count:f,texture:M,size:new Rh(C,S)},o.set(c,p),c.addEventListener("dispose",F)}let m=0;for(let D=0;D<d.length;D++)m+=d[D];const g=c.morphTargetsRelative?1:1-m;u.getUniforms().setValue(e,"morphTargetBaseInfluence",g),u.getUniforms().setValue(e,"morphTargetInfluences",d),u.getUniforms().setValue(e,"morphTargetsTexture",p.texture,n),u.getUniforms().setValue(e,"morphTargetsTextureSize",p.size)}else{const H=void 0===d?0:d.length;let R=r[c.id];if(void 0===R||R.length!==H){R=[];for(let K=0;K<H;K++)R[K]=[K,0];r[c.id]=R}for(let G=0;G<H;G++){const W=R[G];W[0]=G,W[1]=d[G]}R.sort(ag);for(let q=0;q<8;q++)q<H&&R[q][1]?(s[q][0]=R[q][0],s[q][1]=R[q][1]):(s[q][0]=Number.MAX_SAFE_INTEGER,s[q][1]=0);s.sort(og);const N=c.morphAttributes.position,z=c.morphAttributes.normal;let V=0;for(let X=0;X<8;X++){const J=s[X],Y=J[0],Z=J[1];Y!==Number.MAX_SAFE_INTEGER&&Z?(N&&c.getAttribute("morphTarget"+X)!==N[Y]&&c.setAttribute("morphTarget"+X,N[Y]),z&&c.getAttribute("morphNormal"+X)!==z[Y]&&c.setAttribute("morphNormal"+X,z[Y]),i[X]=Z,V+=Z):(N&&!0===c.hasAttribute("morphTarget"+X)&&c.deleteAttribute("morphTarget"+X),z&&!0===c.hasAttribute("morphNormal"+X)&&c.deleteAttribute("morphNormal"+X),i[X]=0)}const j=c.morphTargetsRelative?1:1-V;u.getUniforms().setValue(e,"morphTargetBaseInfluence",j),u.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function cg(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,A=t.get(e,s);return i.get(A)!==a&&(t.update(A),i.set(A,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),A},dispose:function(){i=new WeakMap}}}const lg=new sf,ug=new lf,dg=new uf,hg=new vm,fg=[],pg=[],mg=new Float32Array(16),gg=new Float32Array(9),vg=new Float32Array(4);function yg(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=fg[i];if(void 0===o&&(o=new Float32Array(i),fg[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function wg(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function bg(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function Bg(e,t){let n=pg[t];void 0===n&&(n=new Int32Array(t),pg[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function _g(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function xg(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(wg(n,t))return;e.uniform2fv(this.addr,t),bg(n,t)}}function Cg(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(wg(n,t))return;e.uniform3fv(this.addr,t),bg(n,t)}}function Sg(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(wg(n,t))return;e.uniform4fv(this.addr,t),bg(n,t)}}function Eg(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(wg(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),bg(n,t)}else{if(wg(n,r))return;vg.set(r),e.uniformMatrix2fv(this.addr,!1,vg),bg(n,r)}}function Mg(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(wg(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),bg(n,t)}else{if(wg(n,r))return;gg.set(r),e.uniformMatrix3fv(this.addr,!1,gg),bg(n,r)}}function Ug(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(wg(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),bg(n,t)}else{if(wg(n,r))return;mg.set(r),e.uniformMatrix4fv(this.addr,!1,mg),bg(n,r)}}function Fg(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Tg(e,t){const n=this.cache;wg(n,t)||(e.uniform2iv(this.addr,t),bg(n,t))}function Qg(e,t){const n=this.cache;wg(n,t)||(e.uniform3iv(this.addr,t),bg(n,t))}function Lg(e,t){const n=this.cache;wg(n,t)||(e.uniform4iv(this.addr,t),bg(n,t))}function Ig(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function kg(e,t){const n=this.cache;wg(n,t)||(e.uniform2uiv(this.addr,t),bg(n,t))}function Pg(e,t){const n=this.cache;wg(n,t)||(e.uniform3uiv(this.addr,t),bg(n,t))}function Og(e,t){const n=this.cache;wg(n,t)||(e.uniform4uiv(this.addr,t),bg(n,t))}function Dg(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||lg,i)}function Hg(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||dg,i)}function Rg(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||hg,i)}function Ng(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||ug,i)}function zg(e,t){e.uniform1fv(this.addr,t)}function Vg(e,t){const n=yg(t,this.size,2);e.uniform2fv(this.addr,n)}function jg(e,t){const n=yg(t,this.size,3);e.uniform3fv(this.addr,n)}function Kg(e,t){const n=yg(t,this.size,4);e.uniform4fv(this.addr,n)}function Gg(e,t){const n=yg(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Wg(e,t){const n=yg(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function qg(e,t){const n=yg(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Xg(e,t){e.uniform1iv(this.addr,t)}function Jg(e,t){e.uniform2iv(this.addr,t)}function Yg(e,t){e.uniform3iv(this.addr,t)}function Zg(e,t){e.uniform4iv(this.addr,t)}function $g(e,t){e.uniform1uiv(this.addr,t)}function ev(e,t){e.uniform2uiv(this.addr,t)}function tv(e,t){e.uniform3uiv(this.addr,t)}function nv(e,t){e.uniform4uiv(this.addr,t)}function rv(e,t,n){const r=t.length,i=Bg(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture2D(t[e]||lg,i[e])}function iv(e,t,n){const r=t.length,i=Bg(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture3D(t[e]||dg,i[e])}function ov(e,t,n){const r=t.length,i=Bg(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTextureCube(t[e]||hg,i[e])}function av(e,t,n){const r=t.length,i=Bg(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||ug,i[e])}function sv(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return _g;case 35664:return xg;case 35665:return Cg;case 35666:return Sg;case 35674:return Eg;case 35675:return Mg;case 35676:return Ug;case 5124:case 35670:return Fg;case 35667:case 35671:return Tg;case 35668:case 35672:return Qg;case 35669:case 35673:return Lg;case 5125:return Ig;case 36294:return kg;case 36295:return Pg;case 36296:return Og;case 35678:case 36198:case 36298:case 36306:case 35682:return Dg;case 35679:case 36299:case 36307:return Hg;case 35680:case 36300:case 36308:case 36293:return Rg;case 36289:case 36303:case 36311:case 36292:return Ng}}(t.type)}function Av(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return zg;case 35664:return Vg;case 35665:return jg;case 35666:return Kg;case 35674:return Gg;case 35675:return Wg;case 35676:return qg;case 5124:case 35670:return Xg;case 35667:case 35671:return Jg;case 35668:case 35672:return Yg;case 35669:case 35673:return Zg;case 5125:return $g;case 36294:return ev;case 36295:return tv;case 36296:return nv;case 35678:case 36198:case 36298:case 36306:case 35682:return rv;case 35679:case 36299:case 36307:return iv;case 35680:case 36300:case 36308:case 36293:return ov;case 36289:case 36303:case 36311:case 36292:return av}}(t.type)}function cv(e){this.id=e,this.seq=[],this.map={}}Av.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),bg(t,e)},cv.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const lv=/(\w+)(\])?(\[|\.)?/g;function uv(e,t){e.seq.push(t),e.map[t.id]=t}function dv(e,t,n){const r=e.name,i=r.length;for(lv.lastIndex=0;;){const o=lv.exec(r),a=lv.lastIndex;let s=o[1];const A="]"===o[2],c=o[3];if(A&&(s|=0),void 0===c||"["===c&&a+2===i){uv(n,void 0===c?new sv(s,e,t):new Av(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new cv(s),uv(n,e)),n=e}}}function hv(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);dv(n,e.getUniformLocation(t,n.name),this)}}function fv(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}hv.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},hv.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},hv.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},hv.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let pv=0;function mv(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";const o=parseInt(/ERROR: 0:(\d+)/.exec(i)[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),o=Math.min(t+6,n.length);for(let e=i;e<o;e++)r.push(e+1+": "+n[e]);return r.join("\n")}(e.getShaderSource(t),o)}function gv(e,t){const n=function(e){switch(e){case vh:return["Linear","( value )"];case yh:return["sRGB","( value )"];default:return["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function vv(e,t){let n;switch(t){case 1:default:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function yv(e){return""!==e}function wv(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function bv(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Bv=/^[ \t]*#include +<([\w\d./]+)>/gm;function _v(e){return e.replace(Bv,xv)}function xv(e,t){const n=Fm[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return _v(n)}const Cv=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Sv=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ev(e){return e.replace(Sv,Uv).replace(Cv,Mv)}function Mv(e,t,n,r){return Uv(e,t,n,r)}function Uv(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function Fv(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Tv(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const A=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case Dd:case Hd:t="ENVMAP_TYPE_CUBE";break;case zd:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),l=function(e){let t="ENVMAP_MODE_REFLECTION";e.envMap&&e.envMapMode===Hd&&(t="ENVMAP_MODE_REFRACTION");return t}(n),u=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),d=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t/32+1)+3,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),h=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(yv).join("\n")}(n),f=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),p=i.createProgram();let m,g,v=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(m=[f].filter(yv).join("\n"),m.length>0&&(m+="\n"),g=[h,f].filter(yv).join("\n"),g.length>0&&(g+="\n")):(m=[Fv(n),"#define SHADER_NAME "+n.shaderName,f,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(yv).join("\n"),g=[h,Fv(n),"#define SHADER_NAME "+n.shaderName,f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+l:"",n.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?Fm.tonemapping_pars_fragment:"",0!==n.toneMapping?vv("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Fm.encodings_pars_fragment,gv("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(yv).join("\n")),a=_v(a),a=wv(a,n),a=bv(a,n),s=_v(s),s=wv(s,n),s=bv(s,n),a=Ev(a),s=Ev(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(v="#version 300 es\n",m=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+m,g=["#define varying in",n.glslVersion===Ch?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Ch?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+g);const y=v+g+s,w=fv(i,35633,v+m+a),b=fv(i,35632,y);if(i.attachShader(p,w),i.attachShader(p,b),void 0!==n.index0AttributeName?i.bindAttribLocation(p,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(p).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(b).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(p,35714)){r=!1;mv(i,w,"vertex"),mv(i,b,"fragment")}else""!==e||""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:m},fragmentShader:{log:n,prefix:g}})}let B,_;return i.deleteShader(w),i.deleteShader(b),this.getUniforms=function(){return void 0===B&&(B=new hv(i,p)),B},this.getAttributes=function(){return void 0===_&&(_=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),o=r.name;let a=1;35674===r.type&&(a=2),35675===r.type&&(a=3),35676===r.type&&(a=4),n[o]={type:r.type,location:e.getAttribLocation(t,o),locationSize:a}}return n}(i,p)),_},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=n.shaderName,this.id=pv++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=w,this.fragmentShader=b,this}let Qv=0;class Lv{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(i)&&(o.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;return!1===t.has(e)&&t.set(e,new Set),t.get(e)}_getShaderStage(e){const t=this.shaderCache;if(!1===t.has(e)){const n=new Iv(e);t.set(e,n)}return t.get(e)}}class Iv{constructor(e){this.id=Qv++,this.code=e,this.usedTimes=0}}function kv(e,t,n,r,i,o,a){const s=new tp,A=new Lv,c=[],l=i.isWebGL2,u=i.logarithmicDepthBuffer,d=i.floatVertexTextures,h=i.maxVertexUniforms,f=i.vertexTextures;let p=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(o,s,c,g,v){const y=g.fog,w=v.geometry,b=o.isMeshStandardMaterial?g.environment:null,B=(o.isMeshStandardMaterial?n:t).get(o.envMap||b),_=B&&B.mapping===zd?B.image.height:null,x=m[o.type],C=v.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(d)return 1024;{const e=h,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?0:r}}(v):0;null!==o.precision&&(p=i.getMaxPrecision(o.precision),o.precision);const S=w.morphAttributes.position||w.morphAttributes.normal||w.morphAttributes.color,E=void 0!==S?S.length:0;let M,U,F,T,Q=0;if(void 0!==w.morphAttributes.position&&(Q=1),void 0!==w.morphAttributes.normal&&(Q=2),void 0!==w.morphAttributes.color&&(Q=3),x){const e=Qm[x];M=e.vertexShader,U=e.fragmentShader}else M=o.vertexShader,U=o.fragmentShader,A.update(o),F=A.getVertexShaderID(o),T=A.getFragmentShaderID(o);const L=e.getRenderTarget(),I=o.alphaTest>0,k=o.clearcoat>0;return{isWebGL2:l,shaderID:x,shaderName:o.type,vertexShader:M,fragmentShader:U,defines:o.defines,customVertexShaderID:F,customFragmentShaderID:T,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:f,outputEncoding:null===L?e.outputEncoding:!0===L.isXRRenderTarget?L.texture.encoding:vh,map:!!o.map,matcap:!!o.matcap,envMap:!!B,envMapMode:B&&B.mapping,envMapCubeUVHeight:_,lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:1===o.normalMapType,tangentSpaceNormalMap:0===o.normalMapType,decodeVideoTexture:!!o.map&&!0===o.map.isVideoTexture&&o.map.encoding===yh,clearcoat:k,clearcoatMap:k&&!!o.clearcoatMap,clearcoatRoughnessMap:k&&!!o.clearcoatRoughnessMap,clearcoatNormalMap:k&&!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,specularIntensityMap:!!o.specularIntensityMap,specularColorMap:!!o.specularColorMap,opaque:!1===o.transparent&&1===o.blending,alphaMap:!!o.alphaMap,alphaTest:I,gradientMap:!!o.gradientMap,sheen:o.sheen>0,sheenColorMap:!!o.sheenColorMap,sheenRoughnessMap:!!o.sheenRoughnessMap,transmission:o.transmission>0,transmissionMap:!!o.transmissionMap,thicknessMap:!!o.thicknessMap,combine:o.combine,vertexTangents:!!o.normalMap&&!!w.attributes.tangent,vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!w.attributes.color&&4===w.attributes.color.itemSize,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheenColorMap||o.sheenRoughnessMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmission>0||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheen>0||o.sheenColorMap||o.sheenRoughnessMap||!o.displacementMap),fog:!!y,useFog:o.fog,fogExp2:y&&y.isFogExp2,flatShading:!!o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===v.isSkinnedMesh&&C>0,maxBones:C,useVertexTexture:d,morphTargets:void 0!==w.morphAttributes.position,morphNormals:void 0!==w.morphAttributes.normal,morphColors:void 0!==w.morphAttributes.color,morphTargetsCount:E,morphTextureStride:Q,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:o.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,doubleSided:2===o.side,flipSided:1===o.side,depthPacking:void 0!==o.depthPacking&&o.depthPacking,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||r.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.maxBones),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0);t.supportsVertexTextures&&s.enable(1);t.instancing&&s.enable(2);t.instancingColor&&s.enable(3);t.map&&s.enable(4);t.matcap&&s.enable(5);t.envMap&&s.enable(6);t.lightMap&&s.enable(7);t.aoMap&&s.enable(8);t.emissiveMap&&s.enable(9);t.bumpMap&&s.enable(10);t.normalMap&&s.enable(11);t.objectSpaceNormalMap&&s.enable(12);t.tangentSpaceNormalMap&&s.enable(13);t.clearcoat&&s.enable(14);t.clearcoatMap&&s.enable(15);t.clearcoatRoughnessMap&&s.enable(16);t.clearcoatNormalMap&&s.enable(17);t.displacementMap&&s.enable(18);t.specularMap&&s.enable(19);t.roughnessMap&&s.enable(20);t.metalnessMap&&s.enable(21);t.gradientMap&&s.enable(22);t.alphaMap&&s.enable(23);t.alphaTest&&s.enable(24);t.vertexColors&&s.enable(25);t.vertexAlphas&&s.enable(26);t.vertexUvs&&s.enable(27);t.vertexTangents&&s.enable(28);t.uvsVertexOnly&&s.enable(29);t.fog&&s.enable(30);e.push(s.mask),s.disableAll(),t.useFog&&s.enable(0);t.flatShading&&s.enable(1);t.logarithmicDepthBuffer&&s.enable(2);t.skinning&&s.enable(3);t.useVertexTexture&&s.enable(4);t.morphTargets&&s.enable(5);t.morphNormals&&s.enable(6);t.morphColors&&s.enable(7);t.premultipliedAlpha&&s.enable(8);t.shadowMapEnabled&&s.enable(9);t.physicallyCorrectLights&&s.enable(10);t.doubleSided&&s.enable(11);t.flipSided&&s.enable(12);t.depthPacking&&s.enable(13);t.dithering&&s.enable(14);t.specularIntensityMap&&s.enable(15);t.specularColorMap&&s.enable(16);t.transmission&&s.enable(17);t.transmissionMap&&s.enable(18);t.thicknessMap&&s.enable(19);t.sheen&&s.enable(20);t.sheenColorMap&&s.enable(21);t.sheenRoughnessMap&&s.enable(22);t.decodeVideoTexture&&s.enable(23);t.opaque&&s.enable(24);e.push(s.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=m[e.type];let n;if(t){const e=Qm[t];n=dm.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e<t;e++){const t=c[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Tv(e,n,t,o),c.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){A.remove(e)},programs:c,dispose:function(){A.dispose()}}}function Pv(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Ov(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Dv(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Hv(){const e=[];let t=0;const n=[],r=[],i=[];function o(n,r,i,o,a,s){let A=e[t];return void 0===A?(A={id:n.id,object:n,geometry:r,material:i,groupOrder:o,renderOrder:n.renderOrder,z:a,group:s},e[t]=A):(A.id=n.id,A.object=n,A.geometry=r,A.material=i,A.groupOrder=o,A.renderOrder=n.renderOrder,A.z=a,A.group=s),t++,A}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,a,s,A,c){const l=o(e,t,a,s,A,c);a.transmission>0?r.push(l):!0===a.transparent?i.push(l):n.push(l)},unshift:function(e,t,a,s,A,c){const l=o(e,t,a,s,A,c);a.transmission>0?r.unshift(l):!0===a.transparent?i.unshift(l):n.unshift(l)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Ov),r.length>1&&r.sort(t||Dv),i.length>1&&i.sort(t||Dv)}}}function Rv(){let e=new WeakMap;return{get:function(t,n){let r;return!1===e.has(t)?(r=new Hv,e.set(t,[r])):n>=e.get(t).length?(r=new Hv,e.get(t).push(r)):r=e.get(t)[n],r},dispose:function(){e=new WeakMap}}}function Nv(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new hf,color:new ef};break;case"SpotLight":n={position:new hf,direction:new hf,color:new ef,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new hf,color:new ef,distance:0,decay:0};break;case"HemisphereLight":n={direction:new hf,skyColor:new ef,groundColor:new ef};break;case"RectAreaLight":n={color:new ef,position:new hf,halfWidth:new hf,halfHeight:new hf}}return e[t.id]=n,n}}}let zv=0;function Vv(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function jv(e,t){const n=new Nv,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rh};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rh,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)i.probe.push(new hf);const o=new hf,a=new jf,s=new jf;return{setup:function(o,a){let s=0,A=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let l=0,u=0,d=0,h=0,f=0,p=0,m=0,g=0;o.sort(Vv);const v=!0!==a?Math.PI:1;for(let e=0,t=o.length;e<t;e++){const t=o[e],a=t.color,y=t.intensity,w=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)s+=a.r*y*v,A+=a.g*y*v,c+=a.b*y*v;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[l]=n,i.directionalShadowMap[l]=b,i.directionalShadowMatrix[l]=t.shadow.matrix,p++}i.directional[l]=e,l++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(a).multiplyScalar(y*v),e.distance=w,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[d]=n,i.spotShadowMap[d]=b,i.spotShadowMatrix[d]=t.shadow.matrix,g++}i.spot[d]=e,d++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(a).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[h]=e,h++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=b,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y*v),e.groundColor.copy(t.groundColor).multiplyScalar(y*v),i.hemi[f]=e,f++}}h>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Tm.LTC_FLOAT_1,i.rectAreaLTC2=Tm.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")&&(i.rectAreaLTC1=Tm.LTC_HALF_1,i.rectAreaLTC2=Tm.LTC_HALF_2)),i.ambient[0]=s,i.ambient[1]=A,i.ambient[2]=c;const y=i.hash;y.directionalLength===l&&y.pointLength===u&&y.spotLength===d&&y.rectAreaLength===h&&y.hemiLength===f&&y.numDirectionalShadows===p&&y.numPointShadows===m&&y.numSpotShadows===g||(i.directional.length=l,i.spot.length=d,i.rectArea.length=h,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,y.directionalLength=l,y.pointLength=u,y.spotLength=d,y.rectAreaLength=h,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=g,i.version=zv++)},setupView:function(e,t){let n=0,r=0,A=0,c=0,l=0;const u=t.matrixWorldInverse;for(let t=0,d=e.length;t<d;t++){const d=e[t];if(d.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(d.matrixWorld),o.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(u),n++}else if(d.isSpotLight){const e=i.spot[A];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(d.matrixWorld),o.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(u),A++}else if(d.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),s.identity(),a.copy(d.matrixWorld),a.premultiply(u),s.extractRotation(a),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(d.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),r++}else if(d.isHemisphereLight){const e=i.hemi[l];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(u),e.direction.normalize(),l++}}},state:i}}function Kv(e,t){const n=new jv(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Gv(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Kv(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new Kv(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class Wv extends Mp{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}Wv.prototype.isMeshDepthMaterial=!0;class qv extends Mp{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new hf,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}qv.prototype.isMeshDistanceMaterial=!0;function Xv(e,t,n){let r=new Sm;const i=new Rh,o=new Rh,a=new Af,s=new Wv({depthPacking:3201}),A=new qv,c={},l=n.maxTextureSize,u={0:1,1:0,2:2},d=new hm({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Rh},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),h=d.clone();h.defines.HORIZONTAL_PASS=1;const f=new Vp;f.setAttribute("position",new Qp(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new sm(f,d),m=this;function g(n,r){const i=t.update(p);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,h.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,h.needsUpdate=!0),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,d,p,null),h.uniforms.shadow_pass.value=n.mapPass.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,h,p,null)}function v(t,n,r,i,o,a){let l=null;const d=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(l=void 0!==d?d:!0===r.isPointLight?A:s,e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0){const e=l.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=l.clone(),r[t]=i),l=i}return l.visible=n.visible,l.wireframe=n.wireframe,l.side=3===a?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],l.alphaMap=n.alphaMap,l.alphaTest=n.alphaTest,l.clipShadows=n.clipShadows,l.clippingPlanes=n.clippingPlanes,l.clipIntersection=n.clipIntersection,l.displacementMap=n.displacementMap,l.displacementScale=n.displacementScale,l.displacementBias=n.displacementBias,l.wireframeLinewidth=n.wireframeLinewidth,l.linewidth=n.linewidth,!0===r.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(r.matrixWorld),l.nearDistance=i,l.farDistance=o),l}function y(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let A=0,c=t.length;A<c;A++){const c=t[A],l=i[c.materialIndex];if(l&&l.visible){const t=v(n,l,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=v(n,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const A=n.children;for(let e=0,t=A.length;e<t;e++)y(A[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,s){if(!1===m.enabled)return;if(!1===m.autoUpdate&&!1===m.needsUpdate)return;if(0===t.length)return;const A=e.getRenderTarget(),c=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let A=0,c=t.length;A<c;A++){const c=t[A],u=c.shadow;if(void 0===u)continue;if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;i.copy(u.mapSize);const h=u.getFrameExtents();if(i.multiply(h),o.copy(u.mapSize),(i.x>l||i.y>l)&&(i.x>l&&(o.x=Math.floor(l/h.x),i.x=o.x*h.x,u.mapSize.x=o.x),i.y>l&&(o.y=Math.floor(l/h.y),i.y=o.y*h.y,u.mapSize.y=o.y)),null!==u.map||u.isPointLightShadow||3!==this.type||(u.map=new cf(i.x,i.y),u.map.texture.name=c.name+".shadowMap",u.mapPass=new cf(i.x,i.y),u.camera.updateProjectionMatrix()),null===u.map){const e={minFilter:Gd,magFilter:Gd,format:ih};u.map=new cf(i.x,i.y,e),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const f=u.getViewportCount();for(let e=0;e<f;e++){const t=u.getViewport(e);a.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),d.viewport(a),u.updateMatrices(c,e),r=u.getFrustum(),y(n,s,u.camera,c,this.type)}u.isPointLightShadow||3!==this.type||g(u,s),u.needsUpdate=!1}m.needsUpdate=!1,e.setRenderTarget(A,c,u)}}function Jv(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new Af;let r=null;const i=new Af(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?D(2929):H(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:default:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},a=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,A=null,c=null;return{setTest:function(e){t||(e?D(2960):H(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&A===r||(e.stencilOp(t,n,r),a=t,s=n,A=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,A=null,c=null}}};let s={},A={},c=new WeakMap,l=[],u=null,d=!1,h=null,f=null,p=null,m=null,g=null,v=null,y=null,w=!1,b=null,B=null,_=null,x=null,C=null;const S=e.getParameter(35661);let E=!1,M=0;const U=e.getParameter(7938);-1!==U.indexOf("WebGL")?(M=parseFloat(/^WebGL (\d)/.exec(U)[1]),E=M>=1):-1!==U.indexOf("OpenGL ES")&&(M=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),E=M>=2);let F=null,T={};const Q=e.getParameter(3088),L=e.getParameter(2978),I=(new Af).fromArray(Q),k=(new Af).fromArray(L);function P(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return o}const O={};function D(t){!0!==s[t]&&(e.enable(t),s[t]=!0)}function H(t){!1!==s[t]&&(e.disable(t),s[t]=!1)}O[3553]=P(3553,3553,1),O[34067]=P(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),a.setClear(0),D(2929),o.setFunc(3),V(!1),j(1),D(2884),z(0);const R={[Od]:32774,101:32778,102:32779};if(r)R[103]=32775,R[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(R[103]=e.MIN_EXT,R[104]=e.MAX_EXT)}const N={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function z(t,n,r,i,o,a,s,A){if(0!==t){if(!1===d&&(D(3042),d=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(R[n],R[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(N[r],N[i],N[a],N[s]),p=r,m=i,v=a,y=s),h=t,w=null;else if(t!==h||A!==w){if(f===Od&&g===Od||(e.blendEquation(32774),f=Od,g=Od),A)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,769,0,1);break;case 4:e.blendFuncSeparate(0,768,0,770)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFuncSeparate(0,769,0,1);break;case 4:e.blendFunc(0,768)}p=null,m=null,v=null,y=null,h=t,w=A}}else!0===d&&(H(3042),d=!1)}function V(t){b!==t&&(t?e.frontFace(2304):e.frontFace(2305),b=t)}function j(t){0!==t?(D(2884),t!==B&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):H(2884),B=t}function K(t,n,r){t?(D(32823),x===n&&C===r||(e.polygonOffset(n,r),x=n,C=r)):H(32823)}function G(t){void 0===t&&(t=33984+S-1),F!==t&&(e.activeTexture(t),F=t)}return{buffers:{color:i,depth:o,stencil:a},enable:D,disable:H,bindFramebuffer:function(t,n){return A[t]!==n&&(e.bindFramebuffer(t,n),A[t]=n,r&&(36009===t&&(A[36160]=n),36160===t&&(A[36009]=n)),!0)},drawBuffers:function(r,i){let o=l,a=!1;if(r)if(o=c.get(i),void 0===o&&(o=[],c.set(i,o)),r.isWebGLMultipleRenderTargets){const e=r.texture;if(o.length!==e.length||36064!==o[0]){for(let t=0,n=e.length;t<n;t++)o[t]=36064+t;o.length=e.length,a=!0}}else 36064!==o[0]&&(o[0]=36064,a=!0);else 1029!==o[0]&&(o[0]=1029,a=!0);a&&(n.isWebGL2?e.drawBuffers(o):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(o))},useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:z,setMaterial:function(e,t){2===e.side?H(2884):D(2884);let n=1===e.side;t&&(n=!n),V(n),1===e.blending&&!1===e.transparent?z(0):z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;a.setTest(r),r&&(a.setMask(e.stencilWriteMask),a.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),a.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),K(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?D(32926):H(32926)},setFlipSided:V,setCullFace:j,setLineWidth:function(t){t!==_&&(E&&e.lineWidth(t),_=t)},setPolygonOffset:K,setScissorTest:function(e){e?D(3089):H(3089)},activeTexture:G,bindTexture:function(t,n){null===F&&G();let r=T[F];void 0===r&&(r={type:void 0,texture:void 0},T[F]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||O[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=T[F];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){}},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){}},scissor:function(t){!1===I.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),I.copy(t))},viewport:function(t){!1===k.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),k.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),s={},F=null,T={},A={},c=new WeakMap,l=[],u=null,d=!1,h=null,f=null,p=null,m=null,g=null,v=null,y=null,w=!1,b=null,B=null,_=null,x=null,C=null,I.set(0,0,e.canvas.width,e.canvas.height),k.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),a.reset()}}}function Yv(e,t,n,r,i,o,a){const s=i.isWebGL2,A=(i.maxTextures,i.maxCubemapSize),c=i.maxTextureSize,l=i.maxSamples,u=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,d=/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let f;const p=new WeakMap;let m=!1;try{m="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function g(e,t){return m?new OffscreenCanvas(e,t):Vh("canvas")}function v(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?Dh:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===f&&(f=g(o,a));const s=n?g(o,a):f;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),s}return e}return e}function y(e){return Ph(e.width)&&Ph(e.height)}function w(e,t){return e.generateMipmaps&&t&&e.minFilter!==Gd&&e.minFilter!==Xd}function b(t){e.generateMipmap(t)}function B(n,r,i,o,a=!1){if(!1===s)return r;if(null!==n&&void 0!==e[n])return e[n];let A=r;return 6403===r&&(5126===i&&(A=33326),5131===i&&(A=33325),5121===i&&(A=33321)),33319===r&&(5126===i&&(A=33328),5131===i&&(A=33327),5121===i&&(A=33323)),6408===r&&(5126===i&&(A=34836),5131===i&&(A=34842),5121===i&&(A=o===yh&&!1===a?35907:32856),32819===i&&(A=32854),32820===i&&(A=32855)),33325!==A&&33326!==A&&33327!==A&&33328!==A&&34842!==A&&34836!==A||t.get("EXT_color_buffer_float"),A}function _(e,t,n){return!0===w(e,n)||e.isFramebufferTexture&&e.minFilter!==Gd&&e.minFilter!==Xd?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function x(e){return e===Gd||e===Wd||e===qd?9728:9729}function C(e){const t=e.target;t.removeEventListener("dispose",C),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=p.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&E(e),0===Object.keys(i).length&&p.delete(n)}r.remove(e)}(t),t.isVideoTexture&&h.delete(t)}function S(t){const n=t.target;n.removeEventListener("dispose",S),function(t){const n=t.texture,i=r.get(t),o=r.get(n);void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),a.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function E(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete p.get(i)[n.__cacheKey],a.memory.textures--}let M=0;function U(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;h.get(e)!==t&&(h.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&i.__version!==e.version){const n=e.image;if(null===n);else if(!1!==n.complete)return void I(i,e,t)}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}const F={[Vd]:10497,[jd]:33071,[Kd]:33648},T={[Gd]:9728,[Wd]:9984,[qd]:9986,[Xd]:9729,[Jd]:9985,[Yd]:9987};function Q(n,o,a){if(a?(e.texParameteri(n,10242,F[o.wrapS]),e.texParameteri(n,10243,F[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,F[o.wrapR]),e.texParameteri(n,10240,T[o.magFilter]),e.texParameteri(n,10241,T[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS!==jd||o.wrapT,e.texParameteri(n,10240,x(o.magFilter)),e.texParameteri(n,10241,x(o.minFilter)),o.minFilter!==Gd&&o.minFilter),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(o.type===th&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&o.type===nh&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function L(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",C));const i=n.source;let o=p.get(i);void 0===o&&(o={},p.set(i,o));const s=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(s!==t.__cacheKey){void 0===o[s]&&(o[s]={texture:e.createTexture(),usedTimes:0},a.memory.textures++,r=!0),o[s].usedTimes++;const i=o[t.__cacheKey];void 0!==i&&(o[t.__cacheKey].usedTimes--,0===i.usedTimes&&E(n)),t.__cacheKey=s,t.__webglTexture=o[s].texture}return r}function I(t,r,i){let a=3553;r.isDataArrayTexture&&(a=35866),r.isData3DTexture&&(a=32879);const A=L(t,r),l=r.source;if(n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),l.version!==l.__currentVersion||!0===A){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=function(e){return!s&&(e.wrapS!==jd||e.wrapT!==jd||e.minFilter!==Gd&&e.minFilter!==Xd)}(r)&&!1===y(r.image);let A=v(r.image,i,!1,c);A=R(r,A);const u=y(A)||s,d=o.convert(r.format,r.encoding);let h,f=o.convert(r.type),p=B(r.internalFormat,d,f,r.encoding,r.isVideoTexture);Q(a,r,u);const m=r.mipmaps,g=s&&!0!==r.isVideoTexture,x=void 0===t.__version,C=_(r,A,u);if(r.isDepthTexture)p=6402,s?p=r.type===th?36012:r.type===eh?33190:r.type===rh?35056:33189:r.type,r.format===oh&&6402===p&&r.type!==$d&&r.type!==eh&&(r.type=$d,f=o.convert(r.type)),r.format===ah&&6402===p&&(p=34041,r.type!==rh&&(r.type=rh,f=o.convert(r.type))),g&&x?n.texStorage2D(3553,1,p,A.width,A.height):n.texImage2D(3553,0,p,A.width,A.height,0,d,f,null);else if(r.isDataTexture)if(m.length>0&&u){g&&x&&n.texStorage2D(3553,C,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)h=m[e],g?n.texSubImage2D(3553,e,0,0,h.width,h.height,d,f,h.data):n.texImage2D(3553,e,p,h.width,h.height,0,d,f,h.data);r.generateMipmaps=!1}else g?(x&&n.texStorage2D(3553,C,p,A.width,A.height),n.texSubImage2D(3553,0,0,0,A.width,A.height,d,f,A.data)):n.texImage2D(3553,0,p,A.width,A.height,0,d,f,A.data);else if(r.isCompressedTexture){g&&x&&n.texStorage2D(3553,C,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)h=m[e],r.format!==ih?null!==d&&(g?n.compressedTexSubImage2D(3553,e,0,0,h.width,h.height,d,h.data):n.compressedTexImage2D(3553,e,p,h.width,h.height,0,h.data)):g?n.texSubImage2D(3553,e,0,0,h.width,h.height,d,f,h.data):n.texImage2D(3553,e,p,h.width,h.height,0,d,f,h.data)}else if(r.isDataArrayTexture)g?(x&&n.texStorage3D(35866,C,p,A.width,A.height,A.depth),n.texSubImage3D(35866,0,0,0,0,A.width,A.height,A.depth,d,f,A.data)):n.texImage3D(35866,0,p,A.width,A.height,A.depth,0,d,f,A.data);else if(r.isData3DTexture)g?(x&&n.texStorage3D(32879,C,p,A.width,A.height,A.depth),n.texSubImage3D(32879,0,0,0,0,A.width,A.height,A.depth,d,f,A.data)):n.texImage3D(32879,0,p,A.width,A.height,A.depth,0,d,f,A.data);else if(r.isFramebufferTexture)g&&x?n.texStorage2D(3553,C,p,A.width,A.height):n.texImage2D(3553,0,p,A.width,A.height,0,d,f,null);else if(m.length>0&&u){g&&x&&n.texStorage2D(3553,C,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)h=m[e],g?n.texSubImage2D(3553,e,0,0,d,f,h):n.texImage2D(3553,e,p,d,f,h);r.generateMipmaps=!1}else g?(x&&n.texStorage2D(3553,C,p,A.width,A.height),n.texSubImage2D(3553,0,0,0,d,f,A)):n.texImage2D(3553,0,p,d,f,A);w(r,u)&&b(a),l.__currentVersion=l.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}function k(t,i,a,s,A){const c=o.convert(a.format,a.encoding),l=o.convert(a.type),d=B(a.internalFormat,c,l,a.encoding);r.get(i).__hasExternalTextures||(32879===A||35866===A?n.texImage3D(A,0,d,i.width,i.height,i.depth,0,c,l,null):n.texImage2D(A,0,d,i.width,i.height,0,c,l,null)),n.bindFramebuffer(36160,t),H(i)?u.framebufferTexture2DMultisampleEXT(36160,s,A,r.get(a).__webglTexture,0,D(i)):e.framebufferTexture2D(36160,s,A,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function P(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r||H(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===th?i=36012:t.type===eh&&(i=33190));const r=D(n);H(n)?u.renderbufferStorageMultisampleEXT(36161,r,i,n.width,n.height):e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=D(n);r&&!1===H(n)?e.renderbufferStorageMultisample(36161,i,35056,n.width,n.height):H(n)?u.renderbufferStorageMultisampleEXT(36161,i,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format,t.encoding),a=o.convert(t.type),s=B(t.internalFormat,i,a,t.encoding),A=D(n);r&&!1===H(n)?e.renderbufferStorageMultisample(36161,A,s,n.width,n.height):H(n)?u.renderbufferStorageMultisampleEXT(36161,A,s,n.width,n.height):e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function O(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),U(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture,a=D(i);if(i.depthTexture.format===oh)H(i)?u.framebufferTexture2DMultisampleEXT(36160,36096,3553,o,0,a):e.framebufferTexture2D(36160,36096,3553,o,0);else{if(i.depthTexture.format!==ah)throw new Error("Unknown depthTexture format");H(i)?u.framebufferTexture2DMultisampleEXT(36160,33306,3553,o,0,a):e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),P(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),P(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function D(e){return Math.min(l,e.samples)}function H(e){const n=r.get(e);return s&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function R(e,n){const r=e.encoding,i=e.format;e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===Sh||r!==vh&&r===yh&&!1===s&&(!0===t.has("EXT_sRGB")&&i===ih?(e.format=Sh,e.minFilter=Xd,e.generateMipmaps=!1):n=nf.sRGBToLinear(n)),n}this.allocateTextureUnit=function(){const e=M;return M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=U,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;const a=L(t,r),c=r.source;if(n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),c.version!==c.__currentVersion||!0===a){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=r.isCompressedTexture||r.image[0].isCompressedTexture,a=r.image[0]&&r.image[0].isDataTexture,l=[];for(let e=0;e<6;e++)l[e]=i||a?a?r.image[e].image:r.image[e]:v(r.image[e],!1,!0,A),l[e]=R(r,l[e]);const u=l[0],d=y(u)||s,h=o.convert(r.format,r.encoding),f=o.convert(r.type),p=B(r.internalFormat,h,f,r.encoding),m=s&&!0!==r.isVideoTexture,g=void 0===t.__version;let x,C=_(r,u,d);if(Q(34067,r,d),i){m&&g&&n.texStorage2D(34067,C,p,u.width,u.height);for(let e=0;e<6;e++){x=l[e].mipmaps;for(let t=0;t<x.length;t++){const i=x[t];r.format!==ih?null!==h&&(m?n.compressedTexSubImage2D(34069+e,t,0,0,i.width,i.height,h,i.data):n.compressedTexImage2D(34069+e,t,p,i.width,i.height,0,i.data)):m?n.texSubImage2D(34069+e,t,0,0,i.width,i.height,h,f,i.data):n.texImage2D(34069+e,t,p,i.width,i.height,0,h,f,i.data)}}}else{x=r.mipmaps,m&&g&&(x.length>0&&C++,n.texStorage2D(34067,C,p,l[0].width,l[0].height));for(let e=0;e<6;e++)if(a){m?n.texSubImage2D(34069+e,0,0,0,l[e].width,l[e].height,h,f,l[e].data):n.texImage2D(34069+e,0,p,l[e].width,l[e].height,0,h,f,l[e].data);for(let t=0;t<x.length;t++){const r=x[t].image[e].image;m?n.texSubImage2D(34069+e,t+1,0,0,r.width,r.height,h,f,r.data):n.texImage2D(34069+e,t+1,p,r.width,r.height,0,h,f,r.data)}}else{m?n.texSubImage2D(34069+e,0,0,0,h,f,l[e]):n.texImage2D(34069+e,0,p,h,f,l[e]);for(let t=0;t<x.length;t++){const r=x[t];m?n.texSubImage2D(34069+e,t+1,0,0,h,f,r.image[e]):n.texImage2D(34069+e,t+1,p,h,f,r.image[e])}}}w(r,d)&&b(34067),c.__currentVersion=c.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))},this.rebindTextures=function(e,t,n){const i=r.get(e);void 0!==t&&k(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&O(e)},this.setupRenderTarget=function(t){const A=t.texture,c=r.get(t),l=r.get(A);t.addEventListener("dispose",S),!0!==t.isWebGLMultipleRenderTargets&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=A.version,a.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,h=y(t)||s;if(u){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else if(c.__webglFramebuffer=e.createFramebuffer(),d){if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}}else if(s&&t.samples>0&&!1===H(t)){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(A.format,A.encoding),i=o.convert(A.type),a=B(A.internalFormat,r,i,A.encoding),s=D(t);e.renderbufferStorageMultisample(36161,s,a,t.width,t.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),P(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}if(u){n.bindTexture(34067,l.__webglTexture),Q(34067,A,h);for(let e=0;e<6;e++)k(c.__webglFramebuffer[e],t,A,36064,34069+e);w(A,h)&&b(34067),n.unbindTexture()}else if(d){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),Q(3553,o,h),k(c.__webglFramebuffer,t,o,36064+i,3553),w(o,h)&&b(3553)}n.unbindTexture()}else{let e=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&s&&(e=t.isWebGL3DRenderTarget?32879:35866),n.bindTexture(e,l.__webglTexture),Q(e,A,h),k(c.__webglFramebuffer,t,A,36064,e),w(A,h)&&b(e),n.unbindTexture()}t.depthBuffer&&O(t)},this.updateRenderTargetMipmap=function(e){const t=y(e)||s,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(w(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),b(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(s&&t.samples>0&&!1===H(t)){const i=t.width,o=t.height;let a=16384;const s=[36064],A=t.stencilBuffer?33306:36096;t.depthBuffer&&s.push(A);const c=r.get(t),l=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;!1===l&&(t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024)),n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer),!0===l&&(e.invalidateFramebuffer(36008,[A]),e.invalidateFramebuffer(36009,[A])),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),d&&e.invalidateFramebuffer(36008,s),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=O,this.setupFrameBufferTexture=k,this.useMultisampledRTT=H}function Zv(e,t,n){const r=n.isWebGL2;return{convert:function(e,n=null){let i;if(e===Zd)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1010===e)return 5120;if(1011===e)return 5122;if(e===$d)return 5123;if(1013===e)return 5124;if(e===eh)return 5125;if(e===th)return 5126;if(e===nh)return r?5131:(i=t.get("OES_texture_half_float"),null!==i?i.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(e===ih)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(e===oh)return 6402;if(e===ah)return 34041;if(1028===e)return 6403;if(1022===e)return 6408;if(e===Sh)return i=t.get("EXT_sRGB"),null!==i?i.SRGB_ALPHA_EXT:null;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1033===e)return 36249;if(e===sh||e===Ah||e===ch||e===lh)if(n===yh){if(i=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===i)return null;if(e===sh)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(e===Ah)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(e===ch)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(e===lh)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(i=t.get("WEBGL_compressed_texture_s3tc"),null===i)return null;if(e===sh)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===Ah)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===ch)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===lh)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(i=t.get("WEBGL_compressed_texture_pvrtc"),null===i)return null;if(35840===e)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return i=t.get("WEBGL_compressed_texture_etc1"),null!==i?i.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===e||37496===e){if(i=t.get("WEBGL_compressed_texture_etc"),null===i)return null;if(37492===e)return n===yh?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(37496===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}if(37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e){if(i=t.get("WEBGL_compressed_texture_astc"),null===i)return null;if(37808===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===e)return n===yh?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===e){if(i=t.get("EXT_texture_compression_bptc"),null===i)return null;if(36492===e)return n===yh?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT}return e===rh?r?34042:(i=t.get("WEBGL_depth_texture"),null!==i?i.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class $v extends pm{constructor(e=[]){super(),this.cameras=e}}$v.prototype.isArrayCamera=!0;class ey extends pp{constructor(){super(),this.type="Group"}}ey.prototype.isGroup=!0;const ty={type:"move"};class ny{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new ey,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new ey,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new hf,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new hf),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new ey,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new hf,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new hf),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,A=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ty))),A&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===A.joints[r.jointName]){const e=new ey;e.matrixAutoUpdate=!1,e.visible=!1,A.joints[r.jointName]=e,A.add(e)}const i=A.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=A.joints["index-finger-tip"],i=A.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,c=.005;A.inputState.pinching&&a>s+c?(A.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!A.inputState.pinching&&a<=s-c&&(A.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==A&&(A.visible=null!==o),this}}class ry extends sf{constructor(e,t,n,r,i,o,a,s,A,c){if((c=void 0!==c?c:oh)!==oh&&c!==ah)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===oh&&(n=$d),void 0===n&&c===ah&&(n=rh),super(null,r,i,o,a,s,c,n,A),this.image={width:e,height:t},this.magFilter=void 0!==a?a:Gd,this.minFilter=void 0!==s?s:Gd,this.flipY=!1,this.generateMipmaps=!1}}ry.prototype.isDepthTexture=!0;class iy extends Eh{constructor(e,t){super();const n=this;let r=null,i=1,o=null,a="local-floor",s=null,A=null,c=null,l=null,u=null;const d=t.getContextAttributes();let h=null,f=null;const p=[],m=new Map,g=new pm;g.layers.enable(1),g.viewport=new Af;const v=new pm;v.layers.enable(2),v.viewport=new Af;const y=[g,v],w=new $v;w.layers.enable(1),w.layers.enable(2);let b=null,B=null;function _(e){const t=m.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){m.forEach((function(e,t){e.disconnect(t)})),m.clear(),b=null,B=null,e.setRenderTarget(h),l=null,c=null,A=null,r=null,f=null,F.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function C(e){const t=r.inputSources;for(let e=0;e<p.length;e++)m.set(t[e],p[e]);for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=m.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),m.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],r=m.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=p[e];return void 0===t&&(t=new ny,p[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=p[e];return void 0===t&&(t=new ny,p[e]=t),t.getGripSpace()},this.getHand=function(e){let t=p[e];return void 0===t&&(t=new ny,p[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,n.isPresenting},this.setReferenceSpaceType=function(e){a=e,n.isPresenting},this.getReferenceSpace=function(){return o},this.getBaseLayer=function(){return null!==c?c:l},this.getBinding=function(){return A},this.getFrame=function(){return u},this.getSession=function(){return r},this.setSession=async function(s){if(r=s,null!==r){if(h=e.getRenderTarget(),r.addEventListener("select",_),r.addEventListener("selectstart",_),r.addEventListener("selectend",_),r.addEventListener("squeeze",_),r.addEventListener("squeezestart",_),r.addEventListener("squeezeend",_),r.addEventListener("end",x),r.addEventListener("inputsourceschange",C),!0!==d.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||d.antialias,alpha:d.alpha,depth:d.depth,stencil:d.stencil,framebufferScaleFactor:i};l=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:l}),f=new cf(l.framebufferWidth,l.framebufferHeight,{format:ih,type:Zd,encoding:e.outputEncoding})}else{let n=null,o=null,a=null;d.depth&&(a=d.stencil?35056:33190,n=d.stencil?ah:oh,o=d.stencil?rh:$d);const s={colorFormat:e.outputEncoding===yh?35907:32856,depthFormat:a,scaleFactor:i};A=new XRWebGLBinding(r,t),c=A.createProjectionLayer(s),r.updateRenderState({layers:[c]}),f=new cf(c.textureWidth,c.textureHeight,{format:ih,type:Zd,depthTexture:new ry(c.textureWidth,c.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:d.stencil,encoding:e.outputEncoding,samples:d.antialias?4:0});e.properties.get(f).__ignoreDepthValues=c.ignoreDepthValues}f.isXRRenderTarget=!0,this.setFoveation(1),o=await r.requestReferenceSpace(a),F.setContext(r),F.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const S=new hf,E=new hf;function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;w.near=v.near=g.near=e.near,w.far=v.far=g.far=e.far,b===w.near&&B===w.far||(r.updateRenderState({depthNear:w.near,depthFar:w.far}),b=w.near,B=w.far);const t=e.parent,n=w.cameras;M(w,t);for(let e=0;e<n.length;e++)M(n[e],t);w.matrixWorld.decompose(w.position,w.quaternion,w.scale),e.position.copy(w.position),e.quaternion.copy(w.quaternion),e.scale.copy(w.scale),e.matrix.copy(w.matrix),e.matrixWorld.copy(w.matrixWorld);const i=e.children;for(let e=0,t=i.length;e<t;e++)i[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){S.setFromMatrixPosition(t.matrixWorld),E.setFromMatrixPosition(n.matrixWorld);const r=S.distanceTo(E),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),A=(i[9]+1)/i[5],c=(i[9]-1)/i[5],l=(i[8]-1)/i[0],u=(o[8]+1)/o[0],d=a*l,h=a*u,f=r/(-l+u),p=f*-l;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const m=a+f,g=s+f,v=d-p,y=h+(r-p),w=A*s/g*m,b=c*s/g*m;e.projectionMatrix.makePerspective(v,y,w,b,m,g)}(w,g,v):w.projectionMatrix.copy(g.projectionMatrix)},this.getCamera=function(){return w},this.getFoveation=function(){return null!==c?c.fixedFoveation:null!==l?l.fixedFoveation:void 0},this.setFoveation=function(e){null!==c&&(c.fixedFoveation=e),null!==l&&void 0!==l.fixedFoveation&&(l.fixedFoveation=e)};let U=null;const F=new Em;F.setAnimationLoop((function(t,n){if(s=n.getViewerPose(o),u=n,null!==s){const t=s.views;null!==l&&(e.setRenderTargetFramebuffer(f,l.framebuffer),e.setRenderTarget(f));let n=!1;t.length!==w.cameras.length&&(w.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let o=null;if(null!==l)o=l.getViewport(i);else{const t=A.getViewSubImage(c,i);o=t.viewport,0===r&&(e.setRenderTargetTextures(f,t.colorTexture,c.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(f))}const a=y[r];a.matrix.fromArray(i.transform.matrix),a.projectionMatrix.fromArray(i.projectionMatrix),a.viewport.set(o.x,o.y,o.width,o.height),0===r&&w.matrix.copy(a.matrix),!0===n&&w.cameras.push(a)}}const i=r.inputSources;for(let e=0;e<p.length;e++){const t=p[e],r=i[e];t.update(r,n,o)}U&&U(t,n),u=null})),this.setAnimationLoop=function(e){U=e},this.dispose=function(){}}}function oy(e,t){function n(n,r){n.opacity.value=r.opacity,r.color&&n.diffuse.value.copy(r.color),r.emissive&&n.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(n.map.value=r.map),r.alphaMap&&(n.alphaMap.value=r.alphaMap),r.bumpMap&&(n.bumpMap.value=r.bumpMap,n.bumpScale.value=r.bumpScale,1===r.side&&(n.bumpScale.value*=-1)),r.displacementMap&&(n.displacementMap.value=r.displacementMap,n.displacementScale.value=r.displacementScale,n.displacementBias.value=r.displacementBias),r.emissiveMap&&(n.emissiveMap.value=r.emissiveMap),r.normalMap&&(n.normalMap.value=r.normalMap,n.normalScale.value.copy(r.normalScale),1===r.side&&n.normalScale.value.negate()),r.specularMap&&(n.specularMap.value=r.specularMap),r.alphaTest>0&&(n.alphaTest.value=r.alphaTest);const i=t.get(r).envMap;if(i&&(n.envMap.value=i,n.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*t}let o,a;r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?o=r.map:r.specularMap?o=r.specularMap:r.displacementMap?o=r.displacementMap:r.normalMap?o=r.normalMap:r.bumpMap?o=r.bumpMap:r.roughnessMap?o=r.roughnessMap:r.metalnessMap?o=r.metalnessMap:r.alphaMap?o=r.alphaMap:r.emissiveMap?o=r.emissiveMap:r.clearcoatMap?o=r.clearcoatMap:r.clearcoatNormalMap?o=r.clearcoatNormalMap:r.clearcoatRoughnessMap?o=r.clearcoatRoughnessMap:r.specularIntensityMap?o=r.specularIntensityMap:r.specularColorMap?o=r.specularColorMap:r.transmissionMap?o=r.transmissionMap:r.thicknessMap?o=r.thicknessMap:r.sheenColorMap?o=r.sheenColorMap:r.sheenRoughnessMap&&(o=r.sheenRoughnessMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uvTransform.value.copy(o.matrix)),r.aoMap?a=r.aoMap:r.lightMap&&(a=r.lightMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),n.uv2Transform.value.copy(a.matrix))}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,a){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap);n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap);t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate()));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,a)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function ay(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=Vh("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0===e.depth||e.depth,i=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,a=void 0===e.premultipliedAlpha||e.premultipliedAlpha,s=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,A=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let l;l=void 0!==e.context?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let u=null,d=null;const h=[],f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=vh,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const p=this;let m=!1,g=0,v=0,y=null,w=-1,b=null;const B=new Af,_=new Af;let x=null,C=t.width,S=t.height,E=1,M=null,U=null;const F=new Af(0,0,C,S),T=new Af(0,0,C,S);let Q=!1;const L=new Sm;let I=!1,k=!1,P=null;const O=new jf,D=new Rh,H=new hf,R={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function N(){return null===y?E:1}let z,V,j,K,G,W,q,X,J,Y,Z,$,ee,te,ne,re,ie,oe,ae,se,Ae,ce,le,ue=n;function de(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:a,preserveDrawingBuffer:s,powerPreference:A,failIfMajorPerformanceCaveat:c};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r139"),t.addEventListener("webglcontextlost",pe,!1),t.addEventListener("webglcontextrestored",me,!1),null===ue){const t=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&t.shift(),ue=de(t,e),null===ue)throw de(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ue.getShaderPrecisionFormat&&(ue.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw e}function he(){z=new tg(ue),V=new Pm(ue,z,e),z.init(V),ce=new Zv(ue,z,V),j=new Jv(ue,z,V),K=new ig(ue),G=new Pv,W=new Yv(ue,z,j,G,V,ce,K),q=new Dm(p),X=new eg(p),J=new Mm(ue,V),le=new Im(ue,z,J,V),Y=new ng(ue,J,K,le),Z=new cg(ue,Y,J,K),ae=new Ag(ue,V,W),re=new Om(G),$=new kv(p,q,X,z,V,le,re),ee=new oy(p,G),te=new Rv,ne=new Gv(z,V),oe=new Lm(p,q,j,Z,l,a),ie=new Xv(p,Z,V),se=new km(ue,z,K,V),Ae=new rg(ue,z,K,V),K.programs=$.programs,p.capabilities=V,p.extensions=z,p.properties=G,p.renderLists=te,p.shadowMap=ie,p.state=j,p.info=K}he();const fe=new iy(p,ue);function pe(e){e.preventDefault(),m=!0}function me(){m=!1;const e=K.autoReset,t=ie.enabled,n=ie.autoUpdate,r=ie.needsUpdate,i=ie.type;he(),K.autoReset=e,ie.enabled=t,ie.autoUpdate=n,ie.needsUpdate=r,ie.type=i}function ge(e){const t=e.target;t.removeEventListener("dispose",ge),function(e){(function(e){const t=G.get(e).programs;void 0!==t&&(t.forEach((function(e){$.releaseProgram(e)})),e.isShaderMaterial&&$.releaseShaderCache(e))})(e),G.remove(e)}(t)}this.xr=fe,this.getContext=function(){return ue},this.getContextAttributes=function(){return ue.getContextAttributes()},this.forceContextLoss=function(){const e=z.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=z.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(e){void 0!==e&&(E=e,this.setSize(C,S,!1))},this.getSize=function(e){return e.set(C,S)},this.setSize=function(e,n,r){fe.isPresenting||(C=e,S=n,t.width=Math.floor(e*E),t.height=Math.floor(n*E),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(C*E,S*E).floor()},this.setDrawingBufferSize=function(e,n,r){C=e,S=n,E=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(B)},this.getViewport=function(e){return e.copy(F)},this.setViewport=function(e,t,n,r){e.isVector4?F.set(e.x,e.y,e.z,e.w):F.set(e,t,n,r),j.viewport(B.copy(F).multiplyScalar(E).floor())},this.getScissor=function(e){return e.copy(T)},this.setScissor=function(e,t,n,r){e.isVector4?T.set(e.x,e.y,e.z,e.w):T.set(e,t,n,r),j.scissor(_.copy(T).multiplyScalar(E).floor())},this.getScissorTest=function(){return Q},this.setScissorTest=function(e){j.setScissorTest(Q=e)},this.setOpaqueSort=function(e){M=e},this.setTransparentSort=function(e){U=e},this.getClearColor=function(e){return e.copy(oe.getClearColor())},this.setClearColor=function(){oe.setClearColor.apply(oe,arguments)},this.getClearAlpha=function(){return oe.getClearAlpha()},this.setClearAlpha=function(){oe.setClearAlpha.apply(oe,arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;e&&(r|=16384),t&&(r|=256),n&&(r|=1024),ue.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",pe,!1),t.removeEventListener("webglcontextrestored",me,!1),te.dispose(),ne.dispose(),G.dispose(),q.dispose(),X.dispose(),Z.dispose(),le.dispose(),$.dispose(),fe.dispose(),fe.removeEventListener("sessionstart",ye),fe.removeEventListener("sessionend",we),P&&(P.dispose(),P=null),be.stop()},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=R);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=function(e,t,n,r,i){!0!==t.isScene&&(t=R);W.resetTextureUnits();const o=t.fog,a=r.isMeshStandardMaterial?t.environment:null,s=null===y?p.outputEncoding:!0===y.isXRRenderTarget?y.texture.encoding:vh,A=(r.isMeshStandardMaterial?X:q).get(r.envMap||a),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,l=!!r.normalMap&&!!n.attributes.tangent,u=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,f=!!n.morphAttributes.color,m=r.toneMapped?p.toneMapping:0,g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,B=G.get(r),_=d.state.lights;if(!0===I&&(!0===k||e!==b)){const t=e===b&&r.id===w;re.setState(r,e,t)}let x=!1;r.version===B.__version?B.needsLights&&B.lightsStateVersion!==_.state.version||B.outputEncoding!==s||i.isInstancedMesh&&!1===B.instancing?x=!0:i.isInstancedMesh||!0!==B.instancing?i.isSkinnedMesh&&!1===B.skinning?x=!0:i.isSkinnedMesh||!0!==B.skinning?B.envMap!==A||r.fog&&B.fog!==o?x=!0:void 0===B.numClippingPlanes||B.numClippingPlanes===re.numPlanes&&B.numIntersection===re.numIntersection?(B.vertexAlphas!==c||B.vertexTangents!==l||B.morphTargets!==u||B.morphNormals!==h||B.morphColors!==f||B.toneMapping!==m||!0===V.isWebGL2&&B.morphTargetsCount!==v)&&(x=!0):x=!0:x=!0:x=!0:(x=!0,B.__version=r.version);let C=B.currentProgram;!0===x&&(C=Se(r,t,i));let M=!1,U=!1,F=!1;const T=C.getUniforms(),Q=B.uniforms;j.useProgram(C.program)&&(M=!0,U=!0,F=!0);r.id!==w&&(w=r.id,U=!0);if(M||b!==e){if(T.setValue(ue,"projectionMatrix",e.projectionMatrix),V.logarithmicDepthBuffer&&T.setValue(ue,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),b!==e&&(b=e,U=!0,F=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=T.map.cameraPosition;void 0!==t&&t.setValue(ue,H.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&T.setValue(ue,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&T.setValue(ue,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){T.setOptional(ue,i,"bindMatrix"),T.setOptional(ue,i,"bindMatrixInverse");const e=i.skeleton;e&&(V.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),T.setValue(ue,"boneTexture",e.boneTexture,W),T.setValue(ue,"boneTextureSize",e.boneTextureSize)):T.setOptional(ue,e,"boneMatrices"))}const L=n.morphAttributes;(void 0!==L.position||void 0!==L.normal||void 0!==L.color&&!0===V.isWebGL2)&&ae.update(i,n,r,C);(U||B.receiveShadow!==i.receiveShadow)&&(B.receiveShadow=i.receiveShadow,T.setValue(ue,"receiveShadow",i.receiveShadow));U&&(T.setValue(ue,"toneMappingExposure",p.toneMappingExposure),B.needsLights&&(D=F,(O=Q).ambientLightColor.needsUpdate=D,O.lightProbe.needsUpdate=D,O.directionalLights.needsUpdate=D,O.directionalLightShadows.needsUpdate=D,O.pointLights.needsUpdate=D,O.pointLightShadows.needsUpdate=D,O.spotLights.needsUpdate=D,O.spotLightShadows.needsUpdate=D,O.rectAreaLights.needsUpdate=D,O.hemisphereLights.needsUpdate=D),o&&r.fog&&ee.refreshFogUniforms(Q,o),ee.refreshMaterialUniforms(Q,r,E,S,P),hv.upload(ue,B.uniformsList,Q,W));var O,D;r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(hv.upload(ue,B.uniformsList,Q,W),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&T.setValue(ue,"center",i.center);return T.setValue(ue,"modelViewMatrix",i.modelViewMatrix),T.setValue(ue,"normalMatrix",i.normalMatrix),T.setValue(ue,"modelMatrix",i.matrixWorld),C}(e,t,n,r,i);j.setMaterial(r,a);let A=n.index;const c=n.attributes.position;if(null===A){if(void 0===c||0===c.count)return}else if(0===A.count)return;let l,u=1;!0===r.wireframe&&(A=Y.getWireframeAttribute(n),u=2),le.setup(i,r,s,n,A);let h=se;null!==A&&(l=J.get(A),h=Ae,h.setIndex(l));const f=null!==A?A.count:c.count,m=n.drawRange.start*u,g=n.drawRange.count*u,v=null!==o?o.start*u:0,B=null!==o?o.count*u:1/0,_=Math.max(m,v),x=Math.min(f,m+g,v+B)-1,C=Math.max(0,x-_+1);if(0!==C){if(i.isMesh)!0===r.wireframe?(j.setLineWidth(r.wireframeLinewidth*N()),h.setMode(1)):h.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),j.setLineWidth(e*N()),i.isLineSegments?h.setMode(1):i.isLineLoop?h.setMode(2):h.setMode(3)}else i.isPoints?h.setMode(0):i.isSprite&&h.setMode(4);if(i.isInstancedMesh)h.renderInstances(_,C,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(_,C,e)}else h.render(_,C)}},this.compile=function(e,t){d=ne.get(e),d.init(),f.push(d),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights(p.physicallyCorrectLights),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Se(n[r],e,t)}else Se(n,e,t)})),f.pop(),d=null};let ve=null;function ye(){be.stop()}function we(){be.start()}const be=new Em;function Be(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||L.intersectsSprite(e)){r&&H.setFromMatrixPosition(e.matrixWorld).applyMatrix4(O);const t=Z.update(e),i=e.material;i.visible&&u.push(e,t,i,n,H.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==K.render.frame&&(e.skeleton.update(),e.skeleton.frame=K.render.frame),!e.frustumCulled||L.intersectsObject(e))){r&&H.setFromMatrixPosition(e.matrixWorld).applyMatrix4(O);const t=Z.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let o=0,a=r.length;o<a;o++){const a=r[o],s=i[a.materialIndex];s&&s.visible&&u.push(e,t,s,n,H.z,a)}}else i.visible&&u.push(e,t,i,n,H.z,null)}const i=e.children;for(let e=0,o=i.length;e<o;e++)Be(i[e],t,n,r)}function _e(e,t,n,r){const i=e.opaque,a=e.transmissive,s=e.transparent;d.setupLightsView(n),a.length>0&&function(e,t,n){const r=V.isWebGL2;null===P&&(P=new cf(1,1,{generateMipmaps:!0,type:null!==ce.convert(nh)?nh:Zd,minFilter:Yd,samples:r&&!0===o?4:0}));p.getDrawingBufferSize(D),r?P.setSize(D.x,D.y):P.setSize(Dh(D.x),Dh(D.y));const i=p.getRenderTarget();p.setRenderTarget(P),p.clear();const a=p.toneMapping;p.toneMapping=0,xe(e,t,n),p.toneMapping=a,W.updateMultisampleRenderTarget(P),W.updateRenderTargetMipmap(P),p.setRenderTarget(i)}(i,t,n),r&&j.viewport(B.copy(r)),i.length>0&&xe(i,t,n),a.length>0&&xe(a,t,n),s.length>0&&xe(s,t,n),j.buffers.depth.setTest(!0),j.buffers.depth.setMask(!0),j.buffers.color.setMask(!0),j.setPolygonOffset(!1)}function xe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,A=null===r?o.material:r,c=o.group;a.layers.test(n.layers)&&Ce(a,t,n,s,A,c)}}function Ce(e,t,n,r,i,o){e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(p,t,n,r,e,o),!0===i.transparent&&2===i.side?(i.side=1,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,o),i.side=0,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,o),i.side=2):p.renderBufferDirect(n,t,r,i,e,o),e.onAfterRender(p,t,n,r,i,o)}function Se(e,t,n){!0!==t.isScene&&(t=R);const r=G.get(e),i=d.state.lights,o=d.state.shadowsArray,a=i.state.version,s=$.getParameters(e,i.state,o,t,n),A=$.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?X:q).get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",ge),c=new Map,r.programs=c);let l=c.get(A);if(void 0!==l){if(r.currentProgram===l&&r.lightsStateVersion===a)return Ee(e,s),l}else s.uniforms=$.getUniforms(e),e.onBuild(n,s,p),e.onBeforeCompile(s,p),l=$.acquireProgram(s,A),c.set(A,l),r.uniforms=s.uniforms;const u=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=re.uniform),Ee(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(u.ambientLightColor.value=i.state.ambient,u.lightProbe.value=i.state.probe,u.directionalLights.value=i.state.directional,u.directionalLightShadows.value=i.state.directionalShadow,u.spotLights.value=i.state.spot,u.spotLightShadows.value=i.state.spotShadow,u.rectAreaLights.value=i.state.rectArea,u.ltc_1.value=i.state.rectAreaLTC1,u.ltc_2.value=i.state.rectAreaLTC2,u.pointLights.value=i.state.point,u.pointLightShadows.value=i.state.pointShadow,u.hemisphereLights.value=i.state.hemi,u.directionalShadowMap.value=i.state.directionalShadowMap,u.directionalShadowMatrix.value=i.state.directionalShadowMatrix,u.spotShadowMap.value=i.state.spotShadowMap,u.spotShadowMatrix.value=i.state.spotShadowMatrix,u.pointShadowMap.value=i.state.pointShadowMap,u.pointShadowMatrix.value=i.state.pointShadowMatrix);const h=l.getUniforms(),f=hv.seqWithValue(h.seq,u);return r.currentProgram=l,r.uniformsList=f,l}function Ee(e,t){const n=G.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}be.setAnimationLoop((function(e){ve&&ve(e)})),"undefined"!=typeof self&&be.setContext(self),this.setAnimationLoop=function(e){ve=e,fe.setAnimationLoop(e),null===e?be.stop():be.start()},fe.addEventListener("sessionstart",ye),fe.addEventListener("sessionend",we),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return;if(!0===m)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===fe.enabled&&!0===fe.isPresenting&&(!0===fe.cameraAutoUpdate&&fe.updateCamera(t),t=fe.getCamera()),!0===e.isScene&&e.onBeforeRender(p,e,t,y),d=ne.get(e,f.length),d.init(),f.push(d),O.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),L.setFromProjectionMatrix(O),k=this.localClippingEnabled,I=re.init(this.clippingPlanes,k,t),u=te.get(e,h.length),u.init(),h.push(u),Be(e,t,0,p.sortObjects),u.finish(),!0===p.sortObjects&&u.sort(M,U),!0===I&&re.beginShadows();const n=d.state.shadowsArray;if(ie.render(n,e,t),!0===I&&re.endShadows(),!0===this.info.autoReset&&this.info.reset(),oe.render(u,e),d.setupLights(p.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];_e(u,e,r,r.viewport)}}else _e(u,e,t);null!==y&&(W.updateMultisampleRenderTarget(y),W.updateRenderTargetMipmap(y)),!0===e.isScene&&e.onAfterRender(p,e,t),le.resetDefaultState(),w=-1,b=null,f.pop(),d=f.length>0?f[f.length-1]:null,h.pop(),u=h.length>0?h[h.length-1]:null},this.getActiveCubeFace=function(){return g},this.getActiveMipmapLevel=function(){return v},this.getRenderTarget=function(){return y},this.setRenderTargetTextures=function(e,t,n){G.get(e.texture).__webglTexture=t,G.get(e.depthTexture).__webglTexture=n;const r=G.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===z.has("WEBGL_multisampled_render_to_texture")&&(r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=G.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){y=e,g=t,v=n;let r=!0;if(e){const t=G.get(e);void 0!==t.__useDefaultFramebuffer?(j.bindFramebuffer(36160,null),r=!1):void 0===t.__webglFramebuffer?W.setupRenderTarget(e):t.__hasExternalTextures&&W.rebindTextures(e,G.get(e.texture).__webglTexture,G.get(e.depthTexture).__webglTexture)}let i=null,o=!1,a=!1;if(e){const n=e.texture;(n.isData3DTexture||n.isDataArrayTexture)&&(a=!0);const r=G.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=r[t],o=!0):i=V.isWebGL2&&e.samples>0&&!1===W.useMultisampledRTT(e)?G.get(e).__webglMultisampledFramebuffer:r,B.copy(e.viewport),_.copy(e.scissor),x=e.scissorTest}else B.copy(F).multiplyScalar(E).floor(),_.copy(T).multiplyScalar(E).floor(),x=Q;if(j.bindFramebuffer(36160,i)&&V.drawBuffers&&r&&j.drawBuffers(e,i),j.viewport(B),j.scissor(_),j.setScissorTest(x),o){const r=G.get(e.texture);ue.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(a){const r=G.get(e.texture),i=t||0;ue.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return;let s=G.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){j.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,A=a.type;if(s!==ih&&ce.convert(s)!==ue.getParameter(35739))return;const c=A===nh&&(z.has("EXT_color_buffer_half_float")||V.isWebGL2&&z.has("EXT_color_buffer_float"));if(!(A===Zd||ce.convert(A)===ue.getParameter(35738)||A===th&&(V.isWebGL2||z.has("OES_texture_float")||z.has("WEBGL_color_buffer_float"))||c))return;t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ue.readPixels(t,n,r,i,ce.convert(s),ce.convert(A),o)}finally{const e=null!==y?G.get(y).__webglFramebuffer:null;j.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){if(!0!==t.isFramebufferTexture)return;const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);W.setTexture2D(t,0),ue.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,o),j.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=ce.convert(n.format),s=ce.convert(n.type);W.setTexture2D(n,0),ue.pixelStorei(37440,n.flipY),ue.pixelStorei(37441,n.premultiplyAlpha),ue.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ue.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ue.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ue.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ue.generateMipmap(3553),j.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(p.isWebGL1Renderer)return;const o=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,A=ce.convert(r.format),c=ce.convert(r.type);let l;if(r.isData3DTexture)W.setTexture3D(r,0),l=32879;else{if(!r.isDataArrayTexture)return;W.setTexture2DArray(r,0),l=35866}ue.pixelStorei(37440,r.flipY),ue.pixelStorei(37441,r.premultiplyAlpha),ue.pixelStorei(3317,r.unpackAlignment);const u=ue.getParameter(3314),d=ue.getParameter(32878),h=ue.getParameter(3316),f=ue.getParameter(3315),m=ue.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ue.pixelStorei(3314,g.width),ue.pixelStorei(32878,g.height),ue.pixelStorei(3316,e.min.x),ue.pixelStorei(3315,e.min.y),ue.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ue.texSubImage3D(l,i,t.x,t.y,t.z,o,a,s,A,c,g.data):n.isCompressedTexture?ue.compressedTexSubImage3D(l,i,t.x,t.y,t.z,o,a,s,A,g.data):ue.texSubImage3D(l,i,t.x,t.y,t.z,o,a,s,A,c,g),ue.pixelStorei(3314,u),ue.pixelStorei(32878,d),ue.pixelStorei(3316,h),ue.pixelStorei(3315,f),ue.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ue.generateMipmap(l),j.unbindTexture()},this.initTexture=function(e){W.setTexture2D(e,0),j.unbindTexture()},this.resetState=function(){g=0,v=0,y=null,j.reset(),le.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}ay.prototype.isWebGLRenderer=!0;(class extends ay{}).prototype.isWebGL1Renderer=!0;class sy{constructor(e,t=25e-5){this.name="",this.color=new ef(e),this.density=t}clone(){return new sy(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}sy.prototype.isFogExp2=!0;class Ay{constructor(e,t=1,n=1e3){this.name="",this.color=new ef(e),this.near=t,this.far=n}clone(){return new Ay(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}Ay.prototype.isFog=!0;class cy extends pp{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}cy.prototype.isScene=!0;class ly{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=_h,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Qh()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Qh()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Qh()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}ly.prototype.isInterleavedBuffer=!0;const uy=new hf;class dy{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)uy.fromBufferAttribute(this,t),uy.applyMatrix4(e),this.setXYZ(t,uy.x,uy.y,uy.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)uy.fromBufferAttribute(this,t),uy.applyNormalMatrix(e),this.setXYZ(t,uy.x,uy.y,uy.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)uy.fromBufferAttribute(this,t),uy.transformDirection(e),this.setXYZ(t,uy.x,uy.y,uy.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new Qp(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new dy(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}dy.prototype.isInterleavedBufferAttribute=!0;class hy extends Mp{constructor(e){super(),this.type="SpriteMaterial",this.color=new ef(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let fy;hy.prototype.isSpriteMaterial=!0;const py=new hf,my=new hf,gy=new hf,vy=new Rh,yy=new Rh,wy=new jf,by=new hf,By=new hf,_y=new hf,xy=new Rh,Cy=new Rh,Sy=new Rh;class Ey extends pp{constructor(e){if(super(),this.type="Sprite",void 0===fy){fy=new Vp;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new ly(e,5);fy.setIndex([0,1,2,0,2,3]),fy.setAttribute("position",new dy(t,3,0,!1)),fy.setAttribute("uv",new dy(t,2,3,!1))}this.geometry=fy,this.material=void 0!==e?e:new hy,this.center=new Rh(.5,.5)}raycast(e,t){e.camera,my.setFromMatrixScale(this.matrixWorld),wy.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),gy.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&my.multiplyScalar(-gy.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;My(by.set(-.5,-.5,0),gy,o,my,r,i),My(By.set(.5,-.5,0),gy,o,my,r,i),My(_y.set(.5,.5,0),gy,o,my,r,i),xy.set(0,0),Cy.set(1,0),Sy.set(1,1);let a=e.ray.intersectTriangle(by,By,_y,!1,py);if(null===a&&(My(By.set(-.5,.5,0),gy,o,my,r,i),Cy.set(0,1),a=e.ray.intersectTriangle(by,_y,By,!1,py),null===a))return;const s=e.ray.origin.distanceTo(py);s<e.near||s>e.far||t.push({distance:s,point:py.clone(),uv:Sp.getUV(py,by,By,_y,xy,Cy,Sy,new Rh),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function My(e,t,n,r,i,o){vy.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(yy.x=o*vy.x-i*vy.y,yy.y=i*vy.x+o*vy.y):yy.copy(vy),e.copy(t),e.x+=yy.x,e.y+=yy.y,e.applyMatrix4(wy)}Ey.prototype.isSprite=!0;const Uy=new hf,Fy=new Af,Ty=new Af,Qy=new hf,Ly=new jf;class Iy extends sm{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new jf,this.bindMatrixInverse=new jf}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Af,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode&&this.bindMatrixInverse.copy(this.bindMatrix).invert()}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Fy.fromBufferAttribute(r.attributes.skinIndex,e),Ty.fromBufferAttribute(r.attributes.skinWeight,e),Uy.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Ty.getComponent(e);if(0!==r){const i=Fy.getComponent(e);Ly.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(Qy.copy(Uy).applyMatrix4(Ly),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}Iy.prototype.isSkinnedMesh=!0;class ky extends pp{constructor(){super(),this.type="Bone"}}ky.prototype.isBone=!0;class Py extends sf{constructor(e=null,t=1,n=1,r,i,o,a,s,A=1003,c=1003,l,u){super(null,o,a,s,A,c,r,i,l,u),this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}Py.prototype.isDataTexture=!0;const Oy=new jf,Dy=new jf;class Hy{constructor(e=[],t=[]){this.uuid=Qh(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new jf)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new jf;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:Dy;Oy.multiplyMatrices(i,t[r]),Oy.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new Hy(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=Oh(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Py(t,e,e,ih,th);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){let r=t[e.bones[n]];void 0===r&&(r=new ky),this.bones.push(r),this.boneInverses.push((new jf).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const o=n[r];e.boneInverses.push(o.toArray())}return e}}class Ry extends Qp{constructor(e,t,n,r=1){"number"==typeof n&&(r=n,n=!1),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}Ry.prototype.isInstancedBufferAttribute=!0;const Ny=new jf,zy=new jf,Vy=[],jy=new sm;class Ky extends sm{constructor(e,t,n){super(e,t),this.instanceMatrix=new Ry(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(jy.geometry=this.geometry,jy.material=this.material,void 0!==jy.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Ny),zy.multiplyMatrices(n,Ny),jy.matrixWorld=zy,jy.raycast(e,Vy);for(let e=0,n=Vy.length;e<n;e++){const n=Vy[e];n.instanceId=i,n.object=this,t.push(n)}Vy.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Ry(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Ky.prototype.isInstancedMesh=!0;class Gy extends Mp{constructor(e){super(),this.type="LineBasicMaterial",this.color=new ef(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this}}Gy.prototype.isLineBasicMaterial=!0;const Wy=new hf,qy=new hf,Xy=new jf,Jy=new Vf,Yy=new kf;class Zy extends pp{constructor(e=new Vp,t=new Gy){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry){if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Wy.fromBufferAttribute(t,e-1),qy.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Wy.distanceTo(qy);e.setAttribute("lineDistance",new kp(n,1))}}else e.isGeometry;return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Yy.copy(n.boundingSphere),Yy.applyMatrix4(r),Yy.radius+=i,!1===e.ray.intersectsSphere(Yy))return;Xy.copy(r).invert(),Jy.copy(e.ray).applyMatrix4(Xy);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,A=new hf,c=new hf,l=new hf,u=new hf,d=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=d){const o=r.getX(n),a=r.getX(n+1);A.fromBufferAttribute(i,o),c.fromBufferAttribute(i,a);if(Jy.distanceSqToSegment(A,c,u,l)>s)continue;u.applyMatrix4(this.matrixWorld);const d=e.ray.origin.distanceTo(u);d<e.near||d>e.far||t.push({distance:d,point:l.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=d){A.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Jy.distanceSqToSegment(A,c,u,l)>s)continue;u.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(u);r<e.near||r>e.far||t.push({distance:r,point:l.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length}}}Zy.prototype.isLine=!0;const $y=new hf,ew=new hf;class tw extends Zy{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry){if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)$y.fromBufferAttribute(t,e),ew.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+$y.distanceTo(ew);e.setAttribute("lineDistance",new kp(n,1))}}else e.isGeometry;return this}}tw.prototype.isLineSegments=!0;class nw extends Zy{constructor(e,t){super(e,t),this.type="LineLoop"}}nw.prototype.isLineLoop=!0;class rw extends Mp{constructor(e){super(),this.type="PointsMaterial",this.color=new ef(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this}}rw.prototype.isPointsMaterial=!0;const iw=new jf,ow=new Vf,aw=new kf,sw=new hf;class Aw extends pp{constructor(e=new Vp,t=new rw){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),aw.copy(n.boundingSphere),aw.applyMatrix4(r),aw.radius+=i,!1===e.ray.intersectsSphere(aw))return;iw.copy(r).invert(),ow.copy(e.ray).applyMatrix4(iw);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),A=Math.min(i.count,o.start+o.count);n<A;n++){const o=i.getX(n);sw.fromBufferAttribute(a,o),cw(sw,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)sw.fromBufferAttribute(a,n),cw(sw,n,s,r,e,t,this)}}}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length}}}function cw(e,t,n,r,i,o,a){const s=ow.distanceSqToPoint(e);if(s<n){const n=new hf;ow.closestPointToPoint(e,n),n.applyMatrix4(r);const A=i.ray.origin.distanceTo(n);if(A<i.near||A>i.far)return;o.push({distance:A,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}Aw.prototype.isPoints=!0;(class extends sf{constructor(e,t,n,r,i,o,a,s,A){super(e,t,n,r,i,o,a,s,A),this.minFilter=void 0!==o?o:Xd,this.magFilter=void 0!==i?i:Xd,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;(class extends sf{constructor(e,t,n){super({width:e,height:t}),this.format=n,this.magFilter=Gd,this.minFilter=Gd,this.generateMipmaps=!1,this.needsUpdate=!0}}).prototype.isFramebufferTexture=!0;class lw extends sf{constructor(e,t,n,r,i,o,a,s,A,c,l,u){super(null,o,a,s,A,c,r,i,l,u),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}lw.prototype.isCompressedTexture=!0;(class extends sf{constructor(e,t,n,r,i,o,a,s,A){super(e,t,n,r,i,o,a,s,A),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;class uw{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,A=i-1;for(;s<=A;)if(r=Math.floor(s+(A-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){A=r;break}A=r-1}if(r=A,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),a=this.getPoint(i),s=t||(o.isVector2?new Rh:new hf);return s.copy(a).sub(o).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new hf,r=[],i=[],o=[],a=new hf,s=new jf;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new hf)}i[0]=new hf,o[0]=new hf;let A=Number.MAX_VALUE;const c=Math.abs(r[0].x),l=Math.abs(r[0].y),u=Math.abs(r[0].z);c<=A&&(A=c,n.set(1,0,0)),l<=A&&(A=l,n.set(0,1,0)),u<=A&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),a.crossVectors(r[t-1],r[t]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(Lh(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(a,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(Lh(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class dw extends uw{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new Rh,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),A=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=A-this.aY;s=n*e-r*t+this.aX,A=n*t+r*e+this.aY}return n.set(s,A)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}dw.prototype.isEllipseCurve=!0;class hw extends dw{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function fw(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let A=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;A*=a,c*=a,i(t,n,A,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}hw.prototype.isArcCurve=!0;const pw=new hf,mw=new fw,gw=new fw,vw=new fw;class yw extends uw{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new hf){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,A=Math.floor(o),c=o-A;this.closed?A+=A>0?0:(Math.floor(Math.abs(A)/i)+1)*i:0===c&&A===i-1&&(A=i-2,c=1),this.closed||A>0?a=r[(A-1)%i]:(pw.subVectors(r[0],r[1]).add(r[0]),a=pw);const l=r[A%i],u=r[(A+1)%i];if(this.closed||A+2<i?s=r[(A+2)%i]:(pw.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=pw),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(l),e),n=Math.pow(l.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),mw.initNonuniformCatmullRom(a.x,l.x,u.x,s.x,t,n,r),gw.initNonuniformCatmullRom(a.y,l.y,u.y,s.y,t,n,r),vw.initNonuniformCatmullRom(a.z,l.z,u.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(mw.initCatmullRom(a.x,l.x,u.x,s.x,this.tension),gw.initCatmullRom(a.y,l.y,u.y,s.y,this.tension),vw.initCatmullRom(a.z,l.z,u.z,s.z,this.tension));return n.set(mw.calc(c),gw.calc(c),vw.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new hf).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function ww(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function bw(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Bw(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}yw.prototype.isCatmullRomCurve3=!0;class _w extends uw{constructor(e=new Rh,t=new Rh,n=new Rh,r=new Rh){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Rh){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Bw(e,r.x,i.x,o.x,a.x),Bw(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}_w.prototype.isCubicBezierCurve=!0;class xw extends uw{constructor(e=new hf,t=new hf,n=new hf,r=new hf){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new hf){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Bw(e,r.x,i.x,o.x,a.x),Bw(e,r.y,i.y,o.y,a.y),Bw(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}xw.prototype.isCubicBezierCurve3=!0;class Cw extends uw{constructor(e=new Rh,t=new Rh){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Rh){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Rh;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Cw.prototype.isLineCurve=!0;class Sw extends uw{constructor(e=new Rh,t=new Rh,n=new Rh){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Rh){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(bw(e,r.x,i.x,o.x),bw(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Sw.prototype.isQuadraticBezierCurve=!0;class Ew extends uw{constructor(e=new hf,t=new hf,n=new hf){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new hf){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(bw(e,r.x,i.x,o.x),bw(e,r.y,i.y,o.y),bw(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ew.prototype.isQuadraticBezierCurve3=!0;class Mw extends uw{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new Rh){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],A=r[o],c=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(ww(a,s.x,A.x,c.x,l.x),ww(a,s.y,A.y,c.y,l.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Rh).fromArray(n))}return this}}Mw.prototype.isSplineCurve=!0;var Uw=Object.freeze({__proto__:null,ArcCurve:hw,CatmullRomCurve3:yw,CubicBezierCurve:_w,CubicBezierCurve3:xw,EllipseCurve:dw,LineCurve:Cw,LineCurve3:class extends uw{constructor(e=new hf,t=new hf){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new hf){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},QuadraticBezierCurve:Sw,QuadraticBezierCurve3:Ew,SplineCurve:Mw});class Fw extends uw{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Cw(t,e))}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,o=this.curves[i],a=o.getLength(),s=0===a?0:1-e/a;return o.getPointAt(s,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o.isEllipseCurve?2*e:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Uw[n.type]).fromJSON(n))}return this}}class Tw extends Fw{constructor(e){super(),this.type="Path",this.currentPoint=new Rh,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Cw(this.currentPoint.clone(),new Rh(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Sw(this.currentPoint.clone(),new Rh(e,t),new Rh(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new _w(this.currentPoint.clone(),new Rh(e,t),new Rh(n,r),new Rh(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Mw(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const A=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+A,t+c,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const A=new dw(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=A.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(A);const c=A.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}new hf,new hf,new hf,new Sp;class Qw extends Tw{constructor(e){super(e),this.uuid=Qh(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Tw).fromJSON(n))}return this}}const Lw=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=Iw(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,A,c,l,u,d,h;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,A,c;for(o=0,a=t.length;o<a;o++)s=t[o]*r,A=o<a-1?t[o+1]*r:e.length,c=Iw(e,s,A,r,!1),c===c.next&&(c.steiner=!0),i.push(Kw(c));for(i.sort(Nw),o=0;o<i.length;o++)zw(i[o],n),n=kw(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=c=e[0],A=l=e[1];for(let t=n;t<i;t+=n)u=e[t],d=e[t+1],u<s&&(s=u),d<A&&(A=d),u>c&&(c=u),d>l&&(l=d);h=Math.max(c-s,l-A),h=0!==h?1/h:0}return Pw(o,a,n,s,A,h),a};function Iw(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=tb(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=tb(o,e[o],e[o+1],a);return a&&Xw(a,a.next)&&(nb(a),a=a.next),a}function kw(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Xw(r,r.next)&&0!==qw(r.prev,r,r.next))r=r.next;else{if(nb(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Pw(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=jw(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,A,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(A=c;s>0||A>0&&r;)0!==s&&(0===A||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,A--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);let s,A,c=e;for(;e.prev!==e.next;)if(s=e.prev,A=e.next,o?Dw(e,r,i,o):Ow(e))t.push(s.i/n),t.push(e.i/n),t.push(A.i/n),nb(e),e=A.next,c=A.next;else if((e=A)===c){a?1===a?Pw(e=Hw(kw(e),t,n),t,n,r,i,o,2):2===a&&Rw(e,t,n,r,i,o):Pw(kw(e),t,n,r,i,o,1);break}}function Ow(e){const t=e.prev,n=e,r=e.next;if(qw(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(Gw(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&qw(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Dw(e,t,n,r){const i=e.prev,o=e,a=e.next;if(qw(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,A=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=jw(s,A,t,n,r),d=jw(c,l,t,n,r);let h=e.prevZ,f=e.nextZ;for(;h&&h.z>=u&&f&&f.z<=d;){if(h!==e.prev&&h!==e.next&&Gw(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&qw(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,f!==e.prev&&f!==e.next&&Gw(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&qw(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;h&&h.z>=u;){if(h!==e.prev&&h!==e.next&&Gw(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&qw(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=d;){if(f!==e.prev&&f!==e.next&&Gw(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&qw(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Hw(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Xw(i,o)&&Jw(i,r,r.next,o)&&$w(i,o)&&$w(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),nb(r),nb(r.next),r=e=o),r=r.next}while(r!==e);return kw(r)}function Rw(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Ww(a,e)){let s=eb(a,e);return a=kw(a,a.next),s=kw(s,s.next),Pw(a,t,n,r,i,o),void Pw(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function Nw(e,t){return e.x-t.x}function zw(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,A=o.x,c=o.y;let l,u=1/0;n=o;do{r>=n.x&&n.x>=A&&r!==n.x&&Gw(i<c?r:a,i,A,c,i<c?a:r,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(r-n.x),$w(n,e)&&(l<u||l===u&&(n.x>o.x||n.x===o.x&&Vw(o,n)))&&(o=n,u=l)),n=n.next}while(n!==s);return o}(e,t),t){const n=eb(t,e);kw(t,t.next),kw(n,n.next)}}function Vw(e,t){return qw(e.prev,e,t.prev)<0&&qw(t.next,e,e.next)<0}function jw(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Kw(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Gw(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Ww(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Jw(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&($w(e,t)&&$w(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(qw(e.prev,e,t.prev)||qw(e,t.prev,t))||Xw(e,t)&&qw(e.prev,e,e.next)>0&&qw(t.prev,t,t.next)>0)}function qw(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Xw(e,t){return e.x===t.x&&e.y===t.y}function Jw(e,t,n,r){const i=Zw(qw(e,t,n)),o=Zw(qw(e,t,r)),a=Zw(qw(n,r,e)),s=Zw(qw(n,r,t));return i!==o&&a!==s||(!(0!==i||!Yw(e,n,t))||(!(0!==o||!Yw(e,r,t))||(!(0!==a||!Yw(n,e,r))||!(0!==s||!Yw(n,t,r)))))}function Yw(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Zw(e){return e>0?1:e<0?-1:0}function $w(e,t){return qw(e.prev,e,e.next)<0?qw(e,t,e.next)>=0&&qw(e,e.prev,t)>=0:qw(e,t,e.prev)<0||qw(e,e.next,t)<0}function eb(e,t){const n=new rb(e.i,e.x,e.y),r=new rb(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function tb(e,t,n,r){const i=new rb(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function nb(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function rb(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class ib{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return ib.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];ob(e),ab(n,e);let o=e.length;t.forEach(ob);for(let e=0;e<t.length;e++)r.push(o),o+=t[e].length,ab(n,t[e]);const a=Lw(n,r);for(let e=0;e<a.length;e+=3)i.push(a.slice(e,e+3));return i}}function ob(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function ab(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class sb extends Vp{constructor(e=new Qw([new Rh(.5,.5),new Rh(-.5,.5),new Rh(-.5,-.5),new Rh(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++){o(e[t])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let A=void 0!==t.depth?t.depth:1,c=void 0===t.bevelEnabled||t.bevelEnabled,l=void 0!==t.bevelThickness?t.bevelThickness:.2,u=void 0!==t.bevelSize?t.bevelSize:l-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,h=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,p=void 0!==t.UVGenerator?t.UVGenerator:Ab;void 0!==t.amount&&(A=t.amount);let m,g,v,y,w,b=!1;f&&(m=f.getSpacedPoints(s),b=!0,c=!1,g=f.computeFrenetFrames(s,!1),v=new hf,y=new hf,w=new hf),c||(h=0,l=0,u=0,d=0);const B=e.extractPoints(a);let _=B.shape;const x=B.holes;if(!ib.isClockWise(_)){_=_.reverse();for(let e=0,t=x.length;e<t;e++){const t=x[e];ib.isClockWise(t)&&(x[e]=t.reverse())}}const C=ib.triangulateShape(_,x),S=_;for(let e=0,t=x.length;e<t;e++){const t=x[e];_=_.concat(t)}function E(e,t,n){return t.clone().multiplyScalar(n).add(e)}const M=_.length,U=C.length;function F(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,A=n.x-e.x,c=n.y-e.y,l=a*a+s*s,u=a*c-s*A;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(l),d=Math.sqrt(A*A+c*c),h=t.x-s/u,f=t.y+a/u,p=((n.x-c/d-h)*c-(n.y+A/d-f)*A)/(a*c-s*A);r=h+a*p-e.x,i=f+s*p-e.y;const m=r*r+i*i;if(m<=2)return new Rh(r,i);o=Math.sqrt(m/2)}else{let e=!1;a>Number.EPSILON?A>Number.EPSILON&&(e=!0):a<-Number.EPSILON?A<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new Rh(r/o,i/o)}const T=[];for(let e=0,t=S.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),T[e]=F(S[e],S[n],S[r]);const Q=[];let L,I=T.concat();for(let e=0,t=x.length;e<t;e++){const t=x[e];L=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[e]=F(t[e],t[r],t[i]);Q.push(L),I=I.concat(L)}for(let e=0;e<h;e++){const t=e/h,n=l*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+d;for(let e=0,t=S.length;e<t;e++){const t=E(S[e],T[e],r);O(t.x,t.y,-n)}for(let e=0,t=x.length;e<t;e++){const t=x[e];L=Q[e];for(let e=0,i=t.length;e<i;e++){const i=E(t[e],L[e],r);O(i.x,i.y,-n)}}}const k=u+d;for(let e=0;e<M;e++){const t=c?E(_[e],I[e],k):_[e];b?(y.copy(g.normals[0]).multiplyScalar(t.x),v.copy(g.binormals[0]).multiplyScalar(t.y),w.copy(m[0]).add(y).add(v),O(w.x,w.y,w.z)):O(t.x,t.y,0)}for(let e=1;e<=s;e++)for(let t=0;t<M;t++){const n=c?E(_[t],I[t],k):_[t];b?(y.copy(g.normals[e]).multiplyScalar(n.x),v.copy(g.binormals[e]).multiplyScalar(n.y),w.copy(m[e]).add(y).add(v),O(w.x,w.y,w.z)):O(n.x,n.y,A/s*e)}for(let e=h-1;e>=0;e--){const t=e/h,n=l*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+d;for(let e=0,t=S.length;e<t;e++){const t=E(S[e],T[e],r);O(t.x,t.y,A+n)}for(let e=0,t=x.length;e<t;e++){const t=x[e];L=Q[e];for(let e=0,i=t.length;e<i;e++){const i=E(t[e],L[e],r);b?O(i.x,i.y+m[s-1].y,m[s-1].x+n):O(i.x,i.y,A+n)}}}function P(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*h;e<n;e++){const n=M*e,o=M*(e+1);H(t+r+n,t+i+n,t+i+o,t+r+o)}}}function O(e,t,n){o.push(e),o.push(t),o.push(n)}function D(e,t,i){R(e),R(t),R(i);const o=r.length/3,a=p.generateTopUV(n,r,o-3,o-2,o-1);N(a[0]),N(a[1]),N(a[2])}function H(e,t,i,o){R(e),R(t),R(o),R(t),R(i),R(o);const a=r.length/3,s=p.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);N(s[0]),N(s[1]),N(s[3]),N(s[1]),N(s[2]),N(s[3])}function R(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function N(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=M*e;for(let e=0;e<U;e++){const n=C[e];D(n[2]+t,n[1]+t,n[0]+t)}e=s+2*h,t=M*e;for(let e=0;e<U;e++){const n=C[e];D(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<U;e++){const t=C[e];D(t[2],t[1],t[0])}for(let e=0;e<U;e++){const t=C[e];D(t[0]+M*s,t[1]+M*s,t[2]+M*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;P(S,t),t+=S.length;for(let e=0,n=x.length;e<n;e++){const n=x[e];P(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new kp(r,3)),this.setAttribute("uv",new kp(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Uw[r.type]).fromJSON(r)),new sb(n,e.options)}}const Ab={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],A=t[3*r+1],c=t[3*i],l=t[3*i+1];return[new Rh(o,a),new Rh(s,A),new Rh(c,l)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],A=t[3*n+2],c=t[3*r],l=t[3*r+1],u=t[3*r+2],d=t[3*i],h=t[3*i+1],f=t[3*i+2],p=t[3*o],m=t[3*o+1],g=t[3*o+2];return Math.abs(s-l)<Math.abs(a-c)?[new Rh(a,1-A),new Rh(c,1-u),new Rh(d,1-f),new Rh(p,1-g)]:[new Rh(s,1-A),new Rh(l,1-u),new Rh(h,1-f),new Rh(m,1-g)]}};class cb extends Vp{constructor(e=new Qw([new Rh(0,.5),new Rh(-.5,-.5),new Rh(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))A(e);else for(let t=0;t<e.length;t++)A(e[t]),this.addGroup(a,s,t),a+=s,s=0;function A(e){const a=r.length/3,A=e.extractPoints(t);let c=A.shape;const l=A.holes;!1===ib.isClockWise(c)&&(c=c.reverse());for(let e=0,t=l.length;e<t;e++){const t=l[e];!0===ib.isClockWise(t)&&(l[e]=t.reverse())}const u=ib.triangulateShape(c,l);for(let e=0,t=l.length;e<t;e++){const t=l[e];c=c.concat(t)}for(let e=0,t=c.length;e<t;e++){const t=c[e];r.push(t.x,t.y,0),i.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=u.length;e<t;e++){const t=u[e],r=t[0]+a,i=t[1]+a,o=t[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new kp(r,3)),this.setAttribute("normal",new kp(i,3)),this.setAttribute("uv",new kp(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new cb(n,e.curveSegments)}}class lb extends Mp{constructor(e){super(),this.type="ShadowMaterial",this.color=new ef(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}lb.prototype.isShadowMaterial=!0;class ub extends hm{constructor(e){super(e),this.type="RawShaderMaterial"}}ub.prototype.isRawShaderMaterial=!0;class db extends Mp{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ef(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ef(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rh(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}db.prototype.isMeshStandardMaterial=!0;class hb extends db{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Rh(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Lh(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new ef(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new ef(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new ef(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}hb.prototype.isMeshPhysicalMaterial=!0;class fb extends Mp{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new ef(16777215),this.specular=new ef(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ef(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rh(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}fb.prototype.isMeshPhongMaterial=!0;class pb extends Mp{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ef(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ef(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rh(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}pb.prototype.isMeshToonMaterial=!0;class mb extends Mp{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rh(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}mb.prototype.isMeshNormalMaterial=!0;class gb extends Mp{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new ef(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ef(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}gb.prototype.isMeshLambertMaterial=!0;class vb extends Mp{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ef(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rh(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}vb.prototype.isMeshMatcapMaterial=!0;class yb extends Gy{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}yb.prototype.isLineDashedMaterial=!0;const wb={ShadowMaterial:lb,SpriteMaterial:hy,RawShaderMaterial:ub,ShaderMaterial:hm,PointsMaterial:rw,MeshPhysicalMaterial:hb,MeshStandardMaterial:db,MeshPhongMaterial:fb,MeshToonMaterial:pb,MeshNormalMaterial:mb,MeshLambertMaterial:gb,MeshDepthMaterial:Wv,MeshDistanceMaterial:qv,MeshBasicMaterial:Up,MeshMatcapMaterial:vb,LineDashedMaterial:yb,LineBasicMaterial:Gy,Material:Mp};Mp.fromType=function(e){return new wb[e]};const bb={arraySlice:function(e,t,n){return bb.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],s=t.getValueSize(),A=[],c=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*i;if(!(o<n||o>=r)){A.push(t.times[e]);for(let n=0;n<s;++n)c.push(t.values[e*s+n])}}0!==A.length&&(t.times=bb.convertArray(A,t.times.constructor),t.values=bb.convertArray(c,t.values.constructor),a.push(t))}o.tracks=a;let s=1/0;for(let e=0;e<o.tracks.length;++e)s>o.tracks[e].times[0]&&(s=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)continue;let s=0;const A=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=A/3);let c=0;const l=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=l/3);const u=r.times.length-1;let d;if(o<=r.times[0]){const e=s,t=A-s;d=bb.arraySlice(r.values,e,t)}else if(o>=r.times[u]){const e=u*A+s,t=e+A-s;d=bb.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=s,n=A-s;e.evaluate(o),d=bb.arraySlice(e.resultBuffer,t,n)}if("quaternion"===i){(new df).fromArray(d).normalize().conjugate().toArray(d)}const h=a.times.length;for(let e=0;e<h;++e){const t=e*l+c;if("quaternion"===i)df.multiplyQuaternionsFlat(a.values,t,d,0,a.values,t);else{const e=l-2*c;for(let n=0;n<e;++n)a.values[t+n]-=d[n]}}}return e.blendMode=2501,e}};class Bb{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Bb.prototype.beforeStart_=Bb.prototype.copySampleValue_,Bb.prototype.afterEnd_=Bb.prototype.copySampleValue_;class _b extends Bb{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:fh,endingEnd:fh}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case ph:i=e,a=2*t-n;break;case mh:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case ph:o=e,s=2*n-t;break;case mh:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const A=.5*(n-t),c=this.valueSize;this._weightPrev=A/(t-a),this._weightNext=A/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,A=s-a,c=this._offsetPrev,l=this._offsetNext,u=this._weightPrev,d=this._weightNext,h=(n-t)/(r-t),f=h*h,p=f*h,m=-u*p+2*u*f-u*h,g=(1+u)*p+(-1.5-2*u)*f+(-.5+u)*h+1,v=(-1-d)*p+(1.5+d)*f+.5*h,y=d*p-d*f;for(let e=0;e!==a;++e)i[e]=m*o[c+e]+g*o[A+e]+v*o[s+e]+y*o[l+e];return i}}class xb extends Bb{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,A=s-a,c=(n-t)/(r-t),l=1-c;for(let e=0;e!==a;++e)i[e]=o[A+e]*l+o[s+e]*c;return i}}class Cb extends Bb{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Sb{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=bb.convertArray(t,this.TimeBufferType),this.values=bb.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:bb.convertArray(e.times,Array),values:bb.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Cb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new xb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new _b(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case uh:t=this.InterpolantFactoryMethodDiscrete;break;case dh:t=this.InterpolantFactoryMethodLinear;break;case hh:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return uh;case this.InterpolantFactoryMethodLinear:return dh;case this.InterpolantFactoryMethodSmooth:return hh}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=bb.arraySlice(n,i,o),this.values=bb.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){e=!1;break}if(null!==o&&o>r){e=!1;break}o=r}if(void 0!==r&&bb.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){e=!1;break}}return e}optimize(){const e=bb.arraySlice(this.times),t=bb.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===hh,i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=bb.arraySlice(e,0,o),this.values=bb.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=bb.arraySlice(this.times,0),t=bb.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Sb.prototype.TimeBufferType=Float32Array,Sb.prototype.ValueBufferType=Float32Array,Sb.prototype.DefaultInterpolation=dh;class Eb extends Sb{}Eb.prototype.ValueTypeName="bool",Eb.prototype.ValueBufferType=Array,Eb.prototype.DefaultInterpolation=uh,Eb.prototype.InterpolantFactoryMethodLinear=void 0,Eb.prototype.InterpolantFactoryMethodSmooth=void 0;class Mb extends Sb{}Mb.prototype.ValueTypeName="color";class Ub extends Sb{}Ub.prototype.ValueTypeName="number";class Fb extends Bb{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let A=e*a;for(let e=A+a;A!==e;A+=4)df.slerpFlat(i,0,o,A-a,o,A,s);return i}}class Tb extends Sb{InterpolantFactoryMethodLinear(e){return new Fb(this.times,this.values,this.getValueSize(),e)}}Tb.prototype.ValueTypeName="quaternion",Tb.prototype.DefaultInterpolation=dh,Tb.prototype.InterpolantFactoryMethodSmooth=void 0;class Qb extends Sb{}Qb.prototype.ValueTypeName="string",Qb.prototype.ValueBufferType=Array,Qb.prototype.DefaultInterpolation=uh,Qb.prototype.InterpolantFactoryMethodLinear=void 0,Qb.prototype.InterpolantFactoryMethodSmooth=void 0;class Lb extends Sb{}Lb.prototype.ValueTypeName="vector";class Ib{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Qh(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(kb(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(Sb.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e<i;e++){let a=[],s=[];a.push((e+i-1)%i,e,(e+1)%i),s.push(0,1,0);const A=bb.getKeyframeOrder(a);a=bb.sortedArray(a,1,A),s=bb.sortedArray(s,1,A),r||0!==a[0]||(a.push(i),s.push(s[0])),o.push(new Ub(".morphTargetInfluences["+t[e].name+"]",a,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(i);if(o&&o.length>1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];bb.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const A=e.hierarchy||[];for(let e=0;e<A.length;e++){const i=A[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new Ub(".morphTargetInfluence["+n+"]",e,o))}s=e.length*o}else{const o=".bones["+t[e].name+"]";n(Lb,o+".position",i,"pos",r),n(Tb,o+".quaternion",i,"rot",r),n(Lb,o+".scale",i,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function kb(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ub;case"vector":case"vector2":case"vector3":case"vector4":return Lb;case"color":return Mb;case"quaternion":return Tb;case"bool":case"boolean":return Eb;case"string":return Qb}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];bb.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Pb={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Ob{constructor(e,t,n){const r=this;let i,o=!1,a=0,s=0;const A=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===o&&void 0!==r.onStart&&r.onStart(e,a,s),o=!0},this.itemEnd=function(e){a++,void 0!==r.onProgress&&r.onProgress(e,a,s),a===s&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return A.push(e,t),this},this.removeHandler=function(e){const t=A.indexOf(e);return-1!==t&&A.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=A.length;t<n;t+=2){const n=A[t],r=A[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const Db=new Ob;class Hb{constructor(e){this.manager=void 0!==e?e:Db,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Rb={};class Nb extends Hb{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=Pb.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==Rb[e])return void Rb[e].push({onLoad:t,onProgress:n,onError:r});Rb[e]=[],Rb[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,s=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(t.status,"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Rb[e],r=t.body.getReader(),i=t.headers.get("Content-Length"),o=i?parseInt(i):0,a=0!==o;let s=0;const A=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:a,loaded:s,total:o});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}}))}()}});return new Response(A)}throw Error(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`)})).then((e=>{switch(s){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{Pb.add(e,t);const n=Rb[e];delete Rb[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=Rb[e];if(void 0===n)throw this.manager.itemError(e),t;delete Rb[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class zb extends Hb{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Pb.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=Vh("img");function s(){c(),Pb.add(e,this),t&&t(this),i.manager.itemEnd(e)}function A(t){c(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){a.removeEventListener("load",s,!1),a.removeEventListener("error",A,!1)}return a.addEventListener("load",s,!1),a.addEventListener("error",A,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class Vb extends Hb{constructor(e){super(e)}load(e,t,n,r){const i=new vm,o=new zb(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)s(t);return i}}class jb extends Hb{constructor(e){super(e)}load(e,t,n,r){const i=new sf,o=new zb(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Kb extends pp{constructor(e,t=1){super(),this.type="Light",this.color=new ef(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}Kb.prototype.isLight=!0;class Gb extends Kb{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(pp.DefaultUp),this.updateMatrix(),this.groundColor=new ef(t)}copy(e){return Kb.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Gb.prototype.isHemisphereLight=!0;const Wb=new jf,qb=new hf,Xb=new hf;class Jb{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Rh(512,512),this.map=null,this.mapPass=null,this.matrix=new jf,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Sm,this._frameExtents=new Rh(1,1),this._viewportCount=1,this._viewports=[new Af(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;qb.setFromMatrixPosition(e.matrixWorld),t.position.copy(qb),Xb.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Xb),t.updateMatrixWorld(),Wb.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wb),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Yb extends Jb{constructor(){super(new pm(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*Th*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}Yb.prototype.isSpotLightShadow=!0;class Zb extends Kb{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(pp.DefaultUp),this.updateMatrix(),this.target=new pp,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new Yb}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Zb.prototype.isSpotLight=!0;const $b=new jf,eB=new hf,tB=new hf;class nB extends Jb{constructor(){super(new pm(90,1,.5,500)),this._frameExtents=new Rh(4,2),this._viewportCount=6,this._viewports=[new Af(2,1,1,1),new Af(0,1,1,1),new Af(3,1,1,1),new Af(1,1,1,1),new Af(3,0,1,1),new Af(1,0,1,1)],this._cubeDirections=[new hf(1,0,0),new hf(-1,0,0),new hf(0,0,1),new hf(0,0,-1),new hf(0,1,0),new hf(0,-1,0)],this._cubeUps=[new hf(0,1,0),new hf(0,1,0),new hf(0,1,0),new hf(0,1,0),new hf(0,0,1),new hf(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),eB.setFromMatrixPosition(e.matrixWorld),n.position.copy(eB),tB.copy(n.position),tB.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(tB),n.updateMatrixWorld(),r.makeTranslation(-eB.x,-eB.y,-eB.z),$b.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix($b)}}nB.prototype.isPointLightShadow=!0;class rB extends Kb{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new nB}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}rB.prototype.isPointLight=!0;class iB extends Jb{constructor(){super(new Hm(-5,5,5,-5,.5,500))}}iB.prototype.isDirectionalLightShadow=!0;class oB extends Kb{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(pp.DefaultUp),this.updateMatrix(),this.target=new pp,this.shadow=new iB}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}oB.prototype.isDirectionalLight=!0;class aB extends Kb{constructor(e,t){super(e,t),this.type="AmbientLight"}}aB.prototype.isAmbientLight=!0;class sB extends Kb{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}sB.prototype.isRectAreaLight=!0;class AB{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new hf)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}AB.prototype.isSphericalHarmonics3=!0;class cB extends Kb{constructor(e=new AB,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}cB.prototype.isLightProbe=!0;class lB{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class uB extends Vp{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}uB.prototype.isInstancedBufferGeometry=!0;class dB extends Hb{constructor(e){super(e),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Pb.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Pb.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}let hB;dB.prototype.isImageBitmapLoader=!0;const fB=function(){return void 0===hB&&(hB=new(window.AudioContext||window.webkitAudioContext)),hB};class pB extends Hb{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Nb(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{const e=n.slice(0);fB().decodeAudioData(e,(function(e){t(e)}))}catch(t){r&&r(t),i.manager.itemError(e)}}),n,r)}}(class extends cB{constructor(e,t,n=1){super(void 0,n);const r=(new ef).set(e),i=(new ef).set(t),o=new hf(r.r,r.g,r.b),a=new hf(i.r,i.g,i.b),s=Math.sqrt(Math.PI),A=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(A)}}).prototype.isHemisphereLightProbe=!0;(class extends cB{constructor(e,t=1){super(void 0,t);const n=(new ef).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class mB{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=gB(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=gB();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function gB(){return("undefined"==typeof performance?Date:performance).now()}class vB extends pp{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return;if(!1===this.hasPlaybackControl)return;this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1!==this.hasPlaybackControl&&this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}class yB{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){df.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;df.multiplyQuaternionsFlat(e,o,e,t,e,n),df.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const wB="\\[\\]\\.:\\/",bB=new RegExp("[\\[\\]\\.:\\/]","g"),BB="[^\\[\\]\\.:\\/]",_B="[^"+wB.replace("\\.","")+"]",xB=/((?:WC+[\/:])*)/.source.replace("WC",BB),CB=/(WCOD+)?/.source.replace("WCOD",_B),SB=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",BB),EB=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",BB),MB=new RegExp("^"+xB+CB+SB+EB+"$"),UB=["material","materials","bones"];class FB{constructor(e,t,n){this.path=t,this.parsedPath=n||FB.parseTrackName(t),this.node=FB.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new FB.Composite(e,t,n):new FB(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(bB,"")}static parseTrackName(e){const t=MB.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==UB.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=FB.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return;if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return;if(!e.material.materials)return;e=e.material.materials;break;case"bones":if(!e.skeleton)return;e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return;e=e[n]}if(void 0!==r){if(void 0===e[r])return;e=e[r]}}const o=e[r];if(void 0===o){t.nodeName;return}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return;if(!e.geometry.isBufferGeometry)return;if(!e.geometry.morphAttributes)return;void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}FB.Composite=class{constructor(e,t,n){const r=n||FB.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},FB.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},FB.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},FB.prototype.GetterByBindingType=[FB.prototype._getValue_direct,FB.prototype._getValue_array,FB.prototype._getValue_arrayElement,FB.prototype._getValue_toArray],FB.prototype.SetterByBindingTypeAndVersioning=[[FB.prototype._setValue_direct,FB.prototype._setValue_direct_setNeedsUpdate,FB.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[FB.prototype._setValue_array,FB.prototype._setValue_array_setNeedsUpdate,FB.prototype._setValue_array_setMatrixWorldNeedsUpdate],[FB.prototype._setValue_arrayElement,FB.prototype._setValue_arrayElement_setNeedsUpdate,FB.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[FB.prototype._setValue_fromArray,FB.prototype._setValue_fromArray_setNeedsUpdate,FB.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class TB{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:fh,endingEnd:fh};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);a[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,A=a.sampleValues;return s[0]=i,s[1]=i+n,A[0]=e/o,A[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=ph,r.endingEnd=ph):(r.endingStart=e?this.zeroSlopeAtStart?ph:fh:mh,r.endingEnd=t?this.zeroSlopeAtEnd?ph:fh:mh)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}(class extends Eh{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,A=this._bindingsByRootAndName;let c=A[s];void 0===c&&(c={},A[s]=c);for(let e=0;e!==i;++e){const i=r[e],A=i.name;let l=c[A];if(void 0!==l)++l.referenceCount,o[e]=l;else{if(l=o[e],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,A));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;l=new yB(FB.create(n,A,r),i.ValueTypeName,i.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,A),o[e]=l}a[e].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,A=s[s.length-1],c=e._byClipCacheIndex;A._byClipCacheIndex=c,s[c]=A,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],A=e._cacheIndex;s._cacheIndex=A,t[A]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new xb(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?Ib.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let A=null;if(void 0===n&&(n=null!==o?o.blendMode:gh),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;A=s.knownActions[0],null===o&&(o=A._clip)}if(null===o)return null;const c=new TB(this,o,t,n);return this._bindAction(c,A),this._addInactiveAction(c,a,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?Ib.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let a=0;a!==n;++a){t[a]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)a[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class QB{constructor(e){"string"==typeof e&&(e=arguments[1]),this.value=e}clone(){return new QB(void 0===this.value.clone?this.value:this.value.clone())}}(class extends ly{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}).prototype.isInstancedInterleavedBuffer=!0;class LB{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Lh(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const IB=new Rh;class kB{constructor(e=new Rh(1/0,1/0),t=new Rh(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=IB.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return IB.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}kB.prototype.isBox2=!0;const PB=new hf,OB=new jf,DB=new jf;function HB(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,HB(e.children[n]));return t}const RB=new ArrayBuffer(4),NB=(new Float32Array(RB),new Uint32Array(RB),new Uint32Array(512)),zB=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(NB[e]=0,NB[256|e]=32768,zB[e]=24,zB[256|e]=24):t<-14?(NB[e]=1024>>-t-14,NB[256|e]=1024>>-t-14|32768,zB[e]=-t-1,zB[256|e]=-t-1):t<=15?(NB[e]=t+15<<10,NB[256|e]=t+15<<10|32768,zB[e]=13,zB[256|e]=13):t<128?(NB[e]=31744,NB[256|e]=64512,zB[e]=24,zB[256|e]=24):(NB[e]=31744,NB[256|e]=64512,zB[e]=13,zB[256|e]=13)}const VB=new Uint32Array(2048),jB=new Uint32Array(64),KB=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,VB[e]=t|n}for(let e=1024;e<2048;++e)VB[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)jB[e]=e<<23;jB[31]=1199570944,jB[32]=2147483648;for(let e=33;e<63;++e)jB[e]=2147483648+(e-32<<23);jB[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(KB[e]=1024);uw.create=function(e,t){return e.prototype=Object.create(uw.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Tw.prototype.fromPoints=function(e){return this.setFromPoints(e)};(class extends tw{constructor(e=10,t=10,n=4473924,r=8947848){n=new ef(n),r=new ef(r);const i=t/2,o=e/t,a=e/2,s=[],A=[];for(let e=0,c=0,l=-a;e<=t;e++,l+=o){s.push(-a,0,l,a,0,l),s.push(l,0,-a,l,0,a);const t=e===i?n:r;t.toArray(A,c),c+=3,t.toArray(A,c),c+=3,t.toArray(A,c),c+=3,t.toArray(A,c),c+=3}const c=new Vp;c.setAttribute("position",new kp(s,3)),c.setAttribute("color",new kp(A,3));super(c,new Gy({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}).prototype.setColors=function(){},class extends tw{constructor(e){const t=HB(e),n=new Vp,r=[],i=[],o=new ef(0,0,1),a=new ef(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new kp(r,3)),n.setAttribute("color",new kp(i,3));super(n,new Gy({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");DB.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(OB.multiplyMatrices(DB,i.matrixWorld),PB.setFromMatrixPosition(OB),r.setXYZ(n,PB.x,PB.y,PB.z),OB.multiplyMatrices(DB,i.parent.matrixWorld),PB.setFromMatrixPosition(OB),r.setXYZ(n+1,PB.x,PB.y,PB.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){};Hb.prototype.extractUrlBase=function(e){return lB.extractUrlBase(e)},Hb.Handlers={add:function(){},get:function(){}};kB.prototype.center=function(e){return this.getCenter(e)},kB.prototype.empty=function(){return this.isEmpty()},kB.prototype.isIntersectionBox=function(e){return this.intersectsBox(e)},kB.prototype.size=function(e){return this.getSize(e)},mf.prototype.center=function(e){return this.getCenter(e)},mf.prototype.empty=function(){return this.isEmpty()},mf.prototype.isIntersectionBox=function(e){return this.intersectsBox(e)},mf.prototype.isIntersectionSphere=function(e){return this.intersectsSphere(e)},mf.prototype.size=function(e){return this.getSize(e)},ep.prototype.toVector3=function(){},kf.prototype.empty=function(){return this.isEmpty()},Sm.prototype.setFromMatrix=function(e){return this.setFromProjectionMatrix(e)},Nh.prototype.flattenToArrayOffset=function(e,t){return this.toArray(e,t)},Nh.prototype.multiplyVector3=function(e){return e.applyMatrix3(this)},Nh.prototype.multiplyVector3Array=function(){},Nh.prototype.applyToBufferAttribute=function(e){return e.applyMatrix3(this)},Nh.prototype.applyToVector3Array=function(){},Nh.prototype.getInverse=function(e){return this.copy(e).invert()},jf.prototype.extractPosition=function(e){return this.copyPosition(e)},jf.prototype.flattenToArrayOffset=function(e,t){return this.toArray(e,t)},jf.prototype.getPosition=function(){return(new hf).setFromMatrixColumn(this,3)},jf.prototype.setRotationFromQuaternion=function(e){return this.makeRotationFromQuaternion(e)},jf.prototype.multiplyToArray=function(){},jf.prototype.multiplyVector3=function(e){return e.applyMatrix4(this)},jf.prototype.multiplyVector4=function(e){return e.applyMatrix4(this)},jf.prototype.multiplyVector3Array=function(){},jf.prototype.rotateAxis=function(e){e.transformDirection(this)},jf.prototype.crossVector=function(e){return e.applyMatrix4(this)},jf.prototype.translate=function(){},jf.prototype.rotateX=function(){},jf.prototype.rotateY=function(){},jf.prototype.rotateZ=function(){},jf.prototype.rotateByAxis=function(){},jf.prototype.applyToBufferAttribute=function(e){return e.applyMatrix4(this)},jf.prototype.applyToVector3Array=function(){},jf.prototype.makeFrustum=function(e,t,n,r,i,o){return this.makePerspective(e,t,r,n,i,o)},jf.prototype.getInverse=function(e){return this.copy(e).invert()},_m.prototype.isIntersectionLine=function(e){return this.intersectsLine(e)},df.prototype.multiplyVector3=function(e){return e.applyQuaternion(this)},df.prototype.inverse=function(){return this.invert()},Vf.prototype.isIntersectionBox=function(e){return this.intersectsBox(e)},Vf.prototype.isIntersectionPlane=function(e){return this.intersectsPlane(e)},Vf.prototype.isIntersectionSphere=function(e){return this.intersectsSphere(e)},Sp.prototype.area=function(){return this.getArea()},Sp.prototype.barycoordFromPoint=function(e,t){return this.getBarycoord(e,t)},Sp.prototype.midpoint=function(e){return this.getMidpoint(e)},Sp.prototypenormal=function(e){return this.getNormal(e)},Sp.prototype.plane=function(e){return this.getPlane(e)},Sp.barycoordFromPoint=function(e,t,n,r,i){return Sp.getBarycoord(e,t,n,r,i)},Sp.normal=function(e,t,n,r){return Sp.getNormal(e,t,n,r)},Qw.prototype.extractAllPoints=function(e){return this.extractPoints(e)},Qw.prototype.extrude=function(e){return new sb(this,e)},Qw.prototype.makeGeometry=function(e){return new cb(this,e)},Rh.prototype.fromAttribute=function(e,t,n){return this.fromBufferAttribute(e,t,n)},Rh.prototype.distanceToManhattan=function(e){return this.manhattanDistanceTo(e)},Rh.prototype.lengthManhattan=function(){return this.manhattanLength()},hf.prototype.setEulerFromRotationMatrix=function(){},hf.prototype.setEulerFromQuaternion=function(){},hf.prototype.getPositionFromMatrix=function(e){return this.setFromMatrixPosition(e)},hf.prototype.getScaleFromMatrix=function(e){return this.setFromMatrixScale(e)},hf.prototype.getColumnFromMatrix=function(e,t){return this.setFromMatrixColumn(t,e)},hf.prototype.applyProjection=function(e){return this.applyMatrix4(e)},hf.prototype.fromAttribute=function(e,t,n){return this.fromBufferAttribute(e,t,n)},hf.prototype.distanceToManhattan=function(e){return this.manhattanDistanceTo(e)},hf.prototype.lengthManhattan=function(){return this.manhattanLength()},Af.prototype.fromAttribute=function(e,t,n){return this.fromBufferAttribute(e,t,n)},Af.prototype.lengthManhattan=function(){return this.manhattanLength()},pp.prototype.getChildByName=function(e){return this.getObjectByName(e)},pp.prototype.renderDepth=function(){},pp.prototype.translate=function(e,t){return this.translateOnAxis(t,e)},pp.prototype.getWorldRotation=function(){},pp.prototype.applyMatrix=function(e){return this.applyMatrix4(e)},Object.defineProperties(pp.prototype,{eulerOrder:{get:function(){return this.rotation.order},set:function(e){this.rotation.order=e}},useQuaternion:{get:function(){},set:function(){}}}),sm.prototype.setDrawMode=function(){},Object.defineProperties(sm.prototype,{drawMode:{get:function(){return 0},set:function(){}}}),Iy.prototype.initBones=function(){},pm.prototype.setLens=function(e,t){void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Kb.prototype,{onlyShadow:{set:function(){}},shadowCameraFov:{set:function(e){this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){}},shadowBias:{set:function(e){this.shadow.bias=e}},shadowDarkness:{set:function(){}},shadowMapWidth:{set:function(e){this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){this.shadow.mapSize.height=e}}}),Object.defineProperties(Qp.prototype,{length:{get:function(){return this.array.length}},dynamic:{get:function(){return this.usage===xh},set:function(){this.setUsage(xh)}}}),Qp.prototype.setDynamic=function(e){return this.setUsage(!0===e?xh:_h),this},Qp.prototype.copyIndicesArray=function(){},Qp.prototype.setArray=function(){},Vp.prototype.addIndex=function(e){this.setIndex(e)},Vp.prototype.addAttribute=function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(this.setIndex(t),this):this.setAttribute(e,t):this.setAttribute(e,new Qp(arguments[1],arguments[2]))},Vp.prototype.addDrawCall=function(e,t,n){this.addGroup(e,t)},Vp.prototype.clearDrawCalls=function(){this.clearGroups()},Vp.prototype.computeOffsets=function(){},Vp.prototype.removeAttribute=function(e){return this.deleteAttribute(e)},Vp.prototype.applyMatrix=function(e){return this.applyMatrix4(e)},Object.defineProperties(Vp.prototype,{drawcalls:{get:function(){return this.groups}},offsets:{get:function(){return this.groups}}}),ly.prototype.setDynamic=function(e){return this.setUsage(!0===e?xh:_h),this},ly.prototype.setArray=function(){},sb.prototype.getArrays=function(){},sb.prototype.addShapeList=function(){},sb.prototype.addShape=function(){},cy.prototype.dispose=function(){},QB.prototype.onUpdate=function(){return this},Object.defineProperties(Mp.prototype,{wrapAround:{get:function(){},set:function(){}},overdraw:{get:function(){},set:function(){}},wrapRGB:{get:function(){return new ef}},shading:{get:function(){},set:function(e){this.flatShading=1===e}},stencilMask:{get:function(){return this.stencilFuncMask},set:function(e){this.stencilFuncMask=e}},vertexTangents:{get:function(){},set:function(){}}}),Object.defineProperties(hm.prototype,{derivatives:{get:function(){return this.extensions.derivatives},set:function(e){this.extensions.derivatives=e}}}),ay.prototype.clearTarget=function(e,t,n,r){this.setRenderTarget(e),this.clear(t,n,r)},ay.prototype.animate=function(e){this.setAnimationLoop(e)},ay.prototype.getCurrentRenderTarget=function(){return this.getRenderTarget()},ay.prototype.getMaxAnisotropy=function(){return this.capabilities.getMaxAnisotropy()},ay.prototype.getPrecision=function(){return this.capabilities.precision},ay.prototype.resetGLState=function(){return this.state.reset()},ay.prototype.supportsFloatTextures=function(){return this.extensions.get("OES_texture_float")},ay.prototype.supportsHalfFloatTextures=function(){return this.extensions.get("OES_texture_half_float")},ay.prototype.supportsStandardDerivatives=function(){return this.extensions.get("OES_standard_derivatives")},ay.prototype.supportsCompressedTextureS3TC=function(){return this.extensions.get("WEBGL_compressed_texture_s3tc")},ay.prototype.supportsCompressedTexturePVRTC=function(){return this.extensions.get("WEBGL_compressed_texture_pvrtc")},ay.prototype.supportsBlendMinMax=function(){return this.extensions.get("EXT_blend_minmax")},ay.prototype.supportsVertexTextures=function(){return this.capabilities.vertexTextures},ay.prototype.supportsInstancedArrays=function(){return this.extensions.get("ANGLE_instanced_arrays")},ay.prototype.enableScissorTest=function(e){this.setScissorTest(e)},ay.prototype.initMaterial=function(){},ay.prototype.addPrePlugin=function(){},ay.prototype.addPostPlugin=function(){},ay.prototype.updateShadowMap=function(){},ay.prototype.setFaceCulling=function(){},ay.prototype.allocTextureUnit=function(){},ay.prototype.setTexture=function(){},ay.prototype.setTexture2D=function(){},ay.prototype.setTextureCube=function(){},ay.prototype.getActiveMipMapLevel=function(){return this.getActiveMipmapLevel()},Object.defineProperties(ay.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){this.shadowMap.type=e}},shadowMapCullFace:{get:function(){},set:function(){}},context:{get:function(){return this.getContext()}},vr:{get:function(){return this.xr}},gammaInput:{get:function(){return!1},set:function(){}},gammaOutput:{get:function(){return!1},set:function(e){this.outputEncoding=!0===e?yh:vh}},toneMappingWhitePoint:{get:function(){return 1},set:function(){}},gammaFactor:{get:function(){return 2},set:function(){}}}),Object.defineProperties(Xv.prototype,{cullFace:{get:function(){},set:function(){}},renderReverseSided:{get:function(){},set:function(){}},renderSingleSided:{get:function(){},set:function(){}}});Object.defineProperties(cf.prototype,{wrapS:{get:function(){return this.texture.wrapS},set:function(e){this.texture.wrapS=e}},wrapT:{get:function(){return this.texture.wrapT},set:function(e){this.texture.wrapT=e}},magFilter:{get:function(){return this.texture.magFilter},set:function(e){this.texture.magFilter=e}},minFilter:{get:function(){return this.texture.minFilter},set:function(e){this.texture.minFilter=e}},anisotropy:{get:function(){return this.texture.anisotropy},set:function(e){this.texture.anisotropy=e}},offset:{get:function(){return this.texture.offset},set:function(e){this.texture.offset=e}},repeat:{get:function(){return this.texture.repeat},set:function(e){this.texture.repeat=e}},format:{get:function(){return this.texture.format},set:function(e){this.texture.format=e}},type:{get:function(){return this.texture.type},set:function(e){this.texture.type=e}},generateMipmaps:{get:function(){return this.texture.generateMipmaps},set:function(e){this.texture.generateMipmaps=e}}}),vB.prototype.load=function(e){const t=this;return(new pB).load(e,(function(e){t.setBuffer(e)})),this},gm.prototype.updateCubeMap=function(e,t){return this.update(e,t)},gm.prototype.clear=function(e,t,n,r){return this.renderTarget.clear(e,t,n,r)},nf.crossOrigin=void 0,nf.loadTexture=function(e,t,n,r){const i=new jb;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},nf.loadTextureCube=function(e,t,n,r){const i=new Vb;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},nf.loadCompressedTexture=function(){},nf.loadCompressedTextureCube=function(){};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ud}})),"undefined"!=typeof window&&(window.__THREE__||(window.__THREE__=Ud));class GB extends Hb{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new YB(e)})),this.register((function(e){return new r_(e)})),this.register((function(e){return new i_(e)})),this.register((function(e){return new ZB(e)})),this.register((function(e){return new $B(e)})),this.register((function(e){return new e_(e)})),this.register((function(e){return new t_(e)})),this.register((function(e){return new n_(e)})),this.register((function(e){return new XB(e)})),this.register((function(e){return new o_(e)}))}load(e,t,n,r){const i=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:lB.extractUrlBase(e),this.manager.itemStart(e);const a=function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)},s=new Nb(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){try{i.parse(n,o,(function(n){t(n),i.manager.itemEnd(e)}),a)}catch(e){a(e)}}),n,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i;const o={},a={};if("string"==typeof e)i=e;else{if(lB.decodeText(new Uint8Array(e,0,4))===a_){try{o[qB.KHR_BINARY_GLTF]=new c_(e)}catch(e){return void(r&&r(e))}i=o[qB.KHR_BINARY_GLTF].content}else i=lB.decodeText(new Uint8Array(e))}const s=JSON.parse(i);if(void 0===s.asset||s.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const A=new N_(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});A.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](A);a[t.name]=t,o[t.name]=!0}if(s.extensionsUsed)for(let e=0;e<s.extensionsUsed.length;++e){const t=s.extensionsUsed[e],n=s.extensionsRequired||[];switch(t){case qB.KHR_MATERIALS_UNLIT:o[t]=new JB;break;case qB.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:o[t]=new h_;break;case qB.KHR_DRACO_MESH_COMPRESSION:o[t]=new l_(s,this.dracoLoader);break;case qB.KHR_TEXTURE_TRANSFORM:o[t]=new u_;break;case qB.KHR_MESH_QUANTIZATION:o[t]=new f_;break;default:n.indexOf(t)>=0&&a[t]}}A.setExtensions(o),A.setPlugins(a),A.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function WB(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const qB={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression"};class XB{constructor(e){this.parser=e,this.name=qB.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const i=t.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let a;const s=new ef(16777215);void 0!==o.color&&s.fromArray(o.color);const A=void 0!==o.range?o.range:0;switch(o.type){case"directional":a=new oB(s),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new rB(s),a.distance=A;break;case"spot":a=new Zb(s),a.distance=A,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,a.angle=o.spot.outerConeAngle,a.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return a.position.set(0,0,0),a.decay=2,void 0!==o.intensity&&(a.intensity=o.intensity),a.name=t.createUniqueName(o.name||"light_"+e),r=Promise.resolve(a),t.cache.add(n,r),r}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class JB{constructor(){this.name=qB.KHR_MATERIALS_UNLIT}getMaterialType(){return Up}extendParams(e,t,n){const r=[];e.color=new ef(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,yh))}return Promise.all(r)}}class YB{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Rh(e,e)}return Promise.all(i)}}class ZB{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new ef(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,yh)),void 0!==o.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(i)}}class $B{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)}}class e_{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new ef(a[0],a[1],a[2]),Promise.all(i)}}class t_{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class n_{constructor(e){this.parser=e,this.name=qB.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?hb:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new ef(a[0],a[1],a[2]),void 0!==o.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,yh)),Promise.all(i)}}class r_{constructor(e){this.parser=e,this.name=qB.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,o)}}class i_{constructor(e){this.parser=e,this.name=qB.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],a=r.images[o.source];let s=n.textureLoader;if(a.uri){const e=n.options.manager.getHandler(a.uri);null!==e&&(s=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class o_{constructor(e){this.name=qB.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return Promise.all([r,i.ready]).then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,o=e.count,a=e.byteStride,s=new ArrayBuffer(o*a),A=new Uint8Array(t[0],n,r);return i.decodeGltfBuffer(new Uint8Array(s),o,a,A,e.mode,e.filter),s}))}return null}}const a_="glTF",s_=1313821514,A_=5130562;class c_{constructor(e){this.name=qB.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:lB.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==a_)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,r=new DataView(e,12);let i=0;for(;i<n;){const t=r.getUint32(i,!0);i+=4;const n=r.getUint32(i,!0);if(i+=4,n===s_){const n=new Uint8Array(e,12+i,t);this.content=lB.decodeText(n)}else if(n===A_){const n=12+i;this.body=e.slice(n,n+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class l_{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=qB.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},s={},A={};for(const e in o){const t=U_[e]||e.toLowerCase();a[t]=o[e]}for(const t in e.attributes){const r=U_[t]||t.toLowerCase();if(void 0!==o[t]){const i=n.accessors[e.attributes[t]],o=C_[i.componentType];A[r]=o,s[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=s[t];void 0!==r&&(n.normalized=r)}t(e)}),a,A)}))}))}}class u_{constructor(){this.name=qB.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return t.texCoord,void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class d_ extends db{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),a={specular:{value:(new ef).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=a,this.onBeforeCompile=function(e){for(const t in a)e.uniforms[t]=a[t];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return a.specular.value},set:function(e){a.specular.value=e}},specularMap:{get:function(){return a.specularMap.value},set:function(e){a.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return a.glossiness.value},set:function(e){a.glossiness.value=e}},glossinessMap:{get:function(){return a.glossinessMap.value},set:function(e){a.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class h_{constructor(){this.name=qB.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity"]}getMaterialType(){return d_}extendParams(e,t,n){const r=t.extensions[this.name];e.color=new ef(1,1,1),e.opacity=1;const i=[];if(Array.isArray(r.diffuseFactor)){const t=r.diffuseFactor;e.color.fromArray(t),e.opacity=t[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture,yh)),e.emissive=new ef(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new ef(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){const t=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",t)),i.push(n.assignTexture(e,"specularMap",t,yh))}return Promise.all(i)}createMaterial(e){const t=new d_(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=0,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t}}class f_{constructor(){this.name=qB.KHR_MESH_QUANTIZATION}}class p_ extends Bb{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}}p_.prototype.beforeStart_=p_.prototype.copySampleValue_,p_.prototype.afterEnd_=p_.prototype.copySampleValue_,p_.prototype.interpolate_=function(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,A=3*a,c=r-t,l=(n-t)/c,u=l*l,d=u*l,h=e*A,f=h-A,p=-2*d+3*u,m=d-u,g=1-p,v=m-u+l;for(let e=0;e!==a;e++){const t=o[f+e+a],n=o[f+e+s]*c,r=o[h+e+a],A=o[h+e]*c;i[e]=g*t+v*n+p*r+m*A}return i};const m_=new df;class g_ extends p_{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return m_.fromArray(i).normalize().toArray(i),i}}const v_=0,y_=1,w_=2,b_=3,B_=4,__=5,x_=6,C_={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},S_={9728:Gd,9729:Xd,9984:Wd,9985:Jd,9986:qd,9987:Yd},E_={33071:jd,33648:Kd,10497:Vd},M_={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},U_={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},F_={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},T_={CUBICSPLINE:void 0,LINEAR:dh,STEP:uh},Q_="OPAQUE",L_="MASK",I_="BLEND";function k_(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function P_(e,t){void 0!==t.extras&&"object"==typeof t.extras&&Object.assign(e.userData,t.extras)}function O_(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}}}function D_(e){const t=e.extensions&&e.extensions[qB.KHR_DRACO_MESH_COMPRESSION];let n;return n=t?"draco:"+t.bufferView+":"+t.indices+":"+H_(t.attributes):e.indices+":"+H_(e.attributes)+":"+e.mode,n}function H_(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function R_(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class N_{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new WB,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={},"undefined"!=typeof createImageBitmap&&!1===/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?this.textureLoader=new dB(this.options.manager):this.textureLoader=new jb(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Nb(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};k_(i,o,r),P_(o,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[qB.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){n.load(lB.resolveURL(t.uri,r.path),e,void 0,(function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],o=M_[r.type],a=C_[r.componentType],s=a.BYTES_PER_ELEMENT,A=s*o,c=r.byteOffset||0,l=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,u=!0===r.normalized;let d,h;if(l&&l!==A){const e=Math.floor(c/l),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let A=t.cache.get(n);A||(d=new a(i,e*l,r.count*l/s),A=new ly(d,l/s),t.cache.add(n,A)),h=new dy(A,o,c%l/s,u)}else d=null===i?new a(r.count*o):new a(i,c,r.count*o),h=new Qp(d,o,u);if(void 0!==r.sparse){const t=M_.SCALAR,n=C_[r.sparse.indices.componentType],s=r.sparse.indices.byteOffset||0,A=r.sparse.values.byteOffset||0,c=new n(e[1],s,r.sparse.count*t),l=new a(e[2],A,r.sparse.count*o);null!==i&&(h=new Qp(h.array.slice(),h.itemSize,h.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(h.setX(t,l[e*o]),o>=2&&h.setY(t,l[e*o+1]),o>=3&&h.setZ(t,l[e*o+2]),o>=4&&h.setW(t,l[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return h}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let o=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const r=this,i=this.json,o=i.textures[e],a=i.images[t],s=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[s])return this.textureCache[s];const A=this.loadImageSource(t,n).then((function(t){t.flipY=!1,o.name&&(t.name=o.name);const n=(i.samplers||{})[o.sampler]||{};return t.magFilter=S_[n.magFilter]||Xd,t.minFilter=S_[n.minFilter]||Yd,t.wrapS=E_[n.wrapS]||Vd,t.wrapT=E_[n.wrapT]||Vd,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[s]=A,A}loadImageSource(e,t){const n=this,r=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const o=r.images[e],a=self.URL||self.webkitURL;let s=o.uri||"",A=!1;if(void 0!==o.bufferView)s=n.getDependency("bufferView",o.bufferView).then((function(e){A=!0;const t=new Blob([e],{type:o.mimeType});return s=a.createObjectURL(t),s}));else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(s).then((function(e){return new Promise((function(n,r){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new sf(e);t.needsUpdate=!0,n(t)}),t.load(lB.resolveURL(e,i.path),o,void 0,r)}))})).then((function(e){var t;return!0===A&&a.revokeObjectURL(s),e.userData.mimeType=o.mimeType||((t=o.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw e}));return this.sourceCache[e]=c,c}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0!==n.texCoord&&0!=n.texCoord&&("aoMap"!==t||n.texCoord),i.extensions[qB.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[qB.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(o);o=i.extensions[qB.KHR_TEXTURE_TRANSFORM].extendTexture(o,e),i.associations.set(o,t)}}return void 0!==r&&(o.encoding=r),e[t]=o,o}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new rw,Mp.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new Gy,Mp.prototype.copy.call(t,n),t.color.copy(n.color),this.cache.add(e,t)),n=t}if(r||i||o){let e="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(e+="specular-glossiness:"),r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n}getMaterialType(){return db}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let o;const a={},s=i.extensions||{},A=[];if(s[qB.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const e=r[qB.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=e.getMaterialType(),A.push(e.extendParams(a,i,t))}else if(s[qB.KHR_MATERIALS_UNLIT]){const e=r[qB.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),A.push(e.extendParams(a,i,t))}else{const n=i.pbrMetallicRoughness||{};if(a.color=new ef(1,1,1),a.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;a.color.fromArray(e),a.opacity=e[3]}void 0!==n.baseColorTexture&&A.push(t.assignTexture(a,"map",n.baseColorTexture,yh)),a.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,a.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(A.push(t.assignTexture(a,"metalnessMap",n.metallicRoughnessTexture)),A.push(t.assignTexture(a,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),A.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,a)}))))}!0===i.doubleSided&&(a.side=2);const c=i.alphaMode||Q_;if(c===I_?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===L_&&(a.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&o!==Up&&(A.push(t.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new Rh(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;a.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&o!==Up&&(A.push(t.assignTexture(a,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(a.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&o!==Up&&(a.emissive=(new ef).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&o!==Up&&A.push(t.assignTexture(a,"emissiveMap",i.emissiveTexture,yh)),Promise.all(A).then((function(){let n;return n=o===d_?r[qB.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(a):new o(a),i.name&&(n.name=i.name),P_(n,i),t.associations.set(n,{materials:e}),i.extensions&&k_(r,n,i),n}))}createUniqueName(e){const t=FB.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[qB.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return V_(n,e,t)}))}const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n],s=D_(a),A=r[s];if(A)o.push(A.promise);else{let e;e=a.extensions&&a.extensions[qB.KHR_DRACO_MESH_COMPRESSION]?i(a):V_(new Vp,a,t),r[s]={primitive:a,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],o=i.primitives,a=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(s=this.cache).DefaultMaterial&&(s.DefaultMaterial=new db({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:0})),s.DefaultMaterial):this.getDependency("material",o[e].material);a.push(t)}var s;return a.push(t.loadGeometries(o)),Promise.all(a).then((function(n){const a=n.slice(0,n.length-1),s=n[n.length-1],A=[];for(let n=0,c=s.length;n<c;n++){const c=s[n],l=o[n];let u;const d=a[n];if(l.mode===B_||l.mode===__||l.mode===x_||void 0===l.mode)u=!0===i.isSkinnedMesh?new Iy(c,d):new sm(c,d),!0!==u.isSkinnedMesh||u.geometry.attributes.skinWeight.normalized||u.normalizeSkinWeights(),l.mode===__?u.geometry=j_(u.geometry,1):l.mode===x_&&(u.geometry=j_(u.geometry,2));else if(l.mode===y_)u=new tw(c,d);else if(l.mode===b_)u=new Zy(c,d);else if(l.mode===w_)u=new nw(c,d);else{if(l.mode!==v_)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);u=new Aw(c,d)}Object.keys(u.geometry.morphAttributes).length>0&&O_(u,i),u.name=t.createUniqueName(i.name||"mesh_"+e),P_(u,i),l.extensions&&k_(r,u,l),t.assignFinalMaterial(u),A.push(u)}for(let n=0,r=A.length;n<r;n++)t.associations.set(A[n],{meshes:e,primitives:n});if(1===A.length)return A[0];const c=new ey;t.associations.set(c,{meshes:e});for(let e=0,t=A.length;e<t;e++)c.add(A[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new pm(Hh.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new Hm(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),P_(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))}loadAnimation(e){const t=this.json.animations[e],n=[],r=[],i=[],o=[],a=[];for(let e=0,s=t.channels.length;e<s;e++){const s=t.channels[e],A=t.samplers[s.sampler],c=s.target,l=void 0!==c.node?c.node:c.id,u=void 0!==t.parameters?t.parameters[A.input]:A.input,d=void 0!==t.parameters?t.parameters[A.output]:A.output;n.push(this.getDependency("node",l)),r.push(this.getDependency("accessor",u)),i.push(this.getDependency("accessor",d)),o.push(A),a.push(c)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(a)]).then((function(n){const r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],A=[];for(let e=0,t=r.length;e<t;e++){const t=r[e],n=i[e],c=o[e],l=a[e],u=s[e];if(void 0===t)continue;let d;switch(t.updateMatrix(),t.matrixAutoUpdate=!0,F_[u.path]){case F_.weights:d=Ub;break;case F_.rotation:d=Tb;break;default:d=Lb}const h=t.name?t.name:t.uuid,f=void 0!==l.interpolation?T_[l.interpolation]:dh,p=[];F_[u.path]===F_.weights?t.traverse((function(e){e.morphTargetInfluences&&p.push(e.name?e.name:e.uuid)})):p.push(h);let m=c.array;if(c.normalized){const e=R_(m.constructor),t=new Float32Array(m.length);for(let n=0,r=m.length;n<r;n++)t[n]=m[n]*e;m=t}for(let e=0,t=p.length;e<t;e++){const t=new d(p[e]+"."+F_[u.path],n.array,m,f);"CUBICSPLINE"===l.interpolation&&(t.createInterpolant=function(e){return new(this instanceof Tb?g_:p_)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),A.push(t)}}const c=t.name?t.name:"animation_"+e;return new Ib(c,void 0,A)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){const t=[],n=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return n&&t.push(n),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){let a;if(a=!0===i.isBone?new ky:t.length>1?new ey:1===t.length?t[0]:new pp,a!==t[0])for(let e=0,n=t.length;e<n;e++)a.add(t[e]);if(i.name&&(a.userData.name=i.name,a.name=o),P_(a,i),i.extensions&&k_(n,a,i),void 0!==i.matrix){const e=new jf;e.fromArray(i.matrix),a.applyMatrix4(e)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);return r.associations.has(a)||r.associations.set(a,{}),r.associations.get(a).nodes=e,a}))}loadScene(e){const t=this.json,n=this.extensions,r=this.json.scenes[e],i=this,o=new ey;r.name&&(o.name=i.createUniqueName(r.name)),P_(o,r),r.extensions&&k_(n,o,r);const a=r.nodes||[],s=[];for(let e=0,n=a.length;e<n;e++)s.push(z_(a[e],o,t,i));return Promise.all(s).then((function(){return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof Mp||e instanceof sf)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(o),o}))}}function z_(e,t,n,r){const i=n.nodes[e];return r.getDependency("node",e).then((function(e){if(void 0===i.skin)return e;let t;return r.getDependency("skin",i.skin).then((function(e){t=e;const n=[];for(let e=0,i=t.joints.length;e<i;e++)n.push(r.getDependency("node",t.joints[e]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(!e.isMesh)return;const r=[],i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e];if(o){r.push(o);const n=new jf;void 0!==t.inverseBindMatrices&&n.fromArray(t.inverseBindMatrices.array,16*e),i.push(n)}}e.bind(new Hy(r,i),e.matrixWorld)})),e}))})).then((function(e){t.add(e);const o=[];if(i.children){const t=i.children;for(let i=0,a=t.length;i<a;i++){const a=t[i];o.push(z_(a,e,n,r))}}return Promise.all(o)}))}function V_(e,t,n){const r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=U_[t]||t.toLowerCase();n in e.attributes||i.push(o(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return P_(e,t),function(e,t,n){const r=t.attributes,i=new mf;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return;if(i.set(new hf(t[0],t[1],t[2]),new hf(o[0],o[1],o[2])),e.normalized){const t=R_(C_[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new hf,t=new hf;for(let r=0,i=o.length;r<i;r++){const i=o[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],o=r.min,a=r.max;if(void 0!==o&&void 0!==a){if(t.setX(Math.max(Math.abs(o[0]),Math.abs(a[0]))),t.setY(Math.max(Math.abs(o[1]),Math.abs(a[1]))),t.setZ(Math.max(Math.abs(o[2]),Math.abs(a[2]))),r.normalized){const e=R_(C_[r.componentType]);t.multiplyScalar(e)}e.max(t)}}}i.expandByVector(e)}e.boundingBox=i;const a=new kf;i.getCenter(a.center),a.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=a}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,o=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(o=!0),r&&i&&o)break}if(!r&&!i&&!o)return Promise.resolve(e);const a=[],s=[],A=[];for(let c=0,l=t.length;c<l;c++){const l=t[c];if(r){const t=void 0!==l.POSITION?n.getDependency("accessor",l.POSITION):e.attributes.position;a.push(t)}if(i){const t=void 0!==l.NORMAL?n.getDependency("accessor",l.NORMAL):e.attributes.normal;s.push(t)}if(o){const t=void 0!==l.COLOR_0?n.getDependency("accessor",l.COLOR_0):e.attributes.color;A.push(t)}}return Promise.all([Promise.all(a),Promise.all(s),Promise.all(A)]).then((function(t){const n=t[0],a=t[1],s=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=a),o&&(e.morphAttributes.color=s),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function j_(e,t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(2===t)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length;const o=e.clone();return o.setIndex(i),o}const K_={type:"change"},G_={type:"start"},W_={type:"end"};class q_ extends Eh{constructor(e,t){super(),document,this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new hf,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Fd,MIDDLE:Td,RIGHT:Qd},this.touches={ONE:Ld,TWO:kd},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",V),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(K_),n.update(),i=r.NONE},this.update=function(){const t=new hf,u=(new df).setFromUnitVectors(e.up,new hf(0,1,0)),d=u.clone().invert(),h=new hf,f=new df,p=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(u),a.setFromVector3(t),n.autoRotate&&i===r.NONE&&_(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let m=n.minAzimuthAngle,g=n.maxAzimuthAngle;return isFinite(m)&&isFinite(g)&&(m<-Math.PI?m+=p:m>Math.PI&&(m-=p),g<-Math.PI?g+=p:g>Math.PI&&(g-=p),a.theta=m<=g?Math.max(m,Math.min(g,a.theta)):a.theta>(m+g)/2?Math.max(m,a.theta):Math.min(g,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=A,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),t.setFromSpherical(a),t.applyQuaternion(d),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0)),A=1,!!(l||h.distanceToSquared(n.object.position)>o||8*(1-f.dot(n.object.quaternion))>o)&&(n.dispatchEvent(K_),h.copy(n.object.position),f.copy(n.object.quaternion),l=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",j),n.domElement.removeEventListener("pointerdown",D),n.domElement.removeEventListener("pointercancel",N),n.domElement.removeEventListener("wheel",z),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",R),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",V)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const o=1e-6,a=new LB,s=new LB;let A=1;const c=new hf;let l=!1;const u=new Rh,d=new Rh,h=new Rh,f=new Rh,p=new Rh,m=new Rh,g=new Rh,v=new Rh,y=new Rh,w=[],b={};function B(){return Math.pow(.95,n.zoomSpeed)}function _(e){s.theta-=e}function x(e){s.phi-=e}const C=function(){const e=new hf;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),S=function(){const e=new hf;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),E=function(){const e=new hf;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),C(2*t*a/i.clientHeight,n.object.matrix),S(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(C(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),S(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):n.enablePan=!1}}();function M(e){n.object.isPerspectiveCamera?A/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),l=!0):n.enableZoom=!1}function U(e){n.object.isPerspectiveCamera?A*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),l=!0):n.enableZoom=!1}function F(e){u.set(e.clientX,e.clientY)}function T(e){f.set(e.clientX,e.clientY)}function Q(){if(1===w.length)u.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);u.set(e,t)}}function L(){if(1===w.length)f.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);f.set(e,t)}}function I(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);g.set(0,n)}function k(e){if(1==w.length)d.set(e.pageX,e.pageY);else{const t=W(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);d.set(n,r)}h.subVectors(d,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;_(2*Math.PI*h.x/t.clientHeight),x(2*Math.PI*h.y/t.clientHeight),u.copy(d)}function P(e){if(1===w.length)p.set(e.pageX,e.pageY);else{const t=W(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}m.subVectors(p,f).multiplyScalar(n.panSpeed),E(m.x,m.y),f.copy(p)}function O(e){const t=W(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);v.set(0,o),y.set(0,Math.pow(v.y/g.y,n.zoomSpeed)),M(y.y),g.copy(v)}function D(e){!1!==n.enabled&&(0===w.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",H),n.domElement.addEventListener("pointerup",R)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(G(e),w.length){case 1:switch(n.touches.ONE){case Ld:if(!1===n.enableRotate)return;Q(),i=r.TOUCH_ROTATE;break;case Id:if(!1===n.enablePan)return;L(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case kd:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&I(),n.enablePan&&L(),i=r.TOUCH_DOLLY_PAN;break;case Pd:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&I(),n.enableRotate&&Q(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(G_)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case Td:if(!1===n.enableZoom)return;!function(e){g.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case Fd:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;T(e),i=r.PAN}else{if(!1===n.enableRotate)return;F(e),i=r.ROTATE}break;case Qd:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;F(e),i=r.ROTATE}else{if(!1===n.enablePan)return;T(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(G_)}(e))}function H(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(G(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;k(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;P(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&O(e),n.enablePan&&P(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&O(e),n.enableRotate&&k(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){if(!1===n.enabled)return;switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){d.set(e.clientX,e.clientY),h.subVectors(d,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;_(2*Math.PI*h.x/t.clientHeight),x(2*Math.PI*h.y/t.clientHeight),u.copy(d),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,g),y.y>0?M(B()):y.y<0&&U(B()),g.copy(v),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){p.set(e.clientX,e.clientY),m.subVectors(p,f).multiplyScalar(n.panSpeed),E(m.x,m.y),f.copy(p),n.update()}(e)}}(e))}function R(e){K(e),0===w.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",R)),n.dispatchEvent(W_),i=r.NONE}function N(e){K(e)}function z(e){!1!==n.enabled&&!1!==n.enableZoom&&i===r.NONE&&(e.preventDefault(),n.dispatchEvent(G_),function(e){e.deltaY<0?U(B()):e.deltaY>0&&M(B()),n.update()}(e),n.dispatchEvent(W_))}function V(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:E(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:E(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:E(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:E(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function j(e){!1!==n.enabled&&e.preventDefault()}function K(e){delete b[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}function G(e){let t=b[e.pointerId];void 0===t&&(t=new Rh,b[e.pointerId]=t),t.set(e.pageX,e.pageY)}function W(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return b[t.pointerId]}n.domElement.addEventListener("contextmenu",j),n.domElement.addEventListener("pointerdown",D),n.domElement.addEventListener("pointercancel",N),n.domElement.addEventListener("wheel",z,{passive:!1}),this.update()}}var X_=r("../../node_modules/html2canvas/dist/html2canvas.js"),J_=r.n(X_),Y_={aqua:2806473,blue:2806473,turquoise:2806473,black:3222829,gray:11645875,grey:11645875,green:38494,jade:49007,mint:12315102,onyx:3222829,orange:16534530,pink:16088758,purple:12265915,royal:8853661,snow:16777215,white:16777215},Z_={ghost:{buttons:{meshType:2,color:16777215},scroll_wheel:{meshType:2,color:11645875},shell:{meshType:1},logo:{color:16777215}},onyx:{buttons:{meshType:2,color:3222829},scroll_wheel:{meshType:2,color:3222829},shell:{meshType:2,color:3222829,bump:!0},logo:{color:16777215}},jade:{buttons:{meshType:2,color:3222829},scroll_wheel:{meshType:2,color:3222829},shell:{meshType:2,color:49007,bump:!0},logo:{color:3222829}},royal:{buttons:{meshType:2,color:3222829},scroll_wheel:{meshType:2,color:3222829},shell:{meshType:2,color:8853661,bump:!0},logo:{color:3222829}},snow:{buttons:{meshType:2,color:3222829},scroll_wheel:{meshType:2,color:3222829},shell:{meshType:2,color:16777215,bump:!0},logo:{color:3222829}}};var $_=r("../../node_modules/focus-trap-react/dist/focus-trap-react.js"),ex=r.n($_);function tx(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function nx(e){return!!e&&!!e[Vx]}function rx(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===jx}(e)||Array.isArray(e)||!!e[zx]||!!e.constructor[zx]||lx(e)||ux(e))}function ix(e,t,n){void 0===n&&(n=!1),0===ox(e)?(n?Object.keys:Kx)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function ox(e){var t=e[Vx];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:lx(e)?2:ux(e)?3:0}function ax(e,t){return 2===ox(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sx(e,t){return 2===ox(e)?e.get(t):e[t]}function Ax(e,t,n){var r=ox(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function cx(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function lx(e){return Dx&&e instanceof Map}function ux(e){return Hx&&e instanceof Set}function dx(e){return e.o||e.t}function hx(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Gx(e);delete t[Vx];for(var n=Kx(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function fx(e,t){return void 0===t&&(t=!1),mx(e)||nx(e)||!rx(e)||(ox(e)>1&&(e.set=e.add=e.clear=e.delete=px),Object.freeze(e),t&&ix(e,(function(e,t){return fx(t,!0)}),!0)),e}function px(){tx(2)}function mx(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function gx(e){var t=Wx[e];return t||tx(18,e),t}function vx(){return Px}function yx(e,t){t&&(gx("Patches"),e.u=[],e.s=[],e.v=t)}function wx(e){bx(e),e.p.forEach(_x),e.p=null}function bx(e){e===Px&&(Px=e.l)}function Bx(e){return Px={p:[],l:Px,h:e,m:!0,_:0}}function _x(e){var t=e[Vx];0===t.i||1===t.i?t.j():t.O=!0}function xx(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||gx("ES5").S(t,e,r),r?(n[Vx].P&&(wx(t),tx(4)),rx(e)&&(e=Cx(t,e),t.l||Ex(t,e)),t.u&&gx("Patches").M(n[Vx].t,e,t.u,t.s)):e=Cx(t,n,[]),wx(t),t.u&&t.v(t.u,t.s),e!==Nx?e:void 0}function Cx(e,t,n){if(mx(t))return t;var r=t[Vx];if(!r)return ix(t,(function(i,o){return Sx(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Ex(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=hx(r.k):r.o;ix(3===r.i?new Set(i):i,(function(t,o){return Sx(e,r,i,t,o,n)})),Ex(e,i,!1),n&&e.u&&gx("Patches").R(r,n,e.u,e.s)}return r.o}function Sx(e,t,n,r,i,o){if(nx(i)){var a=Cx(e,i,o&&t&&3!==t.i&&!ax(t.D,r)?o.concat(r):void 0);if(Ax(n,r,a),!nx(a))return;e.m=!1}if(rx(i)&&!mx(i)){if(!e.h.F&&e._<1)return;Cx(e,i),t&&t.A.l||Ex(e,i)}}function Ex(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&fx(t,n)}function Mx(e,t){var n=e[Vx];return(n?dx(n):e)[t]}function Ux(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fx(e){e.P||(e.P=!0,e.l&&Fx(e.l))}function Tx(e){e.o||(e.o=hx(e.t))}function Qx(e,t,n){var r=lx(t)?gx("MapSet").N(t,n):ux(t)?gx("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:vx(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=qx;n&&(i=[r],o=Xx);var a=Proxy.revocable(i,o),s=a.revoke,A=a.proxy;return r.k=A,r.j=s,A}(t,n):gx("ES5").J(t,n);return(n?n.A:vx()).p.push(r),r}function Lx(e){return nx(e)||tx(22,e),function e(t){if(!rx(t))return t;var n,r=t[Vx],i=ox(t);if(r){if(!r.P&&(r.i<4||!gx("ES5").K(r)))return r.t;r.I=!0,n=Ix(t,i),r.I=!1}else n=Ix(t,i);return ix(n,(function(t,i){r&&sx(r.t,t)===i||Ax(n,t,e(i))})),3===i?new Set(n):n}(e)}function Ix(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return hx(e)}var kx,Px,Ox="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Dx="undefined"!=typeof Map,Hx="undefined"!=typeof Set,Rx="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Nx=Ox?Symbol.for("immer-nothing"):((kx={})["immer-nothing"]=!0,kx),zx=Ox?Symbol.for("immer-draftable"):"__$immer_draftable",Vx=Ox?Symbol.for("immer-state"):"__$immer_state",jx=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Kx="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Gx=Object.getOwnPropertyDescriptors||function(e){var t={};return Kx(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Wx={},qx={get:function(e,t){if(t===Vx)return e;var n=dx(e);if(!ax(n,t))return function(e,t,n){var r,i=Ux(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!rx(r)?r:r===Mx(e.t,t)?(Tx(e),e.o[t]=Qx(e.A.h,r,e)):r},has:function(e,t){return t in dx(e)},ownKeys:function(e){return Reflect.ownKeys(dx(e))},set:function(e,t,n){var r=Ux(dx(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Mx(dx(e),t),o=null==i?void 0:i[Vx];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(cx(n,i)&&(void 0!==n||ax(e.t,t)))return!0;Tx(e),Fx(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==Mx(e.t,t)||t in e.t?(e.D[t]=!1,Tx(e),Fx(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=dx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){tx(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){tx(12)}},Xx={};ix(qx,(function(e,t){Xx[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Xx.deleteProperty=function(e,t){return Xx.set.call(this,e,t,void 0)},Xx.set=function(e,t,n){return qx.set.call(this,e[0],t,n,e[0])};var Jx=function(){function e(e){var t=this;this.g=Rx,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var o=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return o.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&tx(6),void 0!==r&&"function"!=typeof r&&tx(7),rx(e)){var s=Bx(t),A=Qx(t,e,void 0),c=!0;try{a=n(A),c=!1}finally{c?wx(s):bx(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return yx(s,r),xx(e,s)}),(function(e){throw wx(s),e})):(yx(s,r),xx(a,s))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===Nx&&(a=void 0),t.F&&fx(a,!0),r){var l=[],u=[];gx("Patches").M(e,a,l,u),r(l,u)}return a}tx(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,o=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,r,i]})):[o,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){rx(e)||tx(8),nx(e)&&(e=Lx(e));var t=Bx(this),n=Qx(this,e,void 0);return n[Vx].C=!0,bx(t),n},t.finishDraft=function(e,t){var n=(e&&e[Vx]).A;return yx(n,t),xx(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!Rx&&tx(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=gx("Patches").$;return nx(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),Yx=new Jx,Zx=Yx.produce,$x=(Yx.produceWithPatches.bind(Yx),Yx.setAutoFreeze.bind(Yx),Yx.setUseProxies.bind(Yx),Yx.applyPatches.bind(Yx),Yx.createDraft.bind(Yx),Yx.finishDraft.bind(Yx),Zx);var eC="SEARCH_OPEN",tC="SEARCH_CLOSE",nC="SEARCH_TOGGLE",rC="SEARCH_RESET",iC="SEARCH_FOCUS",oC="SEARCH_FETCH_REQUEST",aC="SEARCH_FETCH_SUCCESS",sC="SEARCH_FETCH_FAILURE";function AC(){return{type:tC}}function cC(e){return function(t){return t(function(e){return{type:oC,query:e}}(e)),function(e){return Pc().get("/api/v1/search",{params:{q:e}})}(e).then((function(n){return t(function(e,t){return{type:aC,query:e,results:t}}(e,n.data))}),(function(e){return t(function(e){return{type:sC,error:e}}(e))}))}}var lC={open:!1,loading:!1,scrollIndex:0,lastQuery:"",results:[]};function uC(e){return uC="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},uC(e)}function dC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fC(e,t){return fC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fC(e,t)}function pC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vC(e);if(t){var i=vC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mC(this,n)}}function mC(e,t){if(t&&("object"===uC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gC(e)}function gC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vC(e){return vC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vC(e)}function yC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wC=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fC(e,t)}(a,t);var n,r,i,o=pC(a);function a(){var e;dC(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yC(gC(e=o.call.apply(o,[this].concat(n))),"state",{query:""}),yC(gC(e),"handleSubmit",(function(t){t.preventDefault(),e.props.navigateResultsPage(e.state.query)})),yC(gC(e),"handleChange",(function(t){e.setState({query:t.target.value},(function(){e.props.search(e.state.query),e.props.handleInputChange(e.state.query)}))})),yC(gC(e),"handleKeyUp",(function(t){var n,r=(yC(n={},38,e.props.scrollUp),yC(n,40,e.props.scrollDown),yC(n,13,e.props.navigate),n)[t.code];void 0!==r&&r()})),e}return n=a,(r=[{key:"render",value:function(){return e.createElement("form",{className:"search-widget__field",onSubmit:this.handleSubmit,onKeyUp:this.handleKeyUp},e.createElement("label",{className:"search-widget__label",htmlFor:"search-widget-input"},e.createElement("span",{className:"sr-only"},"Search steelseries.com:"),"Buscar:"),e.createElement("input",{className:"search-widget__input",id:"search-widget-input",type:"text",value:this.state.query,onChange:this.handleChange}))}}])&&hC(n.prototype,r),i&&hC(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component);function bC(e){return bC="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},bC(e)}function BC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xC(e,t){return xC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xC(e,t)}function CC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MC(e);if(t){var i=MC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return SC(this,n)}}function SC(e,t){if(t&&("object"===bC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return EC(e)}function EC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MC(e){return MC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},MC(e)}function UC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var FC=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xC(e,t)}(a,t);var n,r,i,o=CC(a);function a(){var e;BC(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return UC(EC(e=o.call.apply(o,[this].concat(n))),"handleClick",(function(t){e.props.navigate(e.props.result),t.preventDefault()})),e}return n=a,(r=[{key:"render",value:function(){var t=this;return e.createElement("li",{className:"search-widget__result"},e.createElement("a",{href:this.props.result.page_url,className:this.props.active?"is-active":"",onClick:function(){return t.handleClick}},e.createElement("span",null,this.props.result.name),e.createElement("img",{src:this.props.result.image_url,alt:""})))}}])&&_C(n.prototype,r),i&&_C(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component);function TC(t){var n=t.results,r=t.navigate;return e.createElement("ul",{className:"search-widget__result-list","aria-live":"polite","aria-label":"Search results"},n.map((function(t){return e.createElement(FC,{key:t.id,result:t,active:!1,navigate:r})})))}function QC(t){var n=t.closeWidget;return e.createElement("button",{type:"button",className:"search-widget__close",onClick:n},e.createElement("span",{className:"sr-only"},"Close search"),e.createElement("svg",{"aria-hidden":"true",role:"img",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},e.createElement("path",{d:"M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"})))}function LC(e){return LC="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},LC(e)}function IC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OC(e,t,n){return t&&PC(e.prototype,t),n&&PC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HC(e,t)}function HC(e,t){return HC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},HC(e,t)}function RC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VC(e);if(t){var i=VC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NC(this,n)}}function NC(e,t){if(t&&("object"===LC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zC(e)}function zC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VC(e){return VC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},VC(e)}var jC=function(t){DC(r,t);var n=RC(r);function r(){return kC(this,r),n.apply(this,arguments)}return OC(r,[{key:"render",value:function(){return this.props.phrase?e.createElement("ul",{className:"search-widget__result-list"},e.createElement("li",{className:"search-widget__result"},e.createElement("a",{href:"search-catalog?phrase="+this.props.phrase},e.createElement("span",null,"Ver todo")))):""}}]),r}(e.Component),KC=function(t){DC(r,t);var n=RC(r);function r(e){var t;return kC(this,r),IC(zC(t=n.call(this,e)),"scrollUp",(function(){var e=t.props.scrollIndex-1;e<0&&(e=t.props.results.length-1),t.props.scroll(e)})),IC(zC(t),"scrollDown",(function(){var e=t.props.scrollIndex+1;e>=t.props.results.length&&(e=0),t.props.scroll(e)})),IC(zC(t),"navigate",(function(e){var n=e;if(null==n&&(n=t.props.results[t.props.scrollIndex]),null!=n){var r=n.page_url;"dataLayer"in window&&"function"==typeof window.dataLayer.push?window.dataLayer.push({event:"SendEvent",eventCategory:"Buscar",eventAction:"Navigate",eventLabel:n.page_url,eventTimeout:1e3,eventCallback:function(){window.location=r}}):window.location=r}})),IC(zC(t),"navigateResultsPage",(function(e){if(!(e.length<2)){var t=e.trim(),n="/search-catalog?phrase=".concat(t);window.location.href=n}})),IC(zC(t),"handleInputChange",(function(e){t.setState({phrase:e})})),t.state={phrase:""},t}return OC(r,[{key:"render",value:function(){return this.props.open?e.createElement("div",{className:"search-widget ".concat(this.props.open?"is-open":""),role:"search","aria-expanded":this.props.open},e.createElement(ex(),{focusTrapOptions:{escapeDeactivates:!1,clickOutsideDeactivates:!0,allowOutsideClick:!0}},e.createElement("div",{className:"search-widget__inner"},e.createElement("div",{className:"search-widget--caret"}),e.createElement(wC,{search:this.props.search,scrollUp:this.scrollUp,scrollDown:this.scrollDown,navigate:this.navigate,navigateResultsPage:this.navigateResultsPage,handleInputChange:this.handleInputChange}),e.createElement(jC,{phrase:this.state.phrase}),e.createElement(TC,{results:this.props.results,navigate:this.navigate}),e.createElement(QC,{closeWidget:this.props.closeWidget})))):null}}]),r}(e.Component),GC=W((function(e){return{open:e.search.open,results:e.search.results,scrollIndex:e.search.scrollIndex}}),(function(e){return{search:ml()((function(t){return e(cC(t))}),500),scroll:function(t){return e(function(e){return{type:iC,scrollIndex:e}}(t))},closeWidget:function(){return e(AC())}}}))(KC);var WC="CART_OPEN",qC="CART_CLOSE",XC="CART_ADD_COUPON",JC="CART_ADD_COUPON_SUCCESS",YC="CART_ADD_COUPON_FAILURE",ZC="CART_FETCH_REQUEST",$C="CART_FETCH_SUCCESS",eS="CART_FETCH_FAILURE",tS="CART_ADD_PRODUCT_REQUEST",nS="CART_ADD_PRODUCT_SUCCESS",rS="CART_ADD_PRODUCT_FAILURE",iS="CART_SET_QUANTITY_REQUEST",oS="CART_SET_QUANTITY_SUCCESS",aS="CART_SET_QUANTITY_FAILURE",sS="CART_FETCH_ADDONS_REQUEST",AS="CART_FETCH_ADDONS_SUCCESS",cS="CART_FETCH_ADDONS_FAILURE";function lS(){return{type:WC}}function uS(){return{type:qC}}function dS(){return function(e){return e({type:sS}),Pc().get("/api/v3/cart/available-add-ons").then((function(t){var n;e((n=t.data,{type:AS,data:n}))}),(function(t){e(function(e){return{type:cS,error:e}}(t))}))}}function hS(){return function(e){return e({type:ZC}),Pc().get("/api/v3/cart").then((function(t){var n;e((n=t.data,{type:$C,data:n})),e(dS())}),(function(t){e(function(e){return{type:eS,error:e}}(t))}))}}function fS(e,t,n){return function(r){return r({type:tS}),function(e,t){return Pc().post("/api/v3/cart",{items:e,source:t})}(e,t).then((function(e){var t;r((t=e.data,{type:nS,data:t})),r(dS())}),(function(e){r(function(e){return{type:rS,error:e}}(e)),n&&n()}))}}function pS(e,t,n){return function(r){return r({type:iS}),(i=e,o=t,a=n,a?Pc().patch("/api/v3/cart/items/".concat(i,"/").concat(a),{quantity:o}):Pc().patch("/api/v3/cart/items/".concat(i),{quantity:o})).then((function(n){r(function(e,t,n,r){return{type:oS,quantity:t,data:n,productId:e}}(e,t,n.data)),r(dS())}),(function(e){r(function(e){return{type:aS,error:e}}(e))}));var i,o,a}}function mS(e){return function(t){return t({type:XC}),function(e){return Pc().patch("/api/v3/cart",{coupon_code:e})}(e).then((function(e){var n;t((n=e.data,{type:JC,data:n}))}),(function(e){t(function(e){return{type:YC,error:e}}(e.response.data.fields.coupon_code[0]))}))}}function gS(e,t){return gS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gS(e,t)}function vS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gS(e,t)}function yS(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var wS=!1,bS=e.createContext(null),BS="unmounted",_S="exited",xS="entering",CS="entered",SS="exiting",ES=function(t){function n(e,n){var r;r=t.call(this,e,n)||this;var i,o=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?o?(i=_S,r.appearStatus=xS):i=CS:i=e.unmountOnExit||e.mountOnEnter?BS:_S,r.state={status:i},r.nextCallback=null,r}vS(n,t),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===BS?{status:_S}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==xS&&n!==CS&&(t=xS):n!==xS&&n!==CS||(t=SS)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},r.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===xS?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===_S&&this.setState({status:BS})},r.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[w.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),A=r?s.appear:s.enter;!e&&!n||wS?this.safeSetState({status:CS},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:xS},(function(){t.props.onEntering(o,a),t.onTransitionEnd(A,(function(){t.safeSetState({status:CS},(function(){t.props.onEntered(o,a)}))}))})))},r.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:w.findDOMNode(this);t&&!wS?(this.props.onExit(r),this.safeSetState({status:SS},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:_S},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:_S},(function(){e.props.onExited(r)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===BS)return null;var n=this.props,r=n.children,i=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,S(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.createElement(bS.Provider,{value:null},"function"==typeof r?r(t,i):e.cloneElement(e.Children.only(r),i))},n}(e.Component);function MS(){}ES.contextType=bS,ES.propTypes={},ES.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:MS,onEntering:MS,onEntered:MS,onExit:MS,onExiting:MS,onExited:MS},ES.UNMOUNTED=BS,ES.EXITED=_S,ES.ENTERING=xS,ES.ENTERED=CS,ES.EXITING=SS;var US=ES,FS=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=yS(n.className,r):n.setAttribute("class",yS(n.className&&n.className.baseVal||"",r)));var n,r}))},TS=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:r?i+"-active":n[t+"Active"],doneClassName:r?i+"-done":n[t+"Done"]}},e}vS(n,t);var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&FS(e,r),i&&FS(e,i),o&&FS(e,o)},r.render=function(){var t=this.props,n=(t.classNames,S(t,["classNames"]));return e.createElement(US,C({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e.Component);TS.defaultProps={classNames:""},TS.propTypes={};var QS=TS;function LS(t,n){var r=Object.create(null);return t&&e.Children.map(t,(function(e){return e})).forEach((function(t){r[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)})),r}function IS(e,t,n){return null!=n[t]?n[t]:e.props[t]}function kS(t,n,r){var i=LS(t.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var A in t){if(i[A])for(r=0;r<i[A].length;r++){var c=i[A][r];s[i[A][r]]=n(c)}s[A]=n(A)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(n,i);return Object.keys(o).forEach((function(a){var s=o[a];if((0,e.isValidElement)(s)){var A=a in n,c=a in i,l=n[a],u=(0,e.isValidElement)(l)&&!l.props.in;!c||A&&!u?c||!A||u?c&&A&&(0,e.isValidElement)(l)&&(o[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:l.props.in,exit:IS(s,"exit",t),enter:IS(s,"enter",t)})):o[a]=(0,e.cloneElement)(s,{in:!1}):o[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:IS(s,"exit",t),enter:IS(s,"enter",t)})}})),o}var PS=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},OS=function(t){function n(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}vS(n,t);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(t,n){var r,i,o=n.children,a=n.handleExited;return{children:n.firstRender?(r=t,i=a,LS(r.children,(function(t){return(0,e.cloneElement)(t,{onExited:i.bind(null,t),in:!0,appear:IS(t,"appear",r),enter:IS(t,"enter",r),exit:IS(t,"exit",r)})}))):kS(t,o,a),firstRender:!1}},r.handleExited=function(e,t){var n=LS(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=C({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var t=this.props,n=t.component,r=t.childFactory,i=S(t,["component","childFactory"]),o=this.state.contextValue,a=PS(this.state.children).map(r);return delete i.appear,delete i.enter,delete i.exit,null===n?e.createElement(bS.Provider,{value:o},a):e.createElement(bS.Provider,{value:o},e.createElement(n,i,a))},n}(e.Component);OS.propTypes={},OS.defaultProps={component:"div",childFactory:function(e){return e}};var DS=OS;function HS(e){return HS="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},HS(e)}function RS(){return RS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RS.apply(this,arguments)}function NS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function VS(e,t){return VS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},VS(e,t)}function jS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=WS(e);if(t){var i=WS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return KS(this,n)}}function KS(e,t){if(t&&("object"===HS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return GS(e)}function GS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WS(e){return WS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},WS(e)}function qS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XS=10,JS=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VS(e,t)}(a,t);var n,r,i,o=jS(a);function a(){var e;NS(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qS(GS(e=o.call.apply(o,[this].concat(n))),"quantityOptions",Array.from({length:XS},(function(e,t){return t+1}))),qS(GS(e),"state",{quantity:e.props.quantity,inventoryMessage:"",showDropdown:e.props.quantity<XS}),qS(GS(e),"componentDidMount",(function(){e.props.inventory<=0?e.setState({inventoryMessage:"Agotado "}):e.state.quantity>e.props.inventory?e.setState({inventoryMessage:"Not enough inventory - only ".concat(e.props.inventory," left in stock")}):e.state.quantity>e.props.maxQuantity&&e.setState({inventoryMessage:"Limited to ".concat(e.props.maxQuantity," per order")})})),qS(GS(e),"handleSelectChange",(function(t){var n=parseInt(t.currentTarget.value,10);e.setState({quantity:n,showDropdown:n<XS},(function(){e.state.quantity>e.props.inventory?(e.updateQuantity(),e.setState({inventoryMessage:"Not enough inventory - only ".concat(e.props.inventory," left in stock")})):e.props.inventory<=0?e.setState({inventoryMessage:"Agotado"}):e.state.quantity>e.props.maxQuantity?(e.updateQuantity(),e.setState({quantity:e.props.maxQuantity,inventoryMessage:"Limited to ".concat(e.props.maxQuantity," per order")})):e.state.quantity<XS?(e.updateQuantity(),e.setState({inventoryMessage:""})):e.state.quantity===XS&&e.setState({quantity:e.props.quantity,showDropdown:n<XS})}))})),qS(GS(e),"handleInputChange",(function(t){var n,r=t.currentTarget.value;""===r?e.setState({quantity:r}):r.length>3?(r=r.substring(0,3),t.currentTarget.value=r,n=parseInt(r,10),e.setState({quantity:n})):(n=parseInt(r,10),e.setState({quantity:n}))})),qS(GS(e),"handleUpdateButtonClick",(function(){0===e.state.quantity?e.setState({quantity:e.props.quantity,inventoryMessage:""}):e.state.quantity>e.props.inventory?e.setState({inventoryMessage:"Not enough inventory - only ".concat(e.props.inventory," left in stock")}):e.state.quantity>e.props.maxQuantity?(e.updateQuantity(),e.setState({inventoryMessage:"Limited to ".concat(e.props.maxQuantity," per order")})):e.props.inventory<=0?e.setState({inventoryMessage:"Agotado"}):(e.updateQuantity(),e.setState({inventoryMessage:""}))})),qS(GS(e),"updateQuantity",(function(){e.props.updateQuantity(e.props.product,e.state.quantity,e.props.cartGroupId)})),e}return n=a,(r=[{key:"render",value:function(){var t="cart-widget-quantity-".concat(this.props.product),n=this.quantityOptions.map((function(t){var n=t===XS?"".concat(t,"+"):"".concat(t);return e.createElement("option",{value:t,key:t},n)}));return this.state.showDropdown&&this.state.quantity<XS?e.createElement("span",{className:"widget-item-quantity"},e.createElement("label",{htmlFor:t,className:"widget-item-quantity__label"},"Cantidad:",e.createElement("select",RS({id:t,className:"widget-item-quantity__select",value:this.state.quantity,onChange:this.handleSelectChange},this.props.tabIndex),n,e.createElement("option",{value:"0"},"Quitar"))),e.createElement("span",{className:"widget-item-quantity__message"},this.state.inventoryMessage)):e.createElement("span",{className:"widget-item-quantity"},e.createElement("label",{htmlFor:t,className:"widget-item-quantity__label"},"Cantidad:",e.createElement("input",RS({className:"widget-item-quantity__input",id:t,type:"number",min:"0",max:"999",maxLength:3,value:this.state.quantity,onChange:this.handleInputChange},this.props.tabIndex))),this.state.quantity!==this.props.quantity&&e.createElement("button",RS({type:"button",className:"button button--link button--small",onClick:this.handleUpdateButtonClick},this.props.tabIndex),"Actualizar"),e.createElement("span",{className:"widget-item-quantity__message"},this.state.inventoryMessage))}}])&&zS(n.prototype,r),i&&zS(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component),YS=JS,ZS=function(t){if(null===t.choiceType||null===t.choiceName)return null;var n=t.choiceType,r=n.charAt(0).toUpperCase()+n.slice(1);return e.createElement("span",{className:"widget-item__choice"},e.createElement("span",{className:"widget-item__choice--type"},"".concat(r,": ")),t.choiceName)};function $S(e){return"".concat(e,"_").concat((new Date).getTime())}function eE(t){var n=t.ariaHidden,r=t.title,i=$S("lock");return e.createElement("svg",{"aria-hidden":n,"aria-labelledby":i,role:"img",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},e.createElement("desc",{id:i},r||"Lock"),e.createElement("path",{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"}))}function tE(t){var n=t.ariaHidden,r=t.title,i=$S("lock-open");return e.createElement("svg",{"aria-hidden":n,"aria-labelledby":i,role:"img",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},e.createElement("desc",{id:i},r||"Lock open"),e.createElement("path",{d:"M423.5 0C339.5.3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"}))}function nE(){return nE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nE.apply(this,arguments)}var rE=function(t){var n="parent"===t.cartGroupRelation&&null!==t.childProducts,r=n||t.isBundle,i="",o="";if(n&&!t.isBundle){var a=t.linePrice;t.childProducts.map((function(e){var t=e.childPrice;a+=t})),i=t.formatCurrency(a,t.currency)}else if(t.isBundle){var s=0;t.childProducts.map((function(e){var t=e.childPrice;s+=t})),i=t.formatCurrency(t.linePrice,t.currency),o=t.linePrice<s?t.formatCurrency(s,t.currency):null}else t.isReducedPriceAddon?(i=t.formatCurrency(t.linePriceRpa,t.currency),o=t.linePriceRpa<t.lineMsrp?t.formatCurrency(t.lineMsrp,t.currency):null):(i=t.formatCurrency(t.linePrice,t.currency),o=t.linePrice<t.lineMsrp?t.formatCurrency(t.lineMsrp,t.currency):null);var A=t.formatCurrency(t.price,t.currency),c=null,l=null,u=t.isLoginRequired?e.createElement(eE,{ariaHidden:!0,title:""}):e.createElement(tE,{ariaHidden:!0,title:""});if(n&&!t.isBundle){var d=function(e){var t=[];e.forEach((function(e){t.push(e.shopProductId)}));var n=t.sort((function(e,t){return e-t}));return n.join("-")}(t.childProducts);try{l=localStorage.getItem("custom-product-".concat(d))}catch(e){}}return t.isMembersOnly&&(c=e.createElement("div",{className:"widget-item__user-exclusive"},u,"Member exclusive")),e.createElement("tr",{className:"widget-item"},e.createElement("td",{className:"widget-item__thumbnail"},e.createElement("a",{href:t.productPageUrl,style:{backgroundImage:n&&l?"url('".concat(l.toString(),"')"):"url(".concat(t.mediumThumbUrl,")")},"aria-hidden":"true",tabIndex:-1},e.createElement("span",{className:"sr-only"},t.name))),e.createElement("td",{className:"widget-item__name"},e.createElement("a",nE({href:t.productPageUrl,className:"widget-item__link"},t.tabIndex),t.name),e.createElement("div",{className:"widget-item__description"},c,e.createElement(ZS,{choiceType:t.choiceType,choiceName:t.choiceName}),t.forceStaticQuantity?"Quantity: ".concat(t.quantity):e.createElement(YS,{key:t.quantity,name:t.name,product:t.product,cartGroupId:t.cartGroupId,quantity:t.quantity,maxQuantity:t.maxQuantity,inventory:t.inventory,updateQuantity:t.updateQuantity,tabIndex:t.tabIndex}),r&&e.createElement("div",{className:"widget-item__children"},e.createElement("div",{className:"widget-item__children-label"},"Included"),e.createElement("ul",{className:"widget-item__children-list"},t.childProducts.map((function(t){var n=t.productName,r=t.cartGroupId,i=t.shopProductId;return e.createElement("li",{key:"".concat(n,"-").concat(r),"data-shop-product-id":i},n)})))),n&&e.createElement("p",{className:"widget-item__children-message"},"Made-to-order items cannot be canceled, returned, or exchanged."," ",e.createElement("a",{target:"_blank",href:"https://support.steelseries.com/hc/en-us/articles/221466947-Return-Policy"},"Aprenda más")))),e.createElement("td",{className:"widget-item__price"},e.createElement("span",{className:"sr-only","aria-live":"polite"},"".concat(t.quantity," of ").concat(t.name," at ").concat(A," each")),e.createElement("div",{className:"price-wrapper"},i,e.createElement("div",{className:"widget-item__msrp"},o)),e.createElement("div",{className:"widget-item__remove"},e.createElement("button",{onClick:function(){return t.updateQuantity(t.product,0,t.cartGroupId)},type:"button"},e.createElement("span",{className:"sr-only"},"Quitar ",t.quantity," ",t.name," from your cart")))))};function iE(){return iE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iE.apply(this,arguments)}var oE=function(t){var n=t.formatCurrency(t.linePrice,t.currency);return e.createElement("tr",{className:"widget-item widget-item--value-add"},e.createElement("td",{className:"widget-item__thumbnail"},e.createElement("a",{href:t.productPageUrl,style:{backgroundImage:"url(".concat(t.mediumThumbUrl,")")},"aria-hidden":"true",tabIndex:-1},e.createElement("span",{className:"sr-only"},t.name))),e.createElement("td",{className:"widget-item__name"},e.createElement("a",iE({href:t.productPageUrl,className:"widget-item__link"},t.tabIndex),t.name),e.createElement("div",{className:"widget-item__description","aria-label":"".concat(t.quantity," incluido con la compra")},"".concat(t.quantity," included with purchase"))),e.createElement("td",{className:"widget-item__price widget-item__total",colSpan:2},e.createElement("span",{className:"widget-item__total__line free-note"},"Gratis"),e.createElement("small",{className:"widget-item__total__msrp"},n)))},aE=function(t){return e.createElement("tr",{className:"widget-item widget-item--post-order"},e.createElement("td",{className:"widget-item__thumbnail"},e.createElement("a",{style:{backgroundImage:t.meta?"url(".concat(t.meta.thumbnail,")"):"none"},"aria-hidden":"true",tabIndex:-1},e.createElement("span",{className:"sr-only"},t.name))),e.createElement("td",{className:"widget-item__name"},e.createElement("span",{className:"post-order__title"},t.description),e.createElement("span",{className:"post-order__description"},t.name)),e.createElement("td",{className:"widget-item__price widget-item__total"},e.createElement("span",{className:"widget-item__total__line free-note"},"Gratis")))},sE=function(t){var n,r=function(e,t){var n=e,r=t;if(r instanceof Array)for(var i=0;i<r.length;i++)if(r[i].sku===n)return r[i].inventory},i=[];n=i,t.items.map((function(e){return"child"!==e.cart_group_relation&&"bundle_child"!==e.cart_group_relation||n.push({shopProductId:e.product,cartGroupId:e.cart_group_id,productName:e.name,childPrice:e.line_price}),!1}));var o=t.items.slice(0).reverse().map((function(n){if("child"!==n.cart_group_relation&&"bundle_child"!==n.cart_group_relation){var o=i.filter((function(e){return e.cartGroupId===n.cart_group_id}));return e.createElement(QS,{key:"item-".concat(n.cart_group_id,"-").concat(n.product),timeout:600,classNames:"cartItemTransition"},e.createElement(rE,{product:n.product,name:n.name,choiceName:n.choice_name,choiceType:n.choice_type,mediumThumbUrl:n.medium_thumb_url,productPageUrl:n.product_page_url,quantity:n.quantity,maxQuantity:n.max_quantity,lineMsrp:n.line_msrp,linePrice:n.line_price,linePriceRpa:n.line_price_rpa,isUpsell:n.is_upsell,isBundle:n.is_bundle,isReducedPriceAddon:n.is_reduced_price_addon,forceStaticQuantity:n.force_static_quantity,price:n.price,cartGroupId:n.cart_group_id?n.cart_group_id:null,cartGroupRelation:n.cart_group_relation,childProducts:o,isMembersOnly:n.is_members_only,isLoginRequired:t.isLoginRequired,currency:t.currency,inventory:r(n.sku,t.inventoryList),formatCurrency:t.formatCurrency,updateQuantity:t.updateQuantity,tabIndex:t.tabIndex}))}})),a=t.valueAdds.map((function(n){return e.createElement(QS,{key:"valueadd-".concat(n.product),timeout:600,classNames:"cartItemTransition"},e.createElement(oE,{key:"valueadd-".concat(n.product),product:n.product,name:n.name,mediumThumbUrl:n.medium_thumb_url,productPageUrl:n.product_page_url,quantity:n.quantity,linePrice:n.line_price,price:n.price,currency:t.currency,formatCurrency:t.formatCurrency,tabIndex:t.tabIndex}))})),s=t.postOrders.map((function(n){return e.createElement(QS,{key:"postorder-".concat(n.id),timeout:600,classNames:"cartItemTransition"},e.createElement(aE,{key:"postorder-".concat(n.id),name:n.name,description:n.description,meta:n.meta,value:n.value,currency:t.currency,formatCurrency:t.formatCurrency}))}));return e.createElement("div",{className:"cart-widget__items-list cart-widget__section"},e.createElement("table",{role:"presentation"},e.createElement(DS,{component:"tbody"},o,a.length>0||s.length>0?e.createElement("tr",{className:"widget-item--value-add-separator"},e.createElement("td",null,"Included Free"),e.createElement("td",{colSpan:2},e.createElement("hr",null))):null,a,s)))},AE=function(t){return t.totalMsrp===t.estimatedTotalBase?null:e.createElement("tr",{className:"cart-total cart-total--discount"},e.createElement("th",{className:"cart-total__label"},"Discount "),e.createElement("td",{className:"cart-total__amount"},e.createElement("span",null,t.discount),e.createElement("span",{className:"sr-only","aria-live":"polite"},"Amount discount off total order, ".concat(t.discount))))},cE=function(t){return null===t.estimatedShipping||null==t.estimatedShipping?e.createElement(e.Fragment,null):0===t.estimatedShipping?e.createElement("tr",{className:"cart-total cart-total--shipping"},e.createElement("th",{className:"cart-total__label"},"Envío"),e.createElement("td",{className:"cart-total__free"},e.createElement("strong",{className:"free-note"},"Gratis"))):e.createElement("tr",{className:"cart-total cart-total--shipping"},e.createElement("th",{className:"cart-total__label"},"Envío"),e.createElement("td",{className:"cart-total__amount"},e.createElement(e.Fragment,null,t.shipping)))},lE=W((function(e){return{total_msrp:e.cart.data.total_msrp,total_msrp_discount:e.cart.data.total_msrp_discount,total_discounts:e.cart.data.total_discounts,estimated_shipping_price_base:e.cart.data.estimated_shipping_price_base,estimated_total_base:e.cart.data.estimated_total_base,currency:e.cart.data.currency}}))((function(t){var n=t.currency,r=t.formatCurrency(t.total_msrp_discount,n),i=t.formatCurrency(t.total_msrp,n),o="";null!==t.estimated_shipping_price_base&&void 0!==t.estimated_shipping_price_base&&(o=t.formatCurrency(t.estimated_shipping_price_base,n));var a=t.formatCurrency(t.estimated_total_base,n);return e.createElement("table",{className:"cart-totals-table"},e.createElement("tbody",null,e.createElement("tr",{className:"cart-total cart-total--subtotal"},e.createElement("th",{className:"cart-total__label"},"Subtotal"),e.createElement("td",{className:"cart-total__amount"},i)),e.createElement(AE,{totalMsrp:t.total_msrp,estimatedTotalBase:t.estimated_total_base,discount:r}),e.createElement(cE,{estimatedShipping:t.estimated_shipping_price_base,shipping:o}),e.createElement("tr",{className:"cart-total cart-total--grand","aria-live":"polite"},e.createElement("th",{className:"cart-total__label"},"Est. total"),e.createElement("td",{className:"cart-total__amount"},n," ",e.createElement("span",null," ",a)))))}));function uE(){return uE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uE.apply(this,arguments)}var dE=function(t){var n="".concat(t.staticUrl,"img/checkout/payment-icons/").concat(t.fileName),r="".concat(t.name," Logo"),i=t.className?t.className:"widget-payment__icon-card";return e.createElement("img",{className:i,src:n,alt:r})},hE=function(t){var n=t.staticUrl;if(null!==n){var r=[];return r.push({name:"Paypal",fileName:"paypal-logo-16px.png",staticUrl:n,className:"widget-payment__icon--paypal"}),"US"===t.country&&r.push({name:"Affirm",fileName:"affirm_payment_icon-16px.png",staticUrl:n,className:"widget-payment__icon--affirm"}),r.push({name:"Amex",fileName:"amex.png",staticUrl:n}),r.push({name:"Discover",fileName:"discover.png",staticUrl:n}),r.push({name:"Mastercard",fileName:"mastercard.png",staticUrl:n}),r.push({name:"Visa",fileName:"visa.png",staticUrl:n}),e.createElement("div",{className:"widget-payment__icons"},r.map((function(t,n){return e.createElement(dE,uE({key:n},t))})))}return null},fE=function(t){var n=e.createElement("li",{className:"cart-benefit__note--shipping"},"Speedy shipping");return t.freeShipping&&(n=e.createElement("li",{className:"cart-benefit__note--shipping-free"},e.createElement("strong",{className:"free-note"},"Envío rápido y gratuito"))),e.createElement("div",{className:"cart__footer"},e.createElement("ul",{className:"cart-benefits"},n,e.createElement("li",{className:"cart-benefit__note cart-benefit__note--return"},"Política de devolución extendida de 30 días"),e.createElement("li",{className:"cart-benefit__note cart-benefit__note--support"},e.createElement("a",{href:"/membership"},"Beneficios para miembros"))),e.createElement(hE,{staticUrl:t.staticUrl,country:t.country}))},pE=function(t){return e.createElement("div",{className:"cart__checkout-button"},e.createElement("a",{href:t.loginRequiredURL,className:"button button--solid button--purple button--block button--large"},"Log in to check out"))},mE=function(t){return e.createElement("div",{className:"cart__checkout-button js-mobile-checkout-button"},e.createElement("form",{action:t.checkoutURL,method:"post"},e.createElement("input",{type:"hidden",name:"cart_id",value:t.cartId}),e.createElement("button",{type:"submit",className:"button button--solid button--orange button--block button--large ".concat(t.isCheckoutEnabled?"":"is-inactive")},"🔒 Secure Checkout")))},gE=function(t){return t.isLoginRequired?e.createElement(pE,{loginRequiredURL:t.loginRequiredURL}):e.createElement(mE,{checkoutURL:t.checkoutURL,cartId:t.cartId,isCheckoutEnabled:t.isCheckoutEnabled})};function vE(e){return vE="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},vE(e)}function yE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bE(e,t){return bE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bE(e,t)}function BE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CE(e);if(t){var i=CE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _E(this,n)}}function _E(e,t){if(t&&("object"===vE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xE(e)}function xE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CE(e){return CE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},CE(e)}function SE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EE=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bE(e,t)}(a,t);var n,r,i,o=BE(a);function a(){var e;yE(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return SE(xE(e=o.call.apply(o,[this].concat(n))),"isCheckoutEnabled",(function(){for(var t=0;t<e.props.items.length;t++)if(e.props.items[t].quantity>e.props.items[t].max_quantity)return!1;return!0})),e}return n=a,(r=[{key:"render",value:function(){return this.props.isLoaded?this.props.isEmpty?e.createElement("div",null,e.createElement("h1",null,"Carrito de compras"),e.createElement("p",null,"Tu carrito está vacío"),e.createElement("a",{href:"/gaming-products",className:"button button--orange button--solid button--block button--large cart-empty-button"},"Comienza a comprar!")):e.createElement("div",{className:"cart__main"},e.createElement("div",{className:"cart-left"},e.createElement("div",{className:"cart__header"},e.createElement("h1",null,"Carrito"),e.createElement("span",null,"(",this.props.quantity," ","".concat(1===this.props.quantity?"artículo":"artículos"),")")),e.createElement("div",{className:"cart__items"},e.createElement(sE,{items:this.props.items,valueAdds:this.props.valueAdds,postOrders:this.props.postOrders,currency:this.props.currency,inventoryList:this.props.inventoryList,formatCurrency:this.props.formatCurrency,updateQuantity:this.props.updateQuantity,tabIndex:{tabIndex:"0"},isLoginRequired:this.props.isLoginRequired}))),e.createElement("div",{className:"cart-right js-cart-page-summary"},e.createElement("div",{className:"cart-right-wrapper"},e.createElement("h2",null,"Total"),e.createElement(lE,{couponCode:this.props.couponCode,formatCurrency:this.props.formatCurrency}),e.createElement(gE,{cartId:this.props.cartId,isLoginRequired:this.props.isLoginRequired,loginRequiredURL:this.props.loginRequiredURL,checkoutURL:this.props.checkoutURL,isCheckoutEnabled:this.isCheckoutEnabled()}),e.createElement(fE,{freeShipping:this.props.freeShipping,staticUrl:this.props.staticUrl,country:this.props.country})))):void 0===dt.get(window.cartCookieKey)?e.createElement("div",null,e.createElement("h1",null,"Carrito de compras"),e.createElement("p",null,"Tu carrito está vacío"),e.createElement("a",{href:"/gaming-products",className:"button button--orange button--solid button--block button--large cart-empty-button"},"Comienza a comprar!")):e.createElement("div",{className:"container--cart-page-loading"},e.createElement("span",{className:"button is-loading"}))}}])&&wE(n.prototype,r),i&&wE(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component),ME=W((function(e){return{isLoaded:e.cart.isLoaded,cartId:e.cart.data.id,isEmpty:e.cart.data.is_empty,isLoginRequired:e.cart.data.is_login_required,checkoutURL:e.cart.data.checkout_url,loginRequiredURL:e.cart.data.login_required_url,items:e.cart.data.items,addons:e.cart.addons,valueAdds:e.cart.data.value_adds,postOrders:e.cart.data.post_order,quantity:e.cart.data.quantity_incl_value_adds,currency:e.cart.data.currency,freeShipping:0===e.cart.data.estimated_shipping_price_base,couponCode:e.cart.data.coupon_code,country:e.cart.data.country}}),(function(e){return{updateQuantity:function(t,n,r){return e(pS(t,n,r))}}}))(EE);function UE(e){return UE="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},UE(e)}function FE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function QE(e,t){return QE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},QE(e,t)}function LE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=PE(e);if(t){var i=PE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return IE(this,n)}}function IE(e,t){if(t&&("object"===UE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kE(e)}function kE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PE(e){return PE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},PE(e)}function OE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DE=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QE(e,t)}(a,t);var n,r,i,o=LE(a);function a(){var e;FE(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return OE(kE(e=o.call.apply(o,[this].concat(n))),"handleMouseEnter",(function(t){if(""===e.props.enableCartWidget)return t.preventDefault(),t.stopPropagation(),!1;e.props.openPanel()})),e}return n=a,(r=[{key:"render",value:function(){var t=1===this.props.quantity?"artículo":"artículos";return e.createElement("a",{href:"/cart",className:"button button--link simple-cart-icon ".concat(this.props.enableCartWidget),"aria-label":"Cart (".concat(this.props.quantity," ").concat(t,"), opens dialog"),onMouseEnter:this.handleMouseEnter},e.createElement("span",{className:"courtesy-navigation__icon"},e.createElement("svg",{"aria-hidden":"true",role:"img",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},e.createElement("path",{d:"M551.991 64H129.28l-8.329-44.423C118.822 8.226 108.911 0 97.362 0H12C5.373 0 0 5.373 0 12v8c0 6.627 5.373 12 12 12h78.72l69.927 372.946C150.305 416.314 144 431.42 144 448c0 35.346 28.654 64 64 64s64-28.654 64-64a63.681 63.681 0 0 0-8.583-32h145.167a63.681 63.681 0 0 0-8.583 32c0 35.346 28.654 64 64 64 35.346 0 64-28.654 64-64 0-17.993-7.435-34.24-19.388-45.868C506.022 391.891 496.76 384 485.328 384H189.28l-12-64h331.381c11.368 0 21.177-7.976 23.496-19.105l43.331-208C578.592 77.991 567.215 64 551.991 64zM240 448c0 17.645-14.355 32-32 32s-32-14.355-32-32 14.355-32 32-32 32 14.355 32 32zm224 32c-17.645 0-32-14.355-32-32s14.355-32 32-32 32 14.355 32 32-14.355 32-32 32zm38.156-192H171.28l-36-192h406.876l-40 192z"})),e.createElement("span",{className:"navigation-cart__badge"},"".concat(this.props.quantity?this.props.quantity:""))))}}])&&TE(n.prototype,r),i&&TE(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component),HE=W((function(e){return{open:e.cart.open,quantity:e.cart.data.quantity_incl_value_adds}}),(function(e){return{openPanel:function(){return e(lS())}}}))(DE);function RE(){return RE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RE.apply(this,arguments)}var NE=function(t){var n="parent"===t.cartGroupRelation&&t.childProducts&&!t.isBundle,r="",i="";if(n){var o=t.linePrice;t.childProducts.map((function(e){o+=e.childPrice})),r=t.formatCurrency(o,t.currency)}else t.isReducedPriceAddon?(r=t.formatCurrency(t.linePriceRpa,t.currency),i=t.linePriceRpa<t.lineMsrp?t.formatCurrency(t.lineMsrp,t.currency):null):(r=t.formatCurrency(t.linePrice,t.currency),i=t.linePrice<t.lineMsrp?t.formatCurrency(t.lineMsrp,t.currency):null);var a=t.formatCurrency(t.price,t.currency),s=null,A=null,c=t.isLoginRequired?e.createElement(eE,{ariaHidden:!0,title:""}):e.createElement(tE,{ariaHidden:!0,title:""});if(n){var l=function(e){var t=[];e.forEach((function(e){t.push(e.shopProductId)}));var n=t.sort((function(e,t){return e-t}));return n.join("-")}(t.childProducts);try{A=localStorage.getItem("custom-product-".concat(l))}catch(e){}}return t.isMembersOnly&&(s=e.createElement("div",{className:"widget-item__user-exclusive"},c,"Member exclusive")),e.createElement("tr",{className:"widget-item"},e.createElement("td",{className:"widget-item__thumbnail"},e.createElement("a",{href:t.productPageUrl,style:{backgroundImage:n&&A?"url('".concat(A.toString(),"')"):"url(".concat(t.mediumThumbUrl,")")},"aria-hidden":"true",tabIndex:-1},e.createElement("span",{className:"sr-only"},t.name))),e.createElement("td",{className:"widget-item__name"},e.createElement("a",RE({href:t.productPageUrl,className:"widget-item__link"},t.tabIndex),t.name),e.createElement("div",{className:"widget-item__description"},s,e.createElement(ZS,{choiceType:t.choiceType,choiceName:t.choiceName}),e.createElement("span",{className:"widget-item__quantity"},"Cantidad: ".concat(t.quantity)))),e.createElement("td",{className:"widget-item__price"},e.createElement("span",{className:"sr-only","aria-live":"polite"},"".concat(t.quantity," of ").concat(t.name," at ").concat(a," each")),e.createElement("div",{className:"price-wrapper"},r,e.createElement("span",{className:"widget-item__msrp"},i))))},zE=function(t){var n,r=[];n=r,t.items.map((function(e){return"child"===e.cart_group_relation&&n.push({shopProductId:e.product,cartGroupId:e.cart_group_id,productName:e.name,childPrice:e.line_price}),!1}));var i=t.items.slice(0).reverse().map((function(n){if("child"!==n.cart_group_relation){var i=r.filter((function(e){return e.cartGroupId===n.cart_group_id}));return e.createElement(QS,{key:"item-".concat(n.cart_group_id,"-").concat(n.product),timeout:600,classNames:"cartItemTransition"},e.createElement(NE,{product:n.product,name:n.name,choiceName:n.choice_name,choiceType:n.choice_type,mediumThumbUrl:n.medium_thumb_url,productPageUrl:n.product_page_url,quantity:n.quantity,maxQuantity:n.max_quantity,lineMsrp:n.line_msrp,linePrice:n.line_price,linePriceRpa:n.line_price_rpa,price:n.price,isBundle:n.is_bundle,isReducedPriceAddon:n.is_reduced_price_addon,cartGroupId:n.cart_group_id?n.cart_group_id:null,cartGroupRelation:n.cart_group_relation,childProducts:i,currency:t.currency,isMembersOnly:n.is_members_only,isLoginRequired:t.isLoginRequired,formatCurrency:t.formatCurrency,tabIndex:t.tabIndex}))}})),o=t.valueAdds.map((function(n){return e.createElement(QS,{key:"valueadd-".concat(n.product),timeout:600,classNames:"cartItemTransition"},e.createElement(oE,{key:"valueadd-".concat(n.product),product:n.product,name:n.name,mediumThumbUrl:n.medium_thumb_url,productPageUrl:n.product_page_url,quantity:n.quantity,maxQuantity:n.max_quantity,linePrice:n.line_price,price:n.price,currency:t.currency,formatCurrency:t.formatCurrency,tabIndex:t.tabIndex}))})),a=t.postOrders.map((function(n){return e.createElement(QS,{key:"postorder-".concat(n.id),timeout:600,classNames:"cartItemTransition"},e.createElement(aE,{key:"postorder-".concat(n.id),name:n.name,description:n.description,meta:n.meta,value:n.value,currency:t.currency,formatCurrency:t.formatCurrency}))}));return e.createElement("div",{className:"cart-widget__floating__items-list"},e.createElement("table",{role:"presentation"},e.createElement(DS,{component:"tbody"},i,o.length>0||a.length>0?e.createElement("tr",{className:"widget-item--value-add-separator"},e.createElement("td",null,"Included Free"),e.createElement("td",{colSpan:2},e.createElement("hr",null))):null,o,a)))};function VE(e){return VE="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},VE(e)}function jE(){return jE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jE.apply(this,arguments)}function KE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WE(e,t){return WE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},WE(e,t)}function qE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=YE(e);if(t){var i=YE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return XE(this,n)}}function XE(e,t){if(t&&("object"===VE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return JE(e)}function JE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YE(e){return YE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},YE(e)}function ZE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $E=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WE(e,t)}(a,t);var n,r,i,o=qE(a);function a(){var e;KE(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ZE(JE(e=o.call.apply(o,[this].concat(n))),"handleMouseLeave",(function(t){e.props.closePanel()})),e}return n=a,(r=[{key:"render",value:function(){var t=this.props.open?{}:{tabIndex:-1},n=1===this.props.quantity?"artículo":"artículos";return this.props.open?this.props.isEmpty?e.createElement("div",{className:"cart-widget js-cart-widget",onMouseLeave:this.handleMouseLeave},e.createElement("div",{className:"courtesy-navigation__caret"}),e.createElement("div",{className:"cart-widget__inner"},e.createElement("p",{className:"cart-widget__title"},"Carrito",e.createElement("small",null,"(".concat(this.props.quantity," ").concat(n,")"))),e.createElement("div",{className:"simple-cart-widget__empty"},e.createElement("p",null,"Tu carrito está vacío"),e.createElement("a",jE({href:"/gaming-products",className:"button button--orange button--solid button--block button--large"},t),"Comienza a comprar!")))):e.createElement("div",{className:"cart-widget js-cart-widget",onMouseLeave:this.handleMouseLeave},e.createElement("div",{className:"courtesy-navigation__caret"}),e.createElement("div",{className:"cart-widget__inner"},e.createElement("p",{className:"cart-widget__title"},"Carrito",e.createElement("small",null,"(".concat(this.props.quantity," ").concat(n,")"))),e.createElement(zE,{items:this.props.items,valueAdds:this.props.valueAdds,postOrders:this.props.postOrders,currency:this.props.currency,isLoginRequired:this.props.isLoginRequired,formatCurrency:this.props.formatCurrency,tabIndex:t}),e.createElement("div",{className:"cart-widget__bottom"},e.createElement("div",{className:"simple-cart-widget__view-cart-button"},e.createElement("a",{href:"/cart",className:"button button--orange button--solid button--block"},"Ver carrito")),e.createElement("div",{className:"cart-widget__checkout-button"},e.createElement("form",{action:this.props.checkoutURL,method:"POST"},e.createElement("input",{type:"hidden",name:"cart_id",value:this.props.cartId}),e.createElement("button",jE({type:"submit",className:"button button--solid button--orange button--block button-no-wrap"},t),"🔒 Checkout")))))):null}}])&&GE(n.prototype,r),i&&GE(n,i),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component),eM=W((function(e){return{cartId:e.cart.data.id,open:e.cart.open,isEmpty:e.cart.data.is_empty,isLoginRequired:e.cart.data.is_login_required,checkoutURL:e.cart.data.checkout_url,items:e.cart.data.items,valueAdds:e.cart.data.value_adds,postOrders:e.cart.data.post_order,quantity:e.cart.data.quantity_incl_value_adds,currency:e.cart.data.currency,freeShipping:0===e.cart.data.estimated_shipping_price_base}}),(function(e){return{openPanel:function(){return e(lS())},closePanel:function(){return e(uS())}}}))($E),tM={open:!1,isLoaded:!1,couponError:null,addons:[],data:{id:"",country:"US",region:"US",currency:"USD",symbol:"$",charge_currency:"USD",charge_currency_symbol:"$",charge_currency_rate:1,quantity:0,quantity_incl_value_adds:0,is_empty:!0,is_login_required:!1,can_checkout:!1,total_excl_discounts:0,total_discounts:0,total:0,total_msrp:0,total_msrp_discount:0,total_incl_shipping:0,total_excl_discounts_charge:0,total_discounts_charge:0,total_charge:0,total_incl_shipping_charge:0,display_vat:!1,vat:0,vat_charge:0,url:"/api/v3/cart",available_add_on_products_url:"/api/v3/cart/available-add-ons",checkout_url:"/checkout/new",login_required_url:"/login?next=/cart",items:[],value_adds:[],coupon_code:null,promotions:[],post_order:[],estimated_shipping_option:null,estimated_shipping_price_base:0,estimated_free_shipping_qualify_subtotal:0,estimated_total_base:0}};function nM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nM(Object(n),!0).forEach((function(t){iM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oM=function(){return{event:"SendEvent",eventCategory:"Cart Widget",eventAction:"Open"}},aM=function(){return{event:"SendEvent",eventCategory:"Cart Widget",eventAction:"Close"}},sM=function(e){var t=e.coupon;return{item_name:e.name.toString(),item_id:e.sku.toString(),price:parseFloat((e.line_price_rpa/e.quantity).toFixed(2)),quantity:parseInt(e.diff),discount:Math.abs(parseFloat((e.msrp-e.line_price_rpa/e.quantity).toFixed(2))),coupon:t?t.toString():null,item_category:e.category.toString(),in_stock:e.inventory>0}},AM=function(e,t,n){var r=n.reduce((function(e,t){return e+t.price*t.quantity}),0).toFixed(2),i=n;return(window.dataLayer||[]).push({ecommerce:null}),{event:e,ecommerce:{currency:t.toString(),value:parseFloat(r),items:i}}},cM=function(e){var t=e.data.items.filter((function(e){return null!==e.diff})).map((function(t){return rM(rM({},t),{},{coupon:e.data.coupon_code})})).map(sM);return AM("add_to_cart",e.data.currency,t)},lM=function(e,t){if(0===e.quantity){var n=t.cart.data.items.filter((function(t){return t.product===e.productId})).map((function(e){return rM(rM({},e),{},{diff:Math.abs(e.quantity),coupon:t.cart.data.coupon_code})})).map(sM).map((function(e){return rM(rM({},e),{},{quantity:Math.abs(e.quantity)})}));return AM("remove_from_cart",e.data.currency,n)}var r=e.data.items.filter((function(e){return null!==e.diff})).map((function(t){return rM(rM({},t),{},{coupon:e.data.coupon_code})})).map(sM),i=r.filter((function(e){return e.quantity>0})),o=r.filter((function(e){return e.quantity<0})).map((function(e){return rM(rM({},e),{},{quantity:Math.abs(e.quantity)})})),a=[];return i.length>0&&a.push(AM("add_to_cart",e.data.currency,i)),o.length>0&&a.push(AM("remove_from_cart",e.data.currency,o)),a};function uM(e,t,n){return function(r){var i,o,a=Vc()(t,{hash:!0}),s=[],A=Array.from(t.querySelectorAll(n));Array.isArray(a.product_id)&&a.product_id.length>1?(i=!0,o=a.product_id):(i=!1,o=[a.product_id]),o.forEach((function(e){s.push({product:e,quantity:1})})),A.forEach((function(e){return e.classList.add("is-loading")}));var c=[];c.push(new Promise((function(t,n){e.dispatch(fS(s,"add_to_cart",n)).then((function(){return t(!0)}))}))),i&&window.SteelSeries.screenshotThreeDimensionalModel&&c.push(new Promise((function(e,t){window.SteelSeries.screenshotThreeDimensionalModel().then((function(){return e(!0)})).catch((function(e){t()}))}))),Promise.all(c).then((function(){e.dispatch(lS());var t=document.querySelector(".js-interstitial-modal-wrapper");t instanceof HTMLElement||Array.from(document.querySelectorAll(".js-cart-widget")).forEach((function(e){e&&e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}));A.forEach((function(e){if(e.classList.remove("is-loading"),t instanceof HTMLElement){var n=e.parentElement;if(!(n instanceof HTMLElement))return;var r=n.querySelector(".js-add-to-cart-modal");r instanceof HTMLElement&&r.click()}}))})).catch((function(){return A.forEach((function(e){e.classList.remove("is-loading")}))})),r.preventDefault()}}function dM(e){var t=e.getAttribute("action");if(t){var n=e.querySelector(".form-field__error-list "),r=e.querySelector(".footer-newsletter-form__success"),i=e.querySelector(".footer-newsletter-form__widgets"),o=e.querySelector('input[type="email"]');n instanceof HTMLElement&&o instanceof HTMLElement&&r instanceof HTMLElement&&i instanceof HTMLElement&&e.addEventListener("submit",(function(a){a.preventDefault();var s=Vc()(e);(function(e,t){return Pc().post(e,t,{headers:{"X-Requested-With":"XMLHttpRequest"}})})(t,s).then((function(t){e.classList.add("is-success"),e.removeChild(i),r.setAttribute("aria-hidden","false"),n.innerHTML=""}),(function(e){var t=[];e.response?(Object.keys(e.response.data).forEach((function(n){e.response.data[n].forEach((function(e){return t.push(e)}))})),o.classList.add("is-invalid"),o.setAttribute("aria-invalid","true")):t.push("Something went wrong, please try again later."),n.innerHTML="";var r=document.createElement("span");r.className="form-field__error-title sr-only",r.innerHTML="Errores de correo electrónico:",n.appendChild(r),t.forEach((function(e){var t=document.createElement("span");t.className="form-field__error",t.innerHTML=e,n.appendChild(t)}))}))}))}}var hM,fM,pM,mM,gM,vM=["password","123456","12345678","1234","qwerty","12345","dragon","pussy","baseball","football","letmein","monkey","696969","abc123","mustang","michael","shadow","master","jennifer","111111","2000","jordan","superman","harley","1234567","fuckme","hunter","fuckyou","trustno1","ranger","buster","thomas","tigger","robert","soccer","fuck","batman","test","pass","killer","hockey","george","charlie","andrew","michelle","love","sunshine","jessica","asshole","6969","pepper","daniel","access","123456789","654321","joshua","maggie","starwars","silver","william","dallas","yankees","123123","ashley","666666","hello","amanda","orange","biteme","freedom","computer","sexy","thunder","nicole","ginger","heather","hammer","summer","corvette","taylor","fucker","austin","1111","merlin","matthew","121212","golfer","cheese","princess","martin","chelsea","patrick","richard","diamond","yellow","bigdog","secret","asdfgh","sparky","cowboy","camaro","anthony","matrix","falcon","iloveyou","bailey","guitar","jackson","purple","scooter","phoenix","aaaaaa","morgan","tigers","porsche","mickey","maverick","cookie","nascar","peanut","justin","131313","money","horny","samantha","panties","steelers","joseph","snoopy","boomer","whatever","iceman","smokey","gateway","dakota","cowboys","eagles","chicken","dick","black","zxcvbn","please","andrea","ferrari","knight","hardcore","melissa","compaq","coffee","booboo","bitch","johnny","bulldog","xxxxxx","welcome","james","player","ncc1701","wizard","scooby","charles","junior","internet","bigdick","mike","brandy","tennis","blowjob","banana","monster","spider","lakers","miller","rabbit","enter","mercedes","brandon","steven","fender","john","yamaha","diablo","chris","boston","tiger","marine","chicago","rangers","gandalf","winter","bigtits","barney","edward","raiders","porn","badboy","blowme","spanky","bigdaddy","johnson","chester","london","midnight","blue","fishing","000000","hannah","slayer","11111111","rachel","sexsex","redsox","thx1138","asdf","marlboro","panther","zxcvbnm","arsenal","oliver","qazwsx","mother","victoria","7777777","jasper","angel","david","winner","crystal","golden","butthead","viking","jack","iwantu","shannon","murphy","angels","prince","cameron","girls","madison","wilson","carlos","hooters","willie","startrek","captain","maddog","jasmine","butter","booger","angela","golf","lauren","rocket","tiffany","theman","dennis","liverpoo","flower","forever","green","jackie","muffin","turtle","sophie","danielle","redskins","toyota","jason","sierra","winston","debbie","giants","packers","newyork","jeremy","casper","bubba","112233","sandra","lovers","mountain","united","cooper","driver","tucker","helpme","fucking","pookie","lucky","maxwell","8675309","bear","suckit","gators","5150","222222","shithead","fuckoff","jaguar","monica","fred","happy","hotdog","tits","gemini","lover","xxxxxxxx","777777","canada","nathan","victor","florida","88888888","nicholas","rosebud","metallic","doctor","trouble","success","stupid","tomcat","warrior","peaches","apples","fish","qwertyui","magic","buddy","dolphins","rainbow","gunner","987654","freddy","alexis","braves","cock","2112","1212","cocacola","xavier","dolphin","testing","bond007","member","calvin","voodoo","7777","samson","alex","apollo","fire","tester","walter","beavis","voyager","peter","porno","bonnie","rush2112","beer","apple","scorpio","jonathan","skippy","sydney","scott","red123","power","gordon","travis","beaver","star","jackass","flyers","boobs","232323","zzzzzz","steve","rebecca","scorpion","doggie","legend","ou812","yankee","blazer","bill","runner","birdie","bitches","555555","parker","topgun","asdfasdf","heaven","viper","animal","2222","bigboy","4444","arthur","baby","private","godzilla","donald","williams","lifehack","phantom","dave","rock","august","sammy","cool","brian","platinum","jake","bronco","paul","mark","frank","heka6w2","copper","billy","cumshot","garfield","willow","cunt","little","carter","slut","albert","69696969","kitten","super","jordan23","eagle1","shelby","america","11111","jessie","house","free","123321","chevy","bullshit","white","broncos","horney","surfer","nissan","999999","saturn","airborne","elephant","marvin","shit","action","adidas","qwert","kevin","1313","explorer","walker","police","christin","december","benjamin","wolf","sweet","therock","king","online","dickhead","brooklyn","teresa","cricket","sharon","dexter","racing","penis","gregory","0000","teens","redwings","dreams","michigan","hentai","magnum","87654321","nothing","donkey","trinity","digital","333333","stella","cartman","guinness","123abc","speedy","buffalo","kitty","pimpin","eagle","einstein","kelly","nelson","nirvana","vampire","xxxx","playboy","louise","pumpkin","snowball","test123","girl","sucker","mexico","beatles","fantasy","ford","gibson","celtic","marcus","cherry","cassie","888888","natasha","sniper","chance","genesis","hotrod","reddog","alexande","college","jester","passw0rd","bigcock","smith","lasvegas","carmen","slipknot","3333","death","kimberly","1q2w3e","eclipse","1q2w3e4r","stanley","samuel","drummer","homer","montana","music","aaaa","spencer","jimmy","carolina","colorado","creative","hello1","rocky","goober","friday","bollocks","scotty","abcdef","bubbles","hawaii","fluffy","mine","stephen","horses","thumper","5555","pussies","darkness","asdfghjk","pamela","boobies","buddha","vanessa","sandman","naughty","douglas","honda","matt","azerty","6666","shorty","money1","beach","loveme","4321","simple","poohbear","444444","badass","destiny","sarah","denise","vikings","lizard","melanie","assman","sabrina","nintendo","water","good","howard","time","123qwe","november","xxxxx","october","leather","bastard","young","101010","extreme","hard","password1","vincent","pussy1","lacrosse","hotmail","spooky","amateur","alaska","badger","paradise","maryjane","poop","crazy","mozart","video","russell","vagina","spitfire","anderson","norman","eric","cherokee","cougar","barbara","long","420420","family","horse","enigma","allison","raider","brazil","blonde","jones","55555","dude","drowssap","jeff","school","marshall","lovely","1qaz2wsx","jeffrey","caroline","franklin","booty","molly","snickers","leslie","nipples","courtney","diesel","rocks","eminem","westside","suzuki","daddy","passion","hummer","ladies","zachary","frankie","elvis","reggie","alpha","suckme","simpson","patricia","147147","pirate","tommy","semperfi","jupiter","redrum","freeuser","wanker","stinky","ducati","paris","natalie","babygirl","bishop","windows","spirit","pantera","monday","patches","brutus","houston","smooth","penguin","marley","forest","cream","212121","flash","maximus","nipple","bobby","bradley","vision","pokemon","champion","fireman","indian","softball","picard","system","clinton","cobra","enjoy","lucky1","claire","claudia","boogie","timothy","marines","security","dirty","admin","wildcats","pimp","dancer","hardon","veronica","fucked","abcd1234","abcdefg","ironman","wolverin","remember","great","freepass","bigred","squirt","justice","francis","hobbes","kermit","pearljam","mercury","domino","9999","denver","brooke","rascal","hitman","mistress","simon","tony","bbbbbb","friend","peekaboo","naked","budlight","electric","sluts","stargate","saints","bondage","brittany","bigman","zombie","swimming","duke","qwerty1","babes","scotland","disney","rooster","brenda","mookie","swordfis","candy","duncan","olivia","hunting","blink182","alicia","8888","samsung","bubba1","whore","virginia","general","passport","aaaaaaaa","erotic","liberty","arizona","jesus","abcd","newport","skipper","rolltide","balls","happy1","galore","christ","weasel","242424","wombat","digger","classic","bulldogs","poopoo","accord","popcorn","turkey","jenny","amber","bunny","mouse","007007","titanic","liverpool","dreamer","everton","friends","chevelle","carrie","gabriel","psycho","nemesis","burton","pontiac","connor","eatme","lickme","roland","cumming","mitchell","ireland","lincoln","arnold","spiderma","patriots","goblue","devils","eugene","empire","asdfg","cardinal","brown","shaggy","froggy","qwer","kawasaki","kodiak","people","phpbb","light","54321","kramer","chopper","hooker","honey","whynot","lesbian","lisa","baxter","adam","snake","teen","ncc1701d","qqqqqq","airplane","britney","avalon","sandy","sugar","sublime","stewart","wildcat","raven","scarface","elizabet","123654","trucks","wolfpack","pervert","lawrence","raymond","redhead","american","alyssa","bambam","movie","woody","shaved","snowman","tiger1","chicks","raptor","1969","stingray","shooter","france","stars","madmax","kristen","sports","jerry","789456","garcia","simpsons","lights","ryan","looking","chronic","alison","hahaha","packard","hendrix","perfect","service","spring","srinivas","spike","katie","252525","oscar","brother","bigmac","suck","single","cannon","georgia","popeye","tattoo","texas","party","bullet","taurus","sailor","wolves","panthers","japan","strike","flowers","pussycat","chris1","loverboy","berlin","sticky","marina","tarheels","fisher","russia","connie","wolfgang","testtest","mature","bass","catch22","juice","michael1","nigger","159753","women","alpha1","trooper","hawkeye","head","freaky","dodgers","pakistan","machine","pyramid","vegeta","katana","moose","tinker","coyote","infinity","inside","pepsi","letmein1","bang","control"];function yM(){var e=0,t=/[a-z]/,n=/\d+/,r=/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/,i=this.parentElement.querySelectorAll('[id$="_help"] ul li');fM.className="",pM.className="",mM.className="",gM.className="indicatorText",this.value.length>2?(/^[0-9]+$/.test(this.value)?i[2].style.color="red":i[2].style.color="green",this.value.length<8?i[0].style.color="red":i[0].style.color="green",vM.includes(this.value)?i[1].style.color="red":i[1].style.color="green",hM.style.display="block",hM.style.display="flex",this.value.length>=3&&(this.value.match(t)||this.value.match(n)||this.value.match(r))&&(e=1),this.value.length>=8&&(this.value.match(t)&&this.value.match(n)||this.value.match(n)&&this.value.match(r)||this.value.match(t)&&this.value.match(r))&&(e=2),this.value.length>=8&&this.value.match(t)&&this.value.match(n)&&this.value.match(r)&&(e=3),1==e&&(fM.classList.add("weak"),fM.classList.add("active"),gM.style.display="block",gM.textContent="Password Strength: weak",gM.classList.add("weak")),2==e&&(fM.classList.add("active"),fM.classList.add("medium"),pM.classList.add("active"),pM.classList.add("medium"),gM.style.display="block",gM.textContent="Password Strength: medium",gM.classList.add("medium")),3==e&&(fM.classList.add("active"),fM.classList.add("strong"),pM.classList.add("active"),pM.classList.add("strong"),mM.classList.add("active"),mM.classList.add("strong"),gM.style.display="block",gM.textContent="Password Strength: strong",gM.classList.add("strong"))):(i[0].removeAttribute("style"),i[1].removeAttribute("style"),i[2].removeAttribute("style"),gM.style.display="none",gM.className="")}function wM(){switch(window.countryCode){case"DK":return"79609";case"SE":return"79205";case"FI":return"79206";case"NO":return"79207";default:return""}}r("./js/variables.js");window.SteelSeries=window.SteelSeries||{},window.datadogApplicationId&&window.datadogClientToken&&(pc.init({applicationId:window.datadogApplicationId,clientToken:window.datadogClientToken,site:"datadoghq.com",sessionSampleRate:5,sessionReplaySampleRate:5,trackResources:!0,trackLongTasks:!0,trackUserInteractions:!0}),pc.startSessionReplayRecording());var bM=new Ic(window.currencyFormat||{});window.SteelSeries.formatCurrency=function(e,t){return bM.format(e,t)},window.SteelSeries.staticUrl=window.staticUrl,window.SteelSeries.enableCartWidget=window.enableCartWidget,window.SteelSeries.inventoryList=window.inventoryList,window.SteelSeries.AnimationFX=Bc,window.SteelSeries.FormValidator=il,window.SteelSeries.AddressForm=Nc,window.SteelSeries.choiceBox=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.targetSelector,r=t.inputSelector,i=void 0===r?'input[type="radio"]':r,o=t.activeClass,a=void 0===o?"is-active":o,s=t.contentSelector,A=void 0===s?".choice-box__extra":s,c=t.onChange,l=e;if("string"==typeof e&&(l=document.querySelector(e)),l instanceof HTMLElement){var u;u=null==n?Array.from(l.children):Array.from(l.querySelectorAll(n));var d=function(e,t){var n,r;t?(n="false","true",r="true",e.classList.add(a)):(n="true","false",r="false",e.classList.remove(a));var o=e.querySelector(A);o instanceof HTMLElement&&(o.setAttribute("aria-hidden",n),"false"!==e.getAttribute("data-adjust-tabindex")&&Array.from(o.querySelectorAll("button, select, input, a")).forEach((function(e){t?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1")})));var s=e.querySelector(i);s instanceof HTMLInputElement&&s.setAttribute("aria-selected",r)};u.forEach((function(e){var t=e.querySelector(i);t&&t instanceof HTMLInputElement&&(t.addEventListener("change",(function(){u.filter((function(t){return t!==e})).forEach((function(e){return d(e,!1)})),d(e,!0),null!=c&&c(t)})),t.checked&&(u.filter((function(t){return t!==e})).forEach((function(e){return d(e,!1)})),d(e,!0)))}))}},window.SteelSeries.Tooltip=ct,window.SteelSeries.FacetedProductList=Ku,window.SteelSeries.BuySection=od,window.SteelSeries.BuySectionv2=vd,window.SteelSeries.BuySectionCustomization=Md,window.SteelSeries.threeDimensionalModelSetup=function(e,t,n){var r,i=n,o="".concat(window.staticUrl,"img/three-dimensional-assets/aerox-3/textures/braided_rope.png"),a="".concat(window.staticUrl,"img/three-dimensional-assets/aerox-3/textures/shell_texture.png"),s=new cy,A=new ay({canvas:t,antialias:!1,alpha:!0});A.setClearColor(14803425,0),e.appendChild(A.domElement);var c=new pm(45,window.innerWidth/window.innerHeight,.1,1e3);c.position.z=2,c.position.x=0,s.add(c);var l=new jb,u=l.load(o),d=l.load(a),h={value:0},f=new GB,p=new hb({bumpMap:d,bumpScale:2e-4,emissive:new ef(13948116),emissiveIntensity:.45,opacity:.8,transmission:.5,thickness:5,roughness:.6,specularColor:16777215,specularIntensity:1,sheenColor:16777215,sheen:1,sheenRoughness:0,reflectivity:1,ior:2}),m=new Promise((function(e){f.load(i,(function(t){(r=t.scene).traverse((function(e){e.isMesh&&(e.castShadow=!1,e.receiveShadow=!0)})),r.scale.set(.1,.1,.1),r.position.y=.25,r.rotation.y=Math.PI,r.rotation.z=Math.PI/100,r.rotation.x=Math.PI/2,r.traverse((function(e){if(e instanceof sm){var t=e.material.clone();(t="shell"===e.parent.name?p:"cable-braid"===e.parent.name?new Up({map:u}):"lightguide"===e.parent.name?new hm({uniforms:{u_time:h},vertexShader:"\n                uniform float u_time;\n                varying vec2 vUv;\n\n                void main() {\n                  vUv.y = position.z + u_time;\n                  gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n                }\n              ",fragmentShader:"\n              #ifdef GL_ES\n              precision highp float;\n              #endif\n\n              uniform float u_time;\n              varying vec2 vUv;\n              vec3 hsb2rgb( in vec3 c ){\n                  vec3 rgb = clamp(abs(mod(c.x*3.0+vec3(0.0,4.0,2.0),\n                                          6.0)-3.0)-1.0,\n                                  0.0,\n                                  1.0 );\n                  rgb = rgb*rgb*(4.0-2.0*rgb);\n                  return c.z * mix(vec3(1.0), rgb, c.y);\n              }\n              void main() {\n                vec2 st = vUv;\n                st *= 0.1 * 0.5;\n                st -= vec2(u_time*0.4);\n                vec3 color = vec3(0.0);\n\n                color = hsb2rgb(vec3(st.y,1.0,1.0));\n\n                gl_FragColor = vec4(color, 1.0);\n              }\n              "}):new fb({color:new ef(Y_.onyx),shininess:30})).specular=new ef(4210752),e.material=t}})),s.add(r),e(r)}),void 0,(function(e){}))})),g=new Gb(14079702,4210752,.6);g.position.set(0,50,0),s.add(g);var v=new oB(14079702,.6);v.position.set(-5,1,8),v.castShadow=!0,s.add(v);var y=new oB(14079702,.6);y.position.set(5,-1,-8),y.castShadow=!0,s.add(y),s.fog=new Ay(16777215,10,100);var w=new rB(65440,5,1,2);w.position.set(-.2,-.3,.05),s.add(w);var b=new rB(65440,5,1,2);b.position.set(.2,-.3,.05),s.add(b);var B=new q_(c,A.domElement);B.enableDamping=!0,B.enablePan=!1,B.dampingFactor=.1,B.maxDistance=Math.PI;var _=new mB;function x(){if(B.update(),A.render(s,c),requestAnimationFrame(x),function(e){var t=e.domElement,n=window.innerWidth,r=window.innerHeight,i=t.width/window.devicePixelRatio,o=t.height/window.devicePixelRatio,a=i!==n||o!==r;a&&e.setSize(n,r,!1);return a}(A)){var e=A.domElement;c.aspect=e.clientWidth/e.clientHeight,c.updateProjectionMatrix()}var t=_.getElapsedTime();h.value=t;var n=1-.175*t%1;w.color.setHSL(n,1,.16),b.color.setHSL(n,1,.16),A.render(s,c)}Array.from(document.querySelectorAll(".js-option-value-link")).forEach((function(e){e.addEventListener("click",(function(e){var t=e.target,n=t.closest(".js-buy-section-option");t instanceof HTMLElement&&n instanceof HTMLElement&&function(e,t,n){switch(t){case"Toggle Visibility":var i=[];e.includes(" ")?i=e.split(" "):i.push(e),i.forEach((function(e){r.traverse((function(t){t.name==e&&(t.visible="wired"===n)}))}));break;case"Change Color":var o=[];e.includes(" ")?o=e.split(" "):o.push(e),r.traverse((function(e){if(o.includes(e.parent.name)&&e instanceof sm)if(Z_[n]&&Z_[n][e.parent.name])if(1==Z_[n][e.parent.name].meshType)e.material=p;else{var t=new fb({color:new ef(Z_[n][e.parent.name].color),shininess:30,specular:new ef(4210752)});Z_[n][e.parent.name].bump&&(t.bumpScale=2e-4,t.bumpMap=d),e.material=t}else{var r=new fb({color:new ef(Y_[n]),shininess:30,specular:new ef(4210752)});e.material=r}}))}}(n.getAttribute("data-model-part-name"),n.getAttribute("data-model-part-function"),t.getAttribute("data-value"))}))})),window.SteelSeries.onModelLoadPromise=m,window.SteelSeries.screenshotThreeDimensionalModel=function(){return B.reset(),x(),J_()(t,{backgroundColor:null,scale:.5}).then((function(e){var t=e.toDataURL("image/png"),n=[];Array.from(document.querySelectorAll('.js-buy-section-form.is-custom input[data-relationship="child"]')).forEach((function(e){n.push(Number(e.getAttribute("value")))}));var r=n.sort((function(e,t){return e-t})),i=r.join("-");try{localStorage.setItem("custom-product-".concat(i),t)}catch(e){}}))},x()},window.SteelSeries.paymentMethods={},window.SteelSeries.StripePaymentMethod=cl,window.SteelSeries.StripePaymentIntents=fl,window.SteelSeries.updateShippingPrice=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shippingSelector,r=void 0===n?".js-summary-shipping":n,i=t.salesTaxSelector,o=void 0===i?".js-summary-sales-tax":i,a=t.totalSelector,s=void 0===a?".js-summary-total":a,A=t.zeroText,c=void 0===A?"Free":A,l=t.zeroClass,u=void 0===l?"cart-total__free":l,d=new Ic(window.currencyFormat||{}),h=e.getAttribute("data-currency"),f=e.getAttribute("data-calculation-subtotal"),p=e.getAttribute("data-calculation-sales-tax"),m=e.getAttribute("data-price"),g=e.getAttribute("data-sales-tax");if(h&&f&&p&&m&&g){var v=xc()(p).plus(g),y=xc()(f).plus(m).plus(g),w=xc()(m).eq(0),b=w?c:d.format(m,h),B=d.format(y,h),_=d.format(v,h),x=Array.from(document.querySelectorAll(r));x.forEach((function(e){e.innerHTML=b,w?e.classList.add(u):e.classList.remove(u)}));var C=Array.from(document.querySelectorAll(s));C.forEach((function(e){e.innerHTML=B}));var S=Array.from(document.querySelectorAll(o));S.forEach((function(e){e.innerHTML=_}))}};var BM=(0,g.Z)(),_M=(0,m.J7)((function(e){switch(e.type){case eC:case tC:case nC:return function(e,t,n){return{event:"SendEvent",eventCategory:"Buscar",eventAction:n.search.open?"Open":"Close"}};case rC:return function(){return{event:"SendEvent",eventCategory:"Buscar",eventAction:"Reset"}};case aC:return function(e){return{event:"SendEvent",eventCategory:"Buscar",eventAction:"Completed",eventLabel:e.query}};case sC:return function(e){return{event:"SendEvent",eventCategory:"Buscar",eventAction:"Error",eventLabel:e.error.message}};default:return[]}}),BM),xM=(0,m.J7)((function(e){switch(e.type){case WC:return[oM];case qC:return[aM];case nS:return[cM];case oS:return[lM];default:return[]}}),BM),CM=u(function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:c.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},A=0;A<s.length;A++){var c=s[A],l=n[c],u=e[c],d=l(u,t);if(void 0===d){t&&t.type;throw new Error(a(14))}i[c]=d,r=r||d!==u}return(r=r||s.length!==Object.keys(e).length)?i:e}}({search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lC,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case eC:return $x(e,(function(e){e.open=!0}));case tC:return $x(e,(function(e){e.open=!1}));case nC:return $x(e,(function(e){e.open=!e.open}));case rC:return $x(e,(function(e){e.lastQuery="",e.scrollIndex=0,e.results=[]}));case iC:var n=t.scrollIndex;return $x(e,(function(e){e.scrollIndex=n}));case oC:var r=t.query;return $x(e,(function(e){e.loading=!0,e.lastQuery=r}));case aC:var i=t.results;return $x(e,(function(e){e.loading=!1,e.scrollIndex=0,e.results=i}));default:return e}},cart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tM,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case WC:return $x(e,(function(e){e.open=!0}));case qC:return $x(e,(function(e){e.open=!1}));case XC:return $x(e,(function(e){e.isLoaded=!0}));case JC:var n=t.data;return $x(e,(function(e){e.couponError=null,e.data=n,e.isLoaded=!0}));case YC:var r=t.error;return r=r.toString(),$x(e,(function(e){e.couponError=r,e.isLoaded=!0}));case tS:return $x(e,(function(e){e.isLoaded=!1}));case nS:var i=t.data;return $x(e,(function(e){e.data=i,e.isLoaded=!0}));case rS:case iS:return $x(e,(function(e){e.isLoaded=!0}));case oS:var o=t.data;return $x(e,(function(e){e.data=o,e.isLoaded=!0}));case aS:case sS:return $x(e,(function(e){e.isLoaded=!0}));case AS:var a=t.data;return $x(e,(function(e){e.addons=a,e.isLoaded=!0}));case cS:return $x(e,(function(e){e.isLoaded=!0}));case ZC:return $x(e,(function(e){e.isLoaded=!1}));case $C:var s=t.data;return $x(e,(function(e){e.data=s,e.isLoaded=!0}));case eS:return $x(e,(function(e){e.isLoaded=!0}));default:return e}}}),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(a(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=d.apply(void 0,s)(n.dispatch),o(o({},n),{},{dispatch:r})}}}(p,_M,xM)),SM=document.getElementById("js-search-container"),EM=document.getElementById("js-cart-icon-container"),MM=document.getElementById("js-cart-container"),UM=document.getElementById("js-cart-page");SM instanceof HTMLElement&&t.createRoot(SM).render(e.createElement(q,{store:CM},e.createElement(GC,null)));EM instanceof HTMLElement&&t.createRoot(EM).render(e.createElement(q,{store:CM},e.createElement(HE,{enableCartWidget:window.SteelSeries.enableCartWidget})));MM instanceof HTMLElement&&t.createRoot(MM).render(e.createElement(q,{store:CM},e.createElement(eM,{formatCurrency:window.SteelSeries.formatCurrency,inventoryList:window.SteelSeries.inventoryList,staticUrl:window.SteelSeries.staticUrl})));UM instanceof HTMLElement&&t.createRoot(UM).render(e.createElement(q,{store:CM},e.createElement(ME,{formatCurrency:window.SteelSeries.formatCurrency,inventoryList:window.SteelSeries.inventoryList,staticUrl:window.SteelSeries.staticUrl})));!function(e,t){e.addEventListener("DOMContentLoaded",(function(){dt.get(window.cartCookieKey)&&t.dispatch(hS())})),e.addEventListener("click",(function(e){var n=e.target;n instanceof Element&&null!==n.parentNode&&!n.closest(".js-cart-widget")&&!n.closest("#js-cart-icon-container")&&t.getState().cart.open&&(e.stopImmediatePropagation(),t.dispatch(uS()))}))}(document,CM),function(e,t){Array.from(e.querySelectorAll(".js-search-toggle")).forEach((function(n){n.addEventListener("click",(function(n){var r=e.querySelector(".category-navigation");if(r instanceof HTMLElement){if(r.classList.contains("is-visible")){r.classList.remove("is-visible");var i=e.querySelector(".main-navigation");i instanceof HTMLElement&&i.classList.remove("menu-open")}else t.dispatch({type:nC});n.stopImmediatePropagation(),n.preventDefault()}}))})),e.addEventListener("click",(function(e){var n=e.target;n instanceof Element&&null!==n.parentNode&&(n.closest("#js-search-container")||t.getState().search.open&&t.dispatch(AC()))}),{passive:!0})}(document,CM);var FM=function(e){return function(t){t.forEach((function(t){t.addEventListener("submit",uM(e,t,".js-add-to-cart"))}))}}(CM);window.SteelSeries.bindAddToCart=FM;var TM=function(e){return function(t,n,r){t.addEventListener("click",(function(t){var i=t.target;if(i.matches("".concat(n," *"))){var o=i.closest(n);uM(e,o,r)(t)}}))}}(CM);window.SteelSeries.delegateAddToCart=TM,window.SteelSeries.delegateAddToCartForSiteCampaign=function(){var e=document.getElementById("main");e&&window.SteelSeries&&window.SteelSeries.hasOwnProperty("delegateAddToCart")&&window.SteelSeries.delegateAddToCart(e,".sc-addToCartForm",".sc-addToCart")};var QM,LM,IM,kM,PM,OM=function(e){return function(t,n){var r=document.querySelector(".quickbuy");e.dispatch(fS(t,"quickbuy")).then((function(){return null!=n?e.dispatch(mS(n)):Promise.resolve()})).then((function(){r instanceof HTMLElement&&r.classList.add("is-success"),window.location.href="/cart"})).catch((function(){r instanceof HTMLElement&&r.classList.add("is-error")}))}}(CM);window.SteelSeries.quickBuy=OM,(QM=Array.from(document.querySelectorAll(".js-tooltip")))&&QM.forEach((function(e){var t=e.getAttribute("title"),n=e.getAttribute("data-placement"),r=e.getAttribute("data-offset");if(t){var i=new ct(e,{title:t,placement:null!==n?n:"auto",offset:null!==r?r:"0,8px",delay:{show:150},container:document.body,boundariesElement:document.body,arrowSelector:".tooltip__arrow",innerSelector:".tooltip__inner",template:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>'});e.removeAttribute("title"),e.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:i.hide(),e.preventDefault();break;case 13:case 32:i.toggle(),e.preventDefault()}}))}})),(LM=Array.from(document.querySelectorAll(".js-collapsible"))).forEach((function(e){var t=e.getAttribute("data-accordion-type"),n="is-active",r=e.querySelector(".js-collapsible-toggle"),i=r.getAttribute("aria-controls"),o=document.getElementById(i),a=Array.from(o.querySelectorAll("a")),s=e.classList.contains(n);s||a.forEach((function(e){e.setAttribute("tabindex","-1")}));var A=function(e){var t=e.querySelector(".js-collapsible-toggle"),r=t.getAttribute("aria-controls"),i=document.getElementById(r),o=Array.from(i.querySelectorAll("a"));e.classList.remove(n),t.setAttribute("aria-expanded","false"),o.forEach((function(e){e.setAttribute("tabindex","-1")}))};r.addEventListener("click",(function(){var r,i,o,a,c;(s=e.classList.contains(n))?A(e):(i=(r=e).querySelector(".js-collapsible-toggle"),o=i.getAttribute("aria-controls"),a=document.getElementById(o),c=Array.from(a.querySelectorAll("a")),"showOne"===t&&LM.forEach((function(e){A(e)})),r.classList.add(n),i.setAttribute("aria-expanded","true"),c.forEach((function(e){"unavailable"===e.getAttribute("data-state")||e.setAttribute("tabindex","")})))}))})),Array.from(document.querySelectorAll(".js-tabs")).forEach((function(e){var t=35,n=36,r=37,i=38,o=39,a=40,s={37:-1,38:-1,39:1,40:1},A=e.querySelector('[role="tablist"]');if(A instanceof HTMLElement){var c=[],l=[];c=Array.from(e.querySelectorAll('[role="tab"]')),l=Array.from(e.querySelectorAll('[role="tabpanel"]'));for(var u=0;u<c.length;u+=1)m(u)}function d(e){var t,n=e.target;(t=n)===document.activeElement&&h(t,!1)}function h(e,t){if(e instanceof HTMLElement){var n=t||!0;!function(){for(var e=0;e<c.length;e+=1)c[e].setAttribute("tabindex","-1"),c[e].setAttribute("aria-selected","false"),c[e].removeEventListener("focus",(function(e){d(e)}));for(var t=0;t<l.length;t+=1)l[t].setAttribute("hidden","hidden")}(),e.removeAttribute("tabindex"),e.setAttribute("aria-selected","true");var r=e.getAttribute("aria-controls");if("string"==typeof r){var i=document.getElementById(r);i instanceof HTMLElement&&(i.removeAttribute("hidden"),n&&e.focus())}}}function f(e){for(var t=e.keyCode,n=0;n<c.length;n+=1)c[n].addEventListener("focus: KeyboardEvent",d);if(s[t]){var A=e.target;if(void 0===A.index)return;c[A.index+s[t]]?c[A.index+s[t]].focus():t===r||t===i?c[c.length-1].focus():t!==o&&t!==a||c[0].focus()}}function p(e){var t=e.keyCode,n="vertical"===A.getAttribute("aria-orientation"),s=!1;n?t!==i&&t!==a||(e.preventDefault(),s=!0):n||t!==r&&t!==o||(s=!0),s&&f(e)}function m(e){c[e].addEventListener("click",(function(e){!function(e){h(e.target,!1)}(e)})),c[e].addEventListener("keydown",(function(e){!function(e){switch(e.keyCode){case t:e.preventDefault(),h(c[c.length-1]);break;case n:e.preventDefault(),h(c[0]);break;case i:case a:p(e)}}(e)})),c[e].addEventListener("keyup",(function(e){!function(e){switch(e.keyCode){case r:case o:p(e)}}(e)})),c[e].index=e}})),Array.from(document.querySelectorAll(".js-choose-country-modal-toggle")).forEach((function(e){e.addEventListener("click",(function(){Array.from(document.querySelectorAll(".js-country-modal-form")).forEach((function(e){e.addEventListener("submit",(function(){dt.remove("sscartid",{path:"/",domain:window.cartCookieDomain})}))}))}))})),Array.from(document.querySelectorAll(".js-countries-container")).forEach((function(e){var t=e.querySelector(".js-country-show-more");t&&t.addEventListener("click",(function(t){t.preventDefault(),e.classList.remove("is-collapsed")}))})),IM=".js-footer-newsletter-form",Array.from(document.querySelectorAll(IM)).forEach((function(e){e instanceof HTMLFormElement&&dM(e)})),kM=window.document,(PM=kM.body)instanceof HTMLElement&&(function(e,t){var n="rgb(31,41,59)",r=document.createElement("div");r.style.color=n,t.appendChild(r);var i=document.defaultView.getComputedStyle(r,null).color;return i=i.replace(/ /g,""),t.removeChild(r),i!==n}(0,PM)?PM.classList.add("high-contrast"):PM.classList.remove("high-contrast")),function(){window.dataLayer=window.dataLayer||[];var e=function(){var e=dt.get("accounts-profile");return void 0!==e?JSON.parse(decodeURI(e)):null}();if(e&&"dataLayer"in window&&"function"==typeof window.dataLayer.push){var t={criteoPartnerId:wM(),criteoEmail:e.email_hashed,criteoPagetype:document.querySelector(".buy-section")instanceof HTMLElement?"Product Tag":document.querySelector(".js-faceted-product-list")instanceof HTMLElement?"Listing Tag":"/cart"===window.location.pathname?"Basket Tag":"/checkout/complete"===window.location.pathname?"Confirmation Tag":""};switch(t.criteoPagetype){case"Product Tag":var n=document.querySelector('input[name="product_id"');if(null!==n&&n instanceof HTMLInputElement){var r=n.value;t.criteoProductId=r}break;case"Listing Tag":var i=Array.from(document.querySelectorAll(".catalog-list-product__link"));i=i.slice(0,3);var o=[];i.forEach((function(e){o.push(e.dataset.itemSku)})),t.criteoListingIds=o;break;case"Basket Tag":var a=[];Pc().get("/api/v3/cart").then((function(e){e.data.items.forEach((function(e){var t={id:e.sku,price:e.price,quantity:e.quantity};a.push(t)}))}),(function(e){})),t.criteoBasketItems=a;break;case"Confirmation Tag":var s=document.querySelector(".js-criteo-order-complete");if(s instanceof HTMLElement){var A=s.querySelector("[data-order-number]").dataset.orderNumber;t.criteoTransactionId=A;var c=Array.from(s.querySelectorAll(".item")),l=[];c.forEach((function(e){var t={id:e.dataset.itemSku,price:e.dataset.itemPrice,quantity:e.dataset.itemQuantity};l.push(t)})),t.criteoTransactionItems=l}}window.dataLayer.push({criteoDataObject:t})}}(),window.SteelSeries.captureUTM=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],r=Su.parse(location.search);if(r){var i={};n.forEach((function(e){e in r&&""!==r[e]&&(i[e]=r[e])})),Object.keys(i).length>0&&dt.set(e,JSON.stringify(i),{expires:t})}},window.SteelSeries.validateSignupForm=function(e){if(e instanceof HTMLFormElement){(hM=document.createElement("div")).className="indicator",(fM=document.createElement("span")).className="weak",(pM=document.createElement("span")).className="medium",(mM=document.createElement("span")).className="strong",(gM=document.createElement("div")).className="indicatorText",hM.appendChild(fM),hM.appendChild(pM),hM.appendChild(mM);var t=e.querySelector('[id$="_password1"]'),n=e.querySelector('[id$="_password1_help"]');t&&n&&(n.appendChild(hM),n.appendChild(gM),t.oninput=yM)}}}()}();
//# sourceMappingURL=main.js.map