@neurodyn/core-ar 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license React
3
+ * react-dom-server-legacy.browser.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ /**
12
+ * @license React
13
+ * react-dom-server.browser.production.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+
21
+ /**
22
+ * @license React
23
+ * react-jsx-runtime.production.js
24
+ *
25
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */
30
+
31
+ /**
32
+ * @license lucide-react v0.553.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see core-ar.chunk.f52e1e86.min.js.LICENSE.txt */
2
+ (self.webpackChunk_neurodyn_core_ar=self.webpackChunk_neurodyn_core_ar||[]).push([["270"],{525(e,t,i){"use strict";var s=i(9081),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=s.useState,a=s.useEffect,n=s.useLayoutEffect,l=s.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!r(e,i)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var i=t(),s=o({inst:{value:i,getSnapshot:t}}),r=s[0].inst,c=s[1];return n(function(){r.value=i,r.getSnapshot=t,u(r)&&c({inst:r})},[e,i,t]),a(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),l(i),i};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:c},4624(e,t,i){"use strict";e.exports=i(525)},3752(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},6670(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",s=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),s&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),s&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,s,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(s)for(var n=0;n<this.length;n++){var l=this[n][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);s&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=i),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},3917(e){"use strict";e.exports=function(e){return e[1]}},4537(e,t,i){"use strict";i.d(t,{A:()=>S});let{slice:s,forEach:r}=[],o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},s=encodeURIComponent(t),r=`${e}=${s}`;if(i.maxAge>0){let e=i.maxAge-0;if(Number.isNaN(e))throw Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(i.domain){if(!o.test(i.domain))throw TypeError("option domain is invalid");r+=`; Domain=${i.domain}`}if(i.path){if(!o.test(i.path))throw TypeError("option path is invalid");r+=`; Path=${i.path}`}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invalid");r+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(r+="; HttpOnly"),i.secure&&(r+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return i.partitioned&&(r+="; Partitioned"),r},n={create(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*i*1e3)),s&&(r.domain=s),document.cookie=a(e,t,r)},read(e){let t=`${e}=`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){let s=i[e];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var l={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"u">typeof document)return n.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:i,cookieMinutes:s,cookieDomain:r,cookieOptions:o}=t;i&&"u">typeof document&&n.create(i,e,s,r,o)}},u={name:"querystring",lookup(e){let t,{lookupQuerystring:i}=e;if("u">typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));let s=e.substring(1).split("&");for(let e=0;e<s.length;e++){let r=s[e].indexOf("=");r>0&&s[e].substring(0,r)===i&&(t=s[e].substring(r+1))}}return t}},c={name:"hash",lookup(e){let t,{lookupHash:i,lookupFromHashIndex:s}=e;if("u">typeof window){let{hash:e}=window.location;if(e&&e.length>2){let r=e.substring(1);if(i){let e=r.split("&");for(let s=0;s<e.length;s++){let r=e[s].indexOf("=");r>0&&e[s].substring(0,r)===i&&(t=e[s].substring(r+1))}}if(t)return t;if(!t&&s>-1){let t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;return t["number"==typeof s?s:0]?.replace("/","")}}}return t}};let h=null,p=()=>{if(null!==h)return h;try{if(!(h="u">typeof window&&null!==window.localStorage))return!1;let e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){h=!1}return h};var d={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&p())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:i}=t;i&&p()&&window.localStorage.setItem(i,e)}};let g=null,f=()=>{if(null!==g)return g;try{if(!(g="u">typeof window&&null!==window.sessionStorage))return!1;let e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){g=!1}return g};var m={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&f())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:i}=t;i&&f()&&window.sessionStorage.setItem(i,e)}},b={name:"navigator",lookup(e){let t=[];if("u">typeof navigator){let{languages:e,userLanguage:i,language:s}=navigator;if(e)for(let i=0;i<e.length;i++)t.push(e[i]);i&&t.push(i),s&&t.push(s)}return t.length>0?t:void 0}},w={name:"htmlTag",lookup(e){let t,{htmlTag:i}=e,s=i||("u">typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(t=s.getAttribute("lang")),t}},v={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("u"<typeof window)return;let i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(i))return i["number"==typeof t?t:0]?.replace("/","")}},y={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e,i="u">typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i["number"==typeof t?t+1:1]}};let x=!1;try{document.cookie,x=!0}catch(e){}let k=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];x||k.splice(1,1);class S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return r.call(s.call(arguments,1),t=>{if(t)for(let i in t)void 0===e[i]&&(e[i]=t[i])}),e}(t,this.options||{},{order:k,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(l),this.addDetector(u),this.addDetector(d),this.addDetector(m),this.addDetector(b),this.addDetector(w),this.addDetector(v),this.addDetector(y),this.addDetector(c)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return(e.forEach(e=>{if(this.detectors[e]){let i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>null!=e&&!("string"==typeof e&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)))).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes)?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;!t||this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})}}S.type="languageDetector"},1960(e,t,i){"use strict";i.d(t,{Ay:()=>q});let s=e=>"string"==typeof e,r=()=>{let e,t,i=new Promise((i,s)=>{e=i,t=s});return i.resolve=e,i.reject=t,i},o=e=>null==e?"":""+e,a=/###/g,n=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,l=e=>!e||s(e),u=(e,t,i)=>{let r=s(t)?t.split("."):t,o=0;for(;o<r.length-1;){if(l(e))return{};let t=n(r[o]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return l(e)?{}:{obj:e,k:n(r[o])}},c=(e,t,i)=>{let{obj:s,k:r}=u(e,t,Object);if(void 0!==s||1===t.length){s[r]=i;return}let o=t[t.length-1],a=t.slice(0,t.length-1),n=u(e,a,Object);for(;void 0===n.obj&&a.length;)o=`${a[a.length-1]}.${o}`,n=u(e,a=a.slice(0,a.length-1),Object),n?.obj&&void 0!==n.obj[`${n.k}.${o}`]&&(n.obj=void 0);n.obj[`${n.k}.${o}`]=i},h=(e,t)=>{let{obj:i,k:s}=u(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},p=(e,t,i)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?s(e[r])||e[r]instanceof String||s(t[r])||t[r]instanceof String?i&&(e[r]=t[r]):p(e[r],t[r],i):e[r]=t[r]);return e};var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let g=e=>s(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e,f=[" ",",","?","!",";"],m=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),b=(e,t,i=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let s=t.split(i),r=e;for(let e=0;e<s.length;){let t;if(!r||"object"!=typeof r)return;let o="";for(let a=e;a<s.length;++a)if(a!==e&&(o+=i),o+=s[a],void 0!==(t=r[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<s.length-1)continue;e+=a-e+1;break}r=t}return r},w=e=>e?.replace("_","-"),v={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class y{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,r){return r&&!this.debug?null:(s(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new y(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new y(this.logger,e)}}var x=new y;class k{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,i])=>{for(let s=0;s<i;s++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,s])=>{for(let r=0;r<s;r++)i.apply(i,[e,...t])})}}class S extends k{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,r={}){let o,a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,n=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):s(i)&&a?o.push(...i.split(a)):o.push(i)));let l=h(this.data,o);return(!l&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),!l&&n&&s(i))?b(this.data?.[e]?.[t],i,a):l}addResource(e,t,i,s,r={silent:!1}){let o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];i&&(a=a.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),c(this.data,a,s),r.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,r={silent:!1}){for(let r in i)(s(i[r])||Array.isArray(i[r]))&&this.addResource(e,t,r,i[r],{silent:!0});r.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,r,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=i,i=t,t=a[1]),this.addNamespaces(t);let n=h(this.data,a)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?p(n,i,r):n={...n,...i},c(this.data,a,n),o.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,r){return e.forEach(e=>{t=this.processors[e]?.process(t,i,s,r)??t}),t}};let L=Symbol("i18next/PATH_KEY");function C(e,t){let i,s,r,{[L]:o}=e((s=[],(r=Object.create(null)).get=(e,t)=>(i?.revoke?.(),t===L)?s:(s.push(t),(i=Proxy.revocable(e,r)).proxy),Proxy.revocable(Object.create(null),r).proxy));return o.join(t?.keySeparator??".")}let $={},N=e=>!s(e)&&"boolean"!=typeof e&&"number"!=typeof e;class R extends k{constructor(e,t={}){super(),((e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=x.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let i={...t};if(null==e)return!1;let s=this.resolve(e,i);if(s?.res===void 0)return!1;let r=N(s.res);return!1!==i.returnObjects||!r}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=i&&e.indexOf(i)>-1,n=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,i)=>{t=t||"",i=i||"";let s=f.filter(e=>0>t.indexOf(e)&&0>i.indexOf(e));if(0===s.length)return!0;let r=m.getRegExp(`(${s.map(e=>"?"===e?"\\?":e).join("|")})`),o=!r.test(e);if(!o){let t=e.indexOf(i);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o})(e,i,r);if(a&&!n){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(o)?[o]:o};let a=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return{key:e,namespaces:s(o)?[o]:o}}translate(e,t,i){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=C(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:n,namespaces:l}=this.extractFromKey(e[e.length-1],r),u=l[l.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");let h=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return p?o?{res:`${u}${c}${n}`,usedKey:n,exactUsedKey:n,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${c}${n}`:o?{res:n,usedKey:n,exactUsedKey:n,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:n;let d=this.resolve(e,r),g=d?.res,f=d?.usedKey||n,m=d?.exactUsedKey||n,b=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!s(r.count),y=R.hasDefaultValue(r),x=v?this.pluralResolver.getSuffix(h,r.count,r):"",k=r.ordinal&&v?this.pluralResolver.getSuffix(h,r.count,{ordinal:!1}):"",S=v&&!r.ordinal&&0===r.count,O=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${k}`]||r.defaultValue,L=g;w&&!g&&y&&(L=O);let $=N(L),P=Object.prototype.toString.apply(L);if(w&&L&&$&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(s(b)&&Array.isArray(L))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,L,{...r,ns:l}):`key '${n} (${this.language})' returned an object instead of string.`;return o?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(a){let e=Array.isArray(L),t=e?[]:{},i=e?m:f;for(let e in L)if(Object.prototype.hasOwnProperty.call(L,e)){let s=`${i}${a}${e}`;y&&!g?t[e]=this.translate(s,{...r,defaultValue:N(O)?O[e]:void 0,...{joinArrays:!1,ns:l}}):t[e]=this.translate(s,{...r,joinArrays:!1,ns:l}),t[e]===s&&(t[e]=L[e])}g=t}}else if(w&&s(b)&&Array.isArray(g))(g=g.join(b))&&(g=this.extendTranslation(g,e,r,i));else{let t=!1,s=!1;!this.isValidLookup(g)&&y&&(t=!0,g=O),this.isValidLookup(g)||(s=!0,g=n);let o=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:g,l=y&&O!==g&&this.options.updateMissing;if(s||t||l){if(this.logger.log(l?"updateKey":"missingKey",h,u,n,l?O:g),a){let e=this.resolve(n,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let i=(e,t,i)=>{let s=y&&i!==g?i:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,s,l,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,s,l,r),this.emit("missingKey",e,u,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{i([e],n+t,r[`defaultValue${t}`]||O)})}):i(e,n,O))}g=this.extendTranslation(g,e,r,d,i),s&&g===n&&this.options.appendNamespaceToMissingKey&&(g=`${u}${c}${n}`),(s||t)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${n}`:n,t?g:void 0,r))}return o?(d.res=g,d.usedParams=this.getUsedParamsDetails(r),d):g}extendTranslation(e,t,i,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){let a;i.interpolation&&this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});let n=s(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(n){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=i.replace&&!s(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,i.lng||this.language||r.usedLng,i),n){let t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||i.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),i)),i.interpolation&&this.interpolator.reset()}let a=i.postProcess||this.options.postProcess,n=s(a)?[a]:a;return null!=e&&n?.length&&!1!==i.applyPostProcessor&&(e=O.handle(n,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,r,o,a,n;return s(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;let l=this.extractFromKey(e,t),u=l.key;r=u;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let h=void 0!==t.count&&!s(t.count),p=h&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(s(t.context)||"number"==typeof t.context)&&""!==t.context,g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(i)||(n=e,!$[`${g[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(n)&&($[`${g[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${g.join(", ")}" won't get resolved as namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(s=>{let r;if(this.isValidLookup(i))return;a=s;let n=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,u,s,e,t);else{let e;h&&(e=this.pluralResolver.getSuffix(s,t.count,t));let i=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&0===e.indexOf(r)&&n.push(u+e.replace(r,this.options.pluralSeparator)),n.push(u+e),p&&n.push(u+i)),d){let s=`${u}${this.options.contextSeparator||"_"}${t.context}`;n.push(s),h&&(t.ordinal&&0===e.indexOf(r)&&n.push(s+e.replace(r,this.options.pluralSeparator)),n.push(s+e),p&&n.push(s+i))}}for(;r=n.pop();)this.isValidLookup(i)||(o=r,i=this.getResource(s,e,r,t))}))})}),{res:i,usedKey:r,exactUsedKey:o,usedLng:a,usedNS:n}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){let t=e.replace&&!s(e.replace),i=t?e.replace:e;if(t&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!t)for(let e of(i={...i},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete i[e];return i}static hasDefaultValue(e){let t="defaultValue";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}class P{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}getScriptPartFromCode(e){if(!(e=w(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=w(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(s(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let i=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let i=this.getScriptPartFromCode(e);if(this.isSupportedCode(i))return t=i;let s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(e=>{if(e===s||!(0>e.indexOf("-")&&0>s.indexOf("-"))&&(e.indexOf("-")>0&&0>s.indexOf("-")&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),s(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){let i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return s(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):s(e)&&o(this.formatLanguageCode(e)),i.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let E={zero:0,one:1,two:2,few:3,many:4,other:5},j={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class T{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=x.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let i,s=w("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{i=new Intl.PluralRules(s,{type:r})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),j;if(!e.match(/-|_/))return j;let s=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(s,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return(i||(i=this.getRule("dev",t)),i)?i.resolvedOptions().pluralCategories.sort((e,t)=>E[e]-E[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,i={}){let s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}let I=(e,t,i,r=".",o=!0)=>{let a,n=void 0!==(a=h(e,i))?a:h(t,i);return!n&&o&&s(i)&&void 0===(n=b(e,i,r))&&(n=b(t,i,r)),n};class A{constructor(e={}){this.logger=x.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:n,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:d,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:w}=e.interpolation;this.escape=void 0!==t?t:g,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==s&&s,this.prefix=r?r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):n||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?h.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=b||1e3,this.alwaysFormat=void 0!==w&&w,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,r){let a,n,l,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(0>e.indexOf(this.formatSeparator)){let s=I(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{...r,...t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),o=s.shift().trim(),a=s.join(this.formatSeparator).trim();return this.format(I(t,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,i,{...r,...t,interpolationkey:o})};this.resetRegExp();let h=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(l=0;a=t.regex.exec(e);){let i=a[1].trim();if(void 0===(n=c(i)))if("function"==typeof h){let t=h(e,a,r);n=s(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,i))n="";else if(p){n=a[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),n="";else s(n)||this.useRawValueToEscape||(n=o(n));let u=t.safeValue(n);if(e=e.replace(a[0],u),p?(t.regex.lastIndex+=n.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t,i={}){let r,a,n,l=(e,t)=>{let i=this.nestingOptionsSeparator;if(0>e.indexOf(i))return e;let s=e.split(RegExp(`${i}[ ]*{`)),r=`{${s[1]}`;e=s[0];let o=(r=this.interpolate(r,n)).match(/'/g),a=r.match(/"/g);((o?.length??0)%2!=0||a)&&a.length%2==0||(r=r.replace(/'/g,'"'));try{n=JSON.parse(r),t&&(n={...t,...n})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${r}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let u=[];(n=(n={...i}).replace&&!s(n.replace)?n.replace:n).applyPostProcessor=!1,delete n.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(u=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),(a=t(l.call(this,r[1].trim(),n),n))&&r[0]===e&&!s(a))return a;s(a)||(a=o(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u.length&&(a=u.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}let D=e=>{let t={};return(i,s,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});let a=s+JSON.stringify(o),n=t[a];return n||(n=e(w(s),r),t[a]=n),n(i)}},F=e=>(t,i,s)=>e(w(i),s)(t);class V{constructor(e={}){this.logger=x.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let i=t.cacheInBuiltFormats?D:F;this.formats={number:i((e,t)=>{let i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:i((e,t)=>{let i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:i((e,t)=>{let i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:i((e,t)=>{let i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:i((e,t)=>{let i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=D(t)}format(e,t,i,s={}){let r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&0>r[0].indexOf(")")&&r.find(e=>e.indexOf(")")>-1)){let e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{let{formatName:r,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),i={};if(e.indexOf("(")>-1){let s=e.split("(");t=s[0].toLowerCase().trim();let r=s[1].substring(0,s[1].length-1);"currency"===t&&0>r.indexOf(":")?i.currency||(i.currency=r.trim()):"relativetime"===t&&0>r.indexOf(":")?i.range||(i.range=r.trim()):r.split(";").forEach(e=>{if(e){let[t,...s]=e.split(":"),r=s.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();i[o]||(i[o]=r),"false"===r&&(i[o]=!1),"true"===r&&(i[o]=!0),isNaN(r)||(i[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[r]){let t=e;try{let a=s?.formatParams?.[s.interpolationkey]||{},n=a.locale||a.lng||s.locale||s.lng||i;t=this.formats[r](e,n,{...o,...s,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class U extends k{constructor(e,t,i,s={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=x.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(e,t,i,s){let r={},o={},a={},n={};return e.forEach(e=>{let s=!0;t.forEach(t=>{let a=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,s=!1,void 0===o[a]&&(o[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===n[t]&&(n[t]=!0)))}),s||(a[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(n)}}loaded(e,t,i){let s=e.split("|"),r=s[0],o=s[1];t&&this.emit("failedLoading",r,o,t),!t&&i&&this.store.addResourceBundle(r,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);let a={};this.queue.forEach(i=>{((e,t,i,s)=>{let{obj:r,k:o}=u(e,t,Object);r[o]=r[o]||[],r[o].push(i)})(i.loaded,[r],o),void 0!==i.pending[e]&&(delete i.pending[e],i.pendingCount--),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{a[e]||(a[e]={});let t=i.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i,s=0,r=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:r,callback:o});this.readingCalls++;let a=(a,n)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&n&&s<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,s+1,2*r,o)},r):o(a,n)},n=this.backend[i].bind(this.backend);if(2===n.length){try{let i=n(e,t);i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}return}return n(e,t,a)}prepareLoading(e,t,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){let i=e.split("|"),s=i[0],r=i[1];this.read(s,r,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${r} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,i,s,r,o={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=i&&""!==i){if(this.backend?.create){let n={...o,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,i,s,n):l(e,t,i,s))&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}else l(e,t,i,s,a,n)}e&&e[0]&&this.store.addResource(e[0],t,i,s)}}}let _=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),s(e[1])&&(t.defaultValue=e[1]),s(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),z=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),M=()=>{};class H extends k{constructor(e={},t){if(super(),this.options=z(e),this.services={},this.logger=x,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(s(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let i=_();this.options={...i,...this.options,...z(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);let o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?x.init(o(this.modules.logger),this.options):x.init(null,this.options),e=this.modules.formatter?this.modules.formatter:V;let t=new P(this.options);this.store=new S(this.options.resources,this.options);let s=this.services;s.logger=x,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new T(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(s.formatter=o(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new A(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new U(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new R(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=M),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=r(),n=()=>{let e=(e,i)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(i),t(e,i)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?n():setTimeout(n,0),a}loadResources(e,t=M){let i=t,r=s(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return i();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,i){let s=r();return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=M),this.services.backendConnector.reload(e,t,e=>{s.resolve(),i(e)}),s}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&O.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=r();this.emit("languageChanging",e);let o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(s,r)=>{r?this.isLanguageChangingTo===e&&(o(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},n=t=>{e||t||!this.services.languageDetector||(t=[]);let i=s(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(s(t)?[t]:t);r&&(this.language||o(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,e=>{a(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(n):this.services.languageDetector.detect(n):n(e):n(this.services.languageDetector.detect()),i}getFixedT(e,t,i){let r=(e,t,...s)=>{let o,a;(o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(s)):{...t}).lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||i||r.keyPrefix);let n=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=C(e,{...this.options,...t})),`${o.keyPrefix}${n}${e}`)):("function"==typeof e&&(e=C(e,{...this.options,...t})),a=o.keyPrefix?`${o.keyPrefix}${n}${e}`:e),this.t(a,o)};return s(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let i=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;let o=(e,t)=>{let i=this.services.backendConnector.state[`${e}|${t}`];return -1===i||0===i||2===i};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!s||o(r,e)))}loadNamespaces(e,t){let i=r();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=r();s(e)&&(e=[e]);let o=this.options.preload||[],a=e.filter(e=>0>o.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=o.concat(a),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new P(_());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let i=new H(e,t);return i.createInstance=H.createInstance,i}cloneInstance(e={},t=M){let i=e.forkResourceStore;i&&delete e.forkResourceStore;let s={...this.options,...e,isClone:!0},r=new H(s);return(void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new S(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((i,s)=>(i[s]={...e[t][s]},i),e[t]),e),{}),s),r.services.resourceStore=r.store),e.interpolation&&(r.services.interpolator=new A(s)),r.translator=new R(r.services,s),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(s,t),r.translator.options=s,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let q=H.createInstance();q.createInstance,q.dir,q.init,q.loadResources,q.reloadResources,q.use,q.changeLanguage,q.getFixedT,q.t,q.exists,q.setDefaultNamespace,q.hasLoadedNamespace,q.loadNamespaces,q.loadLanguages},243(e,t,i){"use strict";let s;i.d(t,{r9:()=>L,Bd:()=>S,xC:()=>O});var r=i(9081);i(1960),i(3752),Object.create(null);let o=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,a={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},n=e=>a[e],l={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(o,n)},u=(0,r.createContext)();class c{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}let h=(e,t,i,s)=>{let r=[i,{code:t,...s||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);b(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},p={},d=(e,t,i,s)=>{b(i)&&p[i]||(b(i)&&(p[i]=new Date),h(e,t,i,s))},g=(e,t)=>()=>{if(e.isInitialized)t();else{let i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},f=(e,t,i)=>{e.loadNamespaces(t,g(e,i))},m=(e,t,i,s)=>{if(b(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return f(e,i,s);i.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,g(e,s))},b=e=>"string"==typeof e,w={"&nbsp;":"\xa0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xa9","&reg;":"\xae","&trade;":"™","&hellip;":"…","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&bull;":"•","&prime;":"′","&Prime;":"″","&lsaquo;":"‹","&rsaquo;":"›","&sect;":"\xa7","&para;":"\xb6","&middot;":"\xb7","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&euro;":"€","&pound;":"\xa3","&yen;":"\xa5","&cent;":"\xa2","&curren;":"\xa4","&times;":"\xd7","&divide;":"\xf7","&minus;":"−","&plusmn;":"\xb1","&ne;":"≠","&le;":"≤","&ge;":"≥","&asymp;":"≈","&equiv;":"≡","&infin;":"∞","&int;":"∫","&sum;":"∑","&prod;":"∏","&radic;":"√","&part;":"∂","&permil;":"‰","&deg;":"\xb0","&micro;":"\xb5","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&Agrave;":"\xc0","&Aacute;":"\xc1","&Acirc;":"\xc2","&Atilde;":"\xc3","&Auml;":"\xc4","&Aring;":"\xc5","&AElig;":"\xc6","&Ccedil;":"\xc7","&Egrave;":"\xc8","&Eacute;":"\xc9","&Ecirc;":"\xca","&Euml;":"\xcb","&Igrave;":"\xcc","&Iacute;":"\xcd","&Icirc;":"\xce","&Iuml;":"\xcf","&ETH;":"\xd0","&Ntilde;":"\xd1","&Ograve;":"\xd2","&Oacute;":"\xd3","&Ocirc;":"\xd4","&Otilde;":"\xd5","&Ouml;":"\xd6","&Oslash;":"\xd8","&Ugrave;":"\xd9","&Uacute;":"\xda","&Ucirc;":"\xdb","&Uuml;":"\xdc","&Yacute;":"\xdd","&THORN;":"\xde","&szlig;":"\xdf","&agrave;":"\xe0","&aacute;":"\xe1","&acirc;":"\xe2","&atilde;":"\xe3","&auml;":"\xe4","&aring;":"\xe5","&aelig;":"\xe6","&ccedil;":"\xe7","&egrave;":"\xe8","&eacute;":"\xe9","&ecirc;":"\xea","&euml;":"\xeb","&igrave;":"\xec","&iacute;":"\xed","&icirc;":"\xee","&iuml;":"\xef","&eth;":"\xf0","&ntilde;":"\xf1","&ograve;":"\xf2","&oacute;":"\xf3","&ocirc;":"\xf4","&otilde;":"\xf5","&ouml;":"\xf6","&oslash;":"\xf8","&ugrave;":"\xf9","&uacute;":"\xfa","&ucirc;":"\xfb","&uuml;":"\xfc","&yacute;":"\xfd","&thorn;":"\xfe","&yuml;":"\xff","&iexcl;":"\xa1","&iquest;":"\xbf","&fnof;":"ƒ","&circ;":"ˆ","&tilde;":"˜","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&ordf;":"\xaa","&ordm;":"\xba","&macr;":"\xaf","&acute;":"\xb4","&cedil;":"\xb8","&sup1;":"\xb9","&sup2;":"\xb2","&sup3;":"\xb3","&frac14;":"\xbc","&frac12;":"\xbd","&frac34;":"\xbe","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦","&loz;":"◊","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&alefsym;":"ℵ"},v=RegExp(Object.keys(w).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");var y=i(4624);let x={t:(e,t)=>b(t)?t:"object"==typeof t&&null!==t&&b(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,ready:!1},k=()=>()=>{},S=(e,t={})=>{let{i18n:i}=t,{i18n:o,defaultNS:a}=(0,r.useContext)(u)||{},n=i||o||s;n&&!n.reportNamespaces&&(n.reportNamespaces=new c),n||d(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let h=(0,r.useMemo)(()=>({...l,...n?.options?.react,...t}),[n,t]),{useSuspense:p,keyPrefix:g}=h,w=e||a||n?.options?.defaultNS,v=b(w)?[w]:w||["translation"],S=(0,r.useMemo)(()=>v,v);n?.reportNamespaces?.addUsedNamespaces?.(S);let O=(0,r.useRef)(0),L=(0,r.useCallback)(e=>{if(!n)return k;let{bindI18n:t,bindI18nStore:i}=h,s=()=>{O.current+=1,e()};return t&&n.on(t,s),i&&n.store.on(i,s),()=>{t&&t.split(" ").forEach(e=>n.off(e,s)),i&&i.split(" ").forEach(e=>n.store.off(e,s))}},[n,h]),C=(0,r.useRef)(),$=(0,r.useCallback)(()=>{if(!n)return x;let e=!!(n.isInitialized||n.initializedStoreOnce)&&S.every(e=>((e,t,i={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:i.lng,precheck:(t,s)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))return!1}}):(d(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,n,h)),i=t.lng||n.language,s=O.current,r=C.current;if(r&&r.ready===e&&r.lng===i&&r.keyPrefix===g&&r.revision===s)return r;let o={t:n.getFixedT(i,"fallback"===h.nsMode?S:S[0],g),ready:e,lng:i,keyPrefix:g,revision:s};return C.current=o,o},[n,S,g,h,t.lng]),[N,R]=(0,r.useState)(0),{t:P,ready:E}=(0,y.useSyncExternalStore)(L,$,$);(0,r.useEffect)(()=>{if(n&&!E&&!p){let e=()=>R(e=>e+1);t.lng?m(n,t.lng,S,e):f(n,S,e)}},[n,t.lng,S,E,p,N]);let j=n||{},T=(0,r.useRef)(null),I=(0,r.useRef)(),A=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let i=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(i,"__original"))try{Object.defineProperty(i,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return i},D=(0,r.useMemo)(()=>{let e=j?.language,t=j;j&&(T.current&&T.current.__original===j?I.current!==e?(T.current=t=A(j),I.current=e):t=T.current:(T.current=t=A(j),I.current=e));let i=[P,t,E];return i.t=P,i.i18n=t,i.ready=E,i},[P,j,E,j.resolvedLanguage,j.language,j.languages]);if(n&&p&&!E)throw new Promise(e=>{let i=()=>e();t.lng?m(n,t.lng,S,i):f(n,S,i)});return D};function O({i18n:e,defaultNS:t,children:i}){let s=(0,r.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,r.createElement)(u.Provider,{value:s},i)}let L={type:"3rdParty",init(e){((e={})=>{l={...l,...e}})(e.options.react),s=e}}},9690(e,t,i){"use strict";i.d(t,{O:()=>eM});var s,r="user-agent",o="function",a="object",n="string",l="undefined",u="browser",c="device",h="engine",p="result",d="name",g="type",f="vendor",m="version",b="architecture",w="major",v="model",y="console",x="mobile",k="tablet",S="smarttv",O="wearable",L="embedded",C="inapp",$="brands",N="formFactors",R="fullVersionList",P="platform",E="platformVersion",j="bitness",T="sec-ch-ua",I=T+"-full-version-list",A=T+"-arch",D=T+"-"+j,F=T+"-form-factors",V=T+"-"+x,U=T+"-"+v,_=T+"-"+P,z=_+"-version",M=[$,R,x,v,P,E,b,N,j],H="Amazon",q="Apple",B="ASUS",K="BlackBerry",G="Google",W="Huawei",J="Lenovo",Y="Honor",X="Microsoft",Q="Motorola",Z="Nvidia",ee="OnePlus",et="OPPO",ei="Samsung",es="Sharp",er="Sony",eo="Xiaomi",ea="Zebra",en="Chrome",el="Chromium",eu="Chromecast",ec="Edge",eh="Firefox",ep="Opera",ed="Facebook",eg="Sogou",ef="Mobile ",em=" Browser",eb="Windows",ew=typeof window!==l&&window.navigator?window.navigator:void 0,ev=ew&&ew.userAgentData?ew.userAgentData:void 0,ey=function(e,t){var i={},s=t;if(!eS(t))for(var r in s={},t)for(var o in t[r])s[o]=t[r][o].concat(s[o]?s[o]:[]);for(var a in e)i[a]=s[a]&&s[a].length%2==0?s[a].concat(e[a]):e[a];return i},ex=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},ek=function(e,t){if(typeof e===a&&e.length>0){for(var i in e)if(eC(t)==eC(e[i]))return!0;return!1}return!!eO(e)&&eC(t)==eC(e)},eS=function(e,t){for(var i in e)return/^(browser|cpu|device|engine|os)$/.test(i)||!!t&&eS(e[i])},eO=function(e){return typeof e===n},eL=function(e){if(e){for(var t=[],i=eR(/\\?\"/g,e).split(","),s=0;s<i.length;s++)if(i[s].indexOf(";")>-1){var r=eE(i[s]).split(";v=");t[s]={brand:r[0],version:r[1]}}else t[s]=eE(i[s]);return t}},eC=function(e){return eO(e)?e.toLowerCase():e},e$=function(e){return eO(e)?eR(/[^\d\.]/g,e).split(".")[0]:void 0},eN=function(e){for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];typeof i==a&&2==i.length?this[i[0]]=i[1]:this[i]=void 0}return this},eR=function(e,t){return eO(t)?t.replace(e,""):t},eP=function(e){return eR(/\\?\"/g,e)},eE=function(e,t){return e=eR(/^\s\s*/,String(e)),typeof t===l?e:e.substring(0,t)},ej=function(e,t){if(e&&t)for(var i,s,r,n,l,u,c=0;c<t.length&&!l;){var h=t[c],p=t[c+1];for(i=s=0;i<h.length&&!l&&h[i];)if(l=h[i++].exec(e))for(r=0;r<p.length;r++)u=l[++s],typeof(n=p[r])===a&&n.length>0?2===n.length?typeof n[1]==o?this[n[0]]=n[1].call(this,u):this[n[0]]=n[1]:n.length>=3&&(typeof n[1]!==o||n[1].exec&&n[1].test?3==n.length?this[n[0]]=u?u.replace(n[1],n[2]):void 0:4==n.length?this[n[0]]=u?n[3].call(this,u.replace(n[1],n[2])):void 0:n.length>4&&(this[n[0]]=u?n[3].apply(this,[u.replace(n[1],n[2])].concat(n.slice(4))):void 0):n.length>3?this[n[0]]=u?n[1].apply(this,n.slice(2)):void 0:this[n[0]]=u?n[1].call(this,u,n[2]):void 0):this[n]=u||void 0;c+=2}},eT=function(e,t){for(var i in t)if(typeof t[i]===a&&t[i].length>0){for(var s=0;s<t[i].length;s++)if(ek(t[i][s],e))return"?"===i?void 0:i}else if(ek(t[i],e))return"?"===i?void 0:i;return t.hasOwnProperty("*")?t["*"]:e},eI={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},eA={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},eD={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},eF={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[d,ef+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[m,[d,ec+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,m],[/opios[\/ ]+([\w\.]+)/i],[m,[d,ep+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[d,ep+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[d,ep]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[m,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[d,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[d,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[d,"Smart "+J+em]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure"+em],m],[/norton\/([\w\.]+)/i],[m,[d,"Norton Private"+em]],[/\bfocus\/([\w\.]+)/i],[m,[d,eh+" Focus"]],[/ mms\/([\w\.]+)$/i],[m,[d,ep+" Neon"]],[/ opt\/([\w\.]+)$/i],[m,[d,ep+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[d,ep+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[d,"MIUI"+em]],[/fxios\/([\w\.-]+)/i],[m,[d,ef+eh]],[/\bqihoobrowser\/?([\w\.]*)/i],[m,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+em],m],[/samsungbrowser\/([\w\.]+)/i],[m,[d,ei+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[m,[d,eg+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,eg+" Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,m],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[d],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[m,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,ed],m,[g,C]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[d,m,[g,C]],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[d,"GSA"],[g,C]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[m,[d,"TikTok"],[g,C]],[/\[(linkedin)app\]/i],[d,[g,C]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[d,/(.+)/,"Zalo"],m,[g,C]],[/(chromium)[\/ ]([-\w\.]+)/i],[d,m],[/ome-(lighthouse)$/i],[d,[g,"fetcher"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[d,en+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[m,[d,ec+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,en+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[d,"Android"+em]],[/chrome\/([\w\.]+) mobile/i],[m,[d,ef+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,m],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[m,[d,ef+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[d,ef+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[m,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[m,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[d,m],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[d,ef+eh],m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],m],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[d,eh+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[m,/[^\d\.]+./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[b,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[b,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[b,"arm"]],[/ sun4\w[;\)]/i],[[b,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[b,/ower/,"",eC]],[/mc680.0/i],[[b,"68k"]],[/winnt.+\[axp/i],[[b,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[v,[f,ei],[g,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[v,[f,ei],[g,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[v,[f,q],[g,x]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[v,[f,q],[g,k]],[/(macintosh);/i],[v,[f,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[v,[f,es],[g,x]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[v,[f,Y],[g,k]],[/honor([-\w ]+)[;\)]/i],[v,[f,Y],[g,x]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[v,[f,W],[g,k]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[v,[f,W],[g,x]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[v,/_/g," "],[f,eo],[g,k]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[v,/_/g," "],[f,eo],[g,x]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[v,[f,ee],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[v,[f,et],[g,x]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[v,[f,eT,{OnePlus:["203","304","403","404","413","415"],"*":et}],[g,k]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[v,[f,"BLU"],[g,x]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[v,[f,"Vivo"],[g,x]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[v,[f,"Realme"],[g,x]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[v,[f,J],[g,k]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[v,[f,J],[g,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[v,[f,Q],[g,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[v,[f,Q],[g,k]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[v,[f,"LG"],[g,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[v,[f,"LG"],[g,x]],[/(nokia) (t[12][01])/i],[f,v,[g,k]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[v,/_/g," "],[g,x],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[v,[f,G],[g,k]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[v,[f,G],[g,x]],[/(google) (pixelbook( go)?)/i],[f,v],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[v,[f,er],[g,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[v,"Xperia Tablet"],[f,er],[g,k]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[v,[f,H],[g,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[v,/(.+)/g,"Fire Phone $1"],[f,H],[g,x]],[/(playbook);[-\w\),; ]+(rim)/i],[v,f,[g,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[v,[f,K],[g,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[v,[f,B],[g,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[v,[f,B],[g,x]],[/(nexus 9)/i],[v,[f,"HTC"],[g,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[v,/_/g," "],[g,x]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[v,[f,"TCL"],[g,k]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[v,[f,"TCL"],[g,x]],[/(itel) ((\w+))/i],[[f,eC],v,[g,eT,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[v,[f,"Acer"],[g,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[v,[f,"Meizu"],[g,x]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[v,[f,"Ulefone"],[g,x]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[v,[f,"Energizer"],[g,x]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[v,[f,"Cat"],[g,x]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[v,[f,"Smartfren"],[g,x]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[v,[f,"Nothing"],[g,x]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[v,[f,"Archos"],[g,k]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[v,[f,"Archos"],[g,x]],[/; (n159v)/i],[v,[f,"HMD"],[g,x]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[f,v,[g,k]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[f,v,[g,x]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[f,v,[g,k]],[/(surface duo)/i],[v,[f,X],[g,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[v,[f,"Fairphone"],[g,x]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[v,[f,Z],[g,k]],[/(sprint) (\w+)/i],[f,v,[g,x]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[f,X],[g,x]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[f,ea],[g,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[f,ea],[g,x]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[f,[g,S]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[f,ei],[g,S]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[f,v,[g,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,"LG"],[g,S]],[/(apple) ?tv/i],[f,[v,q+" TV"],[g,S]],[/crkey.*devicetype\/chromecast/i],[[v,eu+" Third Generation"],[f,G],[g,S]],[/crkey.*devicetype\/([^/]*)/i],[[v,/^/,"Chromecast "],[f,G],[g,S]],[/fuchsia.*crkey/i],[[v,eu+" Nest Hub"],[f,G],[g,S]],[/crkey/i],[[v,eu],[f,G],[g,S]],[/(portaltv)/i],[v,[f,ed],[g,S]],[/droid.+aft(\w+)( bui|\))/i],[v,[f,H],[g,S]],[/(shield \w+ tv)/i],[v,[f,Z],[g,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[v,[f,es],[g,S]],[/(bravia[\w ]+)( bui|\))/i],[v,[f,er],[g,S]],[/(mi(tv|box)-?\w+) bui/i],[v,[f,eo],[g,S]],[/Hbbtv.*(technisat) (.*);/i],[f,v,[g,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,/.+\/(\w+)/,"$1",eT,{LG:"lge"}],[v,eE],[g,S]],[/(playstation \w+)/i],[v,[f,er],[g,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[v,[f,X],[g,y]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[f,eT,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],v,[g,y]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[v,[f,ei],[g,O]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,v,[g,O]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[v,[f,et],[g,O]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[v,[f,q],[g,O]],[/(opwwe\d{3})/i],[v,[f,ee],[g,O]],[/(moto 360)/i],[v,[f,Q],[g,O]],[/(smartwatch 3)/i],[v,[f,er],[g,O]],[/(g watch r)/i],[v,[f,"LG"],[g,O]],[/droid.+; (wt63?0{2,3})\)/i],[v,[f,ea],[g,O]],[/droid.+; (glass) \d/i],[v,[f,G],[g,"xr"]],[/(pico) ([\w ]+) os\d/i],[f,v,[g,"xr"]],[/(quest( \d| pro)?s?).+vr/i],[v,[f,ed],[g,"xr"]],[/mobile vr; rv.+firefox/i],[[g,"xr"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[g,L]],[/(aeobc)\b/i],[v,[f,H],[g,L]],[/(homepod).+mac os/i],[v,[f,q],[g,L]],[/windows iot/i],[[g,L]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[v,[g,S]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[g,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[v,[g,eT,{mobile:"Mobile",xr:"VR","*":k}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,x]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[v,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[d,ec+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[d,m],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,m],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,d]],os:[[/(windows nt) (6\.[23]); arm/i],[[d,/N/,"R"],[m,eT,eI]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[d,m],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[m,/(;|\))/g,"",eT,eI],[d,eb]],[/(windows ce)\/?([\d\.]*)/i],[d,m],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[d,"macOS"],[m,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[m,[d,eu+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[m,[d,eu+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[m,[d,eu+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[m,[d,eu+" Linux"]],[/crkey\/([\d\.]+)/i],[m,[d,eu]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[m,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],m],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[d,m],[/\(bb(10);/i],[m,[d,K]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[m,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[m,[d,eh+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[m,[d,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[m,eT,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[d,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[m,[d,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[m,[d,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[m,[d,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[d,m],[/(sunos) ?([\d\.]*)/i],[[d,"Solaris"],m],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,m]]},eV=(s={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}},eN.call(s.init,[[u,[d,m,w,g]],["cpu",[b]],[c,[g,v,f]],[h,[d,m]],["os",[d,m]]]),eN.call(s.isIgnore,[[u,[m,w]],[h,[m]],["os",[m]]]),eN.call(s.isIgnoreRgx,[[u,/ ?browser$/i],["os",/ ?os$/i]]),eN.call(s.toString,[[u,[d,m]],["cpu",[b]],[c,[f,v]],[h,[d,m]],["os",[d,m]]]),s),eU=function(e,t){var i=eV.init[t],s=eV.isIgnore[t]||0,r=eV.isIgnoreRgx[t]||0,o=eV.toString[t]||0;function a(){eN.call(this,i)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return ev?ev.getHighEntropyValues(M).then(function(t){return e.setCH(new e_(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=p&&(a.prototype.is=function(e){var t=!1;for(var i in this)if(this.hasOwnProperty(i)&&!ek(s,i)&&eC(r?eR(r,this[i]):this[i])==eC(r?eR(r,e):e)){if(t=!0,e!=l)break}else if(e==l&&t){t=!t;break}return t},a.prototype.toString=function(){var e="";for(var t in o)typeof this[o[t]]!==l&&(e+=(e?" ":"")+this[o[t]]);return e||l}),a.prototype.then=function(e){var t=this,i=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};i.prototype={is:a.prototype.is,toString:a.prototype.toString,withClientHints:a.prototype.withClientHints,withFeatureCheck:a.prototype.withFeatureCheck};var s=new i;return e(s),s},new a};function e_(e,t){if(e=e||{},eN.call(this,M),t)eN.call(this,[[$,eL(e[T])],[R,eL(e[I])],[x,/\?1/.test(e[V])],[v,eP(e[U])],[P,eP(e[_])],[E,eP(e[z])],[b,eP(e[A])],[N,eL(e[F])],[j,eP(e[D])]]);else for(var i in e)this.hasOwnProperty(i)&&typeof e[i]!==l&&(this[i]=e[i])}function ez(e,t,i,s){return eN.call(this,[["itemType",e],["ua",t],["uaCH",s],["rgxMap",i],["data",eU(this,e)]]),this}function eM(e,t,i){if(typeof e===a?(eS(e,!0)?(typeof t===a&&(i=t),t=e):(i=e,t=void 0),e=void 0):typeof e!==n||eS(t,!0)||(i=t,t=void 0),i)if(typeof i.append===o){var s={};i.forEach(function(e,t){s[String(t).toLowerCase()]=e}),i=s}else{var l={};for(var d in i)i.hasOwnProperty(d)&&(l[String(d).toLowerCase()]=i[d]);i=l}if(!(this instanceof eM))return new eM(e,t,i).getResult();var g=typeof e===n?e:i&&i[r]?i[r]:ew&&ew.userAgent?ew.userAgent:"",f=new e_(i,!0),m=t?ey(eF,t):eF,b=function(e){return e==p?function(){return new ez(e,g,m,f).set("ua",g).set(u,this.getBrowser()).set("cpu",this.getCPU()).set(c,this.getDevice()).set(h,this.getEngine()).set("os",this.getOS()).get()}:function(){return new ez(e,g,m[e],f).parseUA().get()}};return eN.call(this,[["getBrowser",b(u)],["getCPU",b("cpu")],["getDevice",b(c)],["getEngine",b(h)],["getOS",b("os")],["getResult",b(p)],["getUA",function(){return g}],["setUA",function(e){return eO(e)&&(g=eE(e,500)),this}]]).setUA(g),this}ez.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},ez.prototype.set=function(e,t){return this.data[e]=t,this},ez.prototype.setCH=function(e){return this.uaCH=e,this},ez.prototype.detectFeature=function(){if(ew&&ew.userAgent==this.ua)switch(this.itemType){case u:ew.brave&&typeof ew.brave.isBrave==o&&this.set(d,"Brave");break;case c:!this.get(g)&&ev&&ev[x]&&this.set(g,x),"Macintosh"==this.get(v)&&ew&&typeof ew.standalone!==l&&ew.maxTouchPoints&&ew.maxTouchPoints>2&&this.set(v,"iPad").set(g,k);break;case"os":!this.get(d)&&ev&&ev[P]&&this.set(d,ev[P]);break;case p:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set("cpu",t("cpu")).set(c,t(c)).set(h,t(h)).set("os",t("os"))}return this},ez.prototype.parseUA=function(){switch(this.itemType!=p&&ej.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(w,e$(this.get(m)));break;case"os":if("iOS"==this.get(d)&&"18.6"==this.get(m)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(m,e[1])}}return this},ez.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case h:var i,s=e[R]||e[$];if(s)for(var r=0;r<s.length;r++){var o=s[r].brand||s[r],a=s[r].version;this.itemType==u&&!/not.a.brand/i.test(o)&&(!i||/Chrom/.test(i)&&o!=el||i==ec&&/WebView2/.test(o))&&(o=eT(o,eD),(i=this.get(d))&&!/Chrom/.test(i)&&/Chrom/.test(o)||this.set(d,o).set(m,a).set(w,e$(a)),i=o),this.itemType==h&&o==el&&this.set(m,a)}break;case"cpu":var n=e[b];n&&(n&&"64"==e[j]&&(n+="64"),ej.call(this.data,n+";",t));break;case c:if(e[x]&&this.set(g,x),e[v]&&(this.set(v,e[v]),!this.get(g)||!this.get(f))){var l,y={};ej.call(y,"droid 9; "+e[v]+")",t),!this.get(g)&&y.type&&this.set(g,y.type),!this.get(f)&&y.vendor&&this.set(f,y.vendor)}if(e[N]){if("string"!=typeof e[N])for(var k=0;!l&&k<e[N].length;)l=eT(e[N][k++],eA);else l=eT(e[N],eA);this.set(g,l)}break;case"os":var S=e[P];if(S){var O=e[E];S==eb&&(O=parseInt(e$(O),10)>=13?"11":"10"),this.set(d,S).set(m,O)}this.get(d)==eb&&"Xbox"==e[v]&&this.set(d,"Xbox").set(m,void 0);break;case p:var L=this.data,C=function(t){return L[t].getItem().setCH(e).parseCH().get()};this.set(u,C(u)).set("cpu",C("cpu")).set(c,C(c)).set(h,C(h)).set("os",C("os"))}return this},eM.VERSION="2.0.9",eM.BROWSER=ex([d,m,w,g]),eM.CPU=ex([b]),eM.DEVICE=ex([v,f,g,y,x,S,k,O,L]),eM.ENGINE=eM.OS=ex([d,m])}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e,t,r,i={2585(e,t,r){r.d(t,{_:()=>i});function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,o),r.exports}o.m=i,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);o.r(r);var i={};a=a||[null,s({}),s([]),s(s)];for(var n=2&t&&e;("object"==typeof n||"function"==typeof n)&&!~a.indexOf(n);n=s(n))Object.getOwnPropertyNames(n).forEach(t=>{i[t]=()=>e[t]});return i.default=()=>e,o.d(r,i),r},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>"core-ar.chunk."+({117:"c3761997",548:"3e37d1f5",634:"09fa4463",886:"c15d19d9",986:"f57ba10e"})[e]+".min.js",o.miniCssF=e=>""+e+".css",o.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},o.l=function(e,t,r,i){if(l[e])return void l[e].push(t);if(void 0!==r)for(var n,a,s=document.getElementsByTagName("script"),d=0;d<s.length;d++){var c=s[d];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@neurodyn/core-ar:"+r){n=c;break}}n||(a=!0,(n=document.createElement("script")).timeout=120,o.nc&&n.setAttribute("nonce",o.nc),n.setAttribute("data-rspack","@neurodyn/core-ar:"+r),n.src=e),l[e]=[t];var u=function(t,r){n.onerror=n.onload=null,clearTimeout(g);var i=l[e];if(delete l[e],n.parentNode&&n.parentNode.removeChild(n),i&&i.forEach(function(e){return e(r)}),t)return t(r)},g=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),a&&document.head.appendChild(n)},o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0,o.g.importScripts&&(d=o.g.location+"");var a,s,l,d,c=o.g.document;if(!d&&c&&(c.currentScript&&"SCRIPT"===c.currentScript.tagName.toUpperCase()&&(d=c.currentScript.src),!d)){var u=c.getElementsByTagName("script");if(u.length)for(var g=u.length-1;g>-1&&(!d||!/^http(s?):/.test(d));)d=u[g--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");o.p=d=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e={964:0},o.f.j=function(t,r){var i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise((r,n)=>i=e[t]=[r,n]);r.push(i[2]=n);var a=o.p+o.u(t),s=Error();o.l(a,function(r){if(o.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",s.name="ChunkLoadError",s.type=n,s.request=a,i[1](s)}},"chunk-"+t,t)}},t=(t,r)=>{var i,n,[a,s,l]=r,d=0;if(a.some(t=>0!==e[t])){for(i in s)o.o(s,i)&&(o.m[i]=s[i]);l&&l(o)}for(t&&t(r);d<a.length;d++)n=a[d],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0},(r=self.webpackChunk_neurodyn_core_ar=self.webpackChunk_neurodyn_core_ar||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),(()=>{let e,t,r,i;var n=o(2585);function a(e,t){let r;try{r=new URL(e)}catch{throw TypeError(`${t} must be an absolute HTTP(S) URL`)}if("http:"!==r.protocol&&"https:"!==r.protocol)throw TypeError(`${t} must be an absolute HTTP(S) URL`);return r.origin}function s(){if(!e)throw Error("Core AR widget runtime is not configured");return e}function l(){return"u"<typeof navigator?"":navigator.userAgent||navigator.vendor||""}function d(){if("u"<typeof window||"u"<typeof navigator)return!1;let e="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return(/iPad|iPhone|iPod/.test(l())||e)&&!("MSStream"in window)}function c(){var e,t;if("u"<typeof window||"u"<typeof navigator)return!1;if(d())return!0;let r=navigator.maxTouchPoints>1,i=(null==(e=(t=window).matchMedia)?void 0:e.call(t,"(pointer: coarse)").matches)??!1,n=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(l());return r&&i&&(n||d())}function u(){var e;let t=l();return(null==(e=[[/edg/i,"Microsoft Edge"],[/trident/i,"Microsoft Internet Explorer"],[/firefox|fxios/i,"Mozilla Firefox"],[/opr\//i,"Opera"],[/ucbrowser/i,"UC Browser"],[/samsungbrowser/i,"Samsung Browser"],[/chrome|chromium|crios/i,"Google Chrome"],[/safari/i,"Apple Safari"]].find(e=>{let[r]=e;return r.test(t)}))?void 0:e[1])??"Other"}function g(){let e=function(){var e,t;let r=l(),i=(null==(e=r.match(/\bOS (\d+)/))?void 0:e[1])??(null==(t=r.match(/Version\/(\d+)/))?void 0:t[1]);if(!i)return null;let n=Number.parseInt(i,10);return Number.isNaN(n)?null:n}();return null!==e&&e>=17}function h(e){let t;try{t=new URL(e)}catch{throw TypeError("Native AR asset URL must be absolute HTTP(S)")}if("http:"!==t.protocol&&"https:"!==t.protocol)throw TypeError("Native AR asset URL must be absolute HTTP(S)");return t.href}function m(e,t){let r=h(e.glbUrl),i=h(e.usdzUrl),n=encodeURIComponent(r),o=`intent://arvr.google.com/scene-viewer/1.0?file=${n}&resizable=false${"wall"===t||"ceiling"===t?"&enable_vertical_placement=true":""}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`,a=`${i}#allowsContentScaling=0`;return d()?a:o}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=document.createElement("a"),i=document.createElement("img");r.rel="ar",r.href=e,r.hidden=!0,i.alt="",i.hidden=!0,r.appendChild(i),document.body.appendChild(r),window.setTimeout(()=>{r.click(),r.remove()},t)}function p(e,t,r){let i=function(e,t,r){let{brand:i}=r??s();if(d()){let r=new URL("https://appclip.apple.com/id");return r.searchParams.set("p","com.us.vizbl.Clip"),r.searchParams.set("tinuuid",e),t&&r.searchParams.set("hid",t),r.searchParams.set("region","arizo"===i?"ru":"en"),r.toString()}return`intent:/${window.location.pathname}#Intent;scheme=open;package=com.us.vizbl;end`}(e,t,r);window.self===window.top||u().toLowerCase().includes("edge")?window.location.assign(i):window.open(i,"_top")}function f(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,{viewerOrigin:n}=i??s(),o=new URL("/ar/index.html",n);return o.searchParams.set("tinuuid",e),t&&o.searchParams.set("hid",t),r&&o.searchParams.set("appview","true"),o.toString()}function b(){let e=new WeakMap;return function(t){var r;let i=e.get(t);null==i||null==(r=i.cleanup)||r.call(i);let n={revision:((null==i?void 0:i.revision)??0)+1};return e.set(t,n),{isCurrent:()=>e.get(t)===n,register(r){let i=!1,o=()=>{i||(i=!0,r())};return e.get(t)!==n?(o(),o):(n.cleanup=o,()=>{e.get(t)===n&&e.delete(t),o()})}}}}let w=0,y={arizo:{conjunction:"и",privacyLabel:"Политика конфиденциальности",privacyUrl:"https://arizo.ru/privacy-policy/",termsLabel:"Условия использования",termsUrl:"https://arizo.ru/terms-of-use/"},vizbl:{conjunction:"and",privacyLabel:"Privacy Policy",privacyUrl:"https://vizbl.com/legal/privacy-policy",termsLabel:"Terms of Use",termsUrl:"https://vizbl.com/legal/terms-of-use"}};function A(){return window.QRCode}function E(e,t,r){let i=document.createElement("a");return i.dataset.vizblLegalLink=e,i.href=t,i.rel="noopener noreferrer",i.target="_blank",i.textContent=r,Object.assign(i.style,{color:"inherit",textDecoration:"underline",textUnderlineOffset:"2px",whiteSpace:"nowrap"}),i}async function C(e){let i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vizblQrModal",o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,l=++w;null==r||r(),document.querySelectorAll("[data-vizbl-qr-modal]").forEach(e=>e.remove());let d=function(e){let{brand:t,viewerOrigin:r}=e??s(),i="arizo"===t,n=document.createElement("div");n.dataset.vizblQrModal="",n.setAttribute("aria-label","View object in augmented reality"),n.setAttribute("aria-modal","true"),n.setAttribute("role","dialog"),Object.assign(n.style,{alignItems:"center",backgroundColor:"rgba(0,0,0,0.25)",display:"none",height:"100%",justifyContent:"center",left:"0",position:"fixed",top:"0",width:"100%",zIndex:"9999"});let o=document.createElement("div");Object.assign(o.style,{backgroundColor:"#fff",borderRadius:"12px",boxSizing:"border-box",color:"#000",fontFamily:"Inter, sans-serif",minHeight:"372px",padding:"48px 52px 40px",position:"relative",width:"min(460px, calc(100vw - 32px))"});let a=document.createElement("button");a.type="button",a.dataset.vizblQrClose="",a.setAttribute("aria-label","Close QR code"),a.textContent="\xd7",Object.assign(a.style,{background:"none",border:"none",color:"#AEB1B7",cursor:"pointer",fontSize:"24px",position:"absolute",right:"20px",top:"20px"});let l=document.createElement("div");l.dataset.vizblQrCode="",l.style.margin="0 auto",l.style.width="fit-content";let d=document.createElement("p");d.textContent=i?"Отсканируйте этот QR-код камерой телефона, чтобы примерить объект в интерьере":"Scan this QR code with your phone camera to view the object in Augmented Reality",Object.assign(d.style,{fontSize:"16px",fontWeight:"500",lineHeight:"24px",margin:"24px 0 0",textAlign:"center"});let c=document.createElement("p");Object.assign(c.style,{color:"#93979F",fontSize:"12px",lineHeight:"16px",margin:"12px 0 0",textAlign:"center"});let u=y[t],g=E("terms",u.termsUrl,u.termsLabel),h=E("privacy",u.privacyUrl,u.privacyLabel);c.append(i?"*Требуется устройство и браузер с поддержкой AR. Рекомендуем iOS 18 или новее с Safari либо Android 7.0 или новее с Chrome.":"*Requires an AR-compatible device and browser. We recommend iOS 18 or later with Safari, or Android 7.0 or later with Chrome.",document.createElement("br"),g,` ${u.conjunction} `,h);let m=document.createElement("p");m.textContent=`Powered by ${i?"Arizo":"Vizbl"}`,Object.assign(m.style,{color:"#93979F",fontSize:"11px",letterSpacing:"1.5px",margin:"24px 0 4px",textAlign:"center",textTransform:"uppercase"});let v=document.createElement("a");v.dataset.vizblBrandLink="",v.href=i?"https://arizo.ru":"https://vizbl.com",v.style.display="block",v.style.textAlign="center";let p=document.createElement("img");return p.alt=`${i?"Arizo":"Vizbl"} logo`,p.src=`${r}/${i?"logoArizo.svg":"logo.svg"}`,p.height=20,p.width=i?76:60,v.appendChild(p),o.append(a,l,d,c,m,v),n.appendChild(o),n}(a);d.id=n;let c=d.querySelector("[data-vizbl-qr-close]"),u=Array.from(d.querySelectorAll("button, a[href]")),g=!1,h=e=>{if("Escape"===e.key){e.preventDefault(),i();return}if("Tab"!==e.key||0===u.length)return;let t=u[0],r=u.at(-1)??t;e.shiftKey&&(document.activeElement===t||!d.contains(document.activeElement))?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),t.focus())};r=i=()=>{g||(g=!0,document.removeEventListener("keydown",h),d.remove(),r===i&&(r=void 0),null==o||o.focus({preventScroll:!0}))},null==c||c.addEventListener("click",i),d.addEventListener("click",e=>{e.target===d&&i()}),document.body.appendChild(d),document.addEventListener("keydown",h),function(){let e="https://fonts.googleapis.com/css2?family=Inter&display=swap";if(Array.from(document.querySelectorAll('link[rel="stylesheet"]')).some(t=>t.href===e||t.getAttribute("href")===e))return;let t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}();try{let r=await function(e){let r=A();if(r)return Promise.resolve(r);if(t)return t;let{qrCodeScriptUrl:i}=e??s();return t=new Promise((e,r)=>{let n,o=document.createElement("script"),a=()=>{n();let i=A();i?e(i):(o.remove(),t=void 0,r(Error("QR code runtime did not expose QRCode")))},s=()=>{n(),o.remove(),t=void 0,r(Error("Failed to load QR code runtime"))};n=()=>{o.removeEventListener("load",a),o.removeEventListener("error",s)},o.addEventListener("load",a,{once:!0}),o.addEventListener("error",s,{once:!0}),o.src=i,o.async=!0,o.dataset.vizblQrScript="true",document.head.appendChild(o)})}(a);if(l!==w||!d.isConnected)return i(),i;let n=d.querySelector("[data-vizbl-qr-code]");return n&&new r(n,{correctLevel:r.CorrectLevel.L,height:148,text:e,width:148}),d.style.display="flex",null==c||c.focus({preventScroll:!0}),i}catch(e){throw i(),e}}class O extends Error{constructor(e){super(e),(0,n._)(this,"code",void 0),this.code=e,this.name="WidgetRuntimeError"}}function S(e){return e.runtimeConfig??s()}function I(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new URL(t,e);for(let[e,t]of Object.entries(r))t&&i.searchParams.set(e,t);return i.toString()}async function k(e,t,r){try{var i;return await (r.fetchImpl??(null==(i=r.runtimeConfig)?void 0:i.fetchImpl)??s().fetchImpl)(e,{...t,signal:r.signal})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw e;throw new O("NETWORK_ERROR")}}async function T(e){try{let t=await e.json();return[t.code,t.error,t.message].flatMap(e=>Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).join(" ").toLowerCase()}catch{return""}}async function x(e,t){let r=await T(e);return new O(429===e.status?"RATE_LIMITED":e.status>=500?"API_UNAVAILABLE":404===e.status&&"object"===t?"OBJECT_NOT_FOUND":r.includes("domain")||r.includes("origin")?"DOMAIN_NOT_ALLOWED":r.includes("revoked")?"KEY_REVOKED":r.includes("expired")?"activation"===t?"KEY_EXPIRED":"SESSION_EXPIRED":r.includes("policy")||r.includes("not available for this object")?"POLICY_DENIED":401===e.status||403===e.status?"activation"===t?"INVALID_KEY":"SESSION_EXPIRED":"REQUEST_FAILED")}async function z(e){try{return await e.json()}catch{throw new O("INVALID_RESPONSE")}}function L(e){if(!e||"object"!=typeof e||"string"!=typeof e.token||!e.token.trim()||"string"!=typeof e.sid||!e.sid.trim()||"number"!=typeof e.expiresIn||!Number.isFinite(e.expiresIn)||e.expiresIn<=0)throw new O("INVALID_RESPONSE");return e}async function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{apiOrigin:r}=S(t),i=await k(I(r,"/public/widget/activate-core",{mode:t.mode}),{cache:"no-store",headers:{"x-api-key":e},method:"POST"},t);if(!i.ok)throw await x(i,"activation");let n=await z(i);if("string"!=typeof n.productType)throw new O("INVALID_RESPONSE");return{...L(n.widgetSession),productType:n.productType}}async function R(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{apiOrigin:i}=S(r),n=await k(`${i}/public/widget/token`,{body:JSON.stringify({token:t,...r.mode?{mode:r.mode}:{}}),cache:"no-store",headers:{"Content-Type":"application/json","x-api-key":e},method:"POST"},r);if(!n.ok)throw await x(n,"token");return L(await z(n))}async function P(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{apiOrigin:i}=S(r),n=await k(I(i,`/public/objects/by-tinuuid/${encodeURIComponent(e)}`,{variantId:r.variantId}),{cache:"no-store",headers:{"x-widget-session-token":t},method:"GET"},r);if(!n.ok)throw await x(n,"object");let o=await z(n);if(!o||"object"!=typeof o||Array.isArray(o))throw new O("INVALID_RESPONSE");return o}async function j(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{apiOrigin:n}=S(i),o=await k(`${n}/public/widget/events`,{body:JSON.stringify({event:e,...r?{objectId:r}:{},...i.variantId?{variantId:i.variantId}:{},timestamp:new Date().toISOString()}),cache:"no-store",headers:{"Content-Type":"application/json","x-widget-session-token":t},keepalive:!0,method:"POST"},i);if(!o.ok)throw await x(o,"event");let a=await z(o);if(!a||"object"!=typeof a||Array.isArray(a)||"boolean"!=typeof a.ok)throw new O("INVALID_RESPONSE")}async function N(e,t,r){let i=r??s(),{apiOrigin:n,fetchImpl:o}=i,a=await k(`${n}/catalog/object`,{body:JSON.stringify({tinuuid:e}),headers:{"Content-Type":"application/json"},method:"POST"},{fetchImpl:o,runtimeConfig:i,signal:t});if(!a.ok)throw await x(a,"object");let l=await z(a);if(!l||"object"!=typeof l||Array.isArray(l))throw new O("INVALID_RESPONSE");return l}async function D(e,t){let{apiOrigin:r,fetchImpl:i}=t??s();await i(`${r}/catalog/object/incr-views`,{body:JSON.stringify({tinuuid:e}),headers:{"Content-Type":"application/json"},method:"POST"})}function U(e){try{let t=null==e?void 0:e();t instanceof Promise&&t.catch(()=>void 0)}catch{}}let V=b();function M(e){if(null==e?void 0:e.aborted)throw new DOMException("Aborted","AbortError")}async function $(e){var t,r,i;let n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=V(e),l=e.getAttribute("data-native-link"),h=null==(t=e.dataset.objectTinuuid)?void 0:t.trim(),b=(null==(r=e.dataset.objectHid)?void 0:r.trim())||void 0;if(!h)throw Error("Object ID is required");M(a.signal);let w=a.loadObject??((e,t)=>N(e,t,a.runtimeConfig)),y=a.object??await w(h,a.signal);if(M(a.signal),!s.isCurrent())return()=>void 0;let A=b?y.materials.find(e=>e.hid===b):y.materials[0];if(!(null==A||null==(i=A.native)?void 0:i.glbUrl)||!A.native.usdzUrl)throw Error("Native AR assets are unavailable");let E=m(A.native,y.type),O=c(),S=!1,I=0;e.querySelector("img")||((n=document.createElement("img")).alt="",n.hidden=!0,e.appendChild(n));let k=()=>a.trackView?a.trackView():D(h,a.runtimeConfig),T=t=>{var r;t.preventDefault();let i=++I;null==o||o(),o=void 0,Promise.resolve((null==(r=a.getDesktopQrUrl)?void 0:r.call(a))??f(h,b,!0,a.runtimeConfig)).then(t=>{if(i===I&&s.isCurrent())return U(()=>{var e;return null==(e=a.onAction)?void 0:e.call(a,"interacted")}),C(t,`vizbl-${h}`,e,a.runtimeConfig)}).then(e=>{if(e){if(i!==I||!s.isCurrent())return void e();o=e}}).catch(()=>void 0)},x=async e=>{let t;if(t=u().toLowerCase(),["firefox","edge","opera"].some(e=>t.includes(e))){if(e.preventDefault(),S)return;S=!0,U(()=>{var e;return null==(e=a.onAction)?void 0:e.call(a,"ar_launched")});try{await Promise.resolve(k()).catch(()=>void 0)}finally{S=!1,d()&&g()?p(h,b,a.runtimeConfig):v(E)}return}U(()=>{var e;return null==(e=a.onAction)?void 0:e.call(a,"ar_launched")}),U(k),d()&&g()?(e.preventDefault(),p(h,b,a.runtimeConfig)):v(E)};return O?(e.dataset.nativeLink=E,e.addEventListener("click",x)):e.addEventListener("click",T),s.register(()=>{I+=1,e.removeEventListener("click",T),e.removeEventListener("click",x),null==o||o(),null==n||n.remove(),null===l?e.removeAttribute("data-native-link"):e.setAttribute("data-native-link",l)})}async function q(){let[{ModelViewerDialog:e},{createElement:t},{createRoot:r}]=await Promise.all([Promise.all([o.e("117"),o.e("634"),o.e("548")]).then(o.bind(o,5535)),o.e("986").then(o.t.bind(o,9081,19)),Promise.all([o.e("117"),o.e("886")]).then(o.t.bind(o,8181,19))]);return{open:i=>{let{onClose:n,...o}=i,a=document.createElement("div");a.setAttribute("data-core-ar-model-viewer",""),document.body.appendChild(a);let s=r(a),l=!1,d=r=>s.render(t(e,{...o,onOpenChange:e=>{e||c()},open:r}));function c(){l||(l=!0,d(!1),setTimeout(()=>{s.unmount(),a.remove()},300),null==n||n())}return d(!0),c}}}let W=["cm","inch"],B=["x","y","z"],H=[...B],F=b();function K(e){return e&&W.includes(e)?e:"inch"}function Q(e){if(!e)return H;let t=Array.from(new Set(e.split(",").map(e=>e.trim().toLowerCase()).filter(e=>B.includes(e))));return t.length>0?t:H}let Y=b();function J(e){if(null==e?void 0:e.aborted)throw new DOMException("Aborted","AbortError")}async function X(e){var t,r,i;let n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=Y(e),l=e.getAttribute("href"),d=e.getAttribute("rel"),u=null==(t=e.dataset.objectTinuuid)?void 0:t.trim(),g=(null==(r=e.dataset.objectHid)?void 0:r.trim())||void 0;if(!u)throw Error("Object ID is required");J(a.signal);let h=a.loadObject??((e,t)=>N(e,t,a.runtimeConfig)),v=a.object??await h(u,a.signal);if(J(a.signal),!s.isCurrent())return()=>void 0;let p=g?v.materials.find(e=>e.hid===g):v.materials[0];if(!(null==p||null==(i=p.native)?void 0:i.glbUrl)||!p.native.usdzUrl)throw Error("Native AR assets are unavailable");let b=m(p.native,v.type),w=c(),y=0;e.rel="ar",e.querySelector("img")||((n=document.createElement("img")).alt="",n.hidden=!0,e.appendChild(n));let A=t=>{var r;t.preventDefault();let i=++y;null==o||o(),o=void 0,Promise.resolve((null==(r=a.getDesktopQrUrl)?void 0:r.call(a))??f(u,g,!1,a.runtimeConfig)).then(t=>{if(i===y&&s.isCurrent())return U(()=>{var e;return null==(e=a.onAction)?void 0:e.call(a,"interacted")}),C(t,`vizbl-${u}`,e,a.runtimeConfig)}).then(e=>{if(e){if(i!==y||!s.isCurrent())return void e();o=e}}).catch(()=>void 0)},E=()=>{U(a.trackView??(()=>D(u,a.runtimeConfig))),U(()=>{var e;return null==(e=a.onAction)?void 0:e.call(a,"ar_launched")})};return w?(e.href=b,e.addEventListener("click",E)):(e.href="#",e.addEventListener("click",A)),s.register(()=>{y+=1,e.removeEventListener("click",A),e.removeEventListener("click",E),null==o||o(),null==n||n.remove(),null===l?e.removeAttribute("href"):e.setAttribute("href",l),null===d?e.removeAttribute("rel"):e.setAttribute("rel",d)})}let Z=["advanced-ar","ar-one-click","ar-viewer"],G={arizo:"arizo-core",vizbl:"vizbl-core"},ee=new Set(["core-ar","core-ar-shopify"]),et={arizo:{"advanced-ar":"Посмотреть в расширенной AR","ar-one-click":"Посмотреть в AR","ar-viewer":"Посмотреть в 3D и AR"},vizbl:{"advanced-ar":"View in advanced AR","ar-one-click":"View in AR","ar-viewer":"View in 3D & AR"}},er={"advanced-ar":"advanced-ar-view","ar-one-click":"ar-view","ar-viewer":"ar-viewer"},ei=["api-key","camera-orbit","dev","dimension-axes","max-camera-orbit","min-camera-orbit","object-id","size-type","trigger-class","type","variant-id"],en=new Set(["API_UNAVAILABLE","INVALID_RESPONSE","NETWORK_ERROR","REQUEST_FAILED","SESSION_EXPIRED"]),eo="core-ar-widget-styles";class ea extends Error{constructor(e){super(e),(0,n._)(this,"code",void 0),this.code=e,this.name="CoreArWidgetComponentError"}}function es(e){return Z.includes(e)}function el(e,t){let r=Array.isArray(e.materials)?e.materials:[],i=t?r.find(e=>e.hid===t):r[0];if(!i)throw new ea(t?"VARIANT_NOT_FOUND":"MODEL_UNAVAILABLE");return i}function ed(e,t){var r;if("ar-one-click"===e&&(null==(r=t.policy)?void 0:r.instantArView)===!1)throw new ea("POLICY_DENIED")}let ec="u"<typeof HTMLElement?class{}:HTMLElement;class eu extends ec{static get observedAttributes(){return[...ei]}get triggerClass(){return this.getAttribute("trigger-class")??""}set triggerClass(e){let t="string"==typeof e?e.trim():"";t?this.setAttribute("trigger-class",t):this.removeAttribute("trigger-class")}get unstyled(){return this.hasAttribute("unstyled")}set unstyled(e){this.toggleAttribute("unstyled",!!e)}connectedCallback(){!function(){if(document.getElementById(eo))return;let e=document.createElement("style");e.id=eo,e.textContent=`
1
+ (()=>{"use strict";var e,t,r,i={2585(e,t,r){r.d(t,{_:()=>i});function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,exports:{}};return i[e](r,r.exports,a),r.exports}a.m=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);a.r(r);var i={};o=o||[null,s({}),s([]),s(s)];for(var n=2&t&&e;("object"==typeof n||"function"==typeof n)&&!~o.indexOf(n);n=s(n))Object.getOwnPropertyNames(n).forEach(t=>{i[t]=()=>e[t]});return i.default=()=>e,a.d(r,i),r},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>"core-ar.chunk."+({117:"c3761997",152:"b35bb825",270:"f52e1e86",292:"27b4ab37",343:"87bc2890",393:"5d925ec9",548:"df43e0ae",59:"f136c05d",759:"66c7fd24",789:"86e9b748",872:"e2e05712",886:"c15d19d9",986:"f57ba10e"})[e]+".min.js",a.miniCssF=e=>""+e+".css",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},a.l=function(e,t,r,i){if(l[e])return void l[e].push(t);if(void 0!==r)for(var n,o,s=document.getElementsByTagName("script"),c=0;c<s.length;c++){var d=s[c];if(d.getAttribute("src")==e||d.getAttribute("data-rspack")=="@neurodyn/core-ar:"+r){n=d;break}}n||(o=!0,(n=document.createElement("script")).timeout=120,a.nc&&n.setAttribute("nonce",a.nc),n.setAttribute("data-rspack","@neurodyn/core-ar:"+r),n.src=e),l[e]=[t];var u=function(t,r){n.onerror=n.onload=null,clearTimeout(h);var i=l[e];if(delete l[e],n.parentNode&&n.parentNode.removeChild(n),i&&i.forEach(function(e){return e(r)}),t)return t(r)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),o&&document.head.appendChild(n)},a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0,a.g.importScripts&&(c=a.g.location+"");var o,s,l,c,d=a.g.document;if(!c&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(c=d.currentScript.src),!c)){var u=d.getElementsByTagName("script");if(u.length)for(var h=u.length-1;h>-1&&(!c||!/^http(s?):/.test(c));)c=u[h--].src}if(!c)throw Error("Automatic publicPath is not supported in this browser");a.p=c=c.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e={964:0},a.f.j=function(t,r){var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise((r,n)=>i=e[t]=[r,n]);r.push(i[2]=n);var o=a.p+a.u(t),s=Error();a.l(o,function(r){if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,i[1](s)}},"chunk-"+t,t)}},t=(t,r)=>{var i,n,[o,s,l]=r,c=0;if(o.some(t=>0!==e[t])){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);l&&l(a)}for(t&&t(r);c<o.length;c++)n=o[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0},(r=self.webpackChunk_neurodyn_core_ar=self.webpackChunk_neurodyn_core_ar||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),(()=>{let e,t,r,i,n;var o=a(2585);function s(e,t){let r;try{r=new URL(e)}catch{throw TypeError(`${t} must be an absolute HTTP(S) URL`)}if("http:"!==r.protocol&&"https:"!==r.protocol)throw TypeError(`${t} must be an absolute HTTP(S) URL`);return r.origin}function l(){if(!e)throw Error("Core AR widget runtime is not configured");return e}function c(){return"u"<typeof navigator?"":navigator.userAgent||navigator.vendor||""}function d(){if("u"<typeof window||"u"<typeof navigator)return!1;let e="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return(/iPad|iPhone|iPod/.test(c())||e)&&!("MSStream"in window)}function u(){var e,t;if("u"<typeof window||"u"<typeof navigator)return!1;if(d())return!0;let r=navigator.maxTouchPoints>1,i=(null==(e=(t=window).matchMedia)?void 0:e.call(t,"(pointer: coarse)").matches)??!1,n=/Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(c());return r&&i&&(n||d())}function h(){var e;let t=c();return(null==(e=[[/edg/i,"Microsoft Edge"],[/trident/i,"Microsoft Internet Explorer"],[/firefox|fxios/i,"Mozilla Firefox"],[/opr\//i,"Opera"],[/ucbrowser/i,"UC Browser"],[/samsungbrowser/i,"Samsung Browser"],[/chrome|chromium|crios/i,"Google Chrome"],[/safari/i,"Apple Safari"]].find(e=>{let[r]=e;return r.test(t)}))?void 0:e[1])??"Other"}function g(){let e=function(){var e,t;let r=c(),i=(null==(e=r.match(/\bOS (\d+)/))?void 0:e[1])??(null==(t=r.match(/Version\/(\d+)/))?void 0:t[1]);if(!i)return null;let n=Number.parseInt(i,10);return Number.isNaN(n)?null:n}();return null!==e&&e>=17}function m(e){let t;try{t=new URL(e)}catch{throw TypeError("Native AR asset URL must be absolute HTTP(S)")}if("http:"!==t.protocol&&"https:"!==t.protocol)throw TypeError("Native AR asset URL must be absolute HTTP(S)");return t.href}function v(e,t){let r=m(e.glbUrl),i=m(e.usdzUrl),n=encodeURIComponent(r),a=`intent://arvr.google.com/scene-viewer/1.0?file=${n}&resizable=false${"wall"===t||"ceiling"===t?"&enable_vertical_placement=true":""}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`,o=`${i}#allowsContentScaling=0`;return d()?o:a}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=document.createElement("a"),i=document.createElement("img");r.rel="ar",r.href=e,r.hidden=!0,i.alt="",i.hidden=!0,r.appendChild(i),document.body.appendChild(r),window.setTimeout(()=>{r.click(),r.remove()},t)}function f(e,t,r){let i=function(e,t,r){let{brand:i}=r??l();if(d()){let r=new URL("https://appclip.apple.com/id");return r.searchParams.set("p","com.us.vizbl.Clip"),r.searchParams.set("tinuuid",e),t&&r.searchParams.set("hid",t),r.searchParams.set("region","arizo"===i?"ru":"en"),r.toString()}return`intent:/${window.location.pathname}#Intent;scheme=open;package=com.us.vizbl;end`}(e,t,r);window.self===window.top||h().toLowerCase().includes("edge")?window.location.assign(i):window.open(i,"_top")}function b(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,{viewerOrigin:n}=i??l(),a=new URL("/ar/index.html",n);return a.searchParams.set("tinuuid",e),t&&a.searchParams.set("hid",t),r&&a.searchParams.set("appview","true"),a.toString()}function w(){let e=new WeakMap;return function(t){var r;let i=e.get(t);null==i||null==(r=i.cleanup)||r.call(i);let n={revision:((null==i?void 0:i.revision)??0)+1};return e.set(t,n),{isCurrent:()=>e.get(t)===n,register(r){let i=!1,a=()=>{i||(i=!0,r())};return e.get(t)!==n?(a(),a):(n.cleanup=a,()=>{e.get(t)===n&&e.delete(t),a()})}}}}let y=0,A={arizo:{conjunction:"и",privacyLabel:"Политика конфиденциальности",privacyUrl:"https://arizo.ru/privacy-policy/",termsLabel:"Условия использования",termsUrl:"https://arizo.ru/terms-of-use/"},vizbl:{conjunction:"and",privacyLabel:"Privacy Policy",privacyUrl:"https://vizbl.com/legal/privacy-policy",termsLabel:"Terms of Use",termsUrl:"https://vizbl.com/legal/terms-of-use"}};function E(){return window.QRCode}function C(e,t,r){let i=document.createElement("a");return i.dataset.vizblLegalLink=e,i.href=t,i.rel="noopener noreferrer",i.target="_blank",i.textContent=r,Object.assign(i.style,{color:"inherit",textDecoration:"underline",textUnderlineOffset:"2px",whiteSpace:"nowrap"}),i}async function O(e){let i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vizblQrModal",a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=++y;null==r||r(),document.querySelectorAll("[data-vizbl-qr-modal]").forEach(e=>e.remove());let c=function(e){let{brand:t,viewerOrigin:r}=e??l(),i="arizo"===t,n=document.createElement("div");n.dataset.vizblQrModal="",n.setAttribute("aria-label","View object in augmented reality"),n.setAttribute("aria-modal","true"),n.setAttribute("role","dialog"),Object.assign(n.style,{alignItems:"center",backgroundColor:"rgba(0,0,0,0.25)",display:"none",height:"100%",justifyContent:"center",left:"0",position:"fixed",top:"0",width:"100%",zIndex:"9999"});let a=document.createElement("div");Object.assign(a.style,{backgroundColor:"#fff",borderRadius:"12px",boxSizing:"border-box",color:"#000",fontFamily:"Inter, sans-serif",minHeight:"372px",padding:"48px 52px 40px",position:"relative",width:"min(460px, calc(100vw - 32px))"});let o=document.createElement("button");o.type="button",o.dataset.vizblQrClose="",o.setAttribute("aria-label","Close QR code"),o.textContent="\xd7",Object.assign(o.style,{background:"none",border:"none",color:"#AEB1B7",cursor:"pointer",fontSize:"24px",position:"absolute",right:"20px",top:"20px"});let s=document.createElement("div");s.dataset.vizblQrCode="",s.style.margin="0 auto",s.style.width="fit-content";let c=document.createElement("p");c.textContent=i?"Отсканируйте этот QR-код камерой телефона, чтобы примерить объект в интерьере":"Scan this QR code with your phone camera to view the object in Augmented Reality",Object.assign(c.style,{fontSize:"16px",fontWeight:"500",lineHeight:"24px",margin:"24px 0 0",textAlign:"center"});let d=document.createElement("p");Object.assign(d.style,{color:"#93979F",fontSize:"12px",lineHeight:"16px",margin:"12px 0 0",textAlign:"center"});let u=A[t],h=C("terms",u.termsUrl,u.termsLabel),g=C("privacy",u.privacyUrl,u.privacyLabel);d.append(i?"*Требуется устройство и браузер с поддержкой AR. Рекомендуем iOS 18 или новее с Safari либо Android 7.0 или новее с Chrome.":"*Requires an AR-compatible device and browser. We recommend iOS 18 or later with Safari, or Android 7.0 or later with Chrome.",document.createElement("br"),h,` ${u.conjunction} `,g);let m=document.createElement("p");m.textContent=`Powered by ${i?"Arizo":"Vizbl"}`,Object.assign(m.style,{color:"#93979F",fontSize:"11px",letterSpacing:"1.5px",margin:"24px 0 4px",textAlign:"center",textTransform:"uppercase"});let v=document.createElement("a");v.dataset.vizblBrandLink="",v.href=i?"https://arizo.ru":"https://vizbl.com",v.style.display="block",v.style.textAlign="center";let p=document.createElement("img");return p.alt=`${i?"Arizo":"Vizbl"} logo`,p.src=`${r}/${i?"logoArizo.svg":"logo.svg"}`,p.height=20,p.width=i?76:60,v.appendChild(p),a.append(o,s,c,d,m,v),n.appendChild(a),n}(o);c.id=n;let d=c.querySelector("[data-vizbl-qr-close]"),u=Array.from(c.querySelectorAll("button, a[href]")),h=!1,g=e=>{if("Escape"===e.key){e.preventDefault(),i();return}if("Tab"!==e.key||0===u.length)return;let t=u[0],r=u.at(-1)??t;e.shiftKey&&(document.activeElement===t||!c.contains(document.activeElement))?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),t.focus())};r=i=()=>{h||(h=!0,document.removeEventListener("keydown",g),c.remove(),r===i&&(r=void 0),null==a||a.focus({preventScroll:!0}))},null==d||d.addEventListener("click",i),c.addEventListener("click",e=>{e.target===c&&i()}),document.body.appendChild(c),document.addEventListener("keydown",g),function(){let e="https://fonts.googleapis.com/css2?family=Inter&display=swap";if(Array.from(document.querySelectorAll('link[rel="stylesheet"]')).some(t=>t.href===e||t.getAttribute("href")===e))return;let t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}();try{let r=await function(e){let r=E();if(r)return Promise.resolve(r);if(t)return t;let{qrCodeScriptUrl:i}=e??l();return t=new Promise((e,r)=>{let n,a=document.createElement("script"),o=()=>{n();let i=E();i?e(i):(a.remove(),t=void 0,r(Error("QR code runtime did not expose QRCode")))},s=()=>{n(),a.remove(),t=void 0,r(Error("Failed to load QR code runtime"))};n=()=>{a.removeEventListener("load",o),a.removeEventListener("error",s)},a.addEventListener("load",o,{once:!0}),a.addEventListener("error",s,{once:!0}),a.src=i,a.async=!0,a.dataset.vizblQrScript="true",document.head.appendChild(a)})}(o);if(s!==y||!c.isConnected)return i(),i;let n=c.querySelector("[data-vizbl-qr-code]");return n&&new r(n,{correctLevel:r.CorrectLevel.L,height:148,text:e,width:148}),c.style.display="flex",null==d||d.focus({preventScroll:!0}),i}catch(e){throw i(),e}}class S extends Error{constructor(e){super(e),(0,o._)(this,"code",void 0),this.code=e,this.name="WidgetRuntimeError"}}function I(e){return e.runtimeConfig??l()}function k(e){return{"x-app-type":e.brand}}function T(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new URL(t,e);for(let[e,t]of Object.entries(r))t&&i.searchParams.set(e,t);return i.toString()}async function x(e,t,r){try{var i;return await (r.fetchImpl??(null==(i=r.runtimeConfig)?void 0:i.fetchImpl)??l().fetchImpl)(e,{...t,signal:r.signal})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw e;throw new S("NETWORK_ERROR")}}async function z(e){try{let t=await e.json();return[t.code,t.error,t.message].flatMap(e=>Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).join(" ").toLowerCase()}catch{return""}}async function L(e,t){let r=await z(e);return new S(429===e.status?"RATE_LIMITED":e.status>=500?"API_UNAVAILABLE":404===e.status&&"object"===t?"OBJECT_NOT_FOUND":r.includes("domain")||r.includes("origin")?"DOMAIN_NOT_ALLOWED":r.includes("revoked")?"KEY_REVOKED":r.includes("expired")?"activation"===t?"KEY_EXPIRED":"SESSION_EXPIRED":r.includes("policy")||r.includes("not available for this object")?"POLICY_DENIED":401===e.status||403===e.status?"activation"===t?"INVALID_KEY":"SESSION_EXPIRED":"REQUEST_FAILED")}async function _(e){try{return await e.json()}catch{throw new S("INVALID_RESPONSE")}}function P(e){if(!e||"object"!=typeof e||"string"!=typeof e.token||!e.token.trim()||"string"!=typeof e.sid||!e.sid.trim()||"number"!=typeof e.expiresIn||!Number.isFinite(e.expiresIn)||e.expiresIn<=0)throw new S("INVALID_RESPONSE");return e}async function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=I(t),i=await x(T(r.apiOrigin,"/public/widget/activate-core",{mode:t.mode}),{cache:"no-store",headers:{...k(r),"x-api-key":e},method:"POST"},t);if(!i.ok)throw await L(i,"activation");let n=await _(i);if("string"!=typeof n.productType)throw new S("INVALID_RESPONSE");return{...P(n.widgetSession),productType:n.productType}}async function j(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=I(r),n=await x(`${i.apiOrigin}/public/widget/token`,{body:JSON.stringify({token:t,...r.mode?{mode:r.mode}:{}}),cache:"no-store",headers:{...k(i),"Content-Type":"application/json","x-api-key":e},method:"POST"},r);if(!n.ok)throw await L(n,"token");return P(await _(n))}async function N(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=I(r),n=await x(T(i.apiOrigin,`/public/objects/by-tinuuid/${encodeURIComponent(e)}`,{variantId:r.variantId}),{cache:"no-store",headers:{...k(i),"x-widget-session-token":t},method:"GET"},r);if(!n.ok)throw await L(n,"object");let a=await _(n);if(!a||"object"!=typeof a||Array.isArray(a))throw new S("INVALID_RESPONSE");return a}async function D(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=I(i),a=await x(`${n.apiOrigin}/public/widget/events`,{body:JSON.stringify({event:e,...r?{objectId:r}:{},...i.variantId?{variantId:i.variantId}:{},timestamp:new Date().toISOString()}),cache:"no-store",headers:{...k(n),"Content-Type":"application/json","x-widget-session-token":t},keepalive:!0,method:"POST"},i);if(!a.ok)throw await L(a,"event");let o=await _(a);if(!o||"object"!=typeof o||Array.isArray(o)||"boolean"!=typeof o.ok)throw new S("INVALID_RESPONSE")}async function U(e,t,r){let i=r??l(),{apiOrigin:n,fetchImpl:a}=i,o=await x(`${n}/catalog/object`,{body:JSON.stringify({tinuuid:e}),headers:{...k(i),"Content-Type":"application/json"},method:"POST"},{fetchImpl:a,runtimeConfig:i,signal:t});if(!o.ok)throw await L(o,"object");let s=await _(o);if(!s||"object"!=typeof s||Array.isArray(s))throw new S("INVALID_RESPONSE");return s}async function V(e,t){let r=t??l();await r.fetchImpl(`${r.apiOrigin}/catalog/object/incr-views`,{body:JSON.stringify({tinuuid:e}),headers:{...k(r),"Content-Type":"application/json"},method:"POST"})}function M(e){try{let t=null==e?void 0:e();t instanceof Promise&&t.catch(()=>void 0)}catch{}}let W=w();function $(e){if(null==e?void 0:e.aborted)throw new DOMException("Aborted","AbortError")}async function q(e){var t,r,i;let n,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=W(e),l=e.getAttribute("data-native-link"),c=null==(t=e.dataset.objectTinuuid)?void 0:t.trim(),m=(null==(r=e.dataset.objectHid)?void 0:r.trim())||void 0;if(!c)throw Error("Object ID is required");$(o.signal);let w=o.loadObject??((e,t)=>U(e,t,o.runtimeConfig)),y=o.object??await w(c,o.signal);if($(o.signal),!s.isCurrent())return()=>void 0;let A=m?y.materials.find(e=>e.hid===m):y.materials[0];if(!(null==A||null==(i=A.native)?void 0:i.glbUrl)||!A.native.usdzUrl)throw Error("Native AR assets are unavailable");let E=v(A.native,y.type),C=u(),S=!1,I=!1,k=0;e.querySelector("img")||((n=document.createElement("img")).alt="",n.hidden=!0,e.appendChild(n));let T=()=>o.trackView?o.trackView():V(c,o.runtimeConfig),x=t=>{var r;t.preventDefault();let i=++k;null==a||a(),a=void 0,Promise.resolve((null==(r=o.getDesktopQrUrl)?void 0:r.call(o))??b(c,m,!0,o.runtimeConfig)).then(t=>{if(i===k&&s.isCurrent())return M(()=>{var e;return null==(e=o.onAction)?void 0:e.call(o,"interacted")}),O(t,`vizbl-${c}`,e,o.runtimeConfig)}).then(e=>{if(e){if(i!==k||!s.isCurrent())return void e();a=e}}).catch(()=>void 0)},z=async e=>{var t;let r;if(null==(t=o.webAr)?void 0:t.isAvailable()){if(e.preventDefault(),I)return;I=!0;let t=!1;try{t=await o.webAr.open().catch(()=>!1)}finally{I=!1}if(t||!s.isCurrent())return}if(r=h().toLowerCase(),["firefox","edge","opera"].some(e=>r.includes(e))){if(e.preventDefault(),S)return;S=!0,M(()=>{var e;return null==(e=o.onAction)?void 0:e.call(o,"ar_launched")});try{await Promise.resolve(T()).catch(()=>void 0)}finally{S=!1,d()&&g()?f(c,m,o.runtimeConfig):p(E)}return}M(()=>{var e;return null==(e=o.onAction)?void 0:e.call(o,"ar_launched")}),M(T),d()&&g()?(e.preventDefault(),f(c,m,o.runtimeConfig)):p(E)};return C?(e.dataset.nativeLink=E,e.addEventListener("click",z)):e.addEventListener("click",x),s.register(()=>{k+=1,e.removeEventListener("click",x),e.removeEventListener("click",z),null==a||a(),null==n||n.remove(),null===l?e.removeAttribute("data-native-link"):e.setAttribute("data-native-link",l)})}async function B(){let[{ModelViewerDialog:e},{createElement:t},{createRoot:r}]=await Promise.all([Promise.all([a.e("759"),a.e("117"),a.e("872"),a.e("59"),a.e("548")]).then(a.bind(a,5535)),a.e("986").then(a.t.bind(a,9081,19)),Promise.all([a.e("117"),a.e("886")]).then(a.t.bind(a,8181,19))]);return{open:i=>{let{onClose:n,...a}=i,o=document.createElement("div");o.setAttribute("data-core-ar-model-viewer",""),document.body.appendChild(o);let s=r(o),l=!1,c=r=>s.render(t(e,{...a,onOpenChange:e=>{e||d()},open:r}));function d(){l||(l=!0,c(!1),setTimeout(()=>{s.unmount(),o.remove()},300),null==n||n())}return c(!0),d}}}let K=["cm","inch"],H=["x","y","z"],F=[...H],Q=w();function Y(e){return e&&K.includes(e)?e:"inch"}function J(e){if(!e)return F;let t=Array.from(new Set(e.split(",").map(e=>e.trim().toLowerCase()).filter(e=>H.includes(e))));return t.length>0?t:F}let X=w();function Z(e){if(null==e?void 0:e.aborted)throw new DOMException("Aborted","AbortError")}async function G(e){var t,r,i;let n,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=X(e),l=e.getAttribute("href"),c=e.getAttribute("rel"),d=null==(t=e.dataset.objectTinuuid)?void 0:t.trim(),h=(null==(r=e.dataset.objectHid)?void 0:r.trim())||void 0;if(!d)throw Error("Object ID is required");Z(o.signal);let g=o.loadObject??((e,t)=>U(e,t,o.runtimeConfig)),m=o.object??await g(d,o.signal);if(Z(o.signal),!s.isCurrent())return()=>void 0;let f=h?m.materials.find(e=>e.hid===h):m.materials[0];if(!(null==f||null==(i=f.native)?void 0:i.glbUrl)||!f.native.usdzUrl)throw Error("Native AR assets are unavailable");let w=v(f.native,m.type),y=u(),A=!1,E=0;e.rel="ar",e.querySelector("img")||((n=document.createElement("img")).alt="",n.hidden=!0,e.appendChild(n));let C=t=>{var r;t.preventDefault();let i=++E;null==a||a(),a=void 0,Promise.resolve((null==(r=o.getDesktopQrUrl)?void 0:r.call(o))??b(d,h,!1,o.runtimeConfig)).then(t=>{if(i===E&&s.isCurrent())return M(()=>{var e;return null==(e=o.onAction)?void 0:e.call(o,"interacted")}),O(t,`vizbl-${d}`,e,o.runtimeConfig)}).then(e=>{if(e){if(i!==E||!s.isCurrent())return void e();a=e}}).catch(()=>void 0)},S=()=>{M(o.trackView??(()=>V(d,o.runtimeConfig))),M(()=>{var e;return null==(e=o.onAction)?void 0:e.call(o,"ar_launched")})},I=async e=>{var t;if(!(null==(t=o.webAr)?void 0:t.isAvailable()))return void S();if(e.preventDefault(),A)return;A=!0;let r=!1;try{r=await o.webAr.open().catch(()=>!1)}finally{A=!1}!r&&s.isCurrent()&&(S(),p(w))};return y?(e.href=w,e.addEventListener("click",I)):(e.href="#",e.addEventListener("click",C)),s.register(()=>{E+=1,e.removeEventListener("click",C),e.removeEventListener("click",I),null==a||a(),null==n||n.remove(),null===l?e.removeAttribute("href"):e.setAttribute("href",l),null===c?e.removeAttribute("rel"):e.setAttribute("rel",c)})}async function ee(){let{ArDialog:e,prepareArSessionInPage:t}=await Promise.all([a.e("117"),a.e("59"),a.e("270"),a.e("152")]).then(a.bind(a,5907)),{createElement:r}=await a.e("986").then(a.t.bind(a,9081,19)),{createRoot:i}=await Promise.all([a.e("117"),a.e("886")]).then(a.t.bind(a,8181,19));return{open:t=>{let{onClose:n,...a}=t,o=document.createElement("div");o.setAttribute("data-core-ar-web-ar",""),document.body.appendChild(o);let s=i(o),l=!1,c=t=>s.render(r(e,{...a,onOpenChange:e=>{e||d()},open:t}));function d(){l||(l=!0,c(!1),setTimeout(()=>{s.unmount(),o.remove()},300),null==n||n())}return c(!0),d},prepare:t}}async function et(e){let t=await function(){if(n)return n;let e=ee();return n=e,e.catch(()=>{n===e&&(n=void 0)}),e}();return await t.prepare(e)?t:null}let er=["advanced-ar","ar-one-click","ar-viewer"],ei={arizo:"arizo-core",vizbl:"vizbl-core"},en=new Set(["core-ar","core-ar-shopify"]),ea={arizo:{"advanced-ar":"Посмотреть в расширенной AR","ar-one-click":"Посмотреть в AR","ar-viewer":"Посмотреть в 3D и AR"},vizbl:{"advanced-ar":"View in advanced AR","ar-one-click":"View in AR","ar-viewer":"View in 3D & AR"}},eo={"advanced-ar":"advanced-ar-view","ar-one-click":"ar-view","ar-viewer":"ar-viewer"},es=["api-key","camera-orbit","dev","dimension-axes","max-camera-orbit","min-camera-orbit","object-id","size-type","trigger-class","type","variant-id"],el=new Set(["API_UNAVAILABLE","INVALID_RESPONSE","NETWORK_ERROR","REQUEST_FAILED","SESSION_EXPIRED"]),ec="core-ar-widget-styles";class ed extends Error{constructor(e){super(e),(0,o._)(this,"code",void 0),this.code=e,this.name="CoreArWidgetComponentError"}}function eu(e){return er.includes(e)}function eh(e,t){let r=Array.isArray(e.materials)?e.materials:[],i=t?r.find(e=>e.hid===t):r[0];if(!i)throw new ed(t?"VARIANT_NOT_FOUND":"MODEL_UNAVAILABLE");return i}function eg(e,t){var r;if("ar-one-click"===e&&(null==(r=t.policy)?void 0:r.instantArView)===!1)throw new ed("POLICY_DENIED")}let em="u"<typeof HTMLElement?class{}:HTMLElement;class ev extends em{static get observedAttributes(){return[...es]}get triggerClass(){return this.getAttribute("trigger-class")??""}set triggerClass(e){let t="string"==typeof e?e.trim():"";t?this.setAttribute("trigger-class",t):this.removeAttribute("trigger-class")}get unstyled(){return this.hasAttribute("unstyled")}set unstyled(e){this.toggleAttribute("unstyled",!!e)}connectedCallback(){!function(){if(document.getElementById(ec))return;let e=document.createElement("style");e.id=ec,e.textContent=`
2
2
  :where(vizbl-core, arizo-core) {
3
3
  display: inline-block;
4
4
  --core-ar-widget-background: #3556f0;
@@ -90,4 +90,4 @@
90
90
  transform: rotate(360deg);
91
91
  }
92
92
  }
93
- `,document.head.appendChild(e)}(),this.captureCustomLabel(),this.queueInitialization()}disconnectedCallback(){var e,t;this.initializationRevision+=1,null==(e=this.abortController)||e.abort(),this.abortController=void 0,null==(t=this.cleanup)||t.call(this),this.cleanup=void 0,this.clearActionResetTimer()}attributeChangedCallback(e,t,r){if(t!==r){if("trigger-class"===e)return void this.applyTriggerClass();if(("api-key"===e||"dev"===e)&&(this.session=void 0),this.isConnected){var i,n;null==(i=this.abortController)||i.abort(),null==(n=this.cleanup)||n.call(this),this.cleanup=void 0,this.setState("loading"),this.queueInitialization()}}}captureCustomLabel(){if(null!==this.customLabelNodes)return;let e=Array.from(this.childNodes),t=e.some(e=>{var t;return e.nodeType!==Node.TEXT_NODE||!!(null==(t=e.textContent)?void 0:t.trim())});this.customLabelNodes=t?e:[]}queueInitialization(){this.queued||(this.queued=!0,queueMicrotask(()=>{this.queued=!1,this.isConnected&&this.initialize()}))}async initialize(){var e,t,r,i,n,o,a,s,l,d,u,g;let h=++this.initializationRevision;null==(e=this.abortController)||e.abort(),null==(t=this.cleanup)||t.call(this),this.cleanup=void 0,this.object=void 0,this.variantId=void 0,this.widgetMode=void 0,this.clearActionResetTimer();let m=new AbortController;this.abortController=m;let v=(null==(r=this.getAttribute("type"))?void 0:r.trim())??"",p=es(v)?v:"ar-viewer",f=(null==(i=this.getAttribute("object-id"))?void 0:i.trim())??"",b=(null==(n=this.getAttribute("variant-id"))?void 0:n.trim())||void 0,w=(null==(o=this.getAttribute("api-key"))?void 0:o.trim())??"",y=(null==(a=this.getAttribute("size-type"))?void 0:a.trim())||void 0,A=(null==(s=this.getAttribute("dimension-axes"))?void 0:s.trim())||void 0,E=(null==(l=this.getAttribute("camera-orbit"))?void 0:l.trim())||void 0,C=(null==(d=this.getAttribute("min-camera-orbit"))?void 0:d.trim())||void 0,S=(null==(u=this.getAttribute("max-camera-orbit"))?void 0:u.trim())||void 0;this.removeAttribute("data-error-code"),this.setState("loading"),this.renderTrigger(p);try{let e,t=this.resolveRuntimeConfig();if(!w)throw new ea("MISSING_API_KEY");if(!f)throw new ea("MISSING_OBJECT_ID");if(!es(v))throw new ea("INVALID_TYPE");if("ar-viewer"===v&&y&&"cm"!==y&&"inch"!==y)throw new ea("INVALID_SIZE_TYPE");let r=er[v],i=await this.ensureSession(w,t,r,m.signal);if(this.assertCurrent(h,m.signal),this.variantId=b,this.widgetMode=r,this.applyIntegrationData(f,b,y,A,E,C,S),"ar-viewer"===v)e=await N(f,m.signal,t),this.assertCurrent(h,m.signal),el(e,b),ed(v,e),this.object=e;else{e=c()?await this.fetchObjectWithSession(f,w,i,t,m.signal,b):await N(f,m.signal,t),this.assertCurrent(h,m.signal);let r=el(e,b);if(ed(v,e),!(null==(g=r.native)?void 0:g.glbUrl)||!r.native.usdzUrl)throw new ea("MODEL_UNAVAILABLE");this.object=e}let n=await this.initializeTrigger(v,e,t,m.signal,w,i);try{this.assertCurrent(h,m.signal)}catch(e){throw n(),e}this.cleanup=n,this.setState("ready"),this.dispatchWidgetEvent("core-ar-ready",{objectId:f,type:v})}catch(t){if(h!==this.initializationRevision||m.signal.aborted||t instanceof DOMException&&"AbortError"===t.name)return;let e=t instanceof ea||t instanceof O?t.code:"INITIALIZATION_FAILED";this.setAttribute("data-error-code",e),this.setState("error"),this.dispatchWidgetEvent("core-ar-error",{code:e,objectId:f,type:v})}}failInteraction(e,t){var r;this.isConnected&&(this.setAttribute("data-error-code",e),this.setState("error"),this.dispatchWidgetEvent("core-ar-error",{code:e,objectId:(null==(r=this.getAttribute("object-id"))?void 0:r.trim())??"",type:t}))}async ensureSession(e,t,r,i){var n;let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=`${t.apiOrigin}|${t.viewerOrigin}|${t.modelViewerOrigin}|${r}`,s=(null==(n=this.session)?void 0:n.publicKey)===e&&this.session.runtimeKey===a?this.session:void 0;if(s&&!o&&s.expiresAt-Date.now()>3e4)return s;if(s)try{let r=await R(e,s.token,{mode:s.mode,runtimeConfig:t,signal:i}),n={...s,...r,expiresAt:Date.now()+1e3*r.expiresIn};return this.session=n,n}catch(e){if(!(e instanceof O)||!en.has(e.code))throw e;this.session=void 0}let l=await _(e,{mode:r,runtimeConfig:t,signal:i});if(!ee.has(l.productType))throw new ea("POLICY_DENIED");let d={expiresAt:Date.now()+1e3*l.expiresIn,mode:r,productType:l.productType,publicKey:e,runtimeKey:a,sid:l.sid,token:l.token};return this.session=d,d}async fetchObjectWithSession(e,t,r,i,n,o){try{return await P(e,r.token,{runtimeConfig:i,signal:n,variantId:o})}catch(a){if(!(a instanceof O)||"SESSION_EXPIRED"!==a.code)throw a;return P(e,(await this.ensureSession(t,i,r.mode,n,!0)).token,{runtimeConfig:i,signal:n,variantId:o})}}assertCurrent(e,t){if(e!==this.initializationRevision||t.aborted)throw new DOMException("Aborted","AbortError")}renderTrigger(e){var t;let r="ar-one-click"===e?document.createElement("a"):document.createElement("button");if(r.dataset.coreArWidgetTrigger="",r.setAttribute("part","trigger"),r.addEventListener("click",e=>{"ready"!==this.dataset.state&&(e.preventDefault(),e.stopImmediatePropagation())}),r instanceof HTMLButtonElement&&(r.type="button"),r instanceof HTMLAnchorElement&&(r.href="#",r.rel="ar"),"ar-viewer"===e&&r.setAttribute("aria-haspopup","dialog"),"ar-viewer"!==e){let e=document.createElement("img");e.alt="",e.hidden=!0,r.appendChild(e)}let i=document.createElement("span");i.dataset.coreArWidgetLabel="",(null==(t=this.customLabelNodes)?void 0:t.length)?i.append(...this.customLabelNodes):i.textContent=et[this.resolveRuntimeConfig().brand][e],r.appendChild(i),this.trigger=r,this.applyTriggerClass(),this.replaceChildren(r),this.updateTriggerAccessibility(this.dataset.state)}applyTriggerClass(){if(!this.trigger)return;let e=this.triggerClass.trim();e?this.trigger.className=e:this.trigger.removeAttribute("class")}applyIntegrationData(e,t,r,i,n,o,a){this.trigger&&(this.trigger.dataset.objectTinuuid=e,t?this.trigger.dataset.objectHid=t:delete this.trigger.dataset.objectHid,r?this.trigger.dataset.sizeType=r:delete this.trigger.dataset.sizeType,i?this.trigger.dataset.dimensionAxes=i:delete this.trigger.dataset.dimensionAxes,n?this.trigger.dataset.cameraOrbit=n:delete this.trigger.dataset.cameraOrbit,o?this.trigger.dataset.minCameraOrbit=o:delete this.trigger.dataset.minCameraOrbit,a?this.trigger.dataset.maxCameraOrbit=a:delete this.trigger.dataset.maxCameraOrbit)}async initializeTrigger(e,t,r,n,o,a){if(!this.trigger)throw new ea("INITIALIZATION_FAILED");if("ar-viewer"===e){var l,d;let t,n,c,u;return l=this.trigger,d={apiKey:o,getWidgetSessionToken:async()=>(await this.ensureSession(o,r,a.mode)).token,lang:"arizo"===r.brand?"ru":"en",mode:a.mode,modelViewerOrigin:r.modelViewerOrigin,onAction:e=>this.handleAction(e,r),onClose:()=>{this.isConnected&&this.setState("ready")},onError:()=>this.failInteraction("VIEWER_UNAVAILABLE",e),onLoading:()=>this.setState("loading"),onOpen:()=>this.setState("opening"),viewer:{apiBaseUrl:r.apiOrigin},widgetSessionToken:a.token},n=F(l),c=!1,u=async()=>{var e,r;if(t||c)return;let o=null==(e=l.dataset.objectTinuuid)?void 0:e.trim();if(o){c=!0,U(()=>{var e;return null==(e=d.onLoading)?void 0:e.call(d)});try{let e=d.getWidgetSessionToken?await d.getWidgetSessionToken():d.widgetSessionToken,r=await function(){if(i)return i;let e=q();return i=e,e.catch(()=>{i===e&&(i=void 0)}),e}();if(t||!n.isCurrent())return;let a=d.modelViewerOrigin??s().modelViewerOrigin,c=!1;t=r.open({apiBaseUrl:d.viewer.apiBaseUrl,apiKey:d.apiKey,cameraOrbit:l.dataset.cameraOrbit,dimensionAxes:Q(l.dataset.dimensionAxes),handoffUrl:new URL("/model-viewer",a).toString(),hid:l.dataset.objectHid,initialWidgetSessionToken:e,lang:d.lang,maxCameraOrbit:l.dataset.maxCameraOrbit,minCameraOrbit:l.dataset.minCameraOrbit,mode:d.mode,onClose:()=>{var e;c||(c=!0,t=void 0,null==(e=d.onClose)||e.call(d),l.focus({preventScroll:!0}))},sizeType:K(l.dataset.sizeType),tinuuid:o})}catch(e){n.isCurrent()&&U(()=>{var t;return null==(t=d.onError)?void 0:t.call(d,e)});return}finally{c=!1}null==(r=d.onOpen)||r.call(d),U(()=>{var e;return null==(e=d.onAction)?void 0:e.call(d,"widget_opened")})}},l.addEventListener("click",u),n.register(()=>{l.removeEventListener("click",u),null==t||t(),t=void 0})}if(!t)throw new ea("INITIALIZATION_FAILED");let c={getDesktopQrUrl:async()=>{var e,t,i,n,l,d,c;let u,g,h,m=await this.ensureSession(o,r,a.mode);return u=new URL("/model-viewer",(c={apiKey:o,cameraOrbit:null==(e=this.trigger)?void 0:e.dataset.cameraOrbit,dimensionAxes:Q(null==(t=this.trigger)?void 0:t.dataset.dimensionAxes),hid:this.variantId,lang:"arizo"===r.brand?"ru":"en",maxCameraOrbit:null==(i=this.trigger)?void 0:i.dataset.maxCameraOrbit,minCameraOrbit:null==(n=this.trigger)?void 0:n.dataset.minCameraOrbit,mode:m.mode,modelViewerOrigin:r.modelViewerOrigin,sizeType:K(null==(l=this.trigger)?void 0:l.dataset.sizeType),tinuuid:(null==(d=this.trigger)?void 0:d.dataset.objectTinuuid)??"",widgetSessionToken:m.token}).modelViewerOrigin??s().modelViewerOrigin),g=c.dimensionAxes??H,u.searchParams.set("tinuuid",c.tinuuid),c.hid&&u.searchParams.set("hid",c.hid),u.searchParams.set("size-type",c.sizeType),g.length<H.length&&u.searchParams.set("dimension-axes",g.join(",")),c.cameraOrbit&&u.searchParams.set("camera-orbit",c.cameraOrbit),c.minCameraOrbit&&u.searchParams.set("min-camera-orbit",c.minCameraOrbit),c.maxCameraOrbit&&u.searchParams.set("max-camera-orbit",c.maxCameraOrbit),c.lang&&u.searchParams.set("lang",c.lang),h=new URLSearchParams,c.apiKey&&h.set("api-key",c.apiKey),c.mode&&h.set("mode",c.mode),c.widgetSessionToken&&h.set("widget-session-token",c.widgetSessionToken),u.hash=h.toString(),u.toString()},object:t,onAction:e=>this.handleAction(e,r),runtimeConfig:r,signal:n,trackView:()=>this.trackEvent("ar_launched",r)};if("ar-one-click"===e){if(!(this.trigger instanceof HTMLAnchorElement))throw new ea("INITIALIZATION_FAILED");return X(this.trigger,c)}return $(this.trigger,c)}handleAction(e,t){this.setState("opening"),("interacted"===e||"widget_opened"===e)&&"ar-viewer"!==this.getAttribute("type")&&this.trackEvent(e,t),"ar-viewer"!==this.getAttribute("type")&&(this.clearActionResetTimer(),this.actionResetTimer=window.setTimeout(()=>{this.isConnected&&this.setState("ready")},300))}async trackEvent(e,t){var r,i;let n=null==(r=this.getAttribute("api-key"))?void 0:r.trim(),o=this.widgetMode;if(n&&o&&this.isConnected)try{let r=await this.ensureSession(n,t,o);await j(e,r.token,null==(i=this.object)?void 0:i.uuid,{runtimeConfig:t,variantId:this.variantId})}catch{}}clearActionResetTimer(){void 0!==this.actionResetTimer&&(window.clearTimeout(this.actionResetTimer),this.actionResetTimer=void 0)}setState(e){this.dataset.state=e,this.updateTriggerAccessibility(e)}updateTriggerAccessibility(e){if(!this.trigger)return;let t="ready"===e;this.trigger.setAttribute("aria-busy",String("loading"===e)),this.trigger.setAttribute("aria-disabled",String(!t)),this.trigger.tabIndex=t?0:-1,this.trigger instanceof HTMLButtonElement&&(this.trigger.disabled=!t)}dispatchWidgetEvent(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t}))}constructor(...e){super(...e),(0,n._)(this,"abortController",void 0),(0,n._)(this,"actionResetTimer",void 0),(0,n._)(this,"cleanup",void 0),(0,n._)(this,"customLabelNodes",null),(0,n._)(this,"initializationRevision",0),(0,n._)(this,"object",void 0),(0,n._)(this,"queued",!1),(0,n._)(this,"session",void 0),(0,n._)(this,"trigger",void 0),(0,n._)(this,"variantId",void 0),(0,n._)(this,"widgetMode",void 0)}}function eg(e){if("u"<typeof customElements)return;let t=G[e],r=customElements.get(t);if(r)return r;class i extends eu{resolveRuntimeConfig(){return function(e){var t;let r,i,n,o,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"prod",d="arizo"===e?"arizo.ru":"vizbl.com",c="dev"===l?"-dev":"";return r=a((t={apiOrigin:`https://api${c}.${d}`,modelViewerOrigin:`https://integrations${c}.${d}`,viewerOrigin:`https://viewer${c}.${d}`}).apiOrigin,"apiOrigin"),i=a(t.viewerOrigin,"viewerOrigin"),s=t.modelViewerOrigin?a(t.modelViewerOrigin,"modelViewerOrigin"):(o=(n=new URL(i)).hostname.match(/^viewer(-dev)?\.(vizbl\.com|arizo\.ru)$/))?`${n.protocol}//integrations${o[1]??""}.${o[2]}`:i,{apiOrigin:r,brand:new URL(i).hostname.endsWith("arizo.ru")?"arizo":"vizbl",fetchImpl:t.fetchImpl??fetch,modelViewerOrigin:s,qrCodeScriptUrl:t.qrCodeScriptUrl??`${i}/vendor/qrcode.min.js`,viewerOrigin:i}}(e,this.hasAttribute("dev")?"dev":"prod")}}return customElements.define(t,i),i}eg("arizo"),eg("vizbl")})()})();
93
+ `,document.head.appendChild(e)}(),this.captureCustomLabel(),this.queueInitialization()}disconnectedCallback(){var e,t;this.initializationRevision+=1,null==(e=this.abortController)||e.abort(),this.abortController=void 0,null==(t=this.cleanup)||t.call(this),this.cleanup=void 0,this.clearActionResetTimer()}attributeChangedCallback(e,t,r){if(t!==r){if("trigger-class"===e)return void this.applyTriggerClass();if(("api-key"===e||"dev"===e)&&(this.session=void 0),this.isConnected){var i,n;null==(i=this.abortController)||i.abort(),null==(n=this.cleanup)||n.call(this),this.cleanup=void 0,this.setState("loading"),this.queueInitialization()}}}captureCustomLabel(){if(null!==this.customLabelNodes)return;let e=Array.from(this.childNodes),t=e.some(e=>{var t;return e.nodeType!==Node.TEXT_NODE||!!(null==(t=e.textContent)?void 0:t.trim())});this.customLabelNodes=t?e:[]}queueInitialization(){this.queued||(this.queued=!0,queueMicrotask(()=>{this.queued=!1,this.isConnected&&this.initialize()}))}async initialize(){var e,t,r,i,n,a,o,s,l,c,d,h;let g=++this.initializationRevision;null==(e=this.abortController)||e.abort(),null==(t=this.cleanup)||t.call(this),this.cleanup=void 0,this.object=void 0,this.variantId=void 0,this.widgetMode=void 0,this.clearActionResetTimer();let m=new AbortController;this.abortController=m;let v=(null==(r=this.getAttribute("type"))?void 0:r.trim())??"",p=eu(v)?v:"ar-viewer",f=(null==(i=this.getAttribute("object-id"))?void 0:i.trim())??"",b=(null==(n=this.getAttribute("variant-id"))?void 0:n.trim())||void 0,w=(null==(a=this.getAttribute("api-key"))?void 0:a.trim())??"",y=(null==(o=this.getAttribute("size-type"))?void 0:o.trim())||void 0,A=(null==(s=this.getAttribute("dimension-axes"))?void 0:s.trim())||void 0,E=(null==(l=this.getAttribute("camera-orbit"))?void 0:l.trim())||void 0,C=(null==(c=this.getAttribute("min-camera-orbit"))?void 0:c.trim())||void 0,O=(null==(d=this.getAttribute("max-camera-orbit"))?void 0:d.trim())||void 0;this.removeAttribute("data-error-code"),this.setState("loading"),this.renderTrigger(p);try{let e,t=this.resolveRuntimeConfig();if(!w)throw new ed("MISSING_API_KEY");if(!f)throw new ed("MISSING_OBJECT_ID");if(!eu(v))throw new ed("INVALID_TYPE");if("ar-viewer"===v&&y&&"cm"!==y&&"inch"!==y)throw new ed("INVALID_SIZE_TYPE");let r=eo[v],i=await this.ensureSession(w,t,r,m.signal);if(this.assertCurrent(g,m.signal),this.variantId=b,this.widgetMode=r,this.applyIntegrationData(f,b,y,A,E,C,O),"ar-viewer"===v)e=await U(f,m.signal,t),this.assertCurrent(g,m.signal),eh(e,b),eg(v,e),this.object=e;else{e=u()?await this.fetchObjectWithSession(f,w,i,t,m.signal,b):await U(f,m.signal,t),this.assertCurrent(g,m.signal);let r=eh(e,b);if(eg(v,e),!(null==(h=r.native)?void 0:h.glbUrl)||!r.native.usdzUrl)throw new ed("MODEL_UNAVAILABLE");this.object=e}let n=await this.initializeTrigger(v,e,t,m.signal,w,i);try{this.assertCurrent(g,m.signal)}catch(e){throw n(),e}this.cleanup=()=>{var e;n(),null==(e=this.closeWebAr)||e.call(this)},this.setState("ready"),this.dispatchWidgetEvent("core-ar-ready",{objectId:f,type:v})}catch(t){if(g!==this.initializationRevision||m.signal.aborted||t instanceof DOMException&&"AbortError"===t.name)return;let e=t instanceof ed||t instanceof S?t.code:"INITIALIZATION_FAILED";this.setAttribute("data-error-code",e),this.setState("error"),this.dispatchWidgetEvent("core-ar-error",{code:e,objectId:f,type:v})}}failInteraction(e,t){var r;this.isConnected&&(this.setAttribute("data-error-code",e),this.setState("error"),this.dispatchWidgetEvent("core-ar-error",{code:e,objectId:(null==(r=this.getAttribute("object-id"))?void 0:r.trim())??"",type:t}))}async ensureSession(e,t,r,i){var n;let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=`${t.apiOrigin}|${t.viewerOrigin}|${t.modelViewerOrigin}|${r}`,s=(null==(n=this.session)?void 0:n.publicKey)===e&&this.session.runtimeKey===o?this.session:void 0;if(s&&!a&&s.expiresAt-Date.now()>3e4)return s;if(s)try{let r=await j(e,s.token,{mode:s.mode,runtimeConfig:t,signal:i}),n={...s,...r,expiresAt:Date.now()+1e3*r.expiresIn};return this.session=n,n}catch(e){if(!(e instanceof S)||!el.has(e.code))throw e;this.session=void 0}let l=await R(e,{mode:r,runtimeConfig:t,signal:i});if(!en.has(l.productType))throw new ed("POLICY_DENIED");let c={expiresAt:Date.now()+1e3*l.expiresIn,mode:r,productType:l.productType,publicKey:e,runtimeKey:o,sid:l.sid,token:l.token};return this.session=c,c}async fetchObjectWithSession(e,t,r,i,n,a){try{return await N(e,r.token,{runtimeConfig:i,signal:n,variantId:a})}catch(o){if(!(o instanceof S)||"SESSION_EXPIRED"!==o.code)throw o;return N(e,(await this.ensureSession(t,i,r.mode,n,!0)).token,{runtimeConfig:i,signal:n,variantId:a})}}assertCurrent(e,t){if(e!==this.initializationRevision||t.aborted)throw new DOMException("Aborted","AbortError")}renderTrigger(e){var t;let r="ar-one-click"===e?document.createElement("a"):document.createElement("button");if(r.dataset.coreArWidgetTrigger="",r.setAttribute("part","trigger"),r.addEventListener("click",e=>{"ready"!==this.dataset.state&&(e.preventDefault(),e.stopImmediatePropagation())}),r instanceof HTMLButtonElement&&(r.type="button"),r instanceof HTMLAnchorElement&&(r.href="#",r.rel="ar"),"ar-viewer"===e&&r.setAttribute("aria-haspopup","dialog"),"ar-viewer"!==e){let e=document.createElement("img");e.alt="",e.hidden=!0,r.appendChild(e)}let i=document.createElement("span");i.dataset.coreArWidgetLabel="",(null==(t=this.customLabelNodes)?void 0:t.length)?i.append(...this.customLabelNodes):i.textContent=ea[this.resolveRuntimeConfig().brand][e],r.appendChild(i),this.trigger=r,this.applyTriggerClass(),this.replaceChildren(r),this.updateTriggerAccessibility(this.dataset.state)}applyTriggerClass(){if(!this.trigger)return;let e=this.triggerClass.trim();e?this.trigger.className=e:this.trigger.removeAttribute("class")}applyIntegrationData(e,t,r,i,n,a,o){this.trigger&&(this.trigger.dataset.objectTinuuid=e,t?this.trigger.dataset.objectHid=t:delete this.trigger.dataset.objectHid,r?this.trigger.dataset.sizeType=r:delete this.trigger.dataset.sizeType,i?this.trigger.dataset.dimensionAxes=i:delete this.trigger.dataset.dimensionAxes,n?this.trigger.dataset.cameraOrbit=n:delete this.trigger.dataset.cameraOrbit,a?this.trigger.dataset.minCameraOrbit=a:delete this.trigger.dataset.minCameraOrbit,o?this.trigger.dataset.maxCameraOrbit=o:delete this.trigger.dataset.maxCameraOrbit)}async initializeTrigger(e,t,r,n,a,o){if(!this.trigger)throw new ed("INITIALIZATION_FAILED");if("ar-viewer"===e){var s,c;let t,d,u,h;return s=this.trigger,c={apiKey:a,getWidgetSessionToken:async()=>(await this.ensureSession(a,r,o.mode)).token,lang:"arizo"===r.brand?"ru":"en",launchAr:ep()?e=>this.openWebAr({apiBaseUrl:e.apiBaseUrl??r.apiOrigin,apiKey:e.apiKey??a,hid:e.hid,language:e.lang,name:e.name,tinuuid:e.tinuuid},()=>e.widgetSessionToken,()=>!n.aborted):void 0,mode:o.mode,modelViewerOrigin:r.modelViewerOrigin,onAction:e=>this.handleAction(e,r),onClose:()=>{this.isConnected&&this.setState("ready")},onError:()=>this.failInteraction("VIEWER_UNAVAILABLE",e),onLoading:()=>this.setState("loading"),onOpen:()=>this.setState("opening"),viewer:{apiBaseUrl:r.apiOrigin},widgetSessionToken:o.token},d=Q(s),u=!1,h=async()=>{var e,r;if(t||u)return;let n=null==(e=s.dataset.objectTinuuid)?void 0:e.trim();if(n){u=!0,M(()=>{var e;return null==(e=c.onLoading)?void 0:e.call(c)});try{let e=c.getWidgetSessionToken?await c.getWidgetSessionToken():c.widgetSessionToken,r=await function(){if(i)return i;let e=B();return i=e,e.catch(()=>{i===e&&(i=void 0)}),e}();if(t||!d.isCurrent())return;let a=c.modelViewerOrigin??l().modelViewerOrigin,o=!1;t=r.open({apiBaseUrl:c.viewer.apiBaseUrl,apiKey:c.apiKey,cameraOrbit:s.dataset.cameraOrbit,dimensionAxes:J(s.dataset.dimensionAxes),handoffUrl:new URL("/model-viewer",a).toString(),hid:s.dataset.objectHid,initialWidgetSessionToken:e,lang:c.lang,launchAr:c.launchAr,maxCameraOrbit:s.dataset.maxCameraOrbit,minCameraOrbit:s.dataset.minCameraOrbit,mode:c.mode,onClose:()=>{var e;o||(o=!0,t=void 0,null==(e=c.onClose)||e.call(c),s.focus({preventScroll:!0}))},sizeType:Y(s.dataset.sizeType),tinuuid:n})}catch(e){d.isCurrent()&&M(()=>{var t;return null==(t=c.onError)?void 0:t.call(c,e)});return}finally{u=!1}null==(r=c.onOpen)||r.call(c),M(()=>{var e;return null==(e=c.onAction)?void 0:e.call(c,"widget_opened")})}},s.addEventListener("click",h),d.register(()=>{s.removeEventListener("click",h),null==t||t(),t=void 0})}if(!t)throw new ed("INITIALIZATION_FAILED");let d={getDesktopQrUrl:async()=>{var e,t,i,n,s,c,d;let u,h,g,m=await this.ensureSession(a,r,o.mode);return u=new URL("/model-viewer",(d={apiKey:a,cameraOrbit:null==(e=this.trigger)?void 0:e.dataset.cameraOrbit,dimensionAxes:J(null==(t=this.trigger)?void 0:t.dataset.dimensionAxes),hid:this.variantId,lang:"arizo"===r.brand?"ru":"en",maxCameraOrbit:null==(i=this.trigger)?void 0:i.dataset.maxCameraOrbit,minCameraOrbit:null==(n=this.trigger)?void 0:n.dataset.minCameraOrbit,mode:m.mode,modelViewerOrigin:r.modelViewerOrigin,sizeType:Y(null==(s=this.trigger)?void 0:s.dataset.sizeType),tinuuid:(null==(c=this.trigger)?void 0:c.dataset.objectTinuuid)??"",widgetSessionToken:m.token}).modelViewerOrigin??l().modelViewerOrigin),h=d.dimensionAxes??F,u.searchParams.set("tinuuid",d.tinuuid),d.hid&&u.searchParams.set("hid",d.hid),u.searchParams.set("size-type",d.sizeType),h.length<F.length&&u.searchParams.set("dimension-axes",h.join(",")),d.cameraOrbit&&u.searchParams.set("camera-orbit",d.cameraOrbit),d.minCameraOrbit&&u.searchParams.set("min-camera-orbit",d.minCameraOrbit),d.maxCameraOrbit&&u.searchParams.set("max-camera-orbit",d.maxCameraOrbit),d.lang&&u.searchParams.set("lang",d.lang),g=new URLSearchParams,d.apiKey&&g.set("api-key",d.apiKey),d.mode&&g.set("mode",d.mode),d.widgetSessionToken&&g.set("widget-session-token",d.widgetSessionToken),u.hash=g.toString(),u.toString()},object:t,onAction:e=>this.handleAction(e,r),runtimeConfig:r,signal:n,trackView:()=>this.trackEvent("ar_launched",r),webAr:this.createWebArLauncher(t,a,r,o.mode,n)};if("ar-one-click"===e){if(!(this.trigger instanceof HTMLAnchorElement))throw new ed("INITIALIZATION_FAILED");return G(this.trigger,d)}return q(this.trigger,d)}createWebArLauncher(e,t,r,i,n){let a=()=>!n.aborted;return{isAvailable:ep,open:async()=>{var n;this.setState("loading");let o=await this.openWebAr({apiBaseUrl:r.apiOrigin,apiKey:t,hid:this.variantId,language:"arizo"===r.brand?"ru":"en",name:"string"==typeof e.name?e.name:void 0,onClose:()=>{a()&&this.setState("ready")},tinuuid:(null==(n=this.trigger)?void 0:n.dataset.objectTinuuid)??e.tinuuid},async()=>(await this.ensureSession(t,r,i)).token,a);return a()&&this.setState(o?"opening":"ready"),o}}}async openWebAr(e,t,r){var i,n;let a=null==(i=e.tinuuid)?void 0:i.trim();if(!a)return!1;let[o,s]=await (function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;return new Promise((r,i)=>{let n=setTimeout(()=>r(null),t);e.then(e=>{clearTimeout(n),r(e)},e=>{clearTimeout(n),i(e)})})})(Promise.all([et(a),Promise.resolve().then(t)])).catch(()=>null)??[];if(!o||!this.isConnected||!r())return!1;null==(n=this.closeWebAr)||n.call(this);let l=o.open({...e,initialWidgetSessionToken:s,onClose:()=>{var t;this.closeWebAr===l&&(this.closeWebAr=void 0),null==(t=e.onClose)||t.call(e)}});return this.closeWebAr=l,!0}handleAction(e,t){this.setState("opening"),("interacted"===e||"widget_opened"===e)&&"ar-viewer"!==this.getAttribute("type")&&this.trackEvent(e,t),"ar-viewer"!==this.getAttribute("type")&&(this.clearActionResetTimer(),this.actionResetTimer=window.setTimeout(()=>{this.isConnected&&this.setState("ready")},300))}async trackEvent(e,t){var r,i;let n=null==(r=this.getAttribute("api-key"))?void 0:r.trim(),a=this.widgetMode;if(n&&a&&this.isConnected)try{let r=await this.ensureSession(n,t,a);await D(e,r.token,null==(i=this.object)?void 0:i.uuid,{runtimeConfig:t,variantId:this.variantId})}catch{}}clearActionResetTimer(){void 0!==this.actionResetTimer&&(window.clearTimeout(this.actionResetTimer),this.actionResetTimer=void 0)}setState(e){this.dataset.state=e,this.updateTriggerAccessibility(e)}updateTriggerAccessibility(e){if(!this.trigger)return;let t="ready"===e;this.trigger.setAttribute("aria-busy",String("loading"===e)),this.trigger.setAttribute("aria-disabled",String(!t)),this.trigger.tabIndex=t?0:-1,this.trigger instanceof HTMLButtonElement&&(this.trigger.disabled=!t)}dispatchWidgetEvent(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t}))}constructor(...e){super(...e),(0,o._)(this,"abortController",void 0),(0,o._)(this,"actionResetTimer",void 0),(0,o._)(this,"cleanup",void 0),(0,o._)(this,"closeWebAr",void 0),(0,o._)(this,"customLabelNodes",null),(0,o._)(this,"initializationRevision",0),(0,o._)(this,"object",void 0),(0,o._)(this,"queued",!1),(0,o._)(this,"session",void 0),(0,o._)(this,"trigger",void 0),(0,o._)(this,"variantId",void 0),(0,o._)(this,"widgetMode",void 0)}}function ep(){return u()&&!d()}function ef(e){if("u"<typeof customElements)return;let t=ei[e],r=customElements.get(t);if(r)return r;class i extends ev{resolveRuntimeConfig(){return function(e){var t;let r,i,n,a,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"prod",c="arizo"===e?"arizo.ru":"vizbl.com",d="dev"===l?"-dev":"";return r=s((t={apiOrigin:`https://api${d}.${c}`,modelViewerOrigin:`https://integrations${d}.${c}`,viewerOrigin:`https://viewer${d}.${c}`}).apiOrigin,"apiOrigin"),i=s(t.viewerOrigin,"viewerOrigin"),o=t.modelViewerOrigin?s(t.modelViewerOrigin,"modelViewerOrigin"):(a=(n=new URL(i)).hostname.match(/^viewer(-dev)?\.(vizbl\.com|arizo\.ru)$/))?`${n.protocol}//integrations${a[1]??""}.${a[2]}`:i,{apiOrigin:r,brand:new URL(i).hostname.endsWith("arizo.ru")?"arizo":"vizbl",fetchImpl:t.fetchImpl??fetch,modelViewerOrigin:o,qrCodeScriptUrl:t.qrCodeScriptUrl??`${i}/vendor/qrcode.min.js`,viewerOrigin:i}}(e,this.hasAttribute("dev")?"dev":"prod")}}return customElements.define(t,i),i}ef("arizo"),ef("vizbl")})()})();