@ysolve/ocity-heritage-visualizer 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- (function(B,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(B=typeof globalThis<"u"?globalThis:B||self,p(B.OCityHeritageVisualizer={},B["react/jsx-runtime"],B.React))})(this,function(B,p,g){"use strict";var Cr=Object.defineProperty;var xr=(B,p,g)=>p in B?Cr(B,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):B[p]=g;var De=(B,p,g)=>xr(B,typeof p!="symbol"?p+"":p,g);const Ut={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_DEBUG_MODE:"true",VITE_DEFAULT_IMAGE_URL:"https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png",VITE_GOOGLE_TRANSLATE_BASE:"https://translate.googleapis.com/translate_a/single",VITE_IMAGE_BASE_URL:"https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/",VITE_QWEN_TTS_API_URL:"https://playground-tts.o-city.org"};function oe(e,t=!0){const n=Ut[e];if(!n&&t)throw new Error(`❌ Missing required env variable: ${e}`);return n??""}const Se={NODE_ENV:"production",QWEN_TTS_API_URL:oe("VITE_QWEN_TTS_API_URL"),DEBUG_MODE:!0,GOOGLE_TRANSLATE_BASE:oe("VITE_GOOGLE_TRANSLATE_BASE"),IMAGE_BASE_URL:oe("VITE_IMAGE_BASE_URL"),DEFAULT_IMAGE_URL:oe("VITE_DEFAULT_IMAGE_URL")};async function je(e,t){if(!e.trim())return e;try{const n=`${Se.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`,r=await fetch(n);if(!r.ok)throw new Error(`Error en la traducción: ${r.status}`);const s=await r.json();return s&&Array.isArray(s[0])?s[0].map(i=>i[0]).join(""):e}catch(n){return console.error("Error al traducir:",n),e}}function Te(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ft(e,t){let n;const r=()=>{if(n)return n;const s=indexedDB.open(e);return s.onupgradeneeded=()=>s.result.createObjectStore(t),n=Te(s),n.then(i=>{i.onclose=()=>n=void 0},()=>{}),n};return(s,i)=>r().then(o=>i(o.transaction(t,s).objectStore(t)))}let _e;function Me(){return _e||(_e=Ft("keyval-store","keyval")),_e}function It(e,t=Me()){return t("readonly",n=>Te(n.get(e)))}function Dt(e,t,n=Me()){return n("readwrite",r=>(r.put(t,e),Te(r.transaction)))}async function jt(e){return await It(e)??null}async function Mt(e,t){await Dt(e,t)}function $e(e,t){return function(){return e.apply(t,arguments)}}const{toString:$t}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:ie,toStringTag:qe}=Symbol,ae=(e=>t=>{const n=$t.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>ae(t)===e),ce=e=>t=>typeof t===e,{isArray:Q}=Array,Y=ce("undefined");function qt(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ze=I("ArrayBuffer");function zt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ze(e.buffer),t}const Ht=ce("string"),P=ce("function"),He=ce("number"),le=e=>e!==null&&typeof e=="object",Vt=e=>e===!0||e===!1,ue=e=>{if(ae(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qe in e)&&!(ie in e)},Wt=I("Date"),Jt=I("File"),Gt=I("Blob"),Qt=I("FileList"),Kt=e=>le(e)&&P(e.pipe),Xt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ae(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Zt=I("URLSearchParams"),[Yt,en,tn,nn]=["ReadableStream","Request","Response","Headers"].map(I),rn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Q(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,We=e=>!Y(e)&&e!==z;function Re(){const{caseless:e}=We(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ve(t,s)||s;ue(t[i])&&ue(r)?t[i]=Re(t[i],r):ue(r)?t[i]=Re({},r):Q(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ee(arguments[r],n);return t}const sn=(e,t,n,{allOwnKeys:r}={})=>(ee(t,(s,i)=>{n&&P(s)?e[i]=$e(s,n):e[i]=s},{allOwnKeys:r}),e),on=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),an=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},cn=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ln=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},un=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!He(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),fn=(e,t)=>{const r=(e&&e[ie]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},pn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=I("HTMLFormElement"),mn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Je=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wn=I("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},gn=e=>{Ge(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},En=()=>{},bn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sn(e){return!!(e&&P(e.append)&&e[qe]==="FormData"&&e[ie])}const Tn=e=>{const t=new Array(10),n=(r,s)=>{if(le(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Q(r)?[]:{};return ee(r,(o,c)=>{const l=n(o,s+1);!Y(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},_n=I("AsyncFunction"),An=e=>e&&(le(e)||P(e))&&P(e.then)&&P(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:i})=>{s===z&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(z.postMessage)),Rn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Qe,a={isArray:Q,isArrayBuffer:ze,isBuffer:qt,isFormData:Xt,isArrayBufferView:zt,isString:Ht,isNumber:He,isBoolean:Vt,isObject:le,isPlainObject:ue,isReadableStream:Yt,isRequest:en,isResponse:tn,isHeaders:nn,isUndefined:Y,isDate:Wt,isFile:Jt,isBlob:Gt,isRegExp:wn,isFunction:P,isStream:Kt,isURLSearchParams:Zt,isTypedArray:dn,isFileList:Qt,forEach:ee,merge:Re,extend:sn,trim:rn,stripBOM:on,inherits:an,toFlatObject:cn,kindOf:ae,kindOfTest:I,endsWith:ln,toArray:un,forEachEntry:fn,matchAll:pn,isHTMLForm:hn,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:Ge,freezeMethods:gn,toObjectSet:yn,toCamelCase:mn,noop:En,toFiniteNumber:bn,findKey:Ve,global:z,isContextDefined:We,isSpecCompliantForm:Sn,toJSONObject:Tn,isAsyncFn:_n,isThenable:An,setImmediate:Qe,asap:Rn,isIterable:e=>e!=null&&P(e[ie])};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ke=y.prototype,Xe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xe[e]={value:e}}),Object.defineProperties(y,Xe),Object.defineProperty(Ke,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ke);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const On=null;function Oe(e){return a.isPlainObject(e)||a.isArray(e)}function Ze(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ze(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function vn(e){return a.isArray(e)&&!e.some(Oe)}const Cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function de(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!a.isUndefined(m[w])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(a.isBoolean(h))return h.toString();if(!l&&a.isBlob(h))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,w,m){let _=h;if(h&&!m&&typeof h=="object"){if(a.endsWith(w,"{}"))w=r?w:w.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&vn(h)||(a.isFileList(h)||a.endsWith(w,"[]"))&&(_=a.toArray(h)))return w=Ze(w),_.forEach(function(T,L){!(a.isUndefined(T)||T===null)&&t.append(o===!0?Ye([w],L,i):o===null?w:w+"[]",u(T))}),!1}return Oe(h)?!0:(t.append(Ye(m,w,i),u(h)),!1)}const f=[],E=Object.assign(Cn,{defaultVisitor:d,convertValue:u,isVisitable:Oe});function S(h,w){if(!a.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(h),a.forEach(h,function(_,R){(!(a.isUndefined(_)||_===null)&&s.call(t,_,a.isString(R)?R.trim():R,w,E))===!0&&S(_,w?w.concat(R):[R])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ve(e,t){this._pairs=[],e&&de(e,this,t)}const tt=ve.prototype;tt.append=function(t,n){this._pairs.push([t,n])},tt.toString=function(t){const n=t?function(r){return t.call(this,r,et)}:et;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||xn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new ve(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ln={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ve,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",xe=typeof navigator=="object"&&navigator||void 0,Bn=Ce&&(!xe||["ReactNative","NativeScript","NS"].indexOf(xe.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kn=Ce&&window.location.href||"http://localhost",N={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Bn,hasStandardBrowserWebWorkerEnv:Nn,navigator:xe,origin:kn},Symbol.toStringTag,{value:"Module"})),...Ln};function Pn(e,t){return de(e,new N.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return N.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Fn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Un(r),s,n,0)}),n}return null}function In(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const te={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return de(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),In(t)):t}],transformResponse:[function(t){const n=this.transitional||te.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{te.headers[e]={}});const Dn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jn=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Dn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function fe(e){return e===!1||e==null?e:a.isArray(e)?e.map(fe):String(e)}function Mn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $n=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function qn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,l,u){const d=ne(l);if(!d)throw new Error("header name must be a non-empty string");const f=a.findKey(s,d);(!f||s[f]===void 0||u===!0||u===void 0&&s[f]!==!1)&&(s[f||l]=fe(c))}const o=(c,l)=>a.forEach(c,(u,d)=>i(u,d,l));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!$n(t))o(jn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},l,u;for(const d of t){if(!a.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[u=d[0]]=(l=c[u])?a.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ne(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Mn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ne(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ne(o),o){const c=a.findKey(r,o);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Le(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=fe(s),delete n[i];return}const c=t?qn(i):String(i).trim();c!==i&&delete n[i],n[c]=fe(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=ne(o);r[c]||(zn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(U.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(U);function Be(e,t){const n=this||te,r=t||n,s=U.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function at(e){return!!(e&&e.__CANCEL__)}function K(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(K,y,{__CANCEL__:!0});function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[i];o||(o=u),n[s]=l,r[s]=u;let f=i,E=0;for(;f!==s;)E+=n[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const S=d&&u-d;return S?Math.round(E*1e3/S):void 0}}function Wn(e,t){let n=0,r=1e3/t,s,i;const o=(u,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-f)))},()=>s&&o(s)]}const pe=(e,t,n=3)=>{let r=0;const s=Vn(50,250);return Wn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),d=o<=c;r=o;const f={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},lt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ut=e=>(...t)=>a.asap(()=>e(...t)),Jn=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,Gn=N.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dt(e,t,n){let r=!Qn(t);return e&&(r||n==!1)?Kn(e,t):t}const ft=e=>e instanceof U?{...e}:e;function H(e,t){t=t||{};const n={};function r(u,d,f,E){return a.isPlainObject(u)&&a.isPlainObject(d)?a.merge.call({caseless:E},u,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function s(u,d,f,E){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u,f,E)}else return r(u,d,f,E)}function i(u,d){if(!a.isUndefined(d))return r(void 0,d)}function o(u,d){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function c(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,d,f)=>s(ft(u),ft(d),f,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||s,E=f(e[d],t[d],d);a.isUndefined(E)&&f!==c||(n[d]=E)}),n}const pt=e=>{const t=H({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;t.headers=o=U.from(o),t.url=nt(dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(N.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Jn(t.url))){const u=s&&i&&Gn.read(i);u&&o.set(s,u)}return t},Xn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=pt(e);let i=s.data;const o=U.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=s,d,f,E,S,h;function w(){S&&S(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function _(){if(!m)return;const T=U.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),v={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};ct(function(D){n(D),w()},function(D){r(D),w()},v),m=null}"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(_)},m.onabort=function(){m&&(r(new y("Request aborted",y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let L=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const v=s.transitional||st;s.timeoutErrorMessage&&(L=s.timeoutErrorMessage),r(new y(L,v.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&a.forEach(o.toJSON(),function(L,v){m.setRequestHeader(v,L)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),u&&([E,h]=pe(u,!0),m.addEventListener("progress",E)),l&&m.upload&&([f,S]=pe(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(d=T=>{m&&(r(!T||T.type?new K(null,e,m):T),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const R=Hn(s.url);if(R&&N.protocols.indexOf(R)===-1){r(new y("Unsupported protocol "+R+":",y.ERR_BAD_REQUEST,e));return}m.send(i||null)})},Zn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,c();const d=u instanceof Error?u:this.reason;r.abort(d instanceof y?d:new K(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>a.asap(c),l}},Yn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},er=async function*(e,t){for await(const n of tr(e))yield*Yn(n,t)},tr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ht=(e,t,n,r)=>{const s=er(e,t);let i=0,o,c=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){c(),l.close();return}let f=d.byteLength;if(n){let E=i+=f;n(E)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},he=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mt=he&&typeof ReadableStream=="function",nr=he&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rr=mt&&wt(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gt=64*1024,Ne=mt&&wt(()=>a.isReadableStream(new Response("").body)),me={stream:Ne&&(e=>e.body)};he&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!me[t]&&(me[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const sr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await nr(e)).byteLength},or=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??sr(t)},ke={http:On,xhr:Xn,fetch:he&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:E}=pt(e);u=u?(u+"").toLowerCase():"text";let S=Zn([s,i&&i.toAbortSignal()],o),h;const w=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let m;try{if(l&&rr&&n!=="get"&&n!=="head"&&(m=await or(d,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(a.isFormData(r)&&(k=v.headers.get("content-type"))&&d.setContentType(k),v.body){const[D,M]=lt(m,pe(ut(l)));r=ht(v.body,gt,D,M)}}a.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;h=new Request(t,{...E,signal:S,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:_?f:void 0});let R=await fetch(h,E);const T=Ne&&(u==="stream"||u==="response");if(Ne&&(c||T&&w)){const v={};["status","statusText","headers"].forEach(b=>{v[b]=R[b]});const k=a.toFiniteNumber(R.headers.get("content-length")),[D,M]=c&&lt(k,pe(ut(c),!0))||[];R=new Response(ht(R.body,gt,D,()=>{M&&M(),w&&w()}),v)}u=u||"text";let L=await me[a.findKey(me,u)||"text"](R,e);return!T&&w&&w(),await new Promise((v,k)=>{ct(v,k,{data:L,headers:U.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:h})})}catch(_){throw w&&w(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,h),{cause:_.cause||_}):y.from(_,_&&_.code,e,h)}})};a.forEach(ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yt=e=>`- ${e}`,ir=e=>a.isFunction(e)||e===null||e===!1,Et={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!ir(n)&&(r=ke[(o=String(n)).toLowerCase()],r===void 0))throw new y(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
1
+ (function(v,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],h):(v=typeof globalThis<"u"?globalThis:v||self,h(v.OCityHeritageVisualizer={},v["react/jsx-runtime"],v.React))})(this,function(v,h,g){"use strict";var Or=Object.defineProperty;var xr=(v,h,g)=>h in v?Or(v,h,{enumerable:!0,configurable:!0,writable:!0,value:g}):v[h]=g;var De=(v,h,g)=>xr(v,typeof h!="symbol"?h+"":h,g);const Pt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_DEBUG_MODE:"false",VITE_DEFAULT_IMAGE_URL:"https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png",VITE_GOOGLE_TRANSLATE_BASE:"https://translate.googleapis.com/translate_a/single",VITE_IMAGE_BASE_URL:"https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/",VITE_QWEN_TTS_API_URL:"https://playground-tts.o-city.org"};function oe(e,t=!0){const n=Pt[e];if(!n&&t)throw new Error(`❌ Missing required env variable: ${e}`);return n??""}const ie={NODE_ENV:"production",QWEN_TTS_API_URL:oe("VITE_QWEN_TTS_API_URL"),DEBUG_MODE:!1,GOOGLE_TRANSLATE_BASE:oe("VITE_GOOGLE_TRANSLATE_BASE"),IMAGE_BASE_URL:oe("VITE_IMAGE_BASE_URL"),DEFAULT_IMAGE_URL:oe("VITE_DEFAULT_IMAGE_URL")};async function je(e,t){if(!e.trim())return e;try{const n=`${ie.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`,r=await fetch(n);if(!r.ok)throw new Error(`Error en la traducción: ${r.status}`);const s=await r.json();return s&&Array.isArray(s[0])?s[0].map(i=>i[0]).join(""):e}catch(n){return console.error("Error al traducir:",n),e}}function Te(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ut(e,t){let n;const r=()=>{if(n)return n;const s=indexedDB.open(e);return s.onupgradeneeded=()=>s.result.createObjectStore(t),n=Te(s),n.then(i=>{i.onclose=()=>n=void 0},()=>{}),n};return(s,i)=>r().then(o=>i(o.transaction(t,s).objectStore(t)))}let _e;function Me(){return _e||(_e=Ut("keyval-store","keyval")),_e}function It(e,t=Me()){return t("readonly",n=>Te(n.get(e)))}function Ft(e,t,n=Me()){return n("readwrite",r=>(r.put(t,e),Te(r.transaction)))}async function Dt(e){return await It(e)??null}async function jt(e,t){await Ft(e,t)}function $e(e,t){return function(){return e.apply(t,arguments)}}const{toString:Mt}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:ae,toStringTag:qe}=Symbol,ce=(e=>t=>{const n=Mt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>ce(t)===e),le=e=>t=>typeof t===e,{isArray:Q}=Array,Y=le("undefined");function $t(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ze=F("ArrayBuffer");function qt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ze(e.buffer),t}const zt=le("string"),P=le("function"),He=le("number"),ue=e=>e!==null&&typeof e=="object",Ht=e=>e===!0||e===!1,de=e=>{if(ce(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qe in e)&&!(ae in e)},Vt=F("Date"),Wt=F("File"),Gt=F("Blob"),Jt=F("FileList"),Qt=e=>ue(e)&&P(e.pipe),Kt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ce(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Xt=F("URLSearchParams"),[Zt,Yt,en,tn]=["ReadableStream","Request","Response","Headers"].map(F),nn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Q(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,We=e=>!Y(e)&&e!==z;function Re(){const{caseless:e}=We(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ve(t,s)||s;de(t[i])&&de(r)?t[i]=Re(t[i],r):de(r)?t[i]=Re({},r):Q(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ee(arguments[r],n);return t}const rn=(e,t,n,{allOwnKeys:r}={})=>(ee(t,(s,i)=>{n&&P(s)?e[i]=$e(s,n):e[i]=s},{allOwnKeys:r}),e),sn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),on=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},an=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ln=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!He(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},un=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),dn=(e,t)=>{const r=(e&&e[ae]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},fn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},pn=F("HTMLFormElement"),hn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ge=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mn=F("RegExp"),Je=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},wn=e=>{Je(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},gn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},yn=()=>{},En=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sn(e){return!!(e&&P(e.append)&&e[qe]==="FormData"&&e[ae])}const bn=e=>{const t=new Array(10),n=(r,s)=>{if(ue(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Q(r)?[]:{};return ee(r,(o,c)=>{const l=n(o,s+1);!Y(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},Tn=F("AsyncFunction"),_n=e=>e&&(ue(e)||P(e))&&P(e.then)&&P(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:i})=>{s===z&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(z.postMessage)),An=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Qe,a={isArray:Q,isArrayBuffer:ze,isBuffer:$t,isFormData:Kt,isArrayBufferView:qt,isString:zt,isNumber:He,isBoolean:Ht,isObject:ue,isPlainObject:de,isReadableStream:Zt,isRequest:Yt,isResponse:en,isHeaders:tn,isUndefined:Y,isDate:Vt,isFile:Wt,isBlob:Gt,isRegExp:mn,isFunction:P,isStream:Qt,isURLSearchParams:Xt,isTypedArray:un,isFileList:Jt,forEach:ee,merge:Re,extend:rn,trim:nn,stripBOM:sn,inherits:on,toFlatObject:an,kindOf:ce,kindOfTest:F,endsWith:cn,toArray:ln,forEachEntry:dn,matchAll:fn,isHTMLForm:pn,hasOwnProperty:Ge,hasOwnProp:Ge,reduceDescriptors:Je,freezeMethods:wn,toObjectSet:gn,toCamelCase:hn,noop:yn,toFiniteNumber:En,findKey:Ve,global:z,isContextDefined:We,isSpecCompliantForm:Sn,toJSONObject:bn,isAsyncFn:Tn,isThenable:_n,setImmediate:Qe,asap:An,isIterable:e=>e!=null&&P(e[ae])};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ke=y.prototype,Xe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xe[e]={value:e}}),Object.defineProperties(y,Xe),Object.defineProperty(Ke,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ke);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Rn=null;function Oe(e){return a.isPlainObject(e)||a.isArray(e)}function Ze(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ze(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function On(e){return a.isArray(e)&&!e.some(Oe)}const xn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function fe(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!a.isUndefined(m[w])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(a.isBoolean(p))return p.toString();if(!l&&a.isBlob(p))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,w,m){let T=p;if(p&&!m&&typeof p=="object"){if(a.endsWith(w,"{}"))w=r?w:w.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&On(p)||(a.isFileList(p)||a.endsWith(w,"[]"))&&(T=a.toArray(p)))return w=Ze(w),T.forEach(function(A,L){!(a.isUndefined(A)||A===null)&&t.append(o===!0?Ye([w],L,i):o===null?w:w+"[]",u(A))}),!1}return Oe(p)?!0:(t.append(Ye(m,w,i),u(p)),!1)}const f=[],E=Object.assign(xn,{defaultVisitor:d,convertValue:u,isVisitable:Oe});function S(p,w){if(!a.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(p),a.forEach(p,function(T,_){(!(a.isUndefined(T)||T===null)&&s.call(t,T,a.isString(_)?_.trim():_,w,E))===!0&&S(T,w?w.concat(_):[_])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xe(e,t){this._pairs=[],e&&fe(e,this,t)}const tt=xe.prototype;tt.append=function(t,n){this._pairs.push([t,n])},tt.toString=function(t){const n=t?function(r){return t.call(this,r,et)}:et;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Cn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||Cn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new xe(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:xe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",ve=typeof navigator=="object"&&navigator||void 0,Ln=Ce&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0),Bn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kn=Ce&&window.location.href||"http://localhost",B={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Ln,hasStandardBrowserWebWorkerEnv:Bn,navigator:ve,origin:kn},Symbol.toStringTag,{value:"Module"})),...vn};function Nn(e,t){return fe(e,new B.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return B.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Pn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Un(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Un(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Pn(r),s,n,0)}),n}return null}function In(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const te={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fe(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),In(t)):t}],transformResponse:[function(t){const n=this.transitional||te.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{te.headers[e]={}});const Fn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dn=e=>{const t={};let n,r,s;return e&&e.split(`
2
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Fn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function pe(e){return e===!1||e==null?e:a.isArray(e)?e.map(pe):String(e)}function jn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Mn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function $n(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function qn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,l,u){const d=ne(l);if(!d)throw new Error("header name must be a non-empty string");const f=a.findKey(s,d);(!f||s[f]===void 0||u===!0||u===void 0&&s[f]!==!1)&&(s[f||l]=pe(c))}const o=(c,l)=>a.forEach(c,(u,d)=>i(u,d,l));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!Mn(t))o(Dn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},l,u;for(const d of t){if(!a.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[u=d[0]]=(l=c[u])?a.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ne(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return jn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ne(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ne(o),o){const c=a.findKey(r,o);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Le(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=pe(s),delete n[i];return}const c=t?$n(i):String(i).trim();c!==i&&delete n[i],n[c]=pe(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=ne(o);r[c]||(qn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(U.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(U);function Be(e,t){const n=this||te,r=t||n,s=U.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function at(e){return!!(e&&e.__CANCEL__)}function K(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(K,y,{__CANCEL__:!0});function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[i];o||(o=u),n[s]=l,r[s]=u;let f=i,E=0;for(;f!==s;)E+=n[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const S=d&&u-d;return S?Math.round(E*1e3/S):void 0}}function Vn(e,t){let n=0,r=1e3/t,s,i;const o=(u,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-f)))},()=>s&&o(s)]}const he=(e,t,n=3)=>{let r=0;const s=Hn(50,250);return Vn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),d=o<=c;r=o;const f={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},lt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ut=e=>(...t)=>a.asap(()=>e(...t)),Wn=B.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,B.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Gn=B.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dt(e,t,n){let r=!Jn(t);return e&&(r||n==!1)?Qn(e,t):t}const ft=e=>e instanceof U?{...e}:e;function H(e,t){t=t||{};const n={};function r(u,d,f,E){return a.isPlainObject(u)&&a.isPlainObject(d)?a.merge.call({caseless:E},u,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function s(u,d,f,E){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u,f,E)}else return r(u,d,f,E)}function i(u,d){if(!a.isUndefined(d))return r(void 0,d)}function o(u,d){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function c(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,d,f)=>s(ft(u),ft(d),f,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||s,E=f(e[d],t[d],d);a.isUndefined(E)&&f!==c||(n[d]=E)}),n}const pt=e=>{const t=H({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;t.headers=o=U.from(o),t.url=nt(dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(B.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Wn(t.url))){const u=s&&i&&Gn.read(i);u&&o.set(s,u)}return t},Kn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=pt(e);let i=s.data;const o=U.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=s,d,f,E,S,p;function w(){S&&S(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function T(){if(!m)return;const A=U.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:A,config:e,request:m};ct(function(D){n(D),w()},function(D){r(D),w()},O),m=null}"onloadend"in m?m.onloadend=T:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(T)},m.onabort=function(){m&&(r(new y("Request aborted",y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let L=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const O=s.transitional||st;s.timeoutErrorMessage&&(L=s.timeoutErrorMessage),r(new y(L,O.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&a.forEach(o.toJSON(),function(L,O){m.setRequestHeader(O,L)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),u&&([E,p]=he(u,!0),m.addEventListener("progress",E)),l&&m.upload&&([f,S]=he(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(d=A=>{m&&(r(!A||A.type?new K(null,e,m):A),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const _=zn(s.url);if(_&&B.protocols.indexOf(_)===-1){r(new y("Unsupported protocol "+_+":",y.ERR_BAD_REQUEST,e));return}m.send(i||null)})},Xn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,c();const d=u instanceof Error?u:this.reason;r.abort(d instanceof y?d:new K(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>a.asap(c),l}},Zn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Yn=async function*(e,t){for await(const n of er(e))yield*Zn(n,t)},er=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ht=(e,t,n,r)=>{const s=Yn(e,t);let i=0,o,c=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){c(),l.close();return}let f=d.byteLength;if(n){let E=i+=f;n(E)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},me=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mt=me&&typeof ReadableStream=="function",tr=me&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nr=mt&&wt(()=>{let e=!1;const t=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gt=64*1024,ke=mt&&wt(()=>a.isReadableStream(new Response("").body)),we={stream:ke&&(e=>e.body)};me&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!we[t]&&(we[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const rr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(B.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await tr(e)).byteLength},sr=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??rr(t)},Ne={http:Rn,xhr:Kn,fetch:me&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:E}=pt(e);u=u?(u+"").toLowerCase():"text";let S=Xn([s,i&&i.toAbortSignal()],o),p;const w=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let m;try{if(l&&nr&&n!=="get"&&n!=="head"&&(m=await sr(d,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(a.isFormData(r)&&(k=O.headers.get("content-type"))&&d.setContentType(k),O.body){const[D,$]=lt(m,he(ut(l)));r=ht(O.body,gt,D,$)}}a.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;p=new Request(t,{...E,signal:S,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:T?f:void 0});let _=await fetch(p,E);const A=ke&&(u==="stream"||u==="response");if(ke&&(c||A&&w)){const O={};["status","statusText","headers"].forEach(b=>{O[b]=_[b]});const k=a.toFiniteNumber(_.headers.get("content-length")),[D,$]=c&&lt(k,he(ut(c),!0))||[];_=new Response(ht(_.body,gt,D,()=>{$&&$(),w&&w()}),O)}u=u||"text";let L=await we[a.findKey(we,u)||"text"](_,e);return!A&&w&&w(),await new Promise((O,k)=>{ct(O,k,{data:L,headers:U.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:p})})}catch(T){throw w&&w(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,p),{cause:T.cause||T}):y.from(T,T&&T.code,e,p)}})};a.forEach(Ne,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yt=e=>`- ${e}`,or=e=>a.isFunction(e)||e===null||e===!1,Et={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!or(n)&&(r=Ne[(o=String(n)).toLowerCase()],r===void 0))throw new y(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
4
4
  `+i.map(yt).join(`
5
- `):" "+yt(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ke};function Pe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K(null,e)}function bt(e){return Pe(e),e.headers=U.from(e.headers),e.data=Be.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Et.getAdapter(e.adapter||te.adapter)(e).then(function(r){return Pe(e),r.data=Be.call(e,e.transformResponse,r),r.headers=U.from(r.headers),r},function(r){return at(r)||(Pe(e),r&&r.response&&(r.response.data=Be.call(e,e.transformResponse,r.response),r.response.headers=U.from(r.response.headers))),Promise.reject(r)})}const St="1.10.0",we={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{we[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Tt={};we.transitional=function(t,n,r){function s(i,o){return"[Axios v"+St+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Tt[o]&&(Tt[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}},we.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ar(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],l=c===void 0||o(c,i,e);if(l!==!0)throw new y("option "+i+" must be "+l,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const ge={assertOptions:ar,validators:we},j=ge.validators;let V=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rt,response:new rt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=H(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ge.assertOptions(s,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ge.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=U.concat(o,i);const c=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(l=l&&w.synchronous,c.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let d,f=0,E;if(!l){const h=[bt.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,u),E=h.length,d=Promise.resolve(n);f<E;)d=d.then(h[f++],h[f++]);return d}E=c.length;let S=n;for(f=0;f<E;){const h=c[f++],w=c[f++];try{S=h(S)}catch(m){w.call(this,m);break}}try{d=bt.call(this,S)}catch(h){return Promise.reject(h)}for(f=0,E=u.length;f<E;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=H(this.defaults,t);const n=dt(t.baseURL,t.url,t.allowAbsoluteUrls);return nt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(n,r){return this.request(H(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(H(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}V.prototype[t]=n(),V.prototype[t+"Form"]=n(!0)});let cr=class Pt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new K(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pt(function(s){t=s}),cancel:t}}};function lr(e){return function(n){return e.apply(null,n)}}function ur(e){return a.isObject(e)&&e.isAxiosError===!0}const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach(([e,t])=>{Ue[t]=e});function _t(e){const t=new V(e),n=$e(V.prototype.request,t);return a.extend(n,V.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _t(H(e,s))},n}const x=_t(te);x.Axios=V,x.CanceledError=K,x.CancelToken=cr,x.isCancel=at,x.VERSION=St,x.toFormData=de,x.AxiosError=y,x.Cancel=x.CanceledError,x.all=function(t){return Promise.all(t)},x.spread=lr,x.isAxiosError=ur,x.mergeConfig=H,x.AxiosHeaders=U,x.formToJSON=e=>ot(a.isHTMLForm(e)?new FormData(e):e),x.getAdapter=Et.getAdapter,x.HttpStatusCode=Ue,x.default=x;const{Axios:Ir,AxiosError:Dr,CanceledError:jr,isCancel:Mr,CancelToken:$r,VERSION:qr,all:zr,Cancel:Hr,isAxiosError:Vr,spread:Wr,toFormData:Jr,AxiosHeaders:Gr,HttpStatusCode:Qr,formToJSON:Kr,getAdapter:Xr,mergeConfig:Zr}=x;class dr{constructor(){De(this,"apiUrl");De(this,"timeout",3e4);this.apiUrl=Se.QWEN_TTS_API_URL}async synthesizeSpeech(t){var n,r,s,i,o,c,l,u,d;try{const{text:f,voice:E="Peter",languageType:S="English",emotion:h,speed:w,pitch:m,purpose:_}=t;if(!f||f.trim().length===0)throw new Error("[Qwen TTS] Text cannot be empty");if(f.length>512)throw new Error("[Qwen TTS] Text must not exceed 512 characters (Qwen3-TTS limit)");console.log(`[Qwen TTS] Processing request: text="${f.substring(0,50)}..." voice=${E}`);const R={text:f,voice:E,languageType:S};h&&(R.emotion=h,console.log(`[Qwen TTS] Emotion: ${h}`)),w!==void 0&&(R.speed=w,console.log(`[Qwen TTS] Speed: ${w}`)),m!==void 0&&(R.pitch=m,console.log(`[Qwen TTS] Pitch: ${m}`)),_&&(R.purpose=_,console.log(`[Qwen TTS] Purpose: ${_}`));const T=R;console.log(`[Qwen TTS] Sending request to ${this.apiUrl}/api/v1/tts/audio`);const v=(await x.post(`${this.apiUrl}/api/v1/tts/audio`,T,{headers:{"Content-Type":"application/json"},responseType:"blob",timeout:this.timeout})).data;if(!v||v.size===0)throw new Error("[Qwen TTS] No audio content received from server");return console.log(`[Qwen TTS] Successfully received audio (${v.size} bytes)`),{audio:v,mimeType:"audio/wav"}}catch(f){const E=f instanceof Error?f.message:String(f);if(console.error(`[Qwen TTS] Error: ${E}`),f instanceof x.AxiosError){if(((n=f.response)==null?void 0:n.status)===401||((r=f.response)==null?void 0:r.status)===403)throw new Error("[Qwen TTS] Unauthorized: Invalid credentials or API key on server");if(f.code==="ECONNABORTED")throw new Error("[Qwen TTS] Request timeout: Qwen TTS service not responding");if(((s=f.response)==null?void 0:s.status)===400){const S=((o=(i=f.response)==null?void 0:i.data)==null?void 0:o.message)||"Bad request parameters";throw new Error(`[Qwen TTS] Bad Request: ${S}`)}throw((c=f.response)==null?void 0:c.status)===429?new Error("[Qwen TTS] Rate limit exceeded: Too many requests to Qwen API"):f.code==="ERR_NETWORK"?new Error(`[Qwen TTS] Network error: Cannot reach Qwen TTS service at ${this.apiUrl}`):new Error(`[Qwen TTS] API Error (${(l=f.response)==null?void 0:l.status}): ${((d=(u=f.response)==null?void 0:u.data)==null?void 0:d.message)||E}`)}throw f}}}const fr=new dr;function pr(e){const[t,n]=g.useState({isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0,avatars:e.avatars,error:null}),[r,s]=g.useState(e.autoAdvance||!1),[i,o]=g.useState(!1),[,c]=g.useState(0),l=g.useRef(null),u=g.useRef(null),d=g.useRef(r),f=g.useRef(!1),E=g.useRef(null);g.useEffect(()=>{d.current=r},[r]);const S=b=>{if(e.avatars.length<=1)return 0;const O=e.avatars.length,F=100/O;return Math.min(Math.floor(b/F),O-1)},h=()=>{u.current&&(clearInterval(u.current),u.current=null)},w=()=>{l.current&&(u.current=setInterval(()=>{if(l.current&&l.current.duration){const b=l.current.currentTime,O=l.current.duration,F=b/O*100;n(W=>({...W,progress:Math.min(F,100),currentPNGTuber:S(F)}))}},100))},m=()=>{var b;l.current&&!t.isPaused&&(l.current.pause(),h(),n(O=>({...O,isPlaying:!1,isPaused:!0})),(b=e.onPause)==null||b.call(e))},_=async()=>{if(l.current&&t.isPaused)try{await l.current.play(),w(),n(b=>({...b,isPlaying:!0,isPaused:!1}))}catch(b){console.error("Error al reanudar audio:",b),n(O=>({...O,error:{type:"audio",message:"Error al reanudar la reproducción"}}))}},R=()=>L(!0),T=()=>s(b=>!b),L=(b=!1)=>{h(),l.current&&(E.current&&(l.current.removeEventListener("ended",E.current),E.current=null),l.current.removeEventListener("error",v),l.current.removeEventListener("pause",k),l.current.pause(),l.current.currentTime=0,l.current.src="",l.current.load(),l.current=null),n(O=>({...O,isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0})),d.current&&!f.current&&(f.current=!0,c(O=>O+1)),b||setTimeout(()=>{var O;return(O=e.onStop)==null?void 0:O.call(e)},50)},v=()=>{n(b=>({...b,error:{type:"audio",message:"Error al reproducir el audio"}})),L()},k=()=>{l.current&&l.current.currentTime<l.current.duration&&n(b=>({...b,isPlaying:!1,isPaused:!0}))},D=async()=>{if(!e.text.trim()){n(b=>({...b,error:{type:"synthesis",message:"No hay contenido para reproducir"}}));return}f.current=!1,L(!0);try{o(!0),n(F=>({...F,isPlaying:!1,progress:0,currentPNGTuber:0,error:null}));const b=`qwen-${e.voiceId}-${e.lang??"auto"}-${e.text}`;let O=await jt(b);O?console.log("[TTS] Cache hit"):(O=(await fr.synthesizeSpeech({text:e.text,voice:e.voiceId,languageType:e.lang??"Spanish"})).audio,await Mt(b,O)),M(O)}catch(b){console.error("Error al reproducir TTS:",b),n(O=>({...O,error:{type:"network",message:`Error en la síntesis: ${b.message}`},isPlaying:!1})),h(),o(!1)}},M=b=>{const O=URL.createObjectURL(b);l.current=new Audio(O);const F=()=>{L(!1),URL.revokeObjectURL(O)};E.current=F,l.current.addEventListener("ended",F),l.current.addEventListener("error",v),l.current.addEventListener("pause",k),l.current.addEventListener("canplaythrough",async()=>{var W;o(!1),n(re=>({...re,isPlaying:!0})),w();try{await((W=l.current)==null?void 0:W.play())}catch(re){console.error("Error al iniciar reproducción:",re),n(ye=>({...ye,error:{type:"audio",message:"Error al iniciar la reproducción"}})),L()}})};return g.useEffect(()=>()=>{h(),l.current&&(l.current.pause(),l.current.src="",l.current.load(),l.current=null)},[]),g.useEffect(()=>{e.voiceId&&(l.current&&(l.current.pause(),l.current.src="",l.current.load(),l.current=null),h(),n(b=>({...b,isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0})))},[e.voiceId]),{...t,play:D,pause:m,resume:_,stop:R,toggleAutoAdvance:T,isAutoAdvancing:r,isLoadingAudio:i,avatars:e.avatars}}const X={selectorWrapper:"_selectorWrapper_1kmif_1",iconButton:"_iconButton_1kmif_6",dropdown:"_dropdown_1kmif_18",dropdownItem:"_dropdownItem_1kmif_31",active:"_active_1kmif_44"},At=({languages:e,current:t,onChange:n})=>{const[r,s]=g.useState(!1),[i,o]=g.useState(t||e[0].code),c=g.useRef(null);return g.useEffect(()=>{const l=u=>{c.current&&!c.current.contains(u.target)&&s(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),p.jsxs("div",{className:X.selectorWrapper,ref:c,children:[p.jsx("button",{className:X.iconButton,title:"Cambiar idioma",onClick:()=>s(!r),children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",width:"30px",height:"30px",viewBox:"0 0 24 24",children:p.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"})})}),r&&p.jsx("div",{className:X.dropdown,children:e.map(l=>p.jsx("button",{className:`${X.dropdownItem} ${l.code===i?X.active:""}`,onClick:()=>{o(l.code),n==null||n(l.code),s(!1)},children:l.label},l.code))})]})},A={controlsRow:"_controlsRow_8wakc_1",select:"_select_8wakc_9",autoAdvanceButton:"_autoAdvanceButton_8wakc_15",section:"_section_8wakc_26",textarea:"_textarea_8wakc_36",input:"_input_8wakc_46",error:"_error_8wakc_54",buttonPrimary:"_buttonPrimary_8wakc_59",buttonSuccess:"_buttonSuccess_8wakc_69",infoBox:"_infoBox_8wakc_78",viewer:"_viewer_8wakc_86",viewerTopBar:"_viewerTopBar_8wakc_97",topRightControls:"_topRightControls_8wakc_110",itemCounter:"_itemCounter_8wakc_118",iconButton:"_iconButton_8wakc_126",navButton:"_navButton_8wakc_146",navButtonLeft:"_navButtonLeft_8wakc_163",navButtonRight:"_navButtonRight_8wakc_167",backgroundImage:"_backgroundImage_8wakc_171",avatar:"_avatar_8wakc_178",caption:"_caption_8wakc_188",captionTitle:"_captionTitle_8wakc_201",captionText:"_captionText_8wakc_211",loadingOverlay:"_loadingOverlay_8wakc_217",loadingSpinner:"_loadingSpinner_8wakc_232",spin:"_spin_8wakc_251",loadingButton:"_loadingButton_8wakc_242",spinner:"_spinner_8wakc_251",progressBar:"_progressBar_8wakc_264",progressFill:"_progressFill_8wakc_273",playbackControls:"_playbackControls_8wakc_279",playButton:"_playButton_8wakc_292",pauseButton:"_pauseButton_8wakc_293"},Rt=[{id:"Ebona",name:"Voz Mujer"},{id:"Bodega",name:"Voz Hombre"},{id:"Peter",name:"Voz Narrador"}],Ot=Se.DEFAULT_IMAGE_URL,hr=({heritageItems:e=[],targetLanguage:t="es",descriptionLength:n="extended",autoAdvance:r=!1,voiceIds:s=[],avatars:i=[]})=>{const[o]=g.useState(e),[c,l]=g.useState(0),[u,d]=g.useState(n),[f,E]=g.useState(t),[S,h]=g.useState(""),[w,m]=g.useState([]),[_,R]=g.useState(0),[T,L]=g.useState(r),[v,k]=g.useState(!1),[D,M]=g.useState(s.length>0?s[0]:""),b=D||(s.length>0?s[c%s.length]:""),O=i[c%i.length],[F,W]=g.useState(!1),[re,ye]=g.useState(!1),[mr,Ee]=g.useState(!0),J=g.useRef(null),vt=g.useRef(T),Ct=g.useRef(c),Fe=g.useRef(o),G=g.useRef(null),be=g.useRef(!1);g.useEffect(()=>{vt.current=T,Ct.current=c,Fe.current=o},[T,c,o]);const Z=o[c]||{id:"default",name:"Patrimonio Cultural",description:{local:{short:"Ingrese un JSON válido para comenzar",extended:"Ingrese un JSON válido para comenzar"}},imageUrl:""},{isPlaying:q,isPaused:xt,isLoadingAudio:wr,progress:Lt,play:gr,pause:yr,resume:Er,stop:br}=pr({text:S,lang:f,onStop:()=>{Ee(!0),vt.current&&Fe.current.length>1&&!be.current&&setTimeout(()=>{k(!0);const C=(Ct.current+1)%Fe.current.length;l(C)},100),be.current=!1},voiceId:b,avatars:[O]});g.useEffect(()=>{if(v&&S&&!S.includes("JSON válido")){const C=setTimeout(()=>{q||Bt(),k(!1)},500);return()=>clearTimeout(C)}},[v,S,q]),g.useEffect(()=>{(async()=>{const $=Z.description.local[u];if($)try{const se=await je(Z.name,f),vr=await je($,f);h(`${se}. ${vr}`)}catch(se){console.error("Error en traducción:",se),h(`${Z.name}. ${$}`)}})()},[Z,u,f]);const Ie=()=>{Ee(!0),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{Ee(!1)},4e3)},Bt=()=>{if(!S.trim()||S.includes("JSON válido")){alert("No hay contenido para reproducir");return}gr(),Ie()},Sr=()=>{yr()},Tr=()=>{Er(),Ie()},Nt=()=>{br(),k(!1),J.current&&clearTimeout(J.current),G.current&&clearTimeout(G.current),Ee(!0)},_r=()=>{be.current=!0,Nt(),c>0&&l(C=>C-1)},Ar=()=>{be.current=!0,Nt(),c<o.length-1&&l(C=>C+1)};g.useEffect(()=>()=>{J.current&&clearTimeout(J.current),G.current&&clearTimeout(G.current)},[]),g.useEffect(()=>{if(S){const C=S.split(new RegExp("(?<=[.!?])\\s+","g")).map($=>$.trim()).filter($=>$.length>0);m(C),R(0)}},[S]),g.useEffect(()=>{if(!q||w.length===0)return;J.current&&clearTimeout(J.current);const $=1500+w[_].length*50;J.current=setTimeout(()=>{R(se=>(se+1)%w.length)},$)},[q,w,_]);const[kt,Rr]=g.useState(!1),Or=C=>{M(C),Rr(!0)};return g.useEffect(()=>{!kt&&s.length>0&&M(s[c%s.length])},[c,s,kt]),p.jsxs("div",{children:[p.jsxs("div",{className:A.controlsRow,children:[p.jsxs("select",{value:u,onChange:C=>d(C.target.value),className:A.select,children:[p.jsx("option",{value:"short",children:"Descripción Corta"}),p.jsx("option",{value:"extended",children:"Descripción Extendida"})]}),p.jsxs("select",{value:f,onChange:C=>E(C.target.value),className:A.select,children:[p.jsx("option",{value:"en",children:"Inglés"}),p.jsx("option",{value:"es",children:"Español"}),p.jsx("option",{value:"fr",children:"Francés"})]}),p.jsx("select",{value:b,onChange:C=>Or(C.target.value),className:A.select,children:Rt.map(C=>p.jsx("option",{value:C.id,children:C.name},C.id))}),p.jsx("button",{onClick:()=>L(!T),className:A.autoAdvanceButton,style:{backgroundColor:T?"#34a853":"#ea4335"},children:T?"⏩ AUTO ON":"⏩ AUTO OFF"})]}),p.jsxs("div",{className:A.viewer,onClick:Ie,children:[p.jsxs("div",{className:A.viewerTopBar,children:[p.jsx("div",{className:A.itemCounter,children:o.length>0?`${c+1}/${o.length}`:"0/0"}),p.jsxs("div",{className:A.topRightControls,children:[p.jsx("button",{onClick:()=>L(!T),className:A.iconButton,title:"Autoplay",style:{backgroundColor:T?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)"},children:p.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{style:{fill:T?"black":"white"},d:"M5.23331,0.493645 C6.8801,-0.113331 8.6808,-0.161915 10.3579,0.355379 C11.4019,0.6773972 12.361984,1.20757325 13.1838415,1.90671757 L13.4526,2.14597 L14.2929,1.30564 C14.8955087,0.703065739 15.9071843,1.0850774 15.994017,1.89911843 L16,2.01275 L16,6.00002 L12.0127,6.00002 C11.1605348,6.00002 10.7153321,5.01450817 11.2294893,4.37749065 L11.3056,4.29291 L12.0372,3.56137 C11.389,2.97184 10.6156,2.52782 9.76845,2.26653 C8.5106,1.87856 7.16008,1.915 5.92498,2.37023 C4.68989,2.82547 3.63877,3.67423 2.93361,4.78573 C2.22844,5.89723 1.90836,7.20978 2.02268,8.52112 C2.13701,9.83246 2.6794,11.0698 3.56627,12.0425 C4.45315,13.0152 5.63528,13.6693 6.93052,13.9039 C8.22576,14.1385 9.56221,13.9407 10.7339,13.3409 C11.9057,12.7412 12.8476,11.7727 13.4147,10.5848 C13.6526,10.0864 14.2495,9.8752 14.748,10.1131 C15.2464,10.351 15.4575,10.948 15.2196,11.4464 C14.4635,13.0302 13.2076,14.3215 11.6453,15.1213 C10.0829,15.921 8.30101,16.1847 6.57402,15.8719 C4.84704,15.559 3.27086,14.687 2.08836,13.39 C0.905861,12.0931 0.182675,10.4433 0.0302394,8.69483 C-0.122195,6.94637 0.304581,5.1963 1.2448,3.7143 C2.18503,2.2323 3.58652,1.10062 5.23331,0.493645 Z M6,5.46077 C6,5.09472714 6.37499031,4.86235811 6.69509872,5.0000726 L6.7678,5.03853 L10.7714,7.57776 C11.0528545,7.75626909 11.0784413,8.14585256 10.8481603,8.36273881 L10.7714,8.42224 L6.7678,10.9615 C6.45867857,11.1575214 6.06160816,10.965274 6.00646097,10.6211914 L6,10.5392 L6,5.46077 Z"})})}),p.jsx(At,{languages:[{code:"es",label:"Español"},{code:"en",label:"English"},{code:"fr",label:"Français"}],current:"es",onChange:C=>E(C)})]})]}),p.jsx("button",{onClick:_r,disabled:o.length===0,className:`${A.navButton} ${A.navButtonLeft}`,title:"Anterior",onMouseOver:()=>W(!0),onMouseOut:()=>W(!1),children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"24px",height:"24px",transition:"transform 0.2s ease-in-out",transform:F?"scale(1.5)":"scale(1)"},children:p.jsx("path",{d:"M15 18l-6-6 6-6"})})}),p.jsx("button",{onClick:Ar,disabled:o.length===0,className:`${A.navButton} ${A.navButtonRight}`,title:"Siguiente",onMouseOver:()=>ye(!0),onMouseOut:()=>ye(!1),children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"24px",height:"24px",transition:"transform 0.2s ease-in-out",transform:re?"scale(1.5)":"scale(1)"},children:p.jsx("path",{d:"M9 6l6 6-6 6"})})}),p.jsx("img",{src:Z.imageUrl||Ot,alt:"Background",className:A.backgroundImage,style:{opacity:q?1:.7},onError:C=>C.currentTarget.src=Ot}),q&&p.jsx(p.Fragment,{children:p.jsx("img",{src:O,alt:"Avatar",className:A.avatar,style:{transform:`scale(${Lt%10<5?4:4.05})`}})}),p.jsxs("div",{className:A.caption,children:[p.jsx("h4",{className:A.captionTitle,children:Z.name}),q&&p.jsx(p.Fragment,{children:p.jsx("p",{className:A.captionText,children:w.length>0&&w[_]})})]}),v&&p.jsxs("div",{className:A.loadingOverlay,children:[p.jsx("div",{className:A.loadingSpinner}),p.jsx("p",{children:"Cargando siguiente patrimonio..."})]}),mr&&p.jsx("div",{className:A.playbackControls,children:wr?p.jsx("button",{disabled:!0,className:A.loadingButton,children:p.jsxs("svg",{className:A.spinner,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}):!q&&!xt?p.jsx("button",{onClick:Bt,disabled:o.length===0||v,className:A.playButton,children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"white",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M9 8.5 L9 15.5 L16 12 Z"})})}):xt?p.jsx("button",{onClick:Tr,className:A.playButton,children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"white",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M9 8.5 L9 15.5 L16 12 Z"})})}):p.jsx("button",{onClick:Sr,className:A.pauseButton,children:p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"16"}),p.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"16"})]})})}),p.jsx("div",{className:A.progressBar,children:p.jsx("div",{className:A.progressFill,style:{width:`${Lt}%`}})})]})]})};B.LanguageSelector=At,B.LanguageSelectorStyles=X,B.StoryVisualizer=hr,B.StoryVisualizerStyles=A,B.voices=Rt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
5
+ `):" "+yt(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Ne};function Pe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K(null,e)}function St(e){return Pe(e),e.headers=U.from(e.headers),e.data=Be.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Et.getAdapter(e.adapter||te.adapter)(e).then(function(r){return Pe(e),r.data=Be.call(e,e.transformResponse,r),r.headers=U.from(r.headers),r},function(r){return at(r)||(Pe(e),r&&r.response&&(r.response.data=Be.call(e,e.transformResponse,r.response),r.response.headers=U.from(r.response.headers))),Promise.reject(r)})}const bt="1.10.0",ge={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ge[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Tt={};ge.transitional=function(t,n,r){function s(i,o){return"[Axios v"+bt+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Tt[o]&&(Tt[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}},ge.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ir(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],l=c===void 0||o(c,i,e);if(l!==!0)throw new y("option "+i+" must be "+l,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const ye={assertOptions:ir,validators:ge},j=ye.validators;let V=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rt,response:new rt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=H(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ye.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ye.assertOptions(s,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ye.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=U.concat(o,i);const c=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(l=l&&w.synchronous,c.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let d,f=0,E;if(!l){const p=[St.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,u),E=p.length,d=Promise.resolve(n);f<E;)d=d.then(p[f++],p[f++]);return d}E=c.length;let S=n;for(f=0;f<E;){const p=c[f++],w=c[f++];try{S=p(S)}catch(m){w.call(this,m);break}}try{d=St.call(this,S)}catch(p){return Promise.reject(p)}for(f=0,E=u.length;f<E;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=H(this.defaults,t);const n=dt(t.baseURL,t.url,t.allowAbsoluteUrls);return nt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(n,r){return this.request(H(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(H(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}V.prototype[t]=n(),V.prototype[t+"Form"]=n(!0)});let ar=class Nt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new K(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Nt(function(s){t=s}),cancel:t}}};function cr(e){return function(n){return e.apply(null,n)}}function lr(e){return a.isObject(e)&&e.isAxiosError===!0}const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach(([e,t])=>{Ue[t]=e});function _t(e){const t=new V(e),n=$e(V.prototype.request,t);return a.extend(n,V.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _t(H(e,s))},n}const C=_t(te);C.Axios=V,C.CanceledError=K,C.CancelToken=ar,C.isCancel=at,C.VERSION=bt,C.toFormData=fe,C.AxiosError=y,C.Cancel=C.CanceledError,C.all=function(t){return Promise.all(t)},C.spread=cr,C.isAxiosError=lr,C.mergeConfig=H,C.AxiosHeaders=U,C.formToJSON=e=>ot(a.isHTMLForm(e)?new FormData(e):e),C.getAdapter=Et.getAdapter,C.HttpStatusCode=Ue,C.default=C;const{Axios:Ur,AxiosError:Ir,CanceledError:Fr,isCancel:Dr,CancelToken:jr,VERSION:Mr,all:$r,Cancel:qr,isAxiosError:zr,spread:Hr,toFormData:Vr,AxiosHeaders:Wr,HttpStatusCode:Gr,formToJSON:Jr,getAdapter:Qr,mergeConfig:Kr}=C;class ur{constructor(){De(this,"apiUrl");De(this,"timeout",3e4);this.apiUrl=ie.QWEN_TTS_API_URL}async synthesizeSpeech(t){var n,r,s,i,o,c,l,u,d;try{const{text:f,voice:E="Peter",languageType:S="English",emotion:p,speed:w,pitch:m,purpose:T}=t;if(!f||f.trim().length===0)throw new Error("[Qwen TTS] Text cannot be empty");if(f.length>512)throw new Error("[Qwen TTS] Text must not exceed 512 characters (Qwen3-TTS limit)");console.log(`[Qwen TTS] Processing request: text="${f.substring(0,50)}..." voice=${E}`);const _={text:f,voice:E,languageType:S};p&&(_.emotion=p,console.log(`[Qwen TTS] Emotion: ${p}`)),w!==void 0&&(_.speed=w,console.log(`[Qwen TTS] Speed: ${w}`)),m!==void 0&&(_.pitch=m,console.log(`[Qwen TTS] Pitch: ${m}`)),T&&(_.purpose=T,console.log(`[Qwen TTS] Purpose: ${T}`));const A=_;console.log(`[Qwen TTS] Sending request to ${this.apiUrl}/api/v1/tts/audio`);const O=(await C.post(`${this.apiUrl}/api/v1/tts/audio`,A,{headers:{"Content-Type":"application/json"},responseType:"blob",timeout:this.timeout})).data;if(!O||O.size===0)throw new Error("[Qwen TTS] No audio content received from server");return console.log(`[Qwen TTS] Successfully received audio (${O.size} bytes)`),{audio:O,mimeType:"audio/wav"}}catch(f){const E=f instanceof Error?f.message:String(f);if(console.error(`[Qwen TTS] Error: ${E}`),f instanceof C.AxiosError){if(((n=f.response)==null?void 0:n.status)===401||((r=f.response)==null?void 0:r.status)===403)throw new Error("[Qwen TTS] Unauthorized: Invalid credentials or API key on server");if(f.code==="ECONNABORTED")throw new Error("[Qwen TTS] Request timeout: Qwen TTS service not responding");if(((s=f.response)==null?void 0:s.status)===400){const S=((o=(i=f.response)==null?void 0:i.data)==null?void 0:o.message)||"Bad request parameters";throw new Error(`[Qwen TTS] Bad Request: ${S}`)}throw((c=f.response)==null?void 0:c.status)===429?new Error("[Qwen TTS] Rate limit exceeded: Too many requests to Qwen API"):f.code==="ERR_NETWORK"?new Error(`[Qwen TTS] Network error: Cannot reach Qwen TTS service at ${this.apiUrl}`):new Error(`[Qwen TTS] API Error (${(l=f.response)==null?void 0:l.status}): ${((d=(u=f.response)==null?void 0:u.data)==null?void 0:d.message)||E}`)}throw f}}}const dr=new ur;function fr(e){const[t,n]=g.useState({isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0,avatars:e.avatars,error:null}),[r,s]=g.useState(e.autoAdvance||!1),[i,o]=g.useState(!1),[,c]=g.useState(0),l=g.useRef(null),u=g.useRef(null),d=g.useRef(r),f=g.useRef(!1),E=g.useRef(null);g.useEffect(()=>{d.current=r},[r]);const S=b=>{if(e.avatars.length<=1)return 0;const R=e.avatars.length,I=100/R;return Math.min(Math.floor(b/I),R-1)},p=()=>{u.current&&(clearInterval(u.current),u.current=null)},w=()=>{l.current&&(u.current=setInterval(()=>{if(l.current&&l.current.duration){const b=l.current.currentTime,R=l.current.duration,I=b/R*100;n(W=>({...W,progress:Math.min(I,100),currentPNGTuber:S(I)}))}},100))},m=()=>{var b;l.current&&!t.isPaused&&(l.current.pause(),p(),n(R=>({...R,isPlaying:!1,isPaused:!0})),(b=e.onPause)==null||b.call(e))},T=async()=>{if(l.current&&t.isPaused)try{await l.current.play(),w(),n(b=>({...b,isPlaying:!0,isPaused:!1}))}catch(b){console.error("Error al reanudar audio:",b),n(R=>({...R,error:{type:"audio",message:"Error al reanudar la reproducción"}}))}},_=()=>L(!0),A=()=>s(b=>!b),L=(b=!1)=>{p(),l.current&&(E.current&&(l.current.removeEventListener("ended",E.current),E.current=null),l.current.removeEventListener("error",O),l.current.removeEventListener("pause",k),l.current.pause(),l.current.currentTime=0,l.current.src="",l.current.load(),l.current=null),n(R=>({...R,isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0})),d.current&&!f.current&&(f.current=!0,c(R=>R+1)),b||setTimeout(()=>{var R;return(R=e.onStop)==null?void 0:R.call(e)},50)},O=()=>{n(b=>({...b,error:{type:"audio",message:"Error al reproducir el audio"}})),L()},k=()=>{l.current&&l.current.currentTime<l.current.duration&&n(b=>({...b,isPlaying:!1,isPaused:!0}))},D=async()=>{if(!e.text.trim()){n(b=>({...b,error:{type:"synthesis",message:"No hay contenido para reproducir"}}));return}f.current=!1,L(!0);try{o(!0),n(I=>({...I,isPlaying:!1,progress:0,currentPNGTuber:0,error:null}));const b=`qwen-${e.voiceId}-${e.lang??"auto"}-${e.text}`;let R=await Dt(b);R?console.log("[TTS] Cache hit"):(R=(await dr.synthesizeSpeech({text:e.text,voice:e.voiceId,languageType:e.lang??"Spanish"})).audio,await jt(b,R)),$(R)}catch(b){console.error("Error al reproducir TTS:",b),n(R=>({...R,error:{type:"network",message:`Error en la síntesis: ${b.message}`},isPlaying:!1})),p(),o(!1)}},$=b=>{const R=URL.createObjectURL(b);l.current=new Audio(R);const I=()=>{L(!1),URL.revokeObjectURL(R)};E.current=I,l.current.addEventListener("ended",I),l.current.addEventListener("error",O),l.current.addEventListener("pause",k),l.current.addEventListener("canplaythrough",async()=>{var W;o(!1),n(re=>({...re,isPlaying:!0})),w();try{await((W=l.current)==null?void 0:W.play())}catch(re){console.error("Error al iniciar reproducción:",re),n(Ee=>({...Ee,error:{type:"audio",message:"Error al iniciar la reproducción"}})),L()}})};return g.useEffect(()=>()=>{p(),l.current&&(l.current.pause(),l.current.src="",l.current.load(),l.current=null)},[]),g.useEffect(()=>{e.voiceId&&(l.current&&(l.current.pause(),l.current.src="",l.current.load(),l.current=null),p(),n(b=>({...b,isPlaying:!1,isPaused:!1,progress:0,currentPNGTuber:0})))},[e.voiceId]),{...t,play:D,pause:m,resume:T,stop:_,toggleAutoAdvance:A,isAutoAdvancing:r,isLoadingAudio:i,avatars:e.avatars}}const X={selectorWrapper:"_selectorWrapper_1kmif_1",iconButton:"_iconButton_1kmif_6",dropdown:"_dropdown_1kmif_18",dropdownItem:"_dropdownItem_1kmif_31",active:"_active_1kmif_44"},At=({languages:e,current:t,onChange:n})=>{const[r,s]=g.useState(!1),[i,o]=g.useState(t||e[0].code),c=g.useRef(null);return g.useEffect(()=>{const l=u=>{c.current&&!c.current.contains(u.target)&&s(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),h.jsxs("div",{className:X.selectorWrapper,ref:c,children:[h.jsx("button",{className:X.iconButton,title:"Cambiar idioma",onClick:()=>s(!r),children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",width:"30px",height:"30px",viewBox:"0 0 24 24",children:h.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"})})}),r&&h.jsx("div",{className:X.dropdown,children:e.map(l=>h.jsx("button",{className:`${X.dropdownItem} ${l.code===i?X.active:""}`,onClick:()=>{o(l.code),n==null||n(l.code),s(!1)},children:l.label},l.code))})]})},x={controlsRow:"_controlsRow_8wakc_1",select:"_select_8wakc_9",autoAdvanceButton:"_autoAdvanceButton_8wakc_15",section:"_section_8wakc_26",textarea:"_textarea_8wakc_36",input:"_input_8wakc_46",error:"_error_8wakc_54",buttonPrimary:"_buttonPrimary_8wakc_59",buttonSuccess:"_buttonSuccess_8wakc_69",infoBox:"_infoBox_8wakc_78",viewer:"_viewer_8wakc_86",viewerTopBar:"_viewerTopBar_8wakc_97",topRightControls:"_topRightControls_8wakc_110",itemCounter:"_itemCounter_8wakc_118",iconButton:"_iconButton_8wakc_126",navButton:"_navButton_8wakc_146",navButtonLeft:"_navButtonLeft_8wakc_163",navButtonRight:"_navButtonRight_8wakc_167",backgroundImage:"_backgroundImage_8wakc_171",avatar:"_avatar_8wakc_178",caption:"_caption_8wakc_188",captionTitle:"_captionTitle_8wakc_201",captionText:"_captionText_8wakc_211",loadingOverlay:"_loadingOverlay_8wakc_217",loadingSpinner:"_loadingSpinner_8wakc_232",spin:"_spin_8wakc_251",loadingButton:"_loadingButton_8wakc_242",spinner:"_spinner_8wakc_251",progressBar:"_progressBar_8wakc_264",progressFill:"_progressFill_8wakc_273",playbackControls:"_playbackControls_8wakc_279",playButton:"_playButton_8wakc_292",pauseButton:"_pauseButton_8wakc_293"},pr=[{id:"Ebona",name:"Voz Mujer"},{id:"Bodega",name:"Voz Hombre"},{id:"Peter",name:"Voz Narrador"}],Rt=ie.DEFAULT_IMAGE_URL,hr=({heritageItems:e=[],targetLanguage:t="es",descriptionLength:n="extended",autoAdvance:r=!1,voiceIds:s=[],avatars:i=[]})=>{const[o]=g.useState(e),[c,l]=g.useState(0),[u,d]=g.useState(n),[f,E]=g.useState(t),[S,p]=g.useState(""),[w,m]=g.useState([]),[T,_]=g.useState(0),[A,L]=g.useState(r),[O,k]=g.useState(!1),[D,$]=g.useState(s.length>0?s[0]:""),b=D||(s.length>0?s[c%s.length]:""),R=i[c%i.length],[I,W]=g.useState(!1),[re,Ee]=g.useState(!1),[mr,Se]=g.useState(!0),G=g.useRef(null),Ot=g.useRef(A),xt=g.useRef(c),Ie=g.useRef(o),J=g.useRef(null),be=g.useRef(!1);g.useEffect(()=>{Ot.current=A,xt.current=c,Ie.current=o},[A,c,o]);const Z=o[c]||{id:"default",name:"Patrimonio Cultural",description:{local:{short:"Ingrese un JSON válido para comenzar",extended:"Ingrese un JSON válido para comenzar"}},imageUrl:""},{isPlaying:q,isPaused:Ct,isLoadingAudio:wr,progress:vt,play:gr,pause:yr,resume:Er,stop:Sr}=fr({text:S,lang:f,onStop:()=>{Se(!0),Ot.current&&Ie.current.length>1&&!be.current&&setTimeout(()=>{k(!0);const N=(xt.current+1)%Ie.current.length;l(N)},100),be.current=!1},voiceId:b,avatars:[R]});g.useEffect(()=>{if(O&&S&&!S.includes("JSON válido")){const N=setTimeout(()=>{q||Lt(),k(!1)},500);return()=>clearTimeout(N)}},[O,S,q]),g.useEffect(()=>{(async()=>{const M=Z.description.local[u];if(M)try{const se=await je(Z.name,f),Rr=await je(M,f);p(`${se}. ${Rr}`)}catch(se){console.error("Error en traducción:",se),p(`${Z.name}. ${M}`)}})()},[Z,u,f]);const Fe=()=>{Se(!0),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{Se(!1)},4e3)},Lt=()=>{if(!S.trim()||S.includes("JSON válido")){alert("No hay contenido para reproducir");return}gr(),Fe()},br=()=>{yr()},Tr=()=>{Er(),Fe()},Bt=()=>{Sr(),k(!1),G.current&&clearTimeout(G.current),J.current&&clearTimeout(J.current),Se(!0)},_r=()=>{be.current=!0,Bt(),c>0&&l(N=>N-1)},Ar=()=>{be.current=!0,Bt(),c<o.length-1&&l(N=>N+1)};g.useEffect(()=>()=>{G.current&&clearTimeout(G.current),J.current&&clearTimeout(J.current)},[]),g.useEffect(()=>{if(S){const N=S.split(new RegExp("(?<=[.!?])\\s+","g")).map(M=>M.trim()).filter(M=>M.length>0);m(N),_(0)}},[S]),g.useEffect(()=>{if(!q||w.length===0)return;G.current&&clearTimeout(G.current);const M=1500+w[T].length*50;G.current=setTimeout(()=>{_(se=>(se+1)%w.length)},M)},[q,w,T]);const[kt,Us]=g.useState(!1);return g.useEffect(()=>{!kt&&s.length>0&&$(s[c%s.length])},[c,s,kt]),h.jsxs("div",{children:[ie.DEBUG_MODE,h.jsxs("div",{className:x.viewer,onClick:Fe,children:[h.jsxs("div",{className:x.viewerTopBar,children:[h.jsx("div",{className:x.itemCounter,children:o.length>0?`${c+1}/${o.length}`:"0/0"}),h.jsxs("div",{className:x.topRightControls,children:[h.jsx("button",{onClick:()=>L(!A),className:x.iconButton,title:"Autoplay",style:{backgroundColor:A?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)"},children:h.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{style:{fill:A?"black":"white"},d:"M5.23331,0.493645 C6.8801,-0.113331 8.6808,-0.161915 10.3579,0.355379 C11.4019,0.6773972 12.361984,1.20757325 13.1838415,1.90671757 L13.4526,2.14597 L14.2929,1.30564 C14.8955087,0.703065739 15.9071843,1.0850774 15.994017,1.89911843 L16,2.01275 L16,6.00002 L12.0127,6.00002 C11.1605348,6.00002 10.7153321,5.01450817 11.2294893,4.37749065 L11.3056,4.29291 L12.0372,3.56137 C11.389,2.97184 10.6156,2.52782 9.76845,2.26653 C8.5106,1.87856 7.16008,1.915 5.92498,2.37023 C4.68989,2.82547 3.63877,3.67423 2.93361,4.78573 C2.22844,5.89723 1.90836,7.20978 2.02268,8.52112 C2.13701,9.83246 2.6794,11.0698 3.56627,12.0425 C4.45315,13.0152 5.63528,13.6693 6.93052,13.9039 C8.22576,14.1385 9.56221,13.9407 10.7339,13.3409 C11.9057,12.7412 12.8476,11.7727 13.4147,10.5848 C13.6526,10.0864 14.2495,9.8752 14.748,10.1131 C15.2464,10.351 15.4575,10.948 15.2196,11.4464 C14.4635,13.0302 13.2076,14.3215 11.6453,15.1213 C10.0829,15.921 8.30101,16.1847 6.57402,15.8719 C4.84704,15.559 3.27086,14.687 2.08836,13.39 C0.905861,12.0931 0.182675,10.4433 0.0302394,8.69483 C-0.122195,6.94637 0.304581,5.1963 1.2448,3.7143 C2.18503,2.2323 3.58652,1.10062 5.23331,0.493645 Z M6,5.46077 C6,5.09472714 6.37499031,4.86235811 6.69509872,5.0000726 L6.7678,5.03853 L10.7714,7.57776 C11.0528545,7.75626909 11.0784413,8.14585256 10.8481603,8.36273881 L10.7714,8.42224 L6.7678,10.9615 C6.45867857,11.1575214 6.06160816,10.965274 6.00646097,10.6211914 L6,10.5392 L6,5.46077 Z"})})}),h.jsx(At,{languages:[{code:"es",label:"Español"},{code:"en",label:"English"},{code:"fr",label:"Français"}],current:"es",onChange:N=>E(N)})]})]}),h.jsx("button",{onClick:_r,disabled:o.length===0,className:`${x.navButton} ${x.navButtonLeft}`,title:"Anterior",onMouseOver:()=>W(!0),onMouseOut:()=>W(!1),children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"24px",height:"24px",transition:"transform 0.2s ease-in-out",transform:I?"scale(1.5)":"scale(1)"},children:h.jsx("path",{d:"M15 18l-6-6 6-6"})})}),h.jsx("button",{onClick:Ar,disabled:o.length===0,className:`${x.navButton} ${x.navButtonRight}`,title:"Siguiente",onMouseOver:()=>Ee(!0),onMouseOut:()=>Ee(!1),children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"24px",height:"24px",transition:"transform 0.2s ease-in-out",transform:re?"scale(1.5)":"scale(1)"},children:h.jsx("path",{d:"M9 6l6 6-6 6"})})}),h.jsx("img",{src:Z.imageUrl||Rt,alt:"Background",className:x.backgroundImage,style:{opacity:q?1:.7},onError:N=>N.currentTarget.src=Rt}),q&&h.jsx(h.Fragment,{children:h.jsx("img",{src:R,alt:"Avatar",className:x.avatar,style:{transform:`scale(${vt%10<5?4:4.05})`}})}),h.jsxs("div",{className:x.caption,children:[h.jsx("h4",{className:x.captionTitle,children:Z.name}),q&&h.jsx(h.Fragment,{children:h.jsx("p",{className:x.captionText,children:w.length>0&&w[T]})})]}),O&&h.jsxs("div",{className:x.loadingOverlay,children:[h.jsx("div",{className:x.loadingSpinner}),h.jsx("p",{children:"Cargando siguiente patrimonio..."})]}),mr&&h.jsx("div",{className:x.playbackControls,children:wr?h.jsx("button",{disabled:!0,className:x.loadingButton,children:h.jsxs("svg",{className:x.spinner,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}):!q&&!Ct?h.jsx("button",{onClick:Lt,disabled:o.length===0||O,className:x.playButton,children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"white",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M9 8.5 L9 15.5 L16 12 Z"})})}):Ct?h.jsx("button",{onClick:Tr,className:x.playButton,children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"white",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M9 8.5 L9 15.5 L16 12 Z"})})}):h.jsx("button",{onClick:br,className:x.pauseButton,children:h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("line",{x1:"10",y1:"8",x2:"10",y2:"16"}),h.jsx("line",{x1:"14",y1:"8",x2:"14",y2:"16"})]})})}),h.jsx("div",{className:x.progressBar,children:h.jsx("div",{className:x.progressFill,style:{width:`${vt}%`}})})]})]})};v.LanguageSelector=At,v.LanguageSelectorStyles=X,v.StoryVisualizer=hr,v.StoryVisualizerStyles=x,v.voices=pr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
7
7
  //# sourceMappingURL=ocity-heritage-visualizer.umd.js.map