score-viewer 1.0.44 → 1.0.45

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,4 +1,4 @@
1
- (function(Ln,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],C):(Ln=typeof globalThis<"u"?globalThis:Ln||self,C(Ln.ScoreViewer={},Ln.React,Ln.jsxRuntime,Ln.ReactDOM))})(this,function(Ln,C,q,zr){"use strict";var UJ=Object.defineProperty;var WJ=(Ln,C,q)=>C in Ln?UJ(Ln,C,{enumerable:!0,configurable:!0,writable:!0,value:q}):Ln[C]=q;var no=(Ln,C,q)=>WJ(Ln,typeof C!="symbol"?C+"":C,q);function Bg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Bg(C),zg=Bg(zr),Nt=e=>typeof e=="string",ls=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Hg=e=>e==null?"":""+e,ON=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},NN=/###/g,jg=e=>e&&e.indexOf("###")>-1?e.replace(NN,"."):e,Vg=e=>!e||Nt(e),us=(e,t,n)=>{const r=Nt(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Vg(e))return{};const o=jg(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Vg(e)?{}:{obj:e,k:jg(r[i])}},Ug=(e,t,n)=>{const{obj:r,k:i}=us(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=us(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=us(e,a,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},_N=(e,t,n,r)=>{const{obj:i,k:o}=us(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Bl=(e,t)=>{const{obj:n,k:r}=us(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},IN=(e,t,n)=>{const r=Bl(e,n);return r!==void 0?r:Bl(t,n)},Wg=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Nt(e[r])||e[r]instanceof String||Nt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Wg(e[r],t[r],n):e[r]=t[r]);return e},ia=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var AN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const PN=e=>Nt(e)?e.replace(/[&<>"'\/]/g,t=>AN[t]):e;class MN{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const LN=[" ",",","?","!",";"],DN=new MN(20),kN=(e,t,n)=>{t=t||"",n=n||"";const r=LN.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=DN.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},Od=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let a,s="";for(let l=o;l<r.length;++l)if(l!==o&&(s+=n),s+=r[l],a=i[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;o+=l-o+1;break}i=a}return i},cs=e=>e==null?void 0:e.replace("_","-"),RN={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class zl{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||RN,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(Nt(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new zl(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new zl(this.logger,t)}}var hi=new zl;class Hl{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let a=0;a<o;a++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let a=0;a<o;a++)i.apply(i,[t,...n])})}}class Yg extends Hl{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,c;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Nt(r)&&o?s.push(...r.split(o)):s.push(r)));const l=Bl(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!Nt(r)?l:Od((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),Ug(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(Nt(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,a={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=Bl(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Wg(l,r,o):l={...l,...r},Ug(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var qg={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var a;t=((a=this.processors[o])==null?void 0:a.process(t,n,r,i))??t}),t}};const Xg={},Kg=e=>!Nt(e)&&typeof e!="boolean"&&typeof e!="number";class jl extends Hl{constructor(t,n={}){super(),ON(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hi.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);return(i==null?void 0:i.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kN(t,r,i);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Nt(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:Nt(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(i={...i}),i||(i={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?o?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;const h=this.resolve(t,i);let p=h==null?void 0:h.res;const g=(h==null?void 0:h.usedKey)||s,v=(h==null?void 0:h.exactUsedKey)||s,b=["[object Number]","[object Function]","[object RegExp]"],y=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!Nt(i.count),O=jl.hasDefaultValue(i),S=x?this.pluralResolver.getSuffix(d,i.count,i):"",T=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):"",I=x&&!i.ordinal&&i.count===0,N=I&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${T}`]||i.defaultValue;let _=p;E&&!p&&O&&(_=N);const P=Kg(_),A=Object.prototype.toString.apply(_);if(E&&_&&P&&b.indexOf(A)<0&&!(Nt(y)&&Array.isArray(_))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,_,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(h.res=M,h.usedParams=this.getUsedParamsDetails(i),h):M}if(a){const M=Array.isArray(_),D=M?[]:{},R=M?v:g;for(const $ in _)if(Object.prototype.hasOwnProperty.call(_,$)){const F=`${R}${a}${$}`;O&&!p?D[$]=this.translate(F,{...i,defaultValue:Kg(N)?N[$]:void 0,joinArrays:!1,ns:l}):D[$]=this.translate(F,{...i,joinArrays:!1,ns:l}),D[$]===F&&(D[$]=_[$])}p=D}}else if(E&&Nt(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,i,r));else{let M=!1,D=!1;!this.isValidLookup(p)&&O&&(M=!0,p=N),this.isValidLookup(p)||(D=!0,p=s);const $=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:p,F=O&&N!==p&&this.options.updateMissing;if(D||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,u,s,F?N:p),a){const H=this.resolve(s,{...i,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let B=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let H=0;H<z.length;H++)B.push(z[H]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(i.lng||this.language):B.push(i.lng||this.language);const L=(H,W,k)=>{var Y;const G=O&&k!==p?k:$;this.options.missingKeyHandler?this.options.missingKeyHandler(H,u,W,G,F,i):(Y=this.backendConnector)!=null&&Y.saveMissing&&this.backendConnector.saveMissing(H,u,W,G,F,i),this.emit("missingKey",H,u,W,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?B.forEach(H=>{const W=this.pluralResolver.getSuffixes(H,i);I&&i[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(k=>{L([H],s+k,i[`defaultValue${k}`]||N)})}):L(B,s,N))}p=this.extendTranslation(p,t,i,h,r),D&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${s}`),(D||M)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,M?p:void 0,i))}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(i),h):p}extendTranslation(t,n,r,i,o){var l,u;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Nt(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&!Nt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),c){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;d<p&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>(o==null?void 0:o[0])===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=Nt(a)?[a]:a;return t!=null&&(s!=null&&s.length)&&r.applyPostProcessor!==!1&&(t=qg.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,a,s;return Nt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Nt(n.count),h=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(Nt(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{var b,y;this.isValidLookup(r)||(s=v,!Xg[`${g[0]}-${v}`]&&((b=this.utils)!=null&&b.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(s))&&(Xg[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(E=>{var S;if(this.isValidLookup(r))return;a=E;const x=[c];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,E,v,n);else{let T;f&&(T=this.pluralResolver.getSuffix(E,n.count,n));const I=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(c+T),n.ordinal&&T.indexOf(N)===0&&x.push(c+T.replace(N,this.options.pluralSeparator)),h&&x.push(c+I)),p){const _=`${c}${this.options.contextSeparator}${n.context}`;x.push(_),f&&(x.push(_+T),n.ordinal&&T.indexOf(N)===0&&x.push(_+T.replace(N,this.options.pluralSeparator)),h&&x.push(_+I))}}let O;for(;O=x.pop();)this.isValidLookup(r)||(o=O,r=this.getResource(E,v,O,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Nt(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class Gg{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hi.create("languageUtils")}getScriptPartFromCode(t){if(t=cs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=cs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Nt(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Nt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Nt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):Nt(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const Qg={zero:0,one:1,two:2,few:3,many:4,other:5},Zg={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class $N{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=hi.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=cs(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zg;if(!t.match(/-|_/))return Zg;const l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>Qg[i]-Qg[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Jg=(e,t,n,r=".",i=!0)=>{let o=IN(e,t,n);return!o&&i&&Nt(n)&&(o=Od(e,n,r),o===void 0&&(o=Od(t,n,r))),o},Nd=e=>e.replace(/\$/g,"$$$$");class FN{constructor(t={}){var n;this.logger=hi.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:PN,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?ia(o):a||"{{",this.suffix=s?ia(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ia(f):h||ia("$t("),this.nestingSuffix=p?ia(p):g||ia(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=b||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var h;let o,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=Jg(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),v=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(Jg(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>Nd(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?Nd(this.escape(p)):Nd(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const g=o[1].trim();if(a=u(g),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=Nt(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(d){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else!Nt(a)&&!this.useRawValueToEscape&&(a=Hg(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,a;const s=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),p=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!Nt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!Nt(o))return o;Nt(o)||(o=Hg(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const BN=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},e0=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(cs(r),i),t[a]=s),s(n)}},zN=e=>(t,n,r)=>e(cs(n),r)(t);class HN{constructor(t={}){this.logger=hi.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?e0:zN;this.formats={number:r((i,o)=>{const a=new Intl.NumberFormat(i,{...o});return s=>a.format(s)}),currency:r((i,o)=>{const a=new Intl.NumberFormat(i,{...o,style:"currency"});return s=>a.format(s)}),datetime:r((i,o)=>{const a=new Intl.DateTimeFormat(i,{...o});return s=>a.format(s)}),relativetime:r((i,o)=>{const a=new Intl.RelativeTimeFormat(i,{...o});return s=>a.format(s,o.range||"day")}),list:r((i,o)=>{const a=new Intl.ListFormat(i,{...o});return s=>a.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=e0(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,l)=>{var d;const{formatName:u,formatOptions:c}=BN(l);if(this.formats[u]){let f=s;try{const h=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[u](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const jN=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class VN extends Hl{constructor(t,n,r,i={}){var o,a;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=hi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(o=this.backend)==null?void 0:o.init)==null||a.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(s[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{_N(l.loaded,[o],a),jN(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{s[u][d]===void 0&&(s[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,i=0,o=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Nt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Nt(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o,a={},s=()=>{}){var l,u,c,d,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...a,isUpdate:o},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,n,r,i,h):g=p(t,n,r,i),g&&typeof g.then=="function"?g.then(v=>s(null,v)).catch(s):s(null,g)}catch(g){s(g)}else p(t,n,r,i,s,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const t0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Nt(e[1])&&(t.defaultValue=e[1]),Nt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),n0=e=>{var t,n;return Nt(e.ns)&&(e.ns=[e.ns]),Nt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Nt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Vl=()=>{},UN=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ds extends Hl{constructor(t={},n){if(super(),this.options=n0(t),this.services={},this.logger=hi,this.modules={external:[]},UN(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Nt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=t0();this.options={...r,...this.options,...n0(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?hi.init(i(this.modules.logger),this.options):hi.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=HN;const c=new Gg(this.options);this.store=new Yg(this.options.resources,this.options);const d=this.services;d.logger=hi,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new $N(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=i(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new FN(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new VN(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new jl(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Vl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const s=ls(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=Vl){var o,a;let r=n;const i=Nt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&s.indexOf(d)<0&&s.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(o=this.options.preload)==null?void 0:o.forEach)==null||a.call(o,u=>l(u)),this.services.backendConnector.load(s,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ls();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Vl),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qg.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ls();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},o=(s,l)=>{l?this.isLanguageChangingTo===t&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},a=s=>{var c,d;!t&&!s&&this.services.languageDetector&&(s=[]);const l=Nt(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Nt(s)?[s]:s);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{o(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),r}getFixedT(t,n,r){const i=(o,a,...s)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([o,a].concat(s)):l={...a},l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||i.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(o)?c=o.map(d=>`${l.keyPrefix}${u}${d}`):c=l.keyPrefix?`${l.keyPrefix}${u}${o}`:o,this.t(c,l)};return Nt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=ls();return this.options.ns?(Nt(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ls();Nt(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const s=a.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new Gg(t0());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new ds(t,n)}cloneInstance(t={},n=Vl){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ds(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});o.store=new Yg(s,i),o.services.resourceStore=o.store}return o.translator=new jl(o.services,i),o.translator.on("*",(s,...l)=>{o.emit(s,...l)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const In=ds.createInstance();In.createInstance=ds.createInstance,In.createInstance,In.dir,In.init,In.loadResources,In.reloadResources,In.use,In.changeLanguage,In.getFixedT,In.t,In.exists,In.setDefaultNamespace,In.hasLoadedNamespace,In.loadNamespaces,In.loadLanguages;var Nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const WN=(e,t,n,r)=>{var o,a,s,l;const i=[n,{code:t,...r||{}}];if((a=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&a.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);To(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&l.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},r0={},_d=(e,t,n,r)=>{To(n)&&r0[n]||(To(n)&&(r0[n]=new Date),WN(e,t,n,r))},i0=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Id=(e,t,n)=>{e.loadNamespaces(t,i0(e,n))},o0=(e,t,n,r)=>{if(To(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Id(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,i0(e,r))},YN=(e,t,n={})=>!t.languages||!t.languages.length?(_d(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),To=e=>typeof e=="string",qN=e=>typeof e=="object"&&e!==null,XN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,KN={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},GN=e=>KN[e];let Ad={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(XN,GN)};const QN=(e={})=>{Ad={...Ad,...e}},ZN=()=>Ad;let a0;const JN=e=>{a0=e},e_=()=>a0,t_={type:"3rdParty",init(e){QN(e.options.react),JN(e)}},n_=C.createContext();class r_{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const i_=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},s0=(e,t,n,r)=>e.getFixedT(t,n,r),o_=(e,t,n,r)=>C.useCallback(s0(e,t,n,r),[e,t,n,r]),cr=(e,t={})=>{var x,O,S;const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(n_)||{},o=n||r||e_();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new r_),!o){_d(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const T=(N,_)=>To(_)?_:qN(_)&&To(_.defaultValue)?_.defaultValue:Array.isArray(N)?N[N.length-1]:N,I=[T,{},!1];return I.t=T,I.i18n={},I.ready=!1,I}(x=o.options.react)!=null&&x.wait&&_d(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...ZN(),...o.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let u=e;u=To(u)?[u]:u||["translation"],(S=(O=o.reportNamespaces).addUsedNamespaces)==null||S.call(O,u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(T=>YN(T,o,a)),d=o_(o,t.lng||null,a.nsMode==="fallback"?u:u[0],l),f=()=>d,h=()=>s0(o,t.lng||null,a.nsMode==="fallback"?u:u[0],l),[p,g]=C.useState(f);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const b=i_(v),y=C.useRef(!0);C.useEffect(()=>{const{bindI18n:T,bindI18nStore:I}=a;y.current=!0,!c&&!s&&(t.lng?o0(o,t.lng,u,()=>{y.current&&g(h)}):Id(o,u,()=>{y.current&&g(h)})),c&&b&&b!==v&&y.current&&g(h);const N=()=>{y.current&&g(h)};return T&&(o==null||o.on(T,N)),I&&(o==null||o.store.on(I,N)),()=>{y.current=!1,o&&T&&(T==null||T.split(" ").forEach(_=>o.off(_,N))),I&&o&&I.split(" ").forEach(_=>o.store.off(_,N))}},[o,v]),C.useEffect(()=>{y.current&&c&&g(f)},[o,l,c]);const E=[p,o,c];if(E.t=p,E.i18n=o,E.ready=c,c||!c&&!s)return E;throw new Promise(T=>{t.lng?o0(o,t.lng,u,()=>T()):Id(o,u,()=>T())})},{slice:a_,forEach:s_}=[];function l_(e){return s_.call(a_.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function u_(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const l0=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,c_=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!l0.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!l0.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},u0={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=c_(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var d_={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return u0.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:o}=t;n&&typeof document<"u"&&u0.create(n,e,r,i,o)}},f_={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s<a.length;s++){const l=a[s].indexOf("=");l>0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}},h_={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const a=o.substring(1);if(t){const s=a.split("&");for(let l=0;l<s.length;l++){const u=s[l].indexOf("=");u>0&&s[l].substring(0,u)===t&&(r=s[l].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(i=s[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let oa=null;const c0=()=>{if(oa!==null)return oa;try{if(oa=typeof window<"u"&&window.localStorage!==null,!oa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{oa=!1}return oa};var m_={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&c0())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&c0()&&window.localStorage.setItem(n,e)}};let aa=null;const d0=()=>{if(aa!==null)return aa;try{if(aa=typeof window<"u"&&window.sessionStorage!==null,!aa)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{aa=!1}return aa};var p_={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&d0())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&d0()&&window.sessionStorage.setItem(n,e)}},g_={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},v_={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},b_={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},y_={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let f0=!1;try{document.cookie,f0=!0}catch{}const h0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];f0||h0.splice(1,1);const E_=()=>({order:h0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class m0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=l_(n,this.options||{},E_()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(d_),this.addDetector(f_),this.addDetector(m_),this.addDetector(p_),this.addDetector(g_),this.addDetector(v_),this.addDetector(b_),this.addDetector(y_),this.addDetector(h_)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!u_(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}m0.type="languageDetector";const S_=50,Pd=30,Md=120,p0=[{key:"en",label:"English"},{key:"es",label:"Español"}],Ld="i18nextLng";var fs=(e=>(e[e.FADE_OUT=0]="FADE_OUT",e[e.FADE_IN=1]="FADE_IN",e))(fs||{});const C_={Music:"Música",save:"Guardar",cancel:"Cancelar",Text:"Texto",Introduction:"Introducción",heading:{work:"Obra",section:"Sección"},tab:{introduction:"Introducción",music:"Música",text:"Texto",facsimile:"Facsimil"},editorial:{preferredReading:"lectura preferida",alternativeReading:"lectura alternativa",regReading:"lectura regularizada",origReading:"lectura original",alternativeReadingNumber:"lectura alternativa nº",currentlyShowing:"Actualmente se muestra la {{what}}",availableOptions:"Opciones disponibles",reason:"Razón",resp:"Responsable",optionNumber:"Opción nº{{number}}",formatType:{corr:"Corrección aplicada",unclear:"Elemento poco claro en la fuente",choice:"Opciones disponibles",app:"Lecturas alternativas",lem:"lectura preferida",rdg:"otra lectura",sic:"error evidente",supplied:"parte añadida",reg:"Regularización",clefChange:"Cambio de clave",default:"tipo: {{type}}"}},error:{scoreViewerError:"Algo fue mal en el visor de partituras",tryAgain:"Intentar de nuevo",fetchingScore:{title:"Error al obtener la partitura",details:"Error al cargar la partitura de la red: {{url}}"},fetchIntroError:"Error al obtener el texto de introducción",fetchLyricsItemError:"Error al obtener el texto poético",fetchTextCommentsError:"Comentarios del texto",fetchErrorDescription:"Se produjeron los siguientes errores al obtener elementos de la red",fetchLyricsItemErrorWithSection:"Texto poético para la sección {{section}}",fetchTextSeeErrorAbove:"Error: ver arriba para más detalles"},ok:"Ok",reset:"Reset",playerMode:{autoscroll:"auto scroll",normal:"normal"},anonymous:"Anónimo",scoreControls:{settings:"Configuración"},scoreOptions:{title:"Opciones de visualizacion",reconstruction:"Reconstrucción {{voiceName}}",uiSettings:{title:"Configuración de la interfaz de usuario"},scoreViewerSettings:{title:"Configuración del visor de partituras"},scoreSettings:{title:"Opciones de la partitura seleccionada"},editorialNotes:{title:"Notas editoriales",description:"Muestra una capa con las notas críticas y elección de variantes variantes"},normalizeFicta:{title:"Normalizar musica ficta",description:"Mostrar las alteraciones subintelectas de como las normales prececiendo a la nota"},originalClefs:{title:"Claves originales",description:"Muestra las claves originales del manuscrito sin modernizar"},noTransposition:{title:"Sin transposición",description:"Muestra la partitura deshaciendo la transposición desde claves altas ({{encodedTransposition}})"},harmonicAnalysis:{title:"Análisis armónico",description:"Muestra la clasificación de las disonancias presentes en la partitura"},limitVerses:{title:"Limitar estrofas",description:"Elige la cantidad de estrofas a mostrar en las coplas"},verseAmmount_one:"1 estrofa",verseAmmount_other:"{{count}} estrofas",reconstructionNone:"ninguna",language:{title:"Idioma",description:"Idioma de la interfaz de usuario"},uiLayout:{title:"Diseño de la interfaz de usuario",description:"Define cómo se organizan los componentes en la pantalla"},measureNumberInterval:{title:"Número de compás",description:"Define con qué frecuencia se muestran los números de compás en la partitura"},measureIntervalPage:"Al comienzo de la página",measureInterval10:"Cada 10 compases",measureInterval5:"Cada 5 compases",measureInterval1:"Cada compás"},scoreProcessor:{reconstructionByIA:"Reconstrucción por IA. Modelo {{name}}",reconstructionByHuman:"Reconstrucción por {{name}}"},score:{measureNumber:"Compás {{number}}"},textView:{intro:"Introducción",poeticText:"Texto poético",notes:"Notas al texto"},test:{score1:"Obra 1",score2:"Obra 2",score3:"Obra 3",basic:"en esp test"},configValidation:{configRequired:"La configuración es requerida",settingsRequired:"El objeto de configuración (settings) es requerido",showScoreSelectorBoolean:"showScoreSelector debe ser un booleano",showTitleBoolean:"showTitle debe ser un booleano",showDownloadButtonBoolean:"showDownloadButton debe ser un booleano",showIntroductionSectionBoolean:"showIntroductionSection debe ser un booleano",showTextSectionBoolean:"showTextSection debe ser un booleano",showFacsimileSectionBoolean:"showFacsimileSection debe ser un booleano",renderTitlesFromMEIBoolean:"renderTitlesFromMEI debe ser un booleano",allowUserLanguageChangeBoolean:"allowUserLanguageChange debe ser un booleano",basePathRequired:"basePath es requerido y debe ser una cadena de texto",facsimileImagesPathRequired:"facsimileImagesPath es requerido y debe ser una cadena de texto",backgroundColorString:"backgroundColor debe ser una cadena de texto si se proporciona",languageString:"language debe ser una cadena de texto si se proporciona",scoresArray:"Scores debe ser un array",scoresNotEmpty:"Se requiere al menos una partitura",scoreTitleRequired:"El título de la partitura es requerido y debe ser una cadena de texto",scorePathRequired:"La ruta de la partitura es requerida y debe ser una cadena de texto",scoreMeiFileRequired:"El archivo MEI de la partitura es requerido y debe ser una cadena de texto",scoreEncodingPropertiesRequired:"El objeto encodingProperties es requerido",scoreAudioOverlaysArray:"audioOverlays debe ser un array si se proporciona",scoreTextArray:"text debe ser un array si se proporciona",scoreFacsimileItemsArray:"facsimileItems debe ser un array si se proporciona",configurationError:"Error de Configuración",configurationErrorDescription:"La configuración del ScoreViewer contiene errores:"}},w_={Music:"Música",save:"Guardar",cancel:"Cancelar",Text:"Texto",Introduction:"Introducción",heading:{work:"Work",section:"Section",splitViewSelector:"Right view content"},tab:{introduction:"Introduction",music:"Music",text:"Text",facsimile:"Facsimile"},editorial:{preferredReading:"preferred reading",alternativeReading:"alternative reading",regReading:"regularized reading",origReading:"original reading",alternativeReadingNumber:"alternative reading #",currentlyShowing:"Currently showing the {{what}}",availableOptions:"Available options",reason:"Reason",resp:"Responsible person",optionNumber:"Option #{{number}}",formatType:{corr:"Applied correction",unclear:"Unclear element in the source",choice:"Available options",app:"Alternative readings",lem:"preferred reading",rdg:"other reading",sic:"obvious error",supplied:"added part",reg:"Regularization",clefChange:"Clef change",default:"type: {{type}}"}},error:{scoreViewerError:"Something went wrong in the score viewer.",tryAgain:"Try again",fetchingScore:{title:"Error fetching the score",details:"Error loading the score from the network: {{url}}"},fetchIntroError:"Error fetching the introduction text",fetchErrorDescription:"The following errors occurred fetching items from the network",fetchLyricsItemErrorWithSection:"Poetic text for section {{section}}",fetchTextCommentsError:"Text comments",fetchTextSeeErrorAbove:"Error: see above for details"},ok:"Ok",reset:"Reset",playerMode:{autoscroll:"auto scroll",normal:"normal"},anonymous:"Anonymous",scoreControls:{settings:"Settings"},scoreOptions:{title:"Display options",reconstruction:"Reconstruction {{voiceName}}",uiSettings:{title:"UI settings"},scoreViewerSettings:{title:"Score viewer settings"},scoreSettings:{title:"Current score options"},editorialNotes:{title:"Editorial notes",description:"Shows a layer with critical notes and variant selection options"},normalizeFicta:{title:"Normalize musica ficta",description:"Show the subsemitonium alterations as normal ones preceding the note"},originalClefs:{title:"Original clefs",description:"Shows the original manuscript clefs without modernization"},noTransposition:{title:"No transposition",description:"Shows the score undoing the transposition from high clefs ({{encodedTransposition}})"},harmonicAnalysis:{title:"Harmonic analysis",description:"Shows classification dissonances present in the score"},limitVerses:{title:"Limit verses",description:"Choose the number of verses to show in the couplets"},verseAmmount_one:"1 verse",verseAmmount_other:"{{count}} verses",reconstructionNone:"none",language:{title:"Language",description:"Language for the UI"},uiLayout:{title:"UI Layout",description:"Define how components are arranged on the screen"},measureNumberInterval:{title:"Measure number",description:"Define how often measure numbers are shown in the score"},measureIntervalPage:"At the beginning of the page",measureInterval10:"Every 10 measures",measureInterval5:"Every 5 measures",measureInterval1:"Every measure"},scoreProcessor:{reconstructionByIA:"Reconstruction by AI. Model {{name}}",reconstructionByHuman:"Reconstruction by {{name}}"},score:{measureNumber:"Measure {{number}}"},textView:{intro:"Introduction",poeticText:"Poetical text",notes:"Notes to the text"},test:{score1:"Score 1",score2:"Score 2",score3:"Score 3",basic:"Basic",selectTest:"Select Test:",sections:"Sections"},configValidation:{configRequired:"Configuration is required",settingsRequired:"Settings object is required",showScoreSelectorBoolean:"showScoreSelector must be a boolean",showTitleBoolean:"showTitle must be a boolean",showDownloadButtonBoolean:"showDownloadButton must be a boolean",showIntroductionSectionBoolean:"showIntroductionSection must be a boolean",showTextSectionBoolean:"showTextSection must be a boolean",showFacsimileSectionBoolean:"showFacsimileSection must be a boolean",renderTitlesFromMEIBoolean:"renderTitlesFromMEI must be a boolean",allowUserLanguageChangeBoolean:"allowUserLanguageChange must be a boolean",basePathRequired:"basePath is required and must be a string",facsimileImagesPathRequired:"facsimileImagesPath is required and must be a string",backgroundColorString:"backgroundColor must be a string if provided",languageString:"language must be a string if provided",scoresArray:"Scores must be an array",scoresNotEmpty:"At least one score is required",scoreTitleRequired:"Score title is required and must be a string",scorePathRequired:"Score path is required and must be a string",scoreMeiFileRequired:"Score meiFile is required and must be a string",scoreEncodingPropertiesRequired:"encodingProperties object is required",scoreAudioOverlaysArray:"audioOverlays must be an array if provided",scoreTextArray:"text must be an array if provided",scoreFacsimileItemsArray:"facsimileItems must be an array if provided",configurationError:"Configuration Error",configurationErrorDescription:"The ScoreViewer configuration contains errors:"}},x_={order:["sessionStorage","navigator"],lookupSessionStorage:Ld,caches:["sessionStorage"]},T_={en:{common:w_},es:{common:C_}};In.use(t_).use(m0).init({supportedLngs:p0.map(e=>e.key),resources:T_,...x_,fallbackLng:"en",debug:!1,defaultNS:"common",interpolation:{escapeValue:!1}});const g0=e=>{let t;const n=new Set,r=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const f=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,f))}},i=()=>t,s={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,i,s);return s},O_=e=>e?g0(e):g0,N_=e=>e;function __(e,t=N_){const n=C.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return C.useDebugValue(n),n}const v0=e=>{const t=O_(e),n=r=>__(t,r);return Object.assign(n,t),n},Oo=e=>e?v0(e):v0;function No(e){const t=e;t.use={};const n=Object.keys(e.getState());for(const r of n)t.use[r]=()=>e(i=>i[r]);return t}const Wl=e=>({type:"load",config:e}),I_=e=>({type:"loadAutoScroll",config:e}),Dd=e=>({type:"render",config:e}),A_=e=>({type:"renderAutoScroll",config:e});class ti extends Error{constructor(n,r){super(r);no(this,"type");this.type=n,Object.setPrototypeOf(this,ti.prototype)}}var Ct=(e=>(e[e.PLAYING=0]="PLAYING",e[e.PAUSED=1]="PAUSED",e[e.STOPPED=2]="STOPPED",e))(Ct||{});const P_=Oo(e=>({pendingAction:null,setPendingAction:t=>e(()=>({pendingAction:t}))})),M_=Oo(e=>({score:null,showingMei:null,scoreCache:{},textCache:{},textComments:void 0,textIntroduction:void 0,textLyrics:void 0,setScore:t=>e(()=>({score:t})),setShowingMei:t=>e(()=>({showingMei:t})),setScoreCache:t=>e(n=>({scoreCache:{...n.scoreCache,...t}})),setTextCache:(t,n)=>e(r=>({textCache:n?t:{...r.textCache,...t}})),setTextComments:t=>e(()=>({textComments:t})),setTextIntroduction:t=>e(()=>({textIntroduction:t})),setTextLyrics:(t,n)=>e(r=>({textLyrics:n?t:[...r.textLyrics||[],...t||[]]}))})),L_=Oo((e,t)=>({pageCount:0,currentPage:1,sectionPageMap:{},setScoreLayout:({pageCount:n,sectionPageMap:r,currentPage:i})=>{e({pageCount:n,sectionPageMap:r,currentPage:i,navigationCommand:null})},goToPage:n=>e({currentPage:Math.max(1,Math.min(n,t().pageCount))}),goToNextPage:()=>t().goToPage(t().currentPage+1),goToPreviousPage:()=>t().goToPage(t().currentPage-1),goToSection:n=>{const r=t().sectionPageMap[n];r&&e({navigationCommand:{type:"section",target:n},currentPage:r})},navigationCommand:null,clearNavigationCommand:()=>e({navigationCommand:null})})),D_=Oo(e=>({isLoading:!0,scoreSvg:null,scale:S_,reachedEffectiveMaxScale:!1,isSplitView:!1,activeSplitView:"facsimile",splitViewOrientation:"horizontal",activeTab:"music",setIsLoading:t=>e(()=>({isLoading:t})),setScoreSvg:t=>e(()=>({scoreSvg:t})),setScale:t=>e(n=>({scale:t<=Md&&t>=Pd?t:n.scale})),increaseScale:()=>e(t=>({scale:Math.min(t.scale+10,Md)})),decreaseScale:()=>e(t=>({scale:Math.max(t.scale-10,Pd)})),setReachedEffectiveMaxScale:t=>e(()=>({reachedEffectiveMaxScale:t})),setIsSplitView:t=>e(()=>({isSplitView:t})),setActiveSplitView:t=>e(()=>({activeSplitView:t})),setSplitViewOrientation:t=>e(()=>({splitViewOrientation:t})),setActiveTab:t=>e(()=>({activeTab:t}))})),k_=Oo(e=>({playingState:Ct.STOPPED,playingPosition:0,seekPosition:-1,autoScroll:!1,setPlayingState:t=>e(()=>({playingState:t})),setPlayingPosition:t=>e(()=>({playingPosition:t})),setSeekPosition:t=>e(()=>({seekPosition:t})),setAutoScroll:t=>e(()=>({autoScroll:t})),resetPlayerPosition:()=>e(()=>({playingPosition:0,seekPosition:0}))})),R_=Oo(e=>({showNVerses:null,showReconstructions:{},showEditorial:!1,showOriginalClefs:null,normalizeFicta:null,showingEditorial:null,appOptions:[],choiceOptions:[],transposition:null,showMusicAnalysis:null,measureNumberInterval:null,setShowNVerses:t=>e(()=>({showNVerses:t})),setShowReconstructions:(t,n)=>e(r=>({showReconstructions:n?t:{...r.showReconstructions,...t}})),setShowEditorial:t=>e(()=>({showEditorial:t})),setShowOriginalClefs:t=>e(()=>({showOriginalClefs:t})),setNormalizeFicta:t=>e(()=>({normalizeFicta:t})),setShowingEditorial:t=>e(()=>({showingEditorial:t})),setAppOptions:(t,n)=>e(r=>({appOptions:n?t:[...r.appOptions,...t]})),setChoiceOptions:(t,n)=>e(r=>({choiceOptions:n?t:[...r.choiceOptions,...t]})),setTransposition:t=>e(()=>({transposition:t})),setShowMusicAnalysis:t=>e(()=>({showMusicAnalysis:t})),setMeasureNumberInterval:t=>e(()=>({measureNumberInterval:t}))})),$_=Oo((e,t)=>({renderedSvgData:null,pageCache:new Map,setRenderedSvgData:n=>e(()=>({renderedSvgData:n})),setCachedPage:(n,r)=>{const i=new Map(t().pageCache);if(i.size>=3&&!i.has(n)){const a=i.keys().next().value;a!==void 0&&i.delete(a)}i.set(n,r),e({pageCache:i})},getCachedPage:n=>t().pageCache.get(n)||null,clearPageCache:()=>e({pageCache:new Map})}));class F_{constructor(){no(this,"use",{pendingAction:b0.use.pendingAction,setPendingAction:b0.use.setPendingAction,score:hr.use.score,showingMei:hr.use.showingMei,scoreCache:hr.use.scoreCache,textCache:hr.use.textCache,textComments:hr.use.textComments,textIntroduction:hr.use.textIntroduction,textLyrics:hr.use.textLyrics,setScore:hr.use.setScore,setShowingMei:hr.use.setShowingMei,setScoreCache:hr.use.setScoreCache,setTextCache:hr.use.setTextCache,setTextComments:hr.use.setTextComments,setTextIntroduction:hr.use.setTextIntroduction,setTextLyrics:hr.use.setTextLyrics,isLoading:qn.use.isLoading,scoreSvg:qn.use.scoreSvg,scale:qn.use.scale,reachedEffectiveMaxScale:qn.use.reachedEffectiveMaxScale,isSplitView:qn.use.isSplitView,activeSplitView:qn.use.activeSplitView,splitViewOrientation:qn.use.splitViewOrientation,activeTab:qn.use.activeTab,setIsLoading:qn.use.setIsLoading,setScoreSvg:qn.use.setScoreSvg,setScale:qn.use.setScale,increaseScale:qn.use.increaseScale,decreaseScale:qn.use.decreaseScale,setReachedEffectiveMaxScale:qn.use.setReachedEffectiveMaxScale,setIsSplitView:qn.use.setIsSplitView,setSplitViewOrientation:qn.use.setSplitViewOrientation,setActiveTab:qn.use.setActiveTab,setActiveSplitView:qn.use.setActiveSplitView,pageCount:mi.use.pageCount,currentPage:mi.use.currentPage,sectionPageMap:mi.use.sectionPageMap,setScoreLayout:mi.use.setScoreLayout,goToPage:mi.use.goToPage,goToNextPage:mi.use.goToNextPage,goToPreviousPage:mi.use.goToPreviousPage,goToSection:mi.use.goToSection,navigationCommand:mi.use.navigationCommand,clearNavigationCommand:mi.use.clearNavigationCommand,playingState:$i.use.playingState,playingPosition:$i.use.playingPosition,seekPosition:$i.use.seekPosition,autoScroll:$i.use.autoScroll,setPlayingState:$i.use.setPlayingState,setPlayingPosition:$i.use.setPlayingPosition,setSeekPosition:$i.use.setSeekPosition,setAutoScroll:$i.use.setAutoScroll,resetPlayerPosition:$i.use.resetPlayerPosition,showNVerses:An.use.showNVerses,showReconstructions:An.use.showReconstructions,showEditorial:An.use.showEditorial,showOriginalClefs:An.use.showOriginalClefs,normalizeFicta:An.use.normalizeFicta,showingEditorial:An.use.showingEditorial,appOptions:An.use.appOptions,choiceOptions:An.use.choiceOptions,transposition:An.use.transposition,showMusicAnalysis:An.use.showMusicAnalysis,measureNumberInterval:An.use.measureNumberInterval,setShowNVerses:An.use.setShowNVerses,setShowReconstructions:An.use.setShowReconstructions,setShowEditorial:An.use.setShowEditorial,setShowOriginalClefs:An.use.setShowOriginalClefs,setNormalizeFicta:An.use.setNormalizeFicta,setShowingEditorial:An.use.setShowingEditorial,setAppOptions:An.use.setAppOptions,setChoiceOptions:An.use.setChoiceOptions,setTransposition:An.use.setTransposition,setShowMusicAnalysis:An.use.setShowMusicAnalysis,setMeasureNumberInterval:An.use.setMeasureNumberInterval,renderedSvgData:sa.use.renderedSvgData,setRenderedSvgData:sa.use.setRenderedSvgData,pageCache:sa.use.pageCache,setCachedPage:sa.use.setCachedPage,getCachedPage:sa.use.getCachedPage,clearPageCache:sa.use.clearPageCache})}}const b0=No(P_),hr=No(M_),mi=No(L_),qn=No(D_),$i=No(k_),An=No(R_),sa=No($_),ge=new F_;function B_(e){return new Worker(""+(typeof document>"u"&&typeof og>"u"?require("url").pathToFileURL(__dirname+"/assets/verovio.worker-BU_hF9pg.js").href:new URL("assets/verovio.worker-BU_hF9pg.js",typeof document>"u"?og.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{name:e==null?void 0:e.name})}let pi=null,Yl=!1,y0=null;const kd=new Map;let Rd=null,z_=0;function H_(){return pi||(console.log("[useVerovio] Creating Verovio worker..."),pi=new B_,Rd=new Promise((e,t)=>{const n=setTimeout(()=>{t(new Error("Worker initialization timeout"))},3e4);pi.onmessage=r=>{const i=r.data;if(i.type==="init"){clearTimeout(n);const o=i;o.status==="ready"?(Yl=!0,y0=o.version||null,console.log("[useVerovio] Worker ready, Verovio version:",y0),e()):(console.error("[useVerovio] Worker initialization failed:",o.error),t(new Error(o.error||"Worker initialization failed"))),pi.onmessage=j_;return}},pi.onerror=r=>{clearTimeout(n),console.error("[useVerovio] Worker error during init:",r),t(r)}}),pi)}function j_(e){const t=e.data,n=kd.get(t.id);n&&(kd.delete(t.id),t.error?n.reject(new Error(t.error)):n.resolve(t.result))}async function Fi(e,...t){if(!pi)throw new Error("Worker not initialized");if(!Yl&&Rd&&await Rd,!Yl)throw new Error("Worker not ready");return new Promise((n,r)=>{if(!pi){r(new Error("Worker not initialized"));return}const i=`req_${++z_}`;kd.set(i,{resolve:n,reject:r});const o={id:i,method:e,args:t};pi.postMessage(o)})}function V_(){return{get isReady(){return Yl},setOptions:e=>Fi("setOptions",e),loadData:e=>Fi("loadData",e),getPageCount:()=>Fi("getPageCount"),renderToSVG:e=>Fi("renderToSVG",e),renderToTimemap:e=>Fi("renderToTimemap",e),getMEI:e=>Fi("getMEI",e),getPageWithElement:e=>Fi("getPageWithElement",e),getElementsAtTime:e=>Fi("getElementsAtTime",e),getVersion:()=>Fi("getVersion")}}function E0(){const[e,t]=C.useState(null),n=C.useRef(null);return C.useEffect(()=>(n.current||(n.current=H_(),t(V_())),()=>{}),[]),e}const ql=C.createContext({verovio:void 0});var S0={exports:{}};/*!
1
+ (function(Ln,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],C):(Ln=typeof globalThis<"u"?globalThis:Ln||self,C(Ln.ScoreViewer={},Ln.React,Ln.jsxRuntime,Ln.ReactDOM))})(this,function(Ln,C,q,zr){"use strict";var UJ=Object.defineProperty;var WJ=(Ln,C,q)=>C in Ln?UJ(Ln,C,{enumerable:!0,configurable:!0,writable:!0,value:q}):Ln[C]=q;var no=(Ln,C,q)=>WJ(Ln,typeof C!="symbol"?C+"":C,q);function Bg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Bg(C),zg=Bg(zr),Ot=e=>typeof e=="string",ls=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Hg=e=>e==null?"":""+e,ON=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},NN=/###/g,jg=e=>e&&e.indexOf("###")>-1?e.replace(NN,"."):e,Vg=e=>!e||Ot(e),us=(e,t,n)=>{const r=Ot(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Vg(e))return{};const o=jg(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Vg(e)?{}:{obj:e,k:jg(r[i])}},Ug=(e,t,n)=>{const{obj:r,k:i}=us(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=us(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=us(e,a,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},_N=(e,t,n,r)=>{const{obj:i,k:o}=us(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Bl=(e,t)=>{const{obj:n,k:r}=us(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},IN=(e,t,n)=>{const r=Bl(e,n);return r!==void 0?r:Bl(t,n)},Wg=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ot(e[r])||e[r]instanceof String||Ot(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Wg(e[r],t[r],n):e[r]=t[r]);return e},ia=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var AN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const PN=e=>Ot(e)?e.replace(/[&<>"'\/]/g,t=>AN[t]):e;class MN{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const LN=[" ",",","?","!",";"],DN=new MN(20),kN=(e,t,n)=>{t=t||"",n=n||"";const r=LN.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=DN.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},Od=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let a,s="";for(let l=o;l<r.length;++l)if(l!==o&&(s+=n),s+=r[l],a=i[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;o+=l-o+1;break}i=a}return i},cs=e=>e==null?void 0:e.replace("_","-"),RN={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class zl{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||RN,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(Ot(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new zl(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new zl(this.logger,t)}}var hi=new zl;class Hl{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let a=0;a<o;a++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let a=0;a<o;a++)i.apply(i,[t,...n])})}}class Yg extends Hl{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,c;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Ot(r)&&o?s.push(...r.split(o)):s.push(r)));const l=Bl(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!Ot(r)?l:Od((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),Ug(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(Ot(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,a={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=Bl(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Wg(l,r,o):l={...l,...r},Ug(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var qg={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var a;t=((a=this.processors[o])==null?void 0:a.process(t,n,r,i))??t}),t}};const Xg={},Kg=e=>!Ot(e)&&typeof e!="boolean"&&typeof e!="number";class jl extends Hl{constructor(t,n={}){super(),ON(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hi.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);return(i==null?void 0:i.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kN(t,r,i);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Ot(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:Ot(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(i={...i}),i||(i={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?o?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;const h=this.resolve(t,i);let p=h==null?void 0:h.res;const g=(h==null?void 0:h.usedKey)||s,v=(h==null?void 0:h.exactUsedKey)||s,b=["[object Number]","[object Function]","[object RegExp]"],y=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!Ot(i.count),O=jl.hasDefaultValue(i),S=x?this.pluralResolver.getSuffix(d,i.count,i):"",T=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):"",I=x&&!i.ordinal&&i.count===0,N=I&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${T}`]||i.defaultValue;let _=p;E&&!p&&O&&(_=N);const P=Kg(_),A=Object.prototype.toString.apply(_);if(E&&_&&P&&b.indexOf(A)<0&&!(Ot(y)&&Array.isArray(_))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,_,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(h.res=M,h.usedParams=this.getUsedParamsDetails(i),h):M}if(a){const M=Array.isArray(_),D=M?[]:{},R=M?v:g;for(const $ in _)if(Object.prototype.hasOwnProperty.call(_,$)){const F=`${R}${a}${$}`;O&&!p?D[$]=this.translate(F,{...i,defaultValue:Kg(N)?N[$]:void 0,joinArrays:!1,ns:l}):D[$]=this.translate(F,{...i,joinArrays:!1,ns:l}),D[$]===F&&(D[$]=_[$])}p=D}}else if(E&&Ot(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,i,r));else{let M=!1,D=!1;!this.isValidLookup(p)&&O&&(M=!0,p=N),this.isValidLookup(p)||(D=!0,p=s);const $=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:p,F=O&&N!==p&&this.options.updateMissing;if(D||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,u,s,F?N:p),a){const H=this.resolve(s,{...i,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let B=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let H=0;H<z.length;H++)B.push(z[H]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(i.lng||this.language):B.push(i.lng||this.language);const L=(H,W,k)=>{var Y;const G=O&&k!==p?k:$;this.options.missingKeyHandler?this.options.missingKeyHandler(H,u,W,G,F,i):(Y=this.backendConnector)!=null&&Y.saveMissing&&this.backendConnector.saveMissing(H,u,W,G,F,i),this.emit("missingKey",H,u,W,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?B.forEach(H=>{const W=this.pluralResolver.getSuffixes(H,i);I&&i[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(k=>{L([H],s+k,i[`defaultValue${k}`]||N)})}):L(B,s,N))}p=this.extendTranslation(p,t,i,h,r),D&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${s}`),(D||M)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,M?p:void 0,i))}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(i),h):p}extendTranslation(t,n,r,i,o){var l,u;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Ot(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&!Ot(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),c){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;d<p&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>(o==null?void 0:o[0])===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=Ot(a)?[a]:a;return t!=null&&(s!=null&&s.length)&&r.applyPostProcessor!==!1&&(t=qg.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,a,s;return Ot(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Ot(n.count),h=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(Ot(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{var b,y;this.isValidLookup(r)||(s=v,!Xg[`${g[0]}-${v}`]&&((b=this.utils)!=null&&b.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(s))&&(Xg[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(E=>{var S;if(this.isValidLookup(r))return;a=E;const x=[c];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,E,v,n);else{let T;f&&(T=this.pluralResolver.getSuffix(E,n.count,n));const I=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(c+T),n.ordinal&&T.indexOf(N)===0&&x.push(c+T.replace(N,this.options.pluralSeparator)),h&&x.push(c+I)),p){const _=`${c}${this.options.contextSeparator}${n.context}`;x.push(_),f&&(x.push(_+T),n.ordinal&&T.indexOf(N)===0&&x.push(_+T.replace(N,this.options.pluralSeparator)),h&&x.push(_+I))}}let O;for(;O=x.pop();)this.isValidLookup(r)||(o=O,r=this.getResource(E,v,O,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ot(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class Gg{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hi.create("languageUtils")}getScriptPartFromCode(t){if(t=cs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=cs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ot(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Ot(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Ot(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):Ot(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const Qg={zero:0,one:1,two:2,few:3,many:4,other:5},Zg={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class $N{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=hi.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=cs(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zg;if(!t.match(/-|_/))return Zg;const l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>Qg[i]-Qg[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Jg=(e,t,n,r=".",i=!0)=>{let o=IN(e,t,n);return!o&&i&&Ot(n)&&(o=Od(e,n,r),o===void 0&&(o=Od(t,n,r))),o},Nd=e=>e.replace(/\$/g,"$$$$");class FN{constructor(t={}){var n;this.logger=hi.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:PN,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?ia(o):a||"{{",this.suffix=s?ia(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ia(f):h||ia("$t("),this.nestingSuffix=p?ia(p):g||ia(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=b||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var h;let o,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=Jg(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),v=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(Jg(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>Nd(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?Nd(this.escape(p)):Nd(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const g=o[1].trim();if(a=u(g),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=Ot(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(d){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else!Ot(a)&&!this.useRawValueToEscape&&(a=Hg(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,a;const s=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),p=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!Ot(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!Ot(o))return o;Ot(o)||(o=Hg(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const BN=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},e0=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(cs(r),i),t[a]=s),s(n)}},zN=e=>(t,n,r)=>e(cs(n),r)(t);class HN{constructor(t={}){this.logger=hi.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?e0:zN;this.formats={number:r((i,o)=>{const a=new Intl.NumberFormat(i,{...o});return s=>a.format(s)}),currency:r((i,o)=>{const a=new Intl.NumberFormat(i,{...o,style:"currency"});return s=>a.format(s)}),datetime:r((i,o)=>{const a=new Intl.DateTimeFormat(i,{...o});return s=>a.format(s)}),relativetime:r((i,o)=>{const a=new Intl.RelativeTimeFormat(i,{...o});return s=>a.format(s,o.range||"day")}),list:r((i,o)=>{const a=new Intl.ListFormat(i,{...o});return s=>a.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=e0(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,l)=>{var d;const{formatName:u,formatOptions:c}=BN(l);if(this.formats[u]){let f=s;try{const h=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[u](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const jN=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class VN extends Hl{constructor(t,n,r,i={}){var o,a;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=hi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(o=this.backend)==null?void 0:o.init)==null||a.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(s[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{_N(l.loaded,[o],a),jN(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{s[u][d]===void 0&&(s[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,i=0,o=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ot(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ot(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o,a={},s=()=>{}){var l,u,c,d,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...a,isUpdate:o},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,n,r,i,h):g=p(t,n,r,i),g&&typeof g.then=="function"?g.then(v=>s(null,v)).catch(s):s(null,g)}catch(g){s(g)}else p(t,n,r,i,s,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const t0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ot(e[1])&&(t.defaultValue=e[1]),Ot(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),n0=e=>{var t,n;return Ot(e.ns)&&(e.ns=[e.ns]),Ot(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ot(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Vl=()=>{},UN=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ds extends Hl{constructor(t={},n){if(super(),this.options=n0(t),this.services={},this.logger=hi,this.modules={external:[]},UN(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Ot(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=t0();this.options={...r,...this.options,...n0(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?hi.init(i(this.modules.logger),this.options):hi.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=HN;const c=new Gg(this.options);this.store=new Yg(this.options.resources,this.options);const d=this.services;d.logger=hi,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new $N(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=i(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new FN(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new VN(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new jl(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Vl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const s=ls(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=Vl){var o,a;let r=n;const i=Ot(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&s.indexOf(d)<0&&s.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(o=this.options.preload)==null?void 0:o.forEach)==null||a.call(o,u=>l(u)),this.services.backendConnector.load(s,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ls();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Vl),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qg.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ls();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},o=(s,l)=>{l?this.isLanguageChangingTo===t&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},a=s=>{var c,d;!t&&!s&&this.services.languageDetector&&(s=[]);const l=Ot(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Ot(s)?[s]:s);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{o(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),r}getFixedT(t,n,r){const i=(o,a,...s)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([o,a].concat(s)):l={...a},l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||i.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(o)?c=o.map(d=>`${l.keyPrefix}${u}${d}`):c=l.keyPrefix?`${l.keyPrefix}${u}${o}`:o,this.t(c,l)};return Ot(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=ls();return this.options.ns?(Ot(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ls();Ot(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const s=a.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new Gg(t0());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new ds(t,n)}cloneInstance(t={},n=Vl){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ds(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});o.store=new Yg(s,i),o.services.resourceStore=o.store}return o.translator=new jl(o.services,i),o.translator.on("*",(s,...l)=>{o.emit(s,...l)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const In=ds.createInstance();In.createInstance=ds.createInstance,In.createInstance,In.dir,In.init,In.loadResources,In.reloadResources,In.use,In.changeLanguage,In.getFixedT,In.t,In.exists,In.setDefaultNamespace,In.hasLoadedNamespace,In.loadNamespaces,In.loadLanguages;var Nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const WN=(e,t,n,r)=>{var o,a,s,l;const i=[n,{code:t,...r||{}}];if((a=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&a.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);To(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&l.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},r0={},_d=(e,t,n,r)=>{To(n)&&r0[n]||(To(n)&&(r0[n]=new Date),WN(e,t,n,r))},i0=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Id=(e,t,n)=>{e.loadNamespaces(t,i0(e,n))},o0=(e,t,n,r)=>{if(To(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Id(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,i0(e,r))},YN=(e,t,n={})=>!t.languages||!t.languages.length?(_d(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),To=e=>typeof e=="string",qN=e=>typeof e=="object"&&e!==null,XN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,KN={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},GN=e=>KN[e];let Ad={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(XN,GN)};const QN=(e={})=>{Ad={...Ad,...e}},ZN=()=>Ad;let a0;const JN=e=>{a0=e},e_=()=>a0,t_={type:"3rdParty",init(e){QN(e.options.react),JN(e)}},n_=C.createContext();class r_{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const i_=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},s0=(e,t,n,r)=>e.getFixedT(t,n,r),o_=(e,t,n,r)=>C.useCallback(s0(e,t,n,r),[e,t,n,r]),cr=(e,t={})=>{var x,O,S;const{i18n:n}=t,{i18n:r,defaultNS:i}=C.useContext(n_)||{},o=n||r||e_();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new r_),!o){_d(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const T=(N,_)=>To(_)?_:qN(_)&&To(_.defaultValue)?_.defaultValue:Array.isArray(N)?N[N.length-1]:N,I=[T,{},!1];return I.t=T,I.i18n={},I.ready=!1,I}(x=o.options.react)!=null&&x.wait&&_d(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...ZN(),...o.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let u=e;u=To(u)?[u]:u||["translation"],(S=(O=o.reportNamespaces).addUsedNamespaces)==null||S.call(O,u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(T=>YN(T,o,a)),d=o_(o,t.lng||null,a.nsMode==="fallback"?u:u[0],l),f=()=>d,h=()=>s0(o,t.lng||null,a.nsMode==="fallback"?u:u[0],l),[p,g]=C.useState(f);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const b=i_(v),y=C.useRef(!0);C.useEffect(()=>{const{bindI18n:T,bindI18nStore:I}=a;y.current=!0,!c&&!s&&(t.lng?o0(o,t.lng,u,()=>{y.current&&g(h)}):Id(o,u,()=>{y.current&&g(h)})),c&&b&&b!==v&&y.current&&g(h);const N=()=>{y.current&&g(h)};return T&&(o==null||o.on(T,N)),I&&(o==null||o.store.on(I,N)),()=>{y.current=!1,o&&T&&(T==null||T.split(" ").forEach(_=>o.off(_,N))),I&&o&&I.split(" ").forEach(_=>o.store.off(_,N))}},[o,v]),C.useEffect(()=>{y.current&&c&&g(f)},[o,l,c]);const E=[p,o,c];if(E.t=p,E.i18n=o,E.ready=c,c||!c&&!s)return E;throw new Promise(T=>{t.lng?o0(o,t.lng,u,()=>T()):Id(o,u,()=>T())})},{slice:a_,forEach:s_}=[];function l_(e){return s_.call(a_.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function u_(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const l0=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,c_=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!l0.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!l0.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},u0={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=c_(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var d_={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return u0.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:o}=t;n&&typeof document<"u"&&u0.create(n,e,r,i,o)}},f_={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s<a.length;s++){const l=a[s].indexOf("=");l>0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}},h_={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const a=o.substring(1);if(t){const s=a.split("&");for(let l=0;l<s.length;l++){const u=s[l].indexOf("=");u>0&&s[l].substring(0,u)===t&&(r=s[l].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(i=s[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let oa=null;const c0=()=>{if(oa!==null)return oa;try{if(oa=typeof window<"u"&&window.localStorage!==null,!oa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{oa=!1}return oa};var m_={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&c0())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&c0()&&window.localStorage.setItem(n,e)}};let aa=null;const d0=()=>{if(aa!==null)return aa;try{if(aa=typeof window<"u"&&window.sessionStorage!==null,!aa)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{aa=!1}return aa};var p_={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&d0())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&d0()&&window.sessionStorage.setItem(n,e)}},g_={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},v_={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},b_={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},y_={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let f0=!1;try{document.cookie,f0=!0}catch{}const h0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];f0||h0.splice(1,1);const E_=()=>({order:h0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class m0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=l_(n,this.options||{},E_()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(d_),this.addDetector(f_),this.addDetector(m_),this.addDetector(p_),this.addDetector(g_),this.addDetector(v_),this.addDetector(b_),this.addDetector(y_),this.addDetector(h_)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!u_(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}m0.type="languageDetector";const S_=50,Pd=30,Md=120,p0=[{key:"en",label:"English"},{key:"es",label:"Español"}],Ld="i18nextLng";var fs=(e=>(e[e.FADE_OUT=0]="FADE_OUT",e[e.FADE_IN=1]="FADE_IN",e))(fs||{});const C_={Music:"Música",save:"Guardar",cancel:"Cancelar",Text:"Texto",Introduction:"Introducción",heading:{work:"Obra",section:"Sección"},tab:{introduction:"Introducción",music:"Música",text:"Texto",facsimile:"Facsimil"},editorial:{preferredReading:"lectura preferida",alternativeReading:"lectura alternativa",regReading:"lectura regularizada",origReading:"lectura original",alternativeReadingNumber:"lectura alternativa nº",currentlyShowing:"Actualmente se muestra la {{what}}",availableOptions:"Opciones disponibles",reason:"Razón",resp:"Responsable",optionNumber:"Opción nº{{number}}",formatType:{corr:"Corrección aplicada",unclear:"Elemento poco claro en la fuente",choice:"Opciones disponibles",app:"Lecturas alternativas",lem:"lectura preferida",rdg:"otra lectura",sic:"error evidente",supplied:"parte añadida",reg:"Regularización",clefChange:"Cambio de clave",default:"tipo: {{type}}"}},error:{scoreViewerError:"Algo fue mal en el visor de partituras",tryAgain:"Intentar de nuevo",fetchingScore:{title:"Error al obtener la partitura",details:"Error al cargar la partitura de la red: {{url}}"},fetchIntroError:"Error al obtener el texto de introducción",fetchLyricsItemError:"Error al obtener el texto poético",fetchTextCommentsError:"Comentarios del texto",fetchErrorDescription:"Se produjeron los siguientes errores al obtener elementos de la red",fetchLyricsItemErrorWithSection:"Texto poético para la sección {{section}}",fetchTextSeeErrorAbove:"Error: ver arriba para más detalles"},ok:"Ok",reset:"Reset",playerMode:{autoscroll:"auto scroll",normal:"normal"},anonymous:"Anónimo",scoreControls:{settings:"Configuración"},scoreOptions:{title:"Opciones de visualizacion",reconstruction:"Reconstrucción {{voiceName}}",uiSettings:{title:"Configuración de la interfaz de usuario"},scoreViewerSettings:{title:"Configuración del visor de partituras"},scoreSettings:{title:"Opciones de la partitura seleccionada"},editorialNotes:{title:"Notas editoriales",description:"Muestra una capa con las notas críticas y elección de variantes variantes"},normalizeFicta:{title:"Normalizar musica ficta",description:"Mostrar las alteraciones subintelectas de como las normales prececiendo a la nota"},originalClefs:{title:"Claves originales",description:"Muestra las claves originales del manuscrito sin modernizar"},noTransposition:{title:"Sin transposición",description:"Muestra la partitura deshaciendo la transposición desde claves altas ({{encodedTransposition}})"},harmonicAnalysis:{title:"Análisis armónico",description:"Muestra la clasificación de las disonancias presentes en la partitura"},limitVerses:{title:"Limitar estrofas",description:"Elige la cantidad de estrofas a mostrar en las coplas"},verseAmmount_one:"1 estrofa",verseAmmount_other:"{{count}} estrofas",reconstructionNone:"ninguna",language:{title:"Idioma",description:"Idioma de la interfaz de usuario"},uiLayout:{title:"Diseño de la interfaz de usuario",description:"Define cómo se organizan los componentes en la pantalla"},measureNumberInterval:{title:"Número de compás",description:"Define con qué frecuencia se muestran los números de compás en la partitura"},measureIntervalPage:"Al comienzo de la página",measureInterval10:"Cada 10 compases",measureInterval5:"Cada 5 compases",measureInterval1:"Cada compás"},scoreProcessor:{reconstructionByIA:"Reconstrucción por IA. Modelo {{name}}",reconstructionByHuman:"Reconstrucción por {{name}}"},score:{measureNumber:"Compás {{number}}"},textView:{intro:"Introducción",poeticText:"Texto poético",notes:"Notas al texto"},test:{score1:"Obra 1",score2:"Obra 2",score3:"Obra 3",basic:"en esp test"},configValidation:{configRequired:"La configuración es requerida",settingsRequired:"El objeto de configuración (settings) es requerido",showScoreSelectorBoolean:"showScoreSelector debe ser un booleano",showTitleBoolean:"showTitle debe ser un booleano",showDownloadButtonBoolean:"showDownloadButton debe ser un booleano",showIntroductionSectionBoolean:"showIntroductionSection debe ser un booleano",showTextSectionBoolean:"showTextSection debe ser un booleano",showFacsimileSectionBoolean:"showFacsimileSection debe ser un booleano",renderTitlesFromMEIBoolean:"renderTitlesFromMEI debe ser un booleano",allowUserLanguageChangeBoolean:"allowUserLanguageChange debe ser un booleano",basePathRequired:"basePath es requerido y debe ser una cadena de texto",facsimileImagesPathRequired:"facsimileImagesPath es requerido y debe ser una cadena de texto",backgroundColorString:"backgroundColor debe ser una cadena de texto si se proporciona",languageString:"language debe ser una cadena de texto si se proporciona",scoresArray:"Scores debe ser un array",scoresNotEmpty:"Se requiere al menos una partitura",scoreTitleRequired:"El título de la partitura es requerido y debe ser una cadena de texto",scorePathRequired:"La ruta de la partitura es requerida y debe ser una cadena de texto",scoreMeiFileRequired:"El archivo MEI de la partitura es requerido y debe ser una cadena de texto",scoreEncodingPropertiesRequired:"El objeto encodingProperties es requerido",scoreAudioOverlaysArray:"audioOverlays debe ser un array si se proporciona",scoreTextArray:"text debe ser un array si se proporciona",scoreFacsimileItemsArray:"facsimileItems debe ser un array si se proporciona",configurationError:"Error de Configuración",configurationErrorDescription:"La configuración del ScoreViewer contiene errores:"}},w_={Music:"Música",save:"Guardar",cancel:"Cancelar",Text:"Texto",Introduction:"Introducción",heading:{work:"Work",section:"Section",splitViewSelector:"Right view content"},tab:{introduction:"Introduction",music:"Music",text:"Text",facsimile:"Facsimile"},editorial:{preferredReading:"preferred reading",alternativeReading:"alternative reading",regReading:"regularized reading",origReading:"original reading",alternativeReadingNumber:"alternative reading #",currentlyShowing:"Currently showing the {{what}}",availableOptions:"Available options",reason:"Reason",resp:"Responsible person",optionNumber:"Option #{{number}}",formatType:{corr:"Applied correction",unclear:"Unclear element in the source",choice:"Available options",app:"Alternative readings",lem:"preferred reading",rdg:"other reading",sic:"obvious error",supplied:"added part",reg:"Regularization",clefChange:"Clef change",default:"type: {{type}}"}},error:{scoreViewerError:"Something went wrong in the score viewer.",tryAgain:"Try again",fetchingScore:{title:"Error fetching the score",details:"Error loading the score from the network: {{url}}"},fetchIntroError:"Error fetching the introduction text",fetchErrorDescription:"The following errors occurred fetching items from the network",fetchLyricsItemErrorWithSection:"Poetic text for section {{section}}",fetchTextCommentsError:"Text comments",fetchTextSeeErrorAbove:"Error: see above for details"},ok:"Ok",reset:"Reset",playerMode:{autoscroll:"auto scroll",normal:"normal"},anonymous:"Anonymous",scoreControls:{settings:"Settings"},scoreOptions:{title:"Display options",reconstruction:"Reconstruction {{voiceName}}",uiSettings:{title:"UI settings"},scoreViewerSettings:{title:"Score viewer settings"},scoreSettings:{title:"Current score options"},editorialNotes:{title:"Editorial notes",description:"Shows a layer with critical notes and variant selection options"},normalizeFicta:{title:"Normalize musica ficta",description:"Show the subsemitonium alterations as normal ones preceding the note"},originalClefs:{title:"Original clefs",description:"Shows the original manuscript clefs without modernization"},noTransposition:{title:"No transposition",description:"Shows the score undoing the transposition from high clefs ({{encodedTransposition}})"},harmonicAnalysis:{title:"Harmonic analysis",description:"Shows classification dissonances present in the score"},limitVerses:{title:"Limit verses",description:"Choose the number of verses to show in the couplets"},verseAmmount_one:"1 verse",verseAmmount_other:"{{count}} verses",reconstructionNone:"none",language:{title:"Language",description:"Language for the UI"},uiLayout:{title:"UI Layout",description:"Define how components are arranged on the screen"},measureNumberInterval:{title:"Measure number",description:"Define how often measure numbers are shown in the score"},measureIntervalPage:"At the beginning of the page",measureInterval10:"Every 10 measures",measureInterval5:"Every 5 measures",measureInterval1:"Every measure"},scoreProcessor:{reconstructionByIA:"Reconstruction by AI. Model {{name}}",reconstructionByHuman:"Reconstruction by {{name}}"},score:{measureNumber:"Measure {{number}}"},textView:{intro:"Introduction",poeticText:"Poetical text",notes:"Notes to the text"},test:{score1:"Score 1",score2:"Score 2",score3:"Score 3",basic:"Basic",selectTest:"Select Test:",sections:"Sections"},configValidation:{configRequired:"Configuration is required",settingsRequired:"Settings object is required",showScoreSelectorBoolean:"showScoreSelector must be a boolean",showTitleBoolean:"showTitle must be a boolean",showDownloadButtonBoolean:"showDownloadButton must be a boolean",showIntroductionSectionBoolean:"showIntroductionSection must be a boolean",showTextSectionBoolean:"showTextSection must be a boolean",showFacsimileSectionBoolean:"showFacsimileSection must be a boolean",renderTitlesFromMEIBoolean:"renderTitlesFromMEI must be a boolean",allowUserLanguageChangeBoolean:"allowUserLanguageChange must be a boolean",basePathRequired:"basePath is required and must be a string",facsimileImagesPathRequired:"facsimileImagesPath is required and must be a string",backgroundColorString:"backgroundColor must be a string if provided",languageString:"language must be a string if provided",scoresArray:"Scores must be an array",scoresNotEmpty:"At least one score is required",scoreTitleRequired:"Score title is required and must be a string",scorePathRequired:"Score path is required and must be a string",scoreMeiFileRequired:"Score meiFile is required and must be a string",scoreEncodingPropertiesRequired:"encodingProperties object is required",scoreAudioOverlaysArray:"audioOverlays must be an array if provided",scoreTextArray:"text must be an array if provided",scoreFacsimileItemsArray:"facsimileItems must be an array if provided",configurationError:"Configuration Error",configurationErrorDescription:"The ScoreViewer configuration contains errors:"}},x_={order:["sessionStorage","navigator"],lookupSessionStorage:Ld,caches:["sessionStorage"]},T_={en:{common:w_},es:{common:C_}};In.use(t_).use(m0).init({supportedLngs:p0.map(e=>e.key),resources:T_,...x_,fallbackLng:"en",debug:!1,defaultNS:"common",interpolation:{escapeValue:!1}});const g0=e=>{let t;const n=new Set,r=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const f=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,f))}},i=()=>t,s={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,i,s);return s},O_=e=>e?g0(e):g0,N_=e=>e;function __(e,t=N_){const n=C.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return C.useDebugValue(n),n}const v0=e=>{const t=O_(e),n=r=>__(t,r);return Object.assign(n,t),n},Oo=e=>e?v0(e):v0;function No(e){const t=e;t.use={};const n=Object.keys(e.getState());for(const r of n)t.use[r]=()=>e(i=>i[r]);return t}const Wl=e=>({type:"load",config:e}),I_=e=>({type:"loadAutoScroll",config:e}),Dd=e=>({type:"render",config:e}),A_=e=>({type:"renderAutoScroll",config:e});class ti extends Error{constructor(n,r){super(r);no(this,"type");this.type=n,Object.setPrototypeOf(this,ti.prototype)}}var It=(e=>(e[e.PLAYING=0]="PLAYING",e[e.PAUSED=1]="PAUSED",e[e.STOPPED=2]="STOPPED",e))(It||{});const P_=Oo(e=>({pendingAction:null,setPendingAction:t=>e(()=>({pendingAction:t}))})),M_=Oo(e=>({score:null,showingMei:null,scoreCache:{},textCache:{},textComments:void 0,textIntroduction:void 0,textLyrics:void 0,setScore:t=>e(()=>({score:t})),setShowingMei:t=>e(()=>({showingMei:t})),setScoreCache:t=>e(n=>({scoreCache:{...n.scoreCache,...t}})),setTextCache:(t,n)=>e(r=>({textCache:n?t:{...r.textCache,...t}})),setTextComments:t=>e(()=>({textComments:t})),setTextIntroduction:t=>e(()=>({textIntroduction:t})),setTextLyrics:(t,n)=>e(r=>({textLyrics:n?t:[...r.textLyrics||[],...t||[]]}))})),L_=Oo((e,t)=>({pageCount:0,currentPage:1,sectionPageMap:{},setScoreLayout:({pageCount:n,sectionPageMap:r,currentPage:i})=>{e({pageCount:n,sectionPageMap:r,currentPage:i,navigationCommand:null})},goToPage:n=>e({currentPage:Math.max(1,Math.min(n,t().pageCount))}),goToNextPage:()=>t().goToPage(t().currentPage+1),goToPreviousPage:()=>t().goToPage(t().currentPage-1),goToSection:n=>{const r=t().sectionPageMap[n];r&&e({navigationCommand:{type:"section",target:n},currentPage:r})},navigationCommand:null,clearNavigationCommand:()=>e({navigationCommand:null})})),D_=Oo(e=>({isLoading:!0,scoreSvg:null,scale:S_,reachedEffectiveMaxScale:!1,isSplitView:!1,activeSplitView:"facsimile",splitViewOrientation:"horizontal",activeTab:"music",setIsLoading:t=>e(()=>({isLoading:t})),setScoreSvg:t=>e(()=>({scoreSvg:t})),setScale:t=>e(n=>({scale:t<=Md&&t>=Pd?t:n.scale})),increaseScale:()=>e(t=>({scale:Math.min(t.scale+10,Md)})),decreaseScale:()=>e(t=>({scale:Math.max(t.scale-10,Pd)})),setReachedEffectiveMaxScale:t=>e(()=>({reachedEffectiveMaxScale:t})),setIsSplitView:t=>e(()=>({isSplitView:t})),setActiveSplitView:t=>e(()=>({activeSplitView:t})),setSplitViewOrientation:t=>e(()=>({splitViewOrientation:t})),setActiveTab:t=>e(()=>({activeTab:t}))})),k_=Oo(e=>({playingState:It.STOPPED,playingPosition:0,seekPosition:-1,autoScroll:!1,setPlayingState:t=>e(()=>({playingState:t})),setPlayingPosition:t=>e(()=>({playingPosition:t})),setSeekPosition:t=>e(()=>({seekPosition:t})),setAutoScroll:t=>e(()=>({autoScroll:t})),resetPlayerPosition:()=>e(()=>({playingPosition:0,seekPosition:0}))})),R_=Oo(e=>({showNVerses:null,showReconstructions:{},showEditorial:!1,showOriginalClefs:null,normalizeFicta:null,showingEditorial:null,appOptions:[],choiceOptions:[],transposition:null,showMusicAnalysis:null,measureNumberInterval:null,setShowNVerses:t=>e(()=>({showNVerses:t})),setShowReconstructions:(t,n)=>e(r=>({showReconstructions:n?t:{...r.showReconstructions,...t}})),setShowEditorial:t=>e(()=>({showEditorial:t})),setShowOriginalClefs:t=>e(()=>({showOriginalClefs:t})),setNormalizeFicta:t=>e(()=>({normalizeFicta:t})),setShowingEditorial:t=>e(()=>({showingEditorial:t})),setAppOptions:(t,n)=>e(r=>({appOptions:n?t:[...r.appOptions,...t]})),setChoiceOptions:(t,n)=>e(r=>({choiceOptions:n?t:[...r.choiceOptions,...t]})),setTransposition:t=>e(()=>({transposition:t})),setShowMusicAnalysis:t=>e(()=>({showMusicAnalysis:t})),setMeasureNumberInterval:t=>e(()=>({measureNumberInterval:t}))})),$_=Oo((e,t)=>({renderedSvgData:null,pageCache:new Map,setRenderedSvgData:n=>e(()=>({renderedSvgData:n})),setCachedPage:(n,r)=>{const i=new Map(t().pageCache);if(i.size>=3&&!i.has(n)){const a=i.keys().next().value;a!==void 0&&i.delete(a)}i.set(n,r),e({pageCache:i})},getCachedPage:n=>t().pageCache.get(n)||null,clearPageCache:()=>e({pageCache:new Map})}));class F_{constructor(){no(this,"use",{pendingAction:b0.use.pendingAction,setPendingAction:b0.use.setPendingAction,score:hr.use.score,showingMei:hr.use.showingMei,scoreCache:hr.use.scoreCache,textCache:hr.use.textCache,textComments:hr.use.textComments,textIntroduction:hr.use.textIntroduction,textLyrics:hr.use.textLyrics,setScore:hr.use.setScore,setShowingMei:hr.use.setShowingMei,setScoreCache:hr.use.setScoreCache,setTextCache:hr.use.setTextCache,setTextComments:hr.use.setTextComments,setTextIntroduction:hr.use.setTextIntroduction,setTextLyrics:hr.use.setTextLyrics,isLoading:qn.use.isLoading,scoreSvg:qn.use.scoreSvg,scale:qn.use.scale,reachedEffectiveMaxScale:qn.use.reachedEffectiveMaxScale,isSplitView:qn.use.isSplitView,activeSplitView:qn.use.activeSplitView,splitViewOrientation:qn.use.splitViewOrientation,activeTab:qn.use.activeTab,setIsLoading:qn.use.setIsLoading,setScoreSvg:qn.use.setScoreSvg,setScale:qn.use.setScale,increaseScale:qn.use.increaseScale,decreaseScale:qn.use.decreaseScale,setReachedEffectiveMaxScale:qn.use.setReachedEffectiveMaxScale,setIsSplitView:qn.use.setIsSplitView,setSplitViewOrientation:qn.use.setSplitViewOrientation,setActiveTab:qn.use.setActiveTab,setActiveSplitView:qn.use.setActiveSplitView,pageCount:mi.use.pageCount,currentPage:mi.use.currentPage,sectionPageMap:mi.use.sectionPageMap,setScoreLayout:mi.use.setScoreLayout,goToPage:mi.use.goToPage,goToNextPage:mi.use.goToNextPage,goToPreviousPage:mi.use.goToPreviousPage,goToSection:mi.use.goToSection,navigationCommand:mi.use.navigationCommand,clearNavigationCommand:mi.use.clearNavigationCommand,playingState:$i.use.playingState,playingPosition:$i.use.playingPosition,seekPosition:$i.use.seekPosition,autoScroll:$i.use.autoScroll,setPlayingState:$i.use.setPlayingState,setPlayingPosition:$i.use.setPlayingPosition,setSeekPosition:$i.use.setSeekPosition,setAutoScroll:$i.use.setAutoScroll,resetPlayerPosition:$i.use.resetPlayerPosition,showNVerses:An.use.showNVerses,showReconstructions:An.use.showReconstructions,showEditorial:An.use.showEditorial,showOriginalClefs:An.use.showOriginalClefs,normalizeFicta:An.use.normalizeFicta,showingEditorial:An.use.showingEditorial,appOptions:An.use.appOptions,choiceOptions:An.use.choiceOptions,transposition:An.use.transposition,showMusicAnalysis:An.use.showMusicAnalysis,measureNumberInterval:An.use.measureNumberInterval,setShowNVerses:An.use.setShowNVerses,setShowReconstructions:An.use.setShowReconstructions,setShowEditorial:An.use.setShowEditorial,setShowOriginalClefs:An.use.setShowOriginalClefs,setNormalizeFicta:An.use.setNormalizeFicta,setShowingEditorial:An.use.setShowingEditorial,setAppOptions:An.use.setAppOptions,setChoiceOptions:An.use.setChoiceOptions,setTransposition:An.use.setTransposition,setShowMusicAnalysis:An.use.setShowMusicAnalysis,setMeasureNumberInterval:An.use.setMeasureNumberInterval,renderedSvgData:sa.use.renderedSvgData,setRenderedSvgData:sa.use.setRenderedSvgData,pageCache:sa.use.pageCache,setCachedPage:sa.use.setCachedPage,getCachedPage:sa.use.getCachedPage,clearPageCache:sa.use.clearPageCache})}}const b0=No(P_),hr=No(M_),mi=No(L_),qn=No(D_),$i=No(k_),An=No(R_),sa=No($_),ge=new F_;function B_(e){return new Worker(""+(typeof document>"u"&&typeof og>"u"?require("url").pathToFileURL(__dirname+"/assets/verovio.worker-BU_hF9pg.js").href:new URL("assets/verovio.worker-BU_hF9pg.js",typeof document>"u"?og.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{name:e==null?void 0:e.name})}let pi=null,Yl=!1,y0=null;const kd=new Map;let Rd=null,z_=0;function H_(){return pi||(console.log("[useVerovio] Creating Verovio worker..."),pi=new B_,Rd=new Promise((e,t)=>{const n=setTimeout(()=>{t(new Error("Worker initialization timeout"))},3e4);pi.onmessage=r=>{const i=r.data;if(i.type==="init"){clearTimeout(n);const o=i;o.status==="ready"?(Yl=!0,y0=o.version||null,console.log("[useVerovio] Worker ready, Verovio version:",y0),e()):(console.error("[useVerovio] Worker initialization failed:",o.error),t(new Error(o.error||"Worker initialization failed"))),pi.onmessage=j_;return}},pi.onerror=r=>{clearTimeout(n),console.error("[useVerovio] Worker error during init:",r),t(r)}}),pi)}function j_(e){const t=e.data,n=kd.get(t.id);n&&(kd.delete(t.id),t.error?n.reject(new Error(t.error)):n.resolve(t.result))}async function Fi(e,...t){if(!pi)throw new Error("Worker not initialized");if(!Yl&&Rd&&await Rd,!Yl)throw new Error("Worker not ready");return new Promise((n,r)=>{if(!pi){r(new Error("Worker not initialized"));return}const i=`req_${++z_}`;kd.set(i,{resolve:n,reject:r});const o={id:i,method:e,args:t};pi.postMessage(o)})}function V_(){return{get isReady(){return Yl},setOptions:e=>Fi("setOptions",e),loadData:e=>Fi("loadData",e),getPageCount:()=>Fi("getPageCount"),renderToSVG:e=>Fi("renderToSVG",e),renderToTimemap:e=>Fi("renderToTimemap",e),getMEI:e=>Fi("getMEI",e),getPageWithElement:e=>Fi("getPageWithElement",e),getElementsAtTime:e=>Fi("getElementsAtTime",e),getVersion:()=>Fi("getVersion")}}function E0(){const[e,t]=C.useState(null),n=C.useRef(null);return C.useEffect(()=>(n.current||(n.current=H_(),t(V_())),()=>{}),[]),e}const ql=C.createContext({verovio:void 0});var S0={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
@@ -61,7 +61,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
61
61
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
62
62
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
63
63
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
64
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var ab=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sb={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},xP={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},TP={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},lb=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:i}=t,o=ab(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=ob(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:u}=l,c=ab(l,["theme"]);let d=c;u&&(d=lb(Object.assign(Object.assign({},a),c),{override:c},u)),a[s]=d}),a};function gr(){const{token:e,hashed:t,theme:n,override:r,cssVar:i}=C.useContext(Xv),o=`${CP}-${t||""}`,a=n||qv,[s,l,u]=aA(a,[Cs,e],{salt:o,override:r,getComputedToken:lb,formatToken:ob,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:sb,ignore:xP,preserve:TP}});return[a,u,t?l:"",s,i]}const Ns={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},zn=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Su=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ub=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),OP=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),NP=(e,t,n,r)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},so=(e,t)=>({outline:`${fe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Ci=(e,t)=>({"&:focus-visible":Object.assign({},so(e,t))}),cb=e=>({[`.${e}`]:Object.assign(Object.assign({},Su()),{[`.${e} .${e}-icon`]:{display:"block"}})}),db=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Ci(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),{genStyleHooks:wn,genComponentStyleHook:_P,genSubStyleComponent:Pf}=SP({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=C.useContext(Qt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,i]=gr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:e}=C.useContext(Qt);return e??{}},getResetStyles:(e,t)=>{var n;const r=OP(e);return[r,{"&":r},cb((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:Eu)]},getCommonStyle:NP,getCompUnitless:()=>sb});function IP(e,t){return Mo.reduce((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const AP=(e,t)=>{const[n,r]=gr();return df({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>[cb(e)])},PP=Object.assign({},m),{useId:fb}=PP,MP=typeof fb>"u"?()=>"":fb;function LP(e,t,n){var r,i;const o=on("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},bu),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:bu.hashed,cssVar:t==null?void 0:t.cssVar}):t,l=MP();if(process.env.NODE_ENV!=="production"){const u=a.cssVar||s.cssVar,c=!!(typeof a.cssVar=="object"&&(!((i=a.cssVar)===null||i===void 0)&&i.key)||l);process.env.NODE_ENV!=="production"&&o(!u||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return ms(()=>{var u,c;if(!e)return t;const d=Object.assign({},s.components);Object.keys(e.components||{}).forEach(p=>{d[p]=Object.assign(Object.assign({},d[p]),e.components[p])});const f=`css-var-${l.replace(/:/g,"")}`,h=((u=a.cssVar)!==null&&u!==void 0?u:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((c=a.cssVar)===null||c===void 0?void 0:c.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:h})},[a,s],(u,c)=>u.some((d,f)=>{const h=c[f];return!ca(d,h,!0)}))}var DP=["children"],hb=m.createContext({});function kP(e){var t=e.children,n=yt(e,DP);return m.createElement(hb.Provider,{value:n},t)}var RP=function(e){bi(n,e);var t=zi(n);function n(){return Dn(this,n),t.apply(this,arguments)}return kn(n,[{key:"render",value:function(){return this.props.children}}]),n}(m.Component);function $P(e){var t=m.useReducer(function(s){return s+1},0),n=ae(t,2),r=n[1],i=m.useRef(e),o=an(function(){return i.current}),a=an(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var lo="none",Cu="appear",wu="enter",xu="leave",mb="none",oi="prepare",Ea="start",Sa="active",Mf="end",pb="prepared";function gb(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function FP(e,t){var n={animationend:gb("Animation","AnimationEnd"),transitionend:gb("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var BP=FP(Xn(),typeof window<"u"?window:{}),vb={};if(Xn()){var zP=document.createElement("div");vb=zP.style}var Tu={};function bb(e){if(Tu[e])return Tu[e];var t=BP[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in vb)return Tu[e]=t[o],Tu[e]}return""}var yb=bb("animationend"),Eb=bb("transitionend"),Sb=!!(yb&&Eb),Cb=yb||"animationend",wb=Eb||"transitionend";function xb(e,t){if(!e)return null;if(lt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const HP=function(e){var t=C.useRef();function n(i){i&&(i.removeEventListener(wb,e),i.removeEventListener(Cb,e))}function r(i){t.current&&t.current!==i&&n(t.current),i&&i!==t.current&&(i.addEventListener(wb,e),i.addEventListener(Cb,e),t.current=i)}return m.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var Tb=Xn()?C.useLayoutEffect:C.useEffect;const jP=function(){var e=m.useRef(null);function t(){Xt.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Xt(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return m.useEffect(function(){return function(){t()}},[]),[n,t]};var VP=[oi,Ea,Sa,Mf],UP=[oi,pb],Ob=!1,WP=!0;function Nb(e){return e===Sa||e===Mf}const YP=function(e,t,n){var r=ya(mb),i=ae(r,2),o=i[0],a=i[1],s=jP(),l=ae(s,2),u=l[0],c=l[1];function d(){a(oi,!0)}var f=t?UP:VP;return Tb(function(){if(o!==mb&&o!==Mf){var h=f.indexOf(o),p=f[h+1],g=n(o);g===Ob?a(p,!0):p&&u(function(v){function b(){v.isCanceled()||a(p,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[e,o]),m.useEffect(function(){return function(){c()}},[]),[d,o]};function qP(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,u=l===void 0?!0:l,c=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,g=r.onAppearStart,v=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,O=r.onAppearEnd,S=r.onEnterEnd,T=r.onLeaveEnd,I=r.onVisibleChanged,N=ya(),_=ae(N,2),P=_[0],A=_[1],M=$P(lo),D=ae(M,2),R=D[0],$=D[1],F=ya(null),B=ae(F,2),z=B[0],L=B[1],H=R(),W=C.useRef(!1),k=C.useRef(null);function G(){return n()}var Y=C.useRef(!1);function te(){$(lo),L(null,!0)}var se=an(function(he){var Ae=R();if(Ae!==lo){var Ie=G();if(!(he&&!he.deadline&&he.target!==Ie)){var me=Y.current,Me;Ae===Cu&&me?Me=O==null?void 0:O(Ie,he):Ae===wu&&me?Me=S==null?void 0:S(Ie,he):Ae===xu&&me&&(Me=T==null?void 0:T(Ie,he)),me&&Me!==!1&&te()}}}),ce=HP(se),ue=ae(ce,1),de=ue[0],J=function(Ae){switch(Ae){case Cu:return V(V(V({},oi,f),Ea,g),Sa,y);case wu:return V(V(V({},oi,h),Ea,v),Sa,E);case xu:return V(V(V({},oi,p),Ea,b),Sa,x);default:return{}}},Z=m.useMemo(function(){return J(H)},[H]),oe=YP(H,!e,function(he){if(he===oi){var Ae=Z[oi];return Ae?Ae(G()):Ob}if(ne in Z){var Ie;L(((Ie=Z[ne])===null||Ie===void 0?void 0:Ie.call(Z,G(),null))||null)}return ne===Sa&&H!==lo&&(de(G()),c>0&&(clearTimeout(k.current),k.current=setTimeout(function(){se({deadline:!0})},c))),ne===pb&&te(),WP}),X=ae(oe,2),ee=X[0],ne=X[1],be=Nb(ne);Y.current=be;var Ce=C.useRef(null);Tb(function(){if(!(W.current&&Ce.current===t)){A(t);var he=W.current;W.current=!0;var Ae;!he&&t&&s&&(Ae=Cu),he&&t&&o&&(Ae=wu),(he&&!t&&u||!he&&d&&!t&&u)&&(Ae=xu);var Ie=J(Ae);Ae&&(e||Ie[oi])?($(Ae),ee()):$(lo),Ce.current=t}},[t]),C.useEffect(function(){(H===Cu&&!s||H===wu&&!o||H===xu&&!u)&&$(lo)},[s,o,u]),C.useEffect(function(){return function(){W.current=!1,clearTimeout(k.current)}},[]);var Se=m.useRef(!1);C.useEffect(function(){P&&(Se.current=!0),P!==void 0&&H===lo&&((Se.current||P)&&(I==null||I(P)),Se.current=!0)},[P,H]);var ve=z;return Z[oi]&&ne===Ea&&(ve=U({transition:"none"},ve)),[H,ne,ve,P??t]}function XP(e){var t=e;lt(e)==="object"&&(t=e.transitionSupport);function n(i,o){return!!(i.motionName&&t&&o!==!1)}var r=m.forwardRef(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,u=l===void 0?!0:l,c=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,p=i.eventProps,g=m.useContext(hb),v=g.motion,b=n(i,v),y=C.useRef(),E=C.useRef();function x(){try{return y.current instanceof HTMLElement?y.current:Xl(E.current)}catch{return null}}var O=qP(b,s,x,i),S=ae(O,4),T=S[0],I=S[1],N=S[2],_=S[3],P=m.useRef(_);_&&(P.current=!0);var A=m.useCallback(function(B){y.current=B,jd(o,B)},[o]),M,D=U(U({},p),{},{visible:s});if(!d)M=null;else if(T===lo)_?M=d(U({},D),A):!u&&P.current&&h?M=d(U(U({},D),{},{className:h}),A):c||!u&&!h?M=d(U(U({},D),{},{style:{display:"none"}}),A):M=null;else{var R;I===oi?R="prepare":Nb(I)?R="active":I===Ea&&(R="start");var $=xb(f,"".concat(T,"-").concat(R));M=d(U(U({},D),{},{className:ie(xb(f,T),V(V({},$,$&&R),f,typeof f=="string")),style:N}),A)}if(m.isValidElement(M)&&_o(M)){var F=la(M);F||(M=m.cloneElement(M,{ref:A}))}return m.createElement(RP,{ref:E},M)});return r.displayName="CSSMotion",r}const Or=XP(Sb);var Lf="add",Df="keep",kf="remove",Rf="removed";function KP(e){var t;return e&&lt(e)==="object"&&"key"in e?t=e:t={key:e},U(U({},t),{},{key:String(t.key)})}function $f(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(KP)}function GP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=$f(e),a=$f(t);o.forEach(function(u){for(var c=!1,d=r;d<i;d+=1){var f=a[d];if(f.key===u.key){r<d&&(n=n.concat(a.slice(r,d).map(function(h){return U(U({},h),{},{status:Lf})})),r=d),n.push(U(U({},f),{},{status:Df})),r+=1,c=!0;break}}c||n.push(U(U({},u),{},{status:kf}))}),r<i&&(n=n.concat(a.slice(r).map(function(u){return U(U({},u),{},{status:Lf})})));var s={};n.forEach(function(u){var c=u.key;s[c]=(s[c]||0)+1});var l=Object.keys(s).filter(function(u){return s[u]>1});return l.forEach(function(u){n=n.filter(function(c){var d=c.key,f=c.status;return d!==u||f!==kf}),n.forEach(function(c){c.key===u&&(c.status=Df)})}),n}var QP=["component","children","onVisibleChanged","onAllRemoved"],ZP=["status"],JP=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function eM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Or,n=function(r){bi(o,r);var i=zi(o);function o(){var a;Dn(this,o);for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return a=i.call.apply(i,[this].concat(l)),V(Vt(a),"state",{keyEntities:[]}),V(Vt(a),"removeKey",function(c){a.setState(function(d){var f=d.keyEntities.map(function(h){return h.key!==c?h:U(U({},h),{},{status:Rf})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(h){var p=h.status;return p!==Rf}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return kn(o,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,u=this.props,c=u.component,d=u.children,f=u.onVisibleChanged;u.onAllRemoved;var h=yt(u,QP),p=c||m.Fragment,g={};return JP.forEach(function(v){g[v]=h[v],delete h[v]}),delete h.keys,m.createElement(p,h,l.map(function(v,b){var y=v.status,E=yt(v,ZP),x=y===Lf||y===Df;return m.createElement(t,Re({},g,{key:E.key,visible:x,eventProps:E,onVisibleChanged:function(S){f==null||f(S,{key:E.key}),S||s.removeKey(E.key)}}),function(O,S){return d(U(U({},O),{},{index:b}),S)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var u=s.keys,c=l.keyEntities,d=$f(u),f=GP(c,d);return{keyEntities:f.filter(function(h){var p=c.find(function(g){var v=g.key;return h.key===v});return!(p&&p.status===Rf&&h.status===kf)})}}}]),o}(m.Component);return V(n,"defaultProps",{component:"div"}),n}eM(Sb);const Ff=m.createContext(!0);process.env.NODE_ENV!=="production"&&(Ff.displayName="MotionCacheContext");function tM(e){const t=m.useContext(Ff),{children:n}=e,[,r]=gr(),{motion:i}=r,o=m.useRef(!1);return o.current||(o.current=t!==i),o.current?m.createElement(Ff.Provider,{value:i},m.createElement(kP,{motion:i},n)):n}const _b=m.memo(({dropdownMatchSelectWidth:e})=>(on("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));process.env.NODE_ENV!=="production"&&(_b.displayName="PropWarning");const nM=process.env.NODE_ENV!=="production"?_b:()=>null;var rM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let Bf=!1;const iM=process.env.NODE_ENV!=="production"?e=>{process.env.NODE_ENV!=="production"&&oo(!Bf,e,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,oM=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Ou,Ib,Ab,Pb;function Nu(){return Ou||yu}function aM(){return Ib||Eu}function sM(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const lM=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(Ou=t),n!==void 0&&(Ib=n),"holderRender"in e&&(Pb=i),r&&(sM(r)?(process.env.NODE_ENV!=="production"&&oo(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),sP(Nu(),r)):Ab=r)},uM=()=>({getPrefixCls:(e,t)=>t||(e?`${Nu()}-${e}`:Nu()),getIconPrefixCls:aM,getRootPrefixCls:()=>Ou||Nu(),getTheme:()=>Ab,holderRender:Pb}),cM=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:u,space:c,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:g,legacyLocale:v,parentContext:b,iconPrefixCls:y,theme:E,componentDisabled:x,segmented:O,statistic:S,spin:T,calendar:I,carousel:N,cascader:_,collapse:P,typography:A,checkbox:M,descriptions:D,divider:R,drawer:$,skeleton:F,steps:B,image:z,layout:L,list:H,mentions:W,modal:k,progress:G,result:Y,slider:te,breadcrumb:se,menu:ce,pagination:ue,input:de,textArea:J,empty:Z,badge:oe,radio:X,rate:ee,switch:ne,transfer:be,avatar:Ce,message:Se,tag:ve,table:he,card:Ae,tabs:Ie,timeline:me,timePicker:Me,upload:Q,notification:le,tree:pe,colorPicker:ye,datePicker:Fe,rangePicker:je,flex:De,wave:we,dropdown:Le,warning:Ue,tour:Te,tooltip:Be,popover:it,popconfirm:wt,floatButtonGroup:Dt,variant:Pt,inputNumber:xt,treeSelect:Ht}=e,kt=m.useCallback((et,nt)=>{const{prefixCls:mt}=e;if(nt)return nt;const vt=mt||b.getPrefixCls("");return et?`${vt}-${et}`:vt},[b.getPrefixCls,e.prefixCls]),at=y||b.iconPrefixCls||Eu,dt=n||b.csp;AP(at,dt);const $e=LP(E,b.theme,{prefixCls:kt("")});process.env.NODE_ENV!=="production"&&(Bf=Bf||!!$e);const Ve={csp:dt,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||v,direction:u,space:c,splitter:d,virtual:f,popupMatchSelectWidth:p??h,popupOverflow:g,getPrefixCls:kt,iconPrefixCls:at,theme:$e,segmented:O,statistic:S,spin:T,calendar:I,carousel:N,cascader:_,collapse:P,typography:A,checkbox:M,descriptions:D,divider:R,drawer:$,skeleton:F,steps:B,image:z,input:de,textArea:J,layout:L,list:H,mentions:W,modal:k,progress:G,result:Y,slider:te,breadcrumb:se,menu:ce,pagination:ue,empty:Z,badge:oe,radio:X,rate:ee,switch:ne,transfer:be,avatar:Ce,message:Se,tag:ve,table:he,card:Ae,tabs:Ie,timeline:me,timePicker:Me,upload:Q,notification:le,tree:pe,colorPicker:ye,datePicker:Fe,rangePicker:je,flex:De,wave:we,dropdown:Le,warning:Ue,tour:Te,tooltip:Be,popover:it,popconfirm:wt,floatButtonGroup:Dt,variant:Pt,inputNumber:xt,treeSelect:Ht};process.env.NODE_ENV!=="production"&&on("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ye=Object.assign({},b);Object.keys(Ve).forEach(et=>{Ve[et]!==void 0&&(Ye[et]=Ve[et])}),oM.forEach(et=>{const nt=e[et];nt&&(Ye[et]=nt)}),typeof r<"u"&&(Ye.button=Object.assign({autoInsertSpace:r},Ye.button));const ot=ms(()=>Ye,Ye,(et,nt)=>{const mt=Object.keys(et),vt=Object.keys(nt);return mt.length!==vt.length||mt.some(ht=>et[ht]!==nt[ht])}),{layer:Pe}=m.useContext(bs),_e=m.useMemo(()=>({prefixCls:at,csp:dt,layer:Pe?"antd":void 0}),[at,dt,Pe]);let xe=m.createElement(m.Fragment,null,m.createElement(nM,{dropdownMatchSelectWidth:h}),t);const ze=m.useMemo(()=>{var et,nt,mt,vt;return va(((et=ao.Form)===null||et===void 0?void 0:et.defaultValidateMessages)||{},((mt=(nt=ot.locale)===null||nt===void 0?void 0:nt.Form)===null||mt===void 0?void 0:mt.defaultValidateMessages)||{},((vt=ot.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ot,a==null?void 0:a.validateMessages]);Object.keys(ze).length>0&&(xe=m.createElement(zA.Provider,{value:ze},xe)),s&&(xe=m.createElement($v,{locale:s,_ANT_MARK__:Rv},xe)),xe=m.createElement(du.Provider,{value:_e},xe),l&&(xe=m.createElement(lP,{size:l},xe)),xe=m.createElement(tM,null,xe);const qe=m.useMemo(()=>{const et=$e||{},{algorithm:nt,token:mt,components:vt,cssVar:ht}=et,St=rM(et,["algorithm","token","components","cssVar"]),At=nt&&(!Array.isArray(nt)||nt.length>0)?Jd(nt):qv,Bt={};Object.entries(vt||{}).forEach(([fn,Ut])=>{const Rt=Object.assign({},Ut);"algorithm"in Rt&&(Rt.algorithm===!0?Rt.theme=At:(Array.isArray(Rt.algorithm)||typeof Rt.algorithm=="function")&&(Rt.theme=Jd(Rt.algorithm)),delete Rt.algorithm),Bt[fn]=Rt});const en=Object.assign(Object.assign({},Cs),mt);return Object.assign(Object.assign({},St),{theme:At,token:en,components:Bt,override:Object.assign({override:en},Bt),cssVar:ht})},[$e]);return E&&(xe=m.createElement(Xv.Provider,{value:qe},xe)),ot.warning&&(xe=m.createElement(Av.Provider,{value:ot.warning},xe)),x!==void 0&&(xe=m.createElement(Gv,{disabled:x},xe)),m.createElement(Qt.Provider,{value:ot},xe)},wi=e=>{const t=m.useContext(Qt),n=m.useContext(ff);return m.createElement(cM,Object.assign({parentContext:t,legacyLocale:n},e))};wi.ConfigContext=Qt,wi.SizeContext=ba,wi.config=lM,wi.useConfig=uP,Object.defineProperty(wi,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&oo(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),ba)}),process.env.NODE_ENV!=="production"&&(wi.displayName="ConfigProvider");var dM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Mb(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function fM(e){return Mb(e)instanceof ShadowRoot}function _u(e){return fM(e)?Mb(e):null}function hM(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function zf(e,t){bt(e,"[@ant-design/icons] ".concat(t))}function Lb(e){return lt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(lt(e.icon)==="object"||typeof e.icon=="function")}function Db(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[hM(n)]=r}return t},{})}function Hf(e,t,n){return n?C.createElement(e.tag,U(U({key:t},Db(e.attrs)),n),(e.children||[]).map(function(r,i){return Hf(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):C.createElement(e.tag,U({key:t},Db(e.attrs)),(e.children||[]).map(function(r,i){return Hf(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function kb(e){return xs(e)[0]}function Rb(e){return e?Array.isArray(e)?e:[e]:[]}var mM={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},pM=`
64
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var ab=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sb={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},xP={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},TP={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},lb=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:i}=t,o=ab(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=ob(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:u}=l,c=ab(l,["theme"]);let d=c;u&&(d=lb(Object.assign(Object.assign({},a),c),{override:c},u)),a[s]=d}),a};function gr(){const{token:e,hashed:t,theme:n,override:r,cssVar:i}=C.useContext(Xv),o=`${CP}-${t||""}`,a=n||qv,[s,l,u]=aA(a,[Cs,e],{salt:o,override:r,getComputedToken:lb,formatToken:ob,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:sb,ignore:xP,preserve:TP}});return[a,u,t?l:"",s,i]}const Ns={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},zn=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Su=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ub=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),OP=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),NP=(e,t,n,r)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},so=(e,t)=>({outline:`${fe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Ci=(e,t)=>({"&:focus-visible":Object.assign({},so(e,t))}),cb=e=>({[`.${e}`]:Object.assign(Object.assign({},Su()),{[`.${e} .${e}-icon`]:{display:"block"}})}),db=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Ci(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),{genStyleHooks:wn,genComponentStyleHook:_P,genSubStyleComponent:Pf}=SP({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=C.useContext(Qt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,i]=gr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:e}=C.useContext(Qt);return e??{}},getResetStyles:(e,t)=>{var n;const r=OP(e);return[r,{"&":r},cb((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:Eu)]},getCommonStyle:NP,getCompUnitless:()=>sb});function IP(e,t){return Mo.reduce((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const AP=(e,t)=>{const[n,r]=gr();return df({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>[cb(e)])},PP=Object.assign({},m),{useId:fb}=PP,MP=typeof fb>"u"?()=>"":fb;function LP(e,t,n){var r,i;const o=on("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},bu),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:bu.hashed,cssVar:t==null?void 0:t.cssVar}):t,l=MP();if(process.env.NODE_ENV!=="production"){const u=a.cssVar||s.cssVar,c=!!(typeof a.cssVar=="object"&&(!((i=a.cssVar)===null||i===void 0)&&i.key)||l);process.env.NODE_ENV!=="production"&&o(!u||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return ms(()=>{var u,c;if(!e)return t;const d=Object.assign({},s.components);Object.keys(e.components||{}).forEach(p=>{d[p]=Object.assign(Object.assign({},d[p]),e.components[p])});const f=`css-var-${l.replace(/:/g,"")}`,h=((u=a.cssVar)!==null&&u!==void 0?u:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((c=a.cssVar)===null||c===void 0?void 0:c.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:h})},[a,s],(u,c)=>u.some((d,f)=>{const h=c[f];return!ca(d,h,!0)}))}var DP=["children"],hb=m.createContext({});function kP(e){var t=e.children,n=yt(e,DP);return m.createElement(hb.Provider,{value:n},t)}var RP=function(e){bi(n,e);var t=zi(n);function n(){return Dn(this,n),t.apply(this,arguments)}return kn(n,[{key:"render",value:function(){return this.props.children}}]),n}(m.Component);function $P(e){var t=m.useReducer(function(s){return s+1},0),n=ae(t,2),r=n[1],i=m.useRef(e),o=an(function(){return i.current}),a=an(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var lo="none",Cu="appear",wu="enter",xu="leave",mb="none",oi="prepare",Ea="start",Sa="active",Mf="end",pb="prepared";function gb(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function FP(e,t){var n={animationend:gb("Animation","AnimationEnd"),transitionend:gb("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var BP=FP(Xn(),typeof window<"u"?window:{}),vb={};if(Xn()){var zP=document.createElement("div");vb=zP.style}var Tu={};function bb(e){if(Tu[e])return Tu[e];var t=BP[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in vb)return Tu[e]=t[o],Tu[e]}return""}var yb=bb("animationend"),Eb=bb("transitionend"),Sb=!!(yb&&Eb),Cb=yb||"animationend",wb=Eb||"transitionend";function xb(e,t){if(!e)return null;if(lt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const HP=function(e){var t=C.useRef();function n(i){i&&(i.removeEventListener(wb,e),i.removeEventListener(Cb,e))}function r(i){t.current&&t.current!==i&&n(t.current),i&&i!==t.current&&(i.addEventListener(wb,e),i.addEventListener(Cb,e),t.current=i)}return m.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var Tb=Xn()?C.useLayoutEffect:C.useEffect;const jP=function(){var e=m.useRef(null);function t(){Xt.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Xt(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return m.useEffect(function(){return function(){t()}},[]),[n,t]};var VP=[oi,Ea,Sa,Mf],UP=[oi,pb],Ob=!1,WP=!0;function Nb(e){return e===Sa||e===Mf}const YP=function(e,t,n){var r=ya(mb),i=ae(r,2),o=i[0],a=i[1],s=jP(),l=ae(s,2),u=l[0],c=l[1];function d(){a(oi,!0)}var f=t?UP:VP;return Tb(function(){if(o!==mb&&o!==Mf){var h=f.indexOf(o),p=f[h+1],g=n(o);g===Ob?a(p,!0):p&&u(function(v){function b(){v.isCanceled()||a(p,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[e,o]),m.useEffect(function(){return function(){c()}},[]),[d,o]};function qP(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,u=l===void 0?!0:l,c=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,g=r.onAppearStart,v=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,O=r.onAppearEnd,S=r.onEnterEnd,T=r.onLeaveEnd,I=r.onVisibleChanged,N=ya(),_=ae(N,2),P=_[0],A=_[1],M=$P(lo),D=ae(M,2),R=D[0],$=D[1],F=ya(null),B=ae(F,2),z=B[0],L=B[1],H=R(),W=C.useRef(!1),k=C.useRef(null);function G(){return n()}var Y=C.useRef(!1);function te(){$(lo),L(null,!0)}var se=an(function(he){var Ae=R();if(Ae!==lo){var Ie=G();if(!(he&&!he.deadline&&he.target!==Ie)){var me=Y.current,Me;Ae===Cu&&me?Me=O==null?void 0:O(Ie,he):Ae===wu&&me?Me=S==null?void 0:S(Ie,he):Ae===xu&&me&&(Me=T==null?void 0:T(Ie,he)),me&&Me!==!1&&te()}}}),ce=HP(se),ue=ae(ce,1),de=ue[0],J=function(Ae){switch(Ae){case Cu:return V(V(V({},oi,f),Ea,g),Sa,y);case wu:return V(V(V({},oi,h),Ea,v),Sa,E);case xu:return V(V(V({},oi,p),Ea,b),Sa,x);default:return{}}},Z=m.useMemo(function(){return J(H)},[H]),oe=YP(H,!e,function(he){if(he===oi){var Ae=Z[oi];return Ae?Ae(G()):Ob}if(ne in Z){var Ie;L(((Ie=Z[ne])===null||Ie===void 0?void 0:Ie.call(Z,G(),null))||null)}return ne===Sa&&H!==lo&&(de(G()),c>0&&(clearTimeout(k.current),k.current=setTimeout(function(){se({deadline:!0})},c))),ne===pb&&te(),WP}),X=ae(oe,2),ee=X[0],ne=X[1],be=Nb(ne);Y.current=be;var Ce=C.useRef(null);Tb(function(){if(!(W.current&&Ce.current===t)){A(t);var he=W.current;W.current=!0;var Ae;!he&&t&&s&&(Ae=Cu),he&&t&&o&&(Ae=wu),(he&&!t&&u||!he&&d&&!t&&u)&&(Ae=xu);var Ie=J(Ae);Ae&&(e||Ie[oi])?($(Ae),ee()):$(lo),Ce.current=t}},[t]),C.useEffect(function(){(H===Cu&&!s||H===wu&&!o||H===xu&&!u)&&$(lo)},[s,o,u]),C.useEffect(function(){return function(){W.current=!1,clearTimeout(k.current)}},[]);var Se=m.useRef(!1);C.useEffect(function(){P&&(Se.current=!0),P!==void 0&&H===lo&&((Se.current||P)&&(I==null||I(P)),Se.current=!0)},[P,H]);var ve=z;return Z[oi]&&ne===Ea&&(ve=U({transition:"none"},ve)),[H,ne,ve,P??t]}function XP(e){var t=e;lt(e)==="object"&&(t=e.transitionSupport);function n(i,o){return!!(i.motionName&&t&&o!==!1)}var r=m.forwardRef(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,u=l===void 0?!0:l,c=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,p=i.eventProps,g=m.useContext(hb),v=g.motion,b=n(i,v),y=C.useRef(),E=C.useRef();function x(){try{return y.current instanceof HTMLElement?y.current:Xl(E.current)}catch{return null}}var O=qP(b,s,x,i),S=ae(O,4),T=S[0],I=S[1],N=S[2],_=S[3],P=m.useRef(_);_&&(P.current=!0);var A=m.useCallback(function(B){y.current=B,jd(o,B)},[o]),M,D=U(U({},p),{},{visible:s});if(!d)M=null;else if(T===lo)_?M=d(U({},D),A):!u&&P.current&&h?M=d(U(U({},D),{},{className:h}),A):c||!u&&!h?M=d(U(U({},D),{},{style:{display:"none"}}),A):M=null;else{var R;I===oi?R="prepare":Nb(I)?R="active":I===Ea&&(R="start");var $=xb(f,"".concat(T,"-").concat(R));M=d(U(U({},D),{},{className:ie(xb(f,T),V(V({},$,$&&R),f,typeof f=="string")),style:N}),A)}if(m.isValidElement(M)&&_o(M)){var F=la(M);F||(M=m.cloneElement(M,{ref:A}))}return m.createElement(RP,{ref:E},M)});return r.displayName="CSSMotion",r}const Or=XP(Sb);var Lf="add",Df="keep",kf="remove",Rf="removed";function KP(e){var t;return e&&lt(e)==="object"&&"key"in e?t=e:t={key:e},U(U({},t),{},{key:String(t.key)})}function $f(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(KP)}function GP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=$f(e),a=$f(t);o.forEach(function(u){for(var c=!1,d=r;d<i;d+=1){var f=a[d];if(f.key===u.key){r<d&&(n=n.concat(a.slice(r,d).map(function(h){return U(U({},h),{},{status:Lf})})),r=d),n.push(U(U({},f),{},{status:Df})),r+=1,c=!0;break}}c||n.push(U(U({},u),{},{status:kf}))}),r<i&&(n=n.concat(a.slice(r).map(function(u){return U(U({},u),{},{status:Lf})})));var s={};n.forEach(function(u){var c=u.key;s[c]=(s[c]||0)+1});var l=Object.keys(s).filter(function(u){return s[u]>1});return l.forEach(function(u){n=n.filter(function(c){var d=c.key,f=c.status;return d!==u||f!==kf}),n.forEach(function(c){c.key===u&&(c.status=Df)})}),n}var QP=["component","children","onVisibleChanged","onAllRemoved"],ZP=["status"],JP=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function eM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Or,n=function(r){bi(o,r);var i=zi(o);function o(){var a;Dn(this,o);for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return a=i.call.apply(i,[this].concat(l)),V(Vt(a),"state",{keyEntities:[]}),V(Vt(a),"removeKey",function(c){a.setState(function(d){var f=d.keyEntities.map(function(h){return h.key!==c?h:U(U({},h),{},{status:Rf})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(h){var p=h.status;return p!==Rf}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return kn(o,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,u=this.props,c=u.component,d=u.children,f=u.onVisibleChanged;u.onAllRemoved;var h=yt(u,QP),p=c||m.Fragment,g={};return JP.forEach(function(v){g[v]=h[v],delete h[v]}),delete h.keys,m.createElement(p,h,l.map(function(v,b){var y=v.status,E=yt(v,ZP),x=y===Lf||y===Df;return m.createElement(t,Re({},g,{key:E.key,visible:x,eventProps:E,onVisibleChanged:function(S){f==null||f(S,{key:E.key}),S||s.removeKey(E.key)}}),function(O,S){return d(U(U({},O),{},{index:b}),S)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var u=s.keys,c=l.keyEntities,d=$f(u),f=GP(c,d);return{keyEntities:f.filter(function(h){var p=c.find(function(g){var v=g.key;return h.key===v});return!(p&&p.status===Rf&&h.status===kf)})}}}]),o}(m.Component);return V(n,"defaultProps",{component:"div"}),n}eM(Sb);const Ff=m.createContext(!0);process.env.NODE_ENV!=="production"&&(Ff.displayName="MotionCacheContext");function tM(e){const t=m.useContext(Ff),{children:n}=e,[,r]=gr(),{motion:i}=r,o=m.useRef(!1);return o.current||(o.current=t!==i),o.current?m.createElement(Ff.Provider,{value:i},m.createElement(kP,{motion:i},n)):n}const _b=m.memo(({dropdownMatchSelectWidth:e})=>(on("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));process.env.NODE_ENV!=="production"&&(_b.displayName="PropWarning");const nM=process.env.NODE_ENV!=="production"?_b:()=>null;var rM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let Bf=!1;const iM=process.env.NODE_ENV!=="production"?e=>{process.env.NODE_ENV!=="production"&&oo(!Bf,e,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,oM=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Ou,Ib,Ab,Pb;function Nu(){return Ou||yu}function aM(){return Ib||Eu}function sM(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const lM=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(Ou=t),n!==void 0&&(Ib=n),"holderRender"in e&&(Pb=i),r&&(sM(r)?(process.env.NODE_ENV!=="production"&&oo(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),sP(Nu(),r)):Ab=r)},uM=()=>({getPrefixCls:(e,t)=>t||(e?`${Nu()}-${e}`:Nu()),getIconPrefixCls:aM,getRootPrefixCls:()=>Ou||Nu(),getTheme:()=>Ab,holderRender:Pb}),cM=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:u,space:c,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:g,legacyLocale:v,parentContext:b,iconPrefixCls:y,theme:E,componentDisabled:x,segmented:O,statistic:S,spin:T,calendar:I,carousel:N,cascader:_,collapse:P,typography:A,checkbox:M,descriptions:D,divider:R,drawer:$,skeleton:F,steps:B,image:z,layout:L,list:H,mentions:W,modal:k,progress:G,result:Y,slider:te,breadcrumb:se,menu:ce,pagination:ue,input:de,textArea:J,empty:Z,badge:oe,radio:X,rate:ee,switch:ne,transfer:be,avatar:Ce,message:Se,tag:ve,table:he,card:Ae,tabs:Ie,timeline:me,timePicker:Me,upload:Q,notification:le,tree:pe,colorPicker:ye,datePicker:Fe,rangePicker:je,flex:De,wave:we,dropdown:Le,warning:Ue,tour:Te,tooltip:Be,popover:it,popconfirm:Ct,floatButtonGroup:Dt,variant:Pt,inputNumber:wt,treeSelect:Ht}=e,kt=m.useCallback((et,nt)=>{const{prefixCls:mt}=e;if(nt)return nt;const vt=mt||b.getPrefixCls("");return et?`${vt}-${et}`:vt},[b.getPrefixCls,e.prefixCls]),at=y||b.iconPrefixCls||Eu,dt=n||b.csp;AP(at,dt);const $e=LP(E,b.theme,{prefixCls:kt("")});process.env.NODE_ENV!=="production"&&(Bf=Bf||!!$e);const Ve={csp:dt,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||v,direction:u,space:c,splitter:d,virtual:f,popupMatchSelectWidth:p??h,popupOverflow:g,getPrefixCls:kt,iconPrefixCls:at,theme:$e,segmented:O,statistic:S,spin:T,calendar:I,carousel:N,cascader:_,collapse:P,typography:A,checkbox:M,descriptions:D,divider:R,drawer:$,skeleton:F,steps:B,image:z,input:de,textArea:J,layout:L,list:H,mentions:W,modal:k,progress:G,result:Y,slider:te,breadcrumb:se,menu:ce,pagination:ue,empty:Z,badge:oe,radio:X,rate:ee,switch:ne,transfer:be,avatar:Ce,message:Se,tag:ve,table:he,card:Ae,tabs:Ie,timeline:me,timePicker:Me,upload:Q,notification:le,tree:pe,colorPicker:ye,datePicker:Fe,rangePicker:je,flex:De,wave:we,dropdown:Le,warning:Ue,tour:Te,tooltip:Be,popover:it,popconfirm:Ct,floatButtonGroup:Dt,variant:Pt,inputNumber:wt,treeSelect:Ht};process.env.NODE_ENV!=="production"&&on("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ye=Object.assign({},b);Object.keys(Ve).forEach(et=>{Ve[et]!==void 0&&(Ye[et]=Ve[et])}),oM.forEach(et=>{const nt=e[et];nt&&(Ye[et]=nt)}),typeof r<"u"&&(Ye.button=Object.assign({autoInsertSpace:r},Ye.button));const ot=ms(()=>Ye,Ye,(et,nt)=>{const mt=Object.keys(et),vt=Object.keys(nt);return mt.length!==vt.length||mt.some(ht=>et[ht]!==nt[ht])}),{layer:Pe}=m.useContext(bs),_e=m.useMemo(()=>({prefixCls:at,csp:dt,layer:Pe?"antd":void 0}),[at,dt,Pe]);let xe=m.createElement(m.Fragment,null,m.createElement(nM,{dropdownMatchSelectWidth:h}),t);const ze=m.useMemo(()=>{var et,nt,mt,vt;return va(((et=ao.Form)===null||et===void 0?void 0:et.defaultValidateMessages)||{},((mt=(nt=ot.locale)===null||nt===void 0?void 0:nt.Form)===null||mt===void 0?void 0:mt.defaultValidateMessages)||{},((vt=ot.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ot,a==null?void 0:a.validateMessages]);Object.keys(ze).length>0&&(xe=m.createElement(zA.Provider,{value:ze},xe)),s&&(xe=m.createElement($v,{locale:s,_ANT_MARK__:Rv},xe)),xe=m.createElement(du.Provider,{value:_e},xe),l&&(xe=m.createElement(lP,{size:l},xe)),xe=m.createElement(tM,null,xe);const qe=m.useMemo(()=>{const et=$e||{},{algorithm:nt,token:mt,components:vt,cssVar:ht}=et,St=rM(et,["algorithm","token","components","cssVar"]),At=nt&&(!Array.isArray(nt)||nt.length>0)?Jd(nt):qv,Bt={};Object.entries(vt||{}).forEach(([fn,Ut])=>{const Rt=Object.assign({},Ut);"algorithm"in Rt&&(Rt.algorithm===!0?Rt.theme=At:(Array.isArray(Rt.algorithm)||typeof Rt.algorithm=="function")&&(Rt.theme=Jd(Rt.algorithm)),delete Rt.algorithm),Bt[fn]=Rt});const en=Object.assign(Object.assign({},Cs),mt);return Object.assign(Object.assign({},St),{theme:At,token:en,components:Bt,override:Object.assign({override:en},Bt),cssVar:ht})},[$e]);return E&&(xe=m.createElement(Xv.Provider,{value:qe},xe)),ot.warning&&(xe=m.createElement(Av.Provider,{value:ot.warning},xe)),x!==void 0&&(xe=m.createElement(Gv,{disabled:x},xe)),m.createElement(Qt.Provider,{value:ot},xe)},wi=e=>{const t=m.useContext(Qt),n=m.useContext(ff);return m.createElement(cM,Object.assign({parentContext:t,legacyLocale:n},e))};wi.ConfigContext=Qt,wi.SizeContext=ba,wi.config=lM,wi.useConfig=uP,Object.defineProperty(wi,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&oo(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),ba)}),process.env.NODE_ENV!=="production"&&(wi.displayName="ConfigProvider");var dM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Mb(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function fM(e){return Mb(e)instanceof ShadowRoot}function _u(e){return fM(e)?Mb(e):null}function hM(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function zf(e,t){bt(e,"[@ant-design/icons] ".concat(t))}function Lb(e){return lt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(lt(e.icon)==="object"||typeof e.icon=="function")}function Db(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[hM(n)]=r}return t},{})}function Hf(e,t,n){return n?C.createElement(e.tag,U(U({key:t},Db(e.attrs)),n),(e.children||[]).map(function(r,i){return Hf(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):C.createElement(e.tag,U({key:t},Db(e.attrs)),(e.children||[]).map(function(r,i){return Hf(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function kb(e){return xs(e)[0]}function Rb(e){return e?Array.isArray(e)?e:[e]:[]}var mM={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},pM=`
65
65
  .anticon {
66
66
  display: inline-flex;
67
67
  align-items: center;
@@ -173,9 +173,9 @@ html body {
173
173
  `]:Object.assign({},d4(e))}}},Aa=wn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=rn(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[g4(r)]},e=>{const{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v4=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("skeleton",t),[u,c,d]=Aa(l),f=_r(e,["prefixCls","className"]),h=ie(l,`${l}-element`,{[`${l}-active`]:i},n,r,c,d);return u(m.createElement("div",{className:h},m.createElement(Gu,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},f))))},b4=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("skeleton",t),[u,c,d]=Aa(l),f=_r(e,["prefixCls"]),h=ie(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,c,d);return u(m.createElement("div",{className:h},m.createElement(Gu,Object.assign({prefixCls:`${l}-button`,size:a},f))))},y4="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",E4=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o}=e,{getPrefixCls:a}=m.useContext(Qt),s=a("skeleton",t),[l,u,c]=Aa(s),d=ie(s,`${s}-element`,{[`${s}-active`]:o},n,r,u,c);return l(m.createElement("div",{className:d},m.createElement("div",{className:ie(`${s}-image`,n),style:i},m.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},m.createElement("title",null,"Image placeholder"),m.createElement("path",{d:y4,className:`${s}-image-path`})))))},S4=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o,size:a="default"}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("skeleton",t),[u,c,d]=Aa(l),f=_r(e,["prefixCls"]),h=ie(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,c,d);return u(m.createElement("div",{className:h},m.createElement(Gu,Object.assign({prefixCls:`${l}-input`,size:a},f))))},C4=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o,children:a}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("skeleton",t),[u,c,d]=Aa(l),f=ie(l,`${l}-element`,{[`${l}-active`]:o},c,n,r,d);return u(m.createElement("div",{className:f},m.createElement("div",{className:ie(`${l}-image`,n),style:i},a)))},w4=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},x4=e=>{const{prefixCls:t,className:n,style:r,rows:i=0}=e,o=Array.from({length:i}).map((a,s)=>m.createElement("li",{key:s,style:{width:w4(s,e)}}));return m.createElement("ul",{className:ie(t,n),style:r},o)},T4=({prefixCls:e,className:t,width:n,style:r})=>m.createElement("h3",{className:ie(e,t),style:Object.assign({width:n},r)});function Oh(e){return e&&typeof e=="object"?e:{}}function O4(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function N4(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function _4(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const uo=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:u=!0,active:c,round:d}=e,{getPrefixCls:f,direction:h,className:p,style:g}=Gn("skeleton"),v=f("skeleton",t),[b,y,E]=Aa(v);if(n||!("loading"in e)){const x=!!s,O=!!l,S=!!u;let T;if(x){const _=Object.assign(Object.assign({prefixCls:`${v}-avatar`},O4(O,S)),Oh(s));T=m.createElement("div",{className:`${v}-header`},m.createElement(Gu,Object.assign({},_)))}let I;if(O||S){let _;if(O){const A=Object.assign(Object.assign({prefixCls:`${v}-title`},N4(x,S)),Oh(l));_=m.createElement(T4,Object.assign({},A))}let P;if(S){const A=Object.assign(Object.assign({prefixCls:`${v}-paragraph`},_4(x,O)),Oh(u));P=m.createElement(x4,Object.assign({},A))}I=m.createElement("div",{className:`${v}-content`},_,P)}const N=ie(v,{[`${v}-with-avatar`]:x,[`${v}-active`]:c,[`${v}-rtl`]:h==="rtl",[`${v}-round`]:d},p,r,i,y,E);return b(m.createElement("div",{className:N,style:Object.assign(Object.assign({},g),o)},T,I))}return a??null};uo.Button=b4,uo.Avatar=v4,uo.Input=S4,uo.Image=E4,uo.Node=C4,process.env.NODE_ENV!=="production"&&(uo.displayName="Skeleton");function a1(){}const I4=m.createContext({add:a1,remove:a1});function s1(e){const t=m.useContext(I4),n=m.useRef(null);return an(i=>{if(i){const o=e?i.querySelector(e):i;t.add(o),n.current=o}else t.remove(n.current)})}const l1=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=C.useContext(Ls);return C.createElement(Hn,Object.assign({onClick:n},e),t)},u1=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=C.useContext(Ls);return C.createElement(Hn,Object.assign({},ny(n),{loading:e,onClick:i},t),r)};function c1(e,t){return C.createElement("span",{className:`${e}-close-x`},t||C.createElement(Ui,{className:`${e}-close-icon`}))}const d1=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:u}=e,[c]=Vi("Modal",kv()),d=t||(c==null?void 0:c.okText),f=r||(c==null?void 0:c.cancelText),h={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:o,onCancel:a},p=C.useMemo(()=>h,Ke(Object.values(h)));let g;return typeof u=="function"||typeof u>"u"?(g=C.createElement(C.Fragment,null,C.createElement(l1,null),C.createElement(u1,null)),typeof u=="function"&&(g=u(g,{OkBtn:u1,CancelBtn:l1})),g=C.createElement(xy,{value:p},g)):g=u,C.createElement(Gv,{disabled:!1},g)},A4=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},P4=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},M4=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=e,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${t}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-offset-${a}`]={marginInlineStart:0},o[`${r}${t}-order-${a}`]={order:0}):(o[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${t}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${t}-order-${a}`]={order:a});return o[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},o},Nh=(e,t)=>M4(e,t),L4=(e,t,n)=>({[`@media (min-width: ${fe(t)})`]:Object.assign({},Nh(e,n))}),D4=()=>({}),k4=()=>({}),R4=wn("Grid",A4,D4),f1=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),$4=wn("Grid",e=>{const t=rn(e,{gridColumns:24}),n=f1(t);return delete n.xs,[P4(t),Nh(t,""),Nh(t,"-xs"),Object.keys(n).map(r=>L4(t,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},k4);function h1(e){return{position:e,inset:0}}const F4=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},h1("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},h1("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:K6(e)}]},B4=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${fe(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},zn(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${fe(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:fe(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},Ci(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${fe(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
174
174
  ${t}-body,
175
175
  ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},z4=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},H4=e=>{const{componentCls:t}=e,n=f1(e);delete n.xs;const r=Object.keys(n).map(i=>({[`@media (min-width: ${fe(n[i])})`]:{width:`var(--${t.replace(".","")}-${i}-width)`}}));return{[`${t}-root`]:{[t]:[{width:`var(--${t.replace(".","")}-xs-width)`}].concat(Ke(r))}}},m1=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return rn(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},p1=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${fe(e.paddingMD)} ${fe(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${fe(e.padding)} ${fe(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${fe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${fe(e.paddingXS)} ${fe(e.padding)}`:0,footerBorderTop:e.wireframe?`${fe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${fe(e.padding*2)} ${fe(e.padding*2)} ${fe(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),g1=wn("Modal",e=>{const t=m1(e);return[B4(t),z4(t),F4(t),yy(t,"zoom"),H4(t)]},p1,{unitless:{titleLineHeight:!0}});var j4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let _h;const V4=e=>{_h={x:e.pageX,y:e.pageY},setTimeout(()=>{_h=null},100)};u4()&&document.documentElement.addEventListener("click",V4,!0);const v1=e=>{const{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:u,visible:c,width:d=520,footer:f,classNames:h,styles:p,children:g,loading:v,confirmLoading:b,zIndex:y,mousePosition:E,onOk:x,onCancel:O,destroyOnHidden:S,destroyOnClose:T}=e,I=j4(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose"]),{getPopupContainer:N,getPrefixCls:_,direction:P,modal:A}=m.useContext(Qt),M=oe=>{b||O==null||O(oe)},D=oe=>{x==null||x(oe)};if(process.env.NODE_ENV!=="production"){const oe=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"],["destroyOnClose","destroyOnHidden"]].forEach(([X,ee])=>{oe.deprecated(!(X in e),X,ee)})}const R=_("modal",t),$=_(),F=Wi(R),[B,z,L]=g1(R,F),H=ie(o,{[`${R}-centered`]:a??(A==null?void 0:A.centered),[`${R}-wrap-rtl`]:P==="rtl"}),W=f!==null&&!v?m.createElement(d1,Object.assign({},e,{onOk:D,onCancel:M})):null,[k,G,Y,te]=r1(Ku(e),Ku(A),{closable:!0,closeIcon:m.createElement(Ui,{className:`${R}-close-icon`}),closeIconRender:oe=>c1(R,oe)}),se=s1(`.${R}-content`),[ce,ue]=Au("Modal",y),[de,J]=m.useMemo(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),Z=m.useMemo(()=>{const oe={};return J&&Object.keys(J).forEach(X=>{const ee=J[X];ee!==void 0&&(oe[`--${R}-${X}-width`]=typeof ee=="number"?`${ee}px`:ee)}),oe},[J]);return B(m.createElement(zs,{form:!0,space:!0},m.createElement(Ps.Provider,{value:ue},m.createElement($y,Object.assign({width:de},I,{zIndex:ce,getContainer:s===void 0?N:s,prefixCls:R,rootClassName:ie(z,r,L,F),footer:W,visible:i??c,mousePosition:E??_h,onClose:M,closable:k&&Object.assign({disabled:Y,closeIcon:G},te),closeIcon:G,focusTriggerAfterClose:l,transitionName:qi($,"zoom",e.transitionName),maskTransitionName:qi($,"fade",e.maskTransitionName),className:ie(z,n,A==null?void 0:A.className),style:Object.assign(Object.assign(Object.assign({},A==null?void 0:A.style),u),Z),classNames:Object.assign(Object.assign(Object.assign({},A==null?void 0:A.classNames),h),{wrapper:ie(H,h==null?void 0:h.wrapper)}),styles:Object.assign(Object.assign({},A==null?void 0:A.styles),p),panelRef:se,destroyOnClose:S??T}),v?m.createElement(uo,{active:!0,title:!1,paragraph:{rows:4},className:`${R}-body-skeleton`}):g))))},U4=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:u}=e,c=`${t}-confirm`;return{[c]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${c}-body-wrapper`]:Object.assign({},ub()),[`&${t} ${t}-body`]:{padding:u},[`${c}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${c}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${fe(e.marginSM)})`},[`${e.iconCls} + ${c}-paragraph`]:{maxWidth:`calc(100% - ${fe(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${c}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${c}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${c}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${c}-error ${c}-body > ${e.iconCls}`]:{color:e.colorError},[`${c}-warning ${c}-body > ${e.iconCls},
176
- ${c}-confirm ${c}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${c}-info ${c}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${c}-success ${c}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},W4=Pf(["Modal","confirm"],e=>{const t=m1(e);return[U4(t)]},p1,{order:-1e3});var Y4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function b1(e){const{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:o,type:a,okCancel:s,footer:l,locale:u}=e,c=Y4(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const T=on("Modal");process.env.NODE_ENV!=="production"&&T(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=m.createElement(Uf,null);break;case"success":d=m.createElement(jf,null);break;case"error":d=m.createElement(Is,null);break;default:d=m.createElement(Vf,null)}const f=s??a==="confirm",h=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[p]=Vi("Modal"),g=u||p,v=r||(f?g==null?void 0:g.okText:g==null?void 0:g.justOkText),b=i||(g==null?void 0:g.cancelText),y=Object.assign({autoFocusButton:h,cancelTextLocale:b,okTextLocale:v,mergedOkCancel:f},c),E=m.useMemo(()=>y,Ke(Object.values(y))),x=m.createElement(m.Fragment,null,m.createElement(Ty,null),m.createElement(Oy,null)),O=e.title!==void 0&&e.title!==null,S=`${o}-body`;return m.createElement("div",{className:`${o}-body-wrapper`},m.createElement("div",{className:ie(S,{[`${S}-has-title`]:O})},d,m.createElement("div",{className:`${o}-paragraph`},O&&m.createElement("span",{className:`${o}-title`},e.title),m.createElement("div",{className:`${o}-content`},e.content))),l===void 0||typeof l=="function"?m.createElement(xy,{value:E},m.createElement("div",{className:`${o}-btns`},typeof l=="function"?l(x,{OkBtn:Oy,CancelBtn:Ty}):x)):l,m.createElement(W4,{prefixCls:t}))}const y1=e=>{const{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:u=!1,onConfirm:c,styles:d}=e;if(process.env.NODE_ENV!=="production"){const x=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(([O,S])=>{x.deprecated(!(O in e),O,S)})}const f=`${o}-confirm`,h=e.width||416,p=e.style||{},g=e.mask===void 0?!0:e.mask,v=e.maskClosable===void 0?!1:e.maskClosable,b=ie(f,`${f}-${e.type}`,{[`${f}-rtl`]:i==="rtl"},e.className),[,y]=gr(),E=m.useMemo(()=>n!==void 0?n:y.zIndexPopupBase+Ub,[n,y]);return m.createElement(v1,Object.assign({},e,{className:b,wrapClassName:ie({[`${f}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),c==null||c(!1)},title:"",footer:null,transitionName:qi(s||"","zoom",e.transitionName),maskTransitionName:qi(s||"","fade",e.maskTransitionName),mask:g,maskClosable:v,style:p,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:E,closable:u}),m.createElement(b1,Object.assign({},e,{confirmPrefixCls:f})))},Ih=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return m.createElement(wi,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},m.createElement(y1,Object.assign({},e)))};process.env.NODE_ENV!=="production"&&(y1.displayName="ConfirmDialog",Ih.displayName="ConfirmDialogWrapper");const Ro=[];let E1="";function S1(){return E1}const q4=e=>{var t,n;const{prefixCls:r,getContainer:i,direction:o}=e,a=kv(),s=C.useContext(Qt),l=S1()||s.getPrefixCls(),u=r||`${l}-modal`;let c=i;return c===!1&&(c=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&oo(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),C.createElement(Ih,Object.assign({},e,{rootPrefixCls:l,prefixCls:u,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(t=s.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:c}))};function Hs(e){const t=uM();process.env.NODE_ENV!=="production"&&!t.holderRender&&iM("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:l,open:!0}),i,o;function a(...c){var d;if(c.some(p=>p==null?void 0:p.triggerCancel)){var h;(d=e.onCancel)===null||d===void 0||(h=d).call.apply(h,[e,()=>{}].concat(Ke(c.slice(1))))}for(let p=0;p<Ro.length;p++)if(Ro[p]===l){Ro.splice(p,1);break}o()}function s(c){clearTimeout(i),i=setTimeout(()=>{const d=t.getPrefixCls(void 0,S1()),f=t.getIconPrefixCls(),h=t.getTheme(),p=C.createElement(q4,Object.assign({},c));o=Qb()(C.createElement(wi,{prefixCls:d,iconPrefixCls:f,theme:h},t.holderRender?t.holderRender(p):p),n)})}function l(...c){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,c)}}),r.visible&&delete r.visible,s(r)}function u(c){typeof c=="function"?r=c(r):r=Object.assign(Object.assign({},r),c),s(r)}return s(r),Ro.push(l),{destroy:l,update:u}}function C1(e){return Object.assign(Object.assign({},e),{type:"warning"})}function w1(e){return Object.assign(Object.assign({},e),{type:"info"})}function x1(e){return Object.assign(Object.assign({},e),{type:"success"})}function T1(e){return Object.assign(Object.assign({},e),{type:"error"})}function O1(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function X4({rootPrefixCls:e}){process.env.NODE_ENV!=="production"&&oo(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),E1=e}var K4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const G4=(e,t)=>{var n,{afterClose:r,config:i}=e,o=K4(e,["afterClose","config"]);const[a,s]=m.useState(!0),[l,u]=m.useState(i),{direction:c,getPrefixCls:d}=m.useContext(Qt),f=d("modal"),h=d(),p=()=>{var y;r(),(y=l.afterClose)===null||y===void 0||y.call(l)},g=(...y)=>{var E;if(s(!1),y.some(S=>S==null?void 0:S.triggerCancel)){var O;(E=l.onCancel)===null||E===void 0||(O=E).call.apply(O,[l,()=>{}].concat(Ke(y.slice(1))))}};m.useImperativeHandle(t,()=>({destroy:g,update:y=>{u(E=>{const x=typeof y=="function"?y(E):y;return Object.assign(Object.assign({},E),x)})}}));const v=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[b]=Vi("Modal",ao.Modal);return m.createElement(Ih,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:g,open:a,afterClose:p,okText:l.okText||(v?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:l.direction||c,cancelText:l.cancelText||(b==null?void 0:b.cancelText)},o))},Q4=m.forwardRef(G4);let N1=0;const Z4=m.memo(m.forwardRef((e,t)=>{const[n,r]=KM();return m.useImperativeHandle(t,()=>({patchElement:r}),[]),m.createElement(m.Fragment,null,n)}));function J4(){const e=m.useRef(null),[t,n]=m.useState([]);m.useEffect(()=>{t.length&&(Ke(t).forEach(a=>{a()}),n([]))},[t]);const r=m.useCallback(o=>function(s){var l;N1+=1;const u=m.createRef();let c;const d=new Promise(v=>{c=v});let f=!1,h;const p=m.createElement(Q4,{key:`modal-${N1}`,config:o(s),ref:u,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:v=>{c(v)}});return h=(l=e.current)===null||l===void 0?void 0:l.patchElement(p),h&&Ro.push(h),{destroy:()=>{function v(){var b;(b=u.current)===null||b===void 0||b.destroy()}u.current?v():n(b=>[].concat(Ke(b),[v]))},update:v=>{function b(){var y;(y=u.current)===null||y===void 0||y.update(v)}u.current?b():n(y=>[].concat(Ke(y),[b]))},then:v=>(f=!0,d.then(v))}},[]);return[m.useMemo(()=>({info:r(w1),success:r(x1),error:r(T1),warning:r(C1),confirm:r(O1)}),[]),m.createElement(Z4,{key:"modal-holder",ref:e})]}function _1(e){return t=>m.createElement(wi,{theme:{token:{motion:!1,zIndexPopupBase:0}}},m.createElement(e,Object.assign({},t)))}const ek=(e,t,n,r,i)=>_1(a=>{const{prefixCls:s,style:l}=a,u=m.useRef(null),[c,d]=m.useState(0),[f,h]=m.useState(0),[p,g]=Cn(!1,{value:a.open}),{getPrefixCls:v}=m.useContext(Qt),b=v("select",s);m.useEffect(()=>{if(g(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(S=>{const T=S[0].target;d(T.offsetHeight+8),h(T.offsetWidth)}),O=setInterval(()=>{var S;const T=`.${b}-dropdown`,I=(S=u.current)===null||S===void 0?void 0:S.querySelector(T);I&&(clearInterval(O),x.observe(I))},10);return()=>{clearInterval(O),x.disconnect()}}},[]);let y=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>u.current});Object.assign(y,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const E={paddingBottom:c,position:"relative",minWidth:f};return m.createElement("div",{ref:u,style:E},m.createElement(e,Object.assign({},y)))}),Ah=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Zu=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,s=t.onClick,l=typeof r=="function"?r(i):r;return m.createElement("span",{className:n,onMouseDown:function(c){c.preventDefault(),a==null||a(c)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:m.createElement("span",{className:ie(n.split(/\s+/).map(function(u){return"".concat(u,"-icon")}))},o))},tk=function(t,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,u=C.useMemo(function(){if(lt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),c=C.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:c,clearIcon:C.createElement(Zu,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:u},"×")}},I1=m.createContext(null);function nk(){return m.useContext(I1)}function rk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=m.useState(!1),n=ae(t,2),r=n[0],i=n[1],o=m.useRef(null),a=function(){window.clearTimeout(o.current)};m.useEffect(function(){return a},[]);var s=function(u,c){a(),o.current=window.setTimeout(function(){i(u),c&&c()},e)};return[r,s,a]}function A1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=m.useRef(null),n=m.useRef(null);m.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function ik(e,t,n,r){var i=m.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},m.useEffect(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&e().filter(function(u){return u}).every(function(u){return!u.contains(l)&&u!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function ok(e){return e&&![Xe.ESC,Xe.SHIFT,Xe.BACKSPACE,Xe.TAB,Xe.WIN_KEY,Xe.ALT,Xe.META,Xe.WIN_KEY_RIGHT,Xe.CTRL,Xe.SEMICOLON,Xe.EQUALS,Xe.CAPS_LOCK,Xe.CONTEXT_MENU,Xe.F1,Xe.F2,Xe.F3,Xe.F4,Xe.F5,Xe.F6,Xe.F7,Xe.F8,Xe.F9,Xe.F10,Xe.F11,Xe.F12].includes(e)}var ak=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Pa=void 0;function sk(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,u=e.itemKey,c=e.className,d=e.style,f=e.children,h=e.display,p=e.order,g=e.component,v=g===void 0?"div":g,b=yt(e,ak),y=a&&!h;function E(I){l(u,I)}m.useEffect(function(){return function(){E(null)}},[]);var x=o&&i!==Pa?o(i,{index:p}):f,O;r||(O={opacity:y?0:1,height:y?0:Pa,overflowY:y?"hidden":Pa,order:a?p:Pa,pointerEvents:y?"none":Pa,position:y?"absolute":Pa});var S={};y&&(S["aria-hidden"]=!0);var T=m.createElement(v,Re({className:ie(!r&&n,c),style:U(U({},O),d)},S,b,{ref:t}),x);return a&&(T=m.createElement(pr,{onResize:function(N){var _=N.offsetWidth;E(_)},disabled:s},T)),T}var js=m.forwardRef(sk);js.displayName="Item";function lk(e){if(typeof MessageChannel>"u")Xt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function uk(){var e=m.useRef(null),t=function(r){e.current||(e.current=[],lk(function(){zr.unstable_batchedUpdates(function(){e.current.forEach(function(i){i()}),e.current=null})})),e.current.push(r)};return t}function Vs(e,t){var n=m.useState(t),r=ae(n,2),i=r[0],o=r[1],a=an(function(s){e(function(){o(s)})});return[i,a]}var Ju=C.createContext(null),ck=["component"],dk=["className"],fk=["className"],hk=function(t,n){var r=m.useContext(Ju);if(!r){var i=t.component,o=i===void 0?"div":i,a=yt(t,ck);return m.createElement(o,Re({},a,{ref:n}))}var s=r.className,l=yt(r,dk),u=t.className,c=yt(t,fk);return m.createElement(Ju.Provider,{value:null},m.createElement(js,Re({ref:n,className:ie(s,u)},l,c)))},P1=m.forwardRef(hk);P1.displayName="RawItem";var mk=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],M1="responsive",L1="invalidate";function pk(e){return"+ ".concat(e.length," ...")}function gk(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,u=e.itemWidth,c=u===void 0?10:u,d=e.ssr,f=e.style,h=e.className,p=e.maxCount,g=e.renderRest,v=e.renderRawRest,b=e.suffix,y=e.component,E=y===void 0?"div":y,x=e.itemComponent,O=e.onVisibleChange,S=yt(e,mk),T=d==="full",I=uk(),N=Vs(I,null),_=ae(N,2),P=_[0],A=_[1],M=P||0,D=Vs(I,new Map),R=ae(D,2),$=R[0],F=R[1],B=Vs(I,0),z=ae(B,2),L=z[0],H=z[1],W=Vs(I,0),k=ae(W,2),G=k[0],Y=k[1],te=Vs(I,0),se=ae(te,2),ce=se[0],ue=se[1],de=C.useState(null),J=ae(de,2),Z=J[0],oe=J[1],X=C.useState(null),ee=ae(X,2),ne=ee[0],be=ee[1],Ce=m.useMemo(function(){return ne===null&&T?Number.MAX_SAFE_INTEGER:ne||0},[ne,P]),Se=C.useState(!1),ve=ae(Se,2),he=ve[0],Ae=ve[1],Ie="".concat(r,"-item"),me=Math.max(L,G),Me=p===M1,Q=o.length&&Me,le=p===L1,pe=Q||typeof p=="number"&&o.length>p,ye=C.useMemo(function(){var $e=o;return Q?P===null&&T?$e=o:$e=o.slice(0,Math.min(o.length,M/c)):typeof p=="number"&&($e=o.slice(0,p)),$e},[o,c,P,p,Q]),Fe=C.useMemo(function(){return Q?o.slice(Ce+1):o.slice(ye.length)},[o,ye,Q,Ce]),je=C.useCallback(function($e,Ve){var Ye;return typeof l=="function"?l($e):(Ye=l&&($e==null?void 0:$e[l]))!==null&&Ye!==void 0?Ye:Ve},[l]),De=C.useCallback(a||function($e){return $e},[a]);function we($e,Ve,Ye){ne===$e&&(Ve===void 0||Ve===Z)||(be($e),Ye||(Ae($e<o.length-1),O==null||O($e)),Ve!==void 0&&oe(Ve))}function Le($e,Ve){A(Ve.clientWidth)}function Ue($e,Ve){F(function(Ye){var ot=new Map(Ye);return Ve===null?ot.delete($e):ot.set($e,Ve),ot})}function Te($e,Ve){Y(Ve),H(G)}function Be($e,Ve){ue(Ve)}function it($e){return $.get(je(ye[$e],$e))}Kt(function(){if(M&&typeof me=="number"&&ye){var $e=ce,Ve=ye.length,Ye=Ve-1;if(!Ve){we(0,null);return}for(var ot=0;ot<Ve;ot+=1){var Pe=it(ot);if(T&&(Pe=Pe||0),Pe===void 0){we(ot-1,void 0,!0);break}if($e+=Pe,Ye===0&&$e<=M||ot===Ye-1&&$e+it(Ye)<=M){we(Ye,null);break}else if($e+me>M){we(ot-1,$e-Pe-ce+G);break}}b&&it(0)+ce>M&&oe(null)}},[M,$,G,ce,je,ye]);var wt=he&&!!Fe.length,Dt={};Z!==null&&Q&&(Dt={position:"absolute",left:Z,top:0});var Pt={prefixCls:Ie,responsive:Q,component:x,invalidate:le},xt=s?function($e,Ve){var Ye=je($e,Ve);return m.createElement(Ju.Provider,{key:Ye,value:U(U({},Pt),{},{order:Ve,item:$e,itemKey:Ye,registerSize:Ue,display:Ve<=Ce})},s($e,Ve))}:function($e,Ve){var Ye=je($e,Ve);return m.createElement(js,Re({},Pt,{order:Ve,key:Ye,item:$e,renderItem:De,itemKey:Ye,registerSize:Ue,display:Ve<=Ce}))},Ht={order:wt?Ce:Number.MAX_SAFE_INTEGER,className:"".concat(Ie,"-rest"),registerSize:Te,display:wt},kt=g||pk,at=v?m.createElement(Ju.Provider,{value:U(U({},Pt),Ht)},v(Fe)):m.createElement(js,Re({},Pt,Ht),typeof kt=="function"?kt(Fe):kt),dt=m.createElement(E,Re({className:ie(!le&&r,h),style:f,ref:t},S),ye.map(xt),pe?at:null,b&&m.createElement(js,Re({},Pt,{responsive:Me,responsiveDisabled:!Q,order:Ce,className:"".concat(Ie,"-suffix"),registerSize:Be,display:!0,style:Dt}),b));return Me?m.createElement(pr,{onResize:Le,disabled:!Q},dt):dt}var Ti=m.forwardRef(gk);Ti.displayName="Overflow",Ti.Item=P1,Ti.RESPONSIVE=M1,Ti.INVALIDATE=L1;function vk(e,t,n){var r=U(U({},e),t);return Object.keys(t).forEach(function(i){var o=t[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return o.apply(void 0,l),(a=e[i])===null||a===void 0?void 0:a.call.apply(a,[e].concat(l))})}),r}var bk=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],yk=function(t,n){var r=t.prefixCls,i=t.id,o=t.inputElement,a=t.autoFocus,s=t.autoComplete,l=t.editable,u=t.activeDescendantId,c=t.value,d=t.open,f=t.attrs,h=yt(t,bk),p=o||m.createElement("input",null),g=p,v=g.ref,b=g.props;return gi(!("maxLength"in p.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),p=m.cloneElement(p,U(U(U({type:"search"},vk(h,b)),{},{id:i,ref:dr(n,v),autoComplete:s||"off",autoFocus:a,className:ie("".concat(r,"-selection-search-input"),b==null?void 0:b.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":d?u:void 0},f),{},{value:l?c:"",readOnly:!l,unselectable:l?null:"on",style:U(U({},b.style),{},{opacity:l?null:0})})),p},Ph=m.forwardRef(yk);process.env.NODE_ENV!=="production"&&(Ph.displayName="Input");function Mh(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var Ek=typeof window<"u"&&window.document&&window.document.documentElement,Sk=process.env.NODE_ENV!=="test"&&Ek;function Ck(e){return e!=null}function wk(e){return!e&&e!==0}function D1(e){return["string","number"].includes(lt(e))}function k1(e){var t=void 0;return e&&(D1(e.title)?t=e.title.toString():D1(e.label)&&(t=e.label.toString())),t}function xk(e,t){Sk?m.useLayoutEffect(e,t):m.useEffect(e,t)}function Tk(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var R1=function(t){t.preventDefault(),t.stopPropagation()},Ok=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,a=t.searchValue,s=t.autoClearSearchValue,l=t.inputRef,u=t.placeholder,c=t.disabled,d=t.mode,f=t.showSearch,h=t.autoFocus,p=t.autoComplete,g=t.activeDescendantId,v=t.tabIndex,b=t.removeIcon,y=t.maxTagCount,E=t.maxTagTextLength,x=t.maxTagPlaceholder,O=x===void 0?function(X){return"+ ".concat(X.length," ...")}:x,S=t.tagRender,T=t.onToggleOpen,I=t.onRemove,N=t.onInputChange,_=t.onInputPaste,P=t.onInputKeyDown,A=t.onInputMouseDown,M=t.onInputCompositionStart,D=t.onInputCompositionEnd,R=t.onInputBlur,$=m.useRef(null),F=C.useState(0),B=ae(F,2),z=B[0],L=B[1],H=C.useState(!1),W=ae(H,2),k=W[0],G=W[1],Y="".concat(r,"-selection"),te=o||d==="multiple"&&s===!1||d==="tags"?a:"",se=d==="tags"||d==="multiple"&&s===!1||f&&(o||k);xk(function(){L($.current.scrollWidth)},[te]);var ce=function(ee,ne,be,Ce,Se){return m.createElement("span",{title:k1(ee),className:ie("".concat(Y,"-item"),V({},"".concat(Y,"-item-disabled"),be))},m.createElement("span",{className:"".concat(Y,"-item-content")},ne),Ce&&m.createElement(Zu,{className:"".concat(Y,"-item-remove"),onMouseDown:R1,onClick:Se,customizeIcon:b},"×"))},ue=function(ee,ne,be,Ce,Se,ve){var he=function(Ie){R1(Ie),T(!o)};return m.createElement("span",{onMouseDown:he},S({label:ne,value:ee,disabled:be,closable:Ce,onClose:Se,isMaxTag:!!ve}))},de=function(ee){var ne=ee.disabled,be=ee.label,Ce=ee.value,Se=!c&&!ne,ve=be;if(typeof E=="number"&&(typeof be=="string"||typeof be=="number")){var he=String(ve);he.length>E&&(ve="".concat(he.slice(0,E),"..."))}var Ae=function(me){me&&me.stopPropagation(),I(ee)};return typeof S=="function"?ue(Ce,ve,ne,Se,Ae):ce(ee,ve,ne,Se,Ae)},J=function(ee){if(!i.length)return null;var ne=typeof O=="function"?O(ee):O;return typeof S=="function"?ue(void 0,ne,!1,!1,void 0,!0):ce({title:ne},ne,!1)},Z=m.createElement("div",{className:"".concat(Y,"-search"),style:{width:z},onFocus:function(){G(!0)},onBlur:function(){G(!1)}},m.createElement(Ph,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:c,autoFocus:h,autoComplete:p,editable:se,activeDescendantId:g,value:te,onKeyDown:P,onMouseDown:A,onChange:N,onPaste:_,onCompositionStart:M,onCompositionEnd:D,onBlur:R,tabIndex:v,attrs:Nr(t,!0)}),m.createElement("span",{ref:$,className:"".concat(Y,"-search-mirror"),"aria-hidden":!0},te," ")),oe=m.createElement(Ti,{prefixCls:"".concat(Y,"-overflow"),data:i,renderItem:de,renderRest:J,suffix:Z,itemKey:Tk,maxCount:y});return m.createElement("span",{className:"".concat(Y,"-wrap")},oe,!i.length&&!te&&m.createElement("span",{className:"".concat(Y,"-placeholder")},u))},Nk=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,u=t.activeDescendantId,c=t.mode,d=t.open,f=t.values,h=t.placeholder,p=t.tabIndex,g=t.showSearch,v=t.searchValue,b=t.activeValue,y=t.maxLength,E=t.onInputKeyDown,x=t.onInputMouseDown,O=t.onInputChange,S=t.onInputPaste,T=t.onInputCompositionStart,I=t.onInputCompositionEnd,N=t.onInputBlur,_=t.title,P=m.useState(!1),A=ae(P,2),M=A[0],D=A[1],R=c==="combobox",$=R||g,F=f[0],B=v||"";R&&b&&!M&&(B=b),m.useEffect(function(){R&&D(!1)},[R,b]);var z=c!=="combobox"&&!d&&!g?!1:!!B,L=_===void 0?k1(F):_,H=m.useMemo(function(){return F?null:m.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:z?{visibility:"hidden"}:void 0},h)},[F,z,h,r]);return m.createElement("span",{className:"".concat(r,"-selection-wrap")},m.createElement("span",{className:"".concat(r,"-selection-search")},m.createElement(Ph,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:$,activeDescendantId:u,value:B,onKeyDown:E,onMouseDown:x,onChange:function(k){D(!0),O(k)},onPaste:S,onCompositionStart:T,onCompositionEnd:I,onBlur:N,tabIndex:p,attrs:Nr(t,!0),maxLength:R?y:void 0})),!R&&F?m.createElement("span",{className:"".concat(r,"-selection-item"),title:L,style:z?{visibility:"hidden"}:void 0},F.label):null,H)},_k=function(t,n){var r=C.useRef(null),i=C.useRef(!1),o=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,u=t.tokenWithEnter,c=t.disabled,d=t.prefix,f=t.autoClearSearchValue,h=t.onSearch,p=t.onSearchSubmit,g=t.onToggleOpen,v=t.onInputKeyDown,b=t.onInputBlur,y=t.domRef;m.useImperativeHandle(n,function(){return{focus:function(L){r.current.focus(L)},blur:function(){r.current.blur()}}});var E=A1(0),x=ae(E,2),O=x[0],S=x[1],T=function(L){var H=L.which,W=r.current instanceof HTMLTextAreaElement;!W&&a&&(H===Xe.UP||H===Xe.DOWN)&&L.preventDefault(),v&&v(L),H===Xe.ENTER&&s==="tags"&&!i.current&&!a&&(p==null||p(L.target.value)),!(W&&!a&&~[Xe.UP,Xe.DOWN,Xe.LEFT,Xe.RIGHT].indexOf(H))&&ok(H)&&g(!0)},I=function(){S(!0)},N=C.useRef(null),_=function(L){h(L,!0,i.current)!==!1&&g(!0)},P=function(){i.current=!0},A=function(L){i.current=!1,s!=="combobox"&&_(L.target.value)},M=function(L){var H=L.target.value;if(u&&N.current&&/[\r\n]/.test(N.current)){var W=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");H=H.replace(W,N.current)}N.current=null,_(H)},D=function(L){var H=L.clipboardData,W=H==null?void 0:H.getData("text");N.current=W||""},R=function(L){var H=L.target;if(H!==r.current){var W=document.body.style.msTouchAction!==void 0;W?setTimeout(function(){r.current.focus()}):r.current.focus()}},$=function(L){var H=O();L.target!==r.current&&!H&&!(s==="combobox"&&c)&&L.preventDefault(),(s!=="combobox"&&(!l||!H)||!a)&&(a&&f!==!1&&h("",!0,!1),g())},F={inputRef:r,onInputKeyDown:T,onInputMouseDown:I,onInputChange:M,onInputPaste:D,onInputCompositionStart:P,onInputCompositionEnd:A,onInputBlur:b},B=s==="multiple"||s==="tags"?m.createElement(Ok,Re({},t,F)):m.createElement(Nk,Re({},t,F));return m.createElement("div",{ref:y,className:"".concat(o,"-selector"),onClick:R,onMouseDown:$},d&&m.createElement("div",{className:"".concat(o,"-prefix")},d),B)},$1=m.forwardRef(_k);process.env.NODE_ENV!=="production"&&($1.displayName="Selector");function Ik(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,u=l===void 0?0:l,c=i.y,d=c===void 0?0:c,f=m.useRef();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],g=n.points[1],v=p[0],b=p[1],y=g[0],E=g[1];v===y||!["t","b"].includes(v)?h.top=d:v==="t"?h.top=0:h.bottom=0,b===E||!["l","r"].includes(b)?h.left=u:b==="l"?h.left=0:h.right=0}return m.createElement("div",{ref:f,className:ie("".concat(t,"-arrow"),a),style:h},s)}function Ak(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?m.createElement(Or,Re({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return m.createElement("div",{style:{zIndex:r},className:ie("".concat(t,"-mask"),s)})}):null}var F1=m.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(F1.displayName="PopupContent");var B1=m.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,o=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,u=e.keepDom,c=e.fresh,d=e.onClick,f=e.mask,h=e.arrow,p=e.arrowPos,g=e.align,v=e.motion,b=e.maskMotion,y=e.forceRender,E=e.getPopupContainer,x=e.autoDestroy,O=e.portal,S=e.zIndex,T=e.onMouseEnter,I=e.onMouseLeave,N=e.onPointerEnter,_=e.onPointerDownCapture,P=e.ready,A=e.offsetX,M=e.offsetY,D=e.offsetR,R=e.offsetB,$=e.onAlign,F=e.onPrepare,B=e.stretch,z=e.targetWidth,L=e.targetHeight,H=typeof n=="function"?n():n,W=l||u,k=(E==null?void 0:E.length)>0,G=m.useState(!E||!k),Y=ae(G,2),te=Y[0],se=Y[1];if(Kt(function(){!te&&k&&a&&se(!0)},[te,k,a]),!te)return null;var ce="auto",ue={left:"-1000vw",top:"-1000vh",right:ce,bottom:ce};if(P||!l){var de,J=g.points,Z=g.dynamicInset||((de=g._experimental)===null||de===void 0?void 0:de.dynamicInset),oe=Z&&J[0][1]==="r",X=Z&&J[0][0]==="b";oe?(ue.right=D,ue.left=ce):(ue.left=A,ue.right=ce),X?(ue.bottom=R,ue.top=ce):(ue.top=M,ue.bottom=ce)}var ee={};return B&&(B.includes("height")&&L?ee.height=L:B.includes("minHeight")&&L&&(ee.minHeight=L),B.includes("width")&&z?ee.width=z:B.includes("minWidth")&&z&&(ee.minWidth=z)),l||(ee.pointerEvents="none"),m.createElement(O,{open:y||W,getContainer:E&&function(){return E(a)},autoDestroy:x},m.createElement(Ak,{prefixCls:i,open:l,zIndex:S,mask:f,motion:b}),m.createElement(pr,{onResize:$,disabled:!l},function(ne){return m.createElement(Or,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:F,onEnterPrepare:F,visible:l,onVisibleChanged:function(Ce){var Se;v==null||(Se=v.onVisibleChanged)===null||Se===void 0||Se.call(v,Ce),s(Ce)}}),function(be,Ce){var Se=be.className,ve=be.style,he=ie(i,Se,r);return m.createElement("div",{ref:dr(ne,t,Ce),className:he,style:U(U(U(U({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},ue),ee),ve),{},{boxSizing:"border-box",zIndex:S},o),onMouseEnter:T,onMouseLeave:I,onPointerEnter:N,onClick:d,onPointerDownCapture:_},h&&m.createElement(Ik,{prefixCls:i,arrow:h,arrowPos:p,align:g}),m.createElement(F1,{cache:!l&&!c},H))})}))});process.env.NODE_ENV!=="production"&&(B1.displayName="Popup");var z1=m.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=_o(n),o=m.useCallback(function(s){jd(t,r?r(s):s)},[r]),a=vi(o,la(n));return i?m.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(z1.displayName="TriggerWrapper");var H1=m.createContext(null);function j1(e){return e?Array.isArray(e)?e:[e]:[]}function Pk(e,t,n,r){return m.useMemo(function(){var i=j1(n??t),o=j1(r??t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,n,r])}function Mk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Lk(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s,l=o[a];if(Mk((s=e[l])===null||s===void 0?void 0:s.points,i,r))return"".concat(t,"-placement-").concat(l)}return""}function V1(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Us(e){return e.ownerDocument.defaultView}function Lh(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=Us(n).getComputedStyle(n),o=i.overflowX,a=i.overflowY,s=i.overflow;[o,a,s].some(function(l){return r.includes(l)})&&t.push(n),n=n.parentElement}return t}function Ws(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Ys(e){return Ws(parseFloat(e),0)}function U1(e,t){var n=U({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Us(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,u=i.borderLeftWidth,c=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,g=r.clientWidth,v=Ys(s),b=Ys(l),y=Ys(u),E=Ys(c),x=Ws(Math.round(d.width/p*1e3)/1e3),O=Ws(Math.round(d.height/f*1e3)/1e3),S=(p-g-y-E)*x,T=(f-h-v-b)*O,I=v*O,N=b*O,_=y*x,P=E*x,A=0,M=0;if(o==="clip"){var D=Ys(a);A=D*x,M=D*O}var R=d.x+_-A,$=d.y+I-M,F=R+d.width+2*A-_-P-S,B=$+d.height+2*M-I-N-T;n.left=Math.max(n.left,R),n.top=Math.max(n.top,$),n.right=Math.min(n.right,F),n.bottom=Math.min(n.bottom,B)}}),n}function W1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function Y1(e,t){var n=t||[],r=ae(n,2),i=r[0],o=r[1];return[W1(e.width,i),W1(e.height,o)]}function q1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Ma(e,t){var n=t[0],r=t[1],i,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?i=e.x:r==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function co(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,i){return i===t?n[r]||"c":r}).join("")}function Dk(e,t,n,r,i,o,a){var s=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=ae(s,2),u=l[0],c=l[1],d=m.useRef(0),f=m.useMemo(function(){return t?Lh(t):[]},[t]),h=m.useRef({}),p=function(){h.current={}};e||p();var g=an(function(){if(t&&n&&e){let ei=function(Fl,to){var ra=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me,Cd=W.x+Fl,wd=W.y+to,Rg=Cd+X,$g=wd+oe,ft=Math.max(Cd,ra.left),Ot=Math.max(wd,ra.top),On=Math.min(Rg,ra.right),Fn=Math.min($g,ra.bottom);return Math.max(0,(On-ft)*(Fn-Ot))},ss=function(){Bt=W.y+ot,en=Bt+oe,fn=W.x+Ye,Ut=fn+X};var y,E,x,O,S=t,T=S.ownerDocument,I=Us(S),N=I.getComputedStyle(S),_=N.position,P=S.style.left,A=S.style.top,M=S.style.right,D=S.style.bottom,R=S.style.overflow,$=U(U({},i[r]),o),F=T.createElement("div");(y=S.parentElement)===null||y===void 0||y.appendChild(F),F.style.left="".concat(S.offsetLeft,"px"),F.style.top="".concat(S.offsetTop,"px"),F.style.position=_,F.style.height="".concat(S.offsetHeight,"px"),F.style.width="".concat(S.offsetWidth,"px"),S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";var B;if(Array.isArray(n))B={x:n[0],y:n[1],width:0,height:0};else{var z,L,H=n.getBoundingClientRect();H.x=(z=H.x)!==null&&z!==void 0?z:H.left,H.y=(L=H.y)!==null&&L!==void 0?L:H.top,B={x:H.x,y:H.y,width:H.width,height:H.height}}var W=S.getBoundingClientRect(),k=I.getComputedStyle(S),G=k.height,Y=k.width;W.x=(E=W.x)!==null&&E!==void 0?E:W.left,W.y=(x=W.y)!==null&&x!==void 0?x:W.top;var te=T.documentElement,se=te.clientWidth,ce=te.clientHeight,ue=te.scrollWidth,de=te.scrollHeight,J=te.scrollTop,Z=te.scrollLeft,oe=W.height,X=W.width,ee=B.height,ne=B.width,be={left:0,top:0,right:se,bottom:ce},Ce={left:-Z,top:-J,right:ue-Z,bottom:de-J},Se=$.htmlRegion,ve="visible",he="visibleFirst";Se!=="scroll"&&Se!==he&&(Se=ve);var Ae=Se===he,Ie=U1(Ce,f),me=U1(be,f),Me=Se===ve?me:Ie,Q=Ae?me:Me;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";var le=S.getBoundingClientRect();S.style.left=P,S.style.top=A,S.style.right=M,S.style.bottom=D,S.style.overflow=R,(O=S.parentElement)===null||O===void 0||O.removeChild(F);var pe=Ws(Math.round(X/parseFloat(Y)*1e3)/1e3),ye=Ws(Math.round(oe/parseFloat(G)*1e3)/1e3);if(pe===0||ye===0||hs(n)&&!Gf(n))return;var Fe=$.offset,je=$.targetOffset,De=Y1(W,Fe),we=ae(De,2),Le=we[0],Ue=we[1],Te=Y1(B,je),Be=ae(Te,2),it=Be[0],wt=Be[1];B.x-=it,B.y-=wt;var Dt=$.points||[],Pt=ae(Dt,2),xt=Pt[0],Ht=Pt[1],kt=q1(Ht),at=q1(xt),dt=Ma(B,kt),$e=Ma(W,at),Ve=U({},$),Ye=dt.x-$e.x+Le,ot=dt.y-$e.y+Ue,Pe=ei(Ye,ot),_e=ei(Ye,ot,me),xe=Ma(B,["t","l"]),ze=Ma(W,["t","l"]),qe=Ma(B,["b","r"]),et=Ma(W,["b","r"]),nt=$.overflow||{},mt=nt.adjustX,vt=nt.adjustY,ht=nt.shiftX,St=nt.shiftY,At=function(to){return typeof to=="boolean"?to:to>=0},Bt,en,fn,Ut;ss();var Rt=At(vt),tt=at[0]===kt[0];if(Rt&&at[0]==="t"&&(en>Q.bottom||h.current.bt)){var He=ot;tt?He-=oe-ee:He=xe.y-et.y-Ue;var ke=ei(Ye,He),Oe=ei(Ye,He,me);ke>Pe||ke===Pe&&(!Ae||Oe>=_e)?(h.current.bt=!0,ot=He,Ue=-Ue,Ve.points=[co(at,0),co(kt,0)]):h.current.bt=!1}if(Rt&&at[0]==="b"&&(Bt<Q.top||h.current.tb)){var Qe=ot;tt?Qe+=oe-ee:Qe=qe.y-ze.y-Ue;var ut=ei(Ye,Qe),pt=ei(Ye,Qe,me);ut>Pe||ut===Pe&&(!Ae||pt>=_e)?(h.current.tb=!0,ot=Qe,Ue=-Ue,Ve.points=[co(at,0),co(kt,0)]):h.current.tb=!1}var $t=At(mt),sn=at[1]===kt[1];if($t&&at[1]==="l"&&(Ut>Q.right||h.current.rl)){var jt=Ye;sn?jt-=X-ne:jt=xe.x-et.x-Le;var rt=ei(jt,ot),gt=ei(jt,ot,me);rt>Pe||rt===Pe&&(!Ae||gt>=_e)?(h.current.rl=!0,Ye=jt,Le=-Le,Ve.points=[co(at,1),co(kt,1)]):h.current.rl=!1}if($t&&at[1]==="r"&&(fn<Q.left||h.current.lr)){var It=Ye;sn?It+=X-ne:It=qe.x-ze.x-Le;var hn=ei(It,ot),_n=ei(It,ot,me);hn>Pe||hn===Pe&&(!Ae||_n>=_e)?(h.current.lr=!0,Ye=It,Le=-Le,Ve.points=[co(at,1),co(kt,1)]):h.current.lr=!1}ss();var Un=ht===!0?0:ht;typeof Un=="number"&&(fn<me.left&&(Ye-=fn-me.left-Le,B.x+ne<me.left+Un&&(Ye+=B.x-me.left+ne-Un)),Ut>me.right&&(Ye-=Ut-me.right-Le,B.x>me.right-Un&&(Ye+=B.x-me.right+Un)));var Fr=St===!0?0:St;typeof Fr=="number"&&(Bt<me.top&&(ot-=Bt-me.top-Ue,B.y+ee<me.top+Fr&&(ot+=B.y-me.top+ee-Fr)),en>me.bottom&&(ot-=en-me.bottom-Ue,B.y>me.bottom-Fr&&(ot+=B.y-me.bottom+Fr)));var Zr=W.x+Ye,Jr=Zr+X,Ri=W.y+ot,eo=Ri+oe,zt=B.x,st=zt+ne,Tt=B.y,Mt=Tt+ee,qt=Math.max(Zr,zt),Zt=Math.min(Jr,st),Jn=(qt+Zt)/2,er=Jn-Zr,Cr=Math.max(Ri,Tt),Br=Math.min(eo,Mt),wr=(Cr+Br)/2,xr=wr-Ri;a==null||a(t,Ve);var Yn=le.right-W.x-(Ye+W.width),na=le.bottom-W.y-(ot+W.height);pe===1&&(Ye=Math.round(Ye),Yn=Math.round(Yn)),ye===1&&(ot=Math.round(ot),na=Math.round(na));var kg={ready:!0,offsetX:Ye/pe,offsetY:ot/ye,offsetR:Yn/pe,offsetB:na/ye,arrowX:er/pe,arrowY:xr/ye,scaleX:pe,scaleY:ye,align:Ve};c(kg)}}),v=function(){d.current+=1;var E=d.current;Promise.resolve().then(function(){d.current===E&&g()})},b=function(){c(function(E){return U(U({},E),{},{ready:!1})})};return Kt(b,[r]),Kt(function(){e||b()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,v]}function kk(e,t,n,r,i){Kt(function(){if(e&&t&&n){let d=function(){r(),i()};var o=t,a=n,s=Lh(o),l=Lh(a),u=Us(a),c=new Set([u].concat(Ke(s),Ke(l)));return c.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),u.addEventListener("resize",d,{passive:!0}),r(),function(){c.forEach(function(f){f.removeEventListener("scroll",d),u.removeEventListener("resize",d)})}}},[e,t,n])}function Rk(e,t,n,r,i,o,a,s){var l=m.useRef(e);l.current=e;var u=m.useRef(!1);m.useEffect(function(){if(t&&r&&(!i||o)){var d=function(){u.current=!1},f=function(x){var O;l.current&&!a(((O=x.composedPath)===null||O===void 0||(O=O.call(x))===null||O===void 0?void 0:O[0])||x.target)&&!u.current&&s(!1)},h=Us(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var p=_u(n);if(p&&(p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var g,v,b=n==null||(g=n.getRootNode)===null||g===void 0?void 0:g.call(n),y=(v=r.getRootNode)===null||v===void 0?void 0:v.call(r);gi(b===y,"trigger element and popup element should in same shadow root.")}return function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),p&&(p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0))}}},[t,n,r,i,o]);function c(){u.current=!0}return c}var $k=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Fk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ds,t=m.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,u=n.showAction,c=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,g=n.mouseEnterDelay,v=n.mouseLeaveDelay,b=v===void 0?.1:v,y=n.focusDelay,E=n.blurDelay,x=n.mask,O=n.maskClosable,S=O===void 0?!0:O,T=n.getPopupContainer,I=n.forceRender,N=n.autoDestroy,_=n.destroyPopupOnHide,P=n.popup,A=n.popupClassName,M=n.popupStyle,D=n.popupPlacement,R=n.builtinPlacements,$=R===void 0?{}:R,F=n.popupAlign,B=n.zIndex,z=n.stretch,L=n.getPopupClassNameFromAlign,H=n.fresh,W=n.alignPoint,k=n.onPopupClick,G=n.onPopupAlign,Y=n.arrow,te=n.popupMotion,se=n.maskMotion,ce=n.popupTransitionName,ue=n.popupAnimation,de=n.maskTransitionName,J=n.maskAnimation,Z=n.className,oe=n.getTriggerDOMNode,X=yt(n,$k),ee=N||_||!1,ne=m.useState(!1),be=ae(ne,2),Ce=be[0],Se=be[1];Kt(function(){Se(Ah())},[]);var ve=m.useRef({}),he=m.useContext(H1),Ae=m.useMemo(function(){return{registerSubPopup:function(Ot,On){ve.current[Ot]=On,he==null||he.registerSubPopup(Ot,On)}}},[he]),Ie=ks(),me=m.useState(null),Me=ae(me,2),Q=Me[0],le=Me[1],pe=m.useRef(null),ye=an(function(ft){pe.current=ft,hs(ft)&&Q!==ft&&le(ft),he==null||he.registerSubPopup(Ie,ft)}),Fe=m.useState(null),je=ae(Fe,2),De=je[0],we=je[1],Le=m.useRef(null),Ue=an(function(ft){hs(ft)&&De!==ft&&(we(ft),Le.current=ft)}),Te=m.Children.only(a),Be=(Te==null?void 0:Te.props)||{},it={},wt=an(function(ft){var Ot,On,Fn=De;return(Fn==null?void 0:Fn.contains(ft))||((Ot=_u(Fn))===null||Ot===void 0?void 0:Ot.host)===ft||ft===Fn||(Q==null?void 0:Q.contains(ft))||((On=_u(Q))===null||On===void 0?void 0:On.host)===ft||ft===Q||Object.values(ve.current).some(function(Mn){return(Mn==null?void 0:Mn.contains(ft))||ft===Mn})}),Dt=V1(o,te,ue,ce),Pt=V1(o,se,J,de),xt=m.useState(f||!1),Ht=ae(xt,2),kt=Ht[0],at=Ht[1],dt=d??kt,$e=an(function(ft){d===void 0&&at(ft)});Kt(function(){at(d||!1)},[d]);var Ve=m.useRef(dt);Ve.current=dt;var Ye=m.useRef([]);Ye.current=[];var ot=an(function(ft){var Ot;$e(ft),((Ot=Ye.current[Ye.current.length-1])!==null&&Ot!==void 0?Ot:dt)!==ft&&(Ye.current.push(ft),h==null||h(ft))}),Pe=m.useRef(),_e=function(){clearTimeout(Pe.current)},xe=function(Ot){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_e(),On===0?ot(Ot):Pe.current=setTimeout(function(){ot(Ot)},On*1e3)};m.useEffect(function(){return _e},[]);var ze=m.useState(!1),qe=ae(ze,2),et=qe[0],nt=qe[1];Kt(function(ft){(!ft||dt)&&nt(!0)},[dt]);var mt=m.useState(null),vt=ae(mt,2),ht=vt[0],St=vt[1],At=m.useState(null),Bt=ae(At,2),en=Bt[0],fn=Bt[1],Ut=function(Ot){fn([Ot.clientX,Ot.clientY])},Rt=Dk(dt,Q,W&&en!==null?en:De,D,$,F,G),tt=ae(Rt,11),He=tt[0],ke=tt[1],Oe=tt[2],Qe=tt[3],ut=tt[4],pt=tt[5],$t=tt[6],sn=tt[7],jt=tt[8],rt=tt[9],gt=tt[10],It=Pk(Ce,l,u,c),hn=ae(It,2),_n=hn[0],Un=hn[1],Fr=_n.has("click"),Zr=Un.has("click")||Un.has("contextMenu"),Jr=an(function(){et||gt()}),Ri=function(){Ve.current&&W&&Zr&&xe(!1)};kk(dt,De,Q,Jr,Ri),Kt(function(){Jr()},[en,D]),Kt(function(){dt&&!($!=null&&$[D])&&Jr()},[JSON.stringify(F)]);var eo=m.useMemo(function(){var ft=Lk($,o,rt,W);return ie(ft,L==null?void 0:L(rt))},[rt,L,$,o,W]);m.useImperativeHandle(r,function(){return{nativeElement:Le.current,popupElement:pe.current,forceAlign:Jr}});var zt=m.useState(0),st=ae(zt,2),Tt=st[0],Mt=st[1],qt=m.useState(0),Zt=ae(qt,2),Jn=Zt[0],er=Zt[1],Cr=function(){if(z&&De){var Ot=De.getBoundingClientRect();Mt(Ot.width),er(Ot.height)}},Br=function(){Cr(),Jr()},wr=function(Ot){nt(!1),gt(),p==null||p(Ot)},xr=function(){return new Promise(function(Ot){Cr(),St(function(){return Ot})})};Kt(function(){ht&&(gt(),ht(),St(null))},[ht]);function Yn(ft,Ot,On,Fn){it[ft]=function(Mn){var xd;Fn==null||Fn(Mn),xe(Ot,On);for(var Fg=arguments.length,TN=new Array(Fg>1?Fg-1:0),Td=1;Td<Fg;Td++)TN[Td-1]=arguments[Td];(xd=Be[ft])===null||xd===void 0||xd.call.apply(xd,[Be,Mn].concat(TN))}}(Fr||Zr)&&(it.onClick=function(ft){var Ot;Ve.current&&Zr?xe(!1):!Ve.current&&Fr&&(Ut(ft),xe(!0));for(var On=arguments.length,Fn=new Array(On>1?On-1:0),Mn=1;Mn<On;Mn++)Fn[Mn-1]=arguments[Mn];(Ot=Be.onClick)===null||Ot===void 0||Ot.call.apply(Ot,[Be,ft].concat(Fn))});var na=Rk(dt,Zr,De,Q,x,S,wt,xe),kg=_n.has("hover"),ei=Un.has("hover"),ss,Fl;kg&&(Yn("onMouseEnter",!0,g,function(ft){Ut(ft)}),Yn("onPointerEnter",!0,g,function(ft){Ut(ft)}),ss=function(Ot){(dt||et)&&Q!==null&&Q!==void 0&&Q.contains(Ot.target)&&xe(!0,g)},W&&(it.onMouseMove=function(ft){var Ot;(Ot=Be.onMouseMove)===null||Ot===void 0||Ot.call(Be,ft)})),ei&&(Yn("onMouseLeave",!1,b),Yn("onPointerLeave",!1,b),Fl=function(){xe(!1,b)}),_n.has("focus")&&Yn("onFocus",!0,y),Un.has("focus")&&Yn("onBlur",!1,E),_n.has("contextMenu")&&(it.onContextMenu=function(ft){var Ot;Ve.current&&Un.has("contextMenu")?xe(!1):(Ut(ft),xe(!0)),ft.preventDefault();for(var On=arguments.length,Fn=new Array(On>1?On-1:0),Mn=1;Mn<On;Mn++)Fn[Mn-1]=arguments[Mn];(Ot=Be.onContextMenu)===null||Ot===void 0||Ot.call.apply(Ot,[Be,ft].concat(Fn))}),Z&&(it.className=ie(Be.className,Z));var to=U(U({},Be),it),ra={},Cd=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Cd.forEach(function(ft){X[ft]&&(ra[ft]=function(){for(var Ot,On=arguments.length,Fn=new Array(On),Mn=0;Mn<On;Mn++)Fn[Mn]=arguments[Mn];(Ot=to[ft])===null||Ot===void 0||Ot.call.apply(Ot,[to].concat(Fn)),X[ft].apply(X,Fn)})});var wd=m.cloneElement(Te,U(U({},to),ra)),Rg={x:pt,y:$t},$g=Y?U({},Y!==!0?Y:{}):null;return m.createElement(m.Fragment,null,m.createElement(pr,{disabled:!dt,ref:Ue,onResize:Br},m.createElement(z1,{getTriggerDOMNode:oe},wd)),m.createElement(H1.Provider,{value:Ae},m.createElement(B1,{portal:e,ref:ye,prefixCls:o,popup:P,className:ie(A,eo),style:M,target:De,onMouseEnter:ss,onMouseLeave:Fl,onPointerEnter:ss,zIndex:B,open:dt,keepDom:et,fresh:H,onClick:k,onPointerDownCapture:na,mask:x,motion:Dt,maskMotion:Pt,onVisibleChanged:wr,onPrepare:xr,forceRender:I,autoDestroy:ee,getPopupContainer:T,align:rt,arrow:$g,arrowPos:Rg,ready:He,offsetX:ke,offsetY:Oe,offsetR:Qe,offsetB:ut,onAlign:Jr,stretch:z,targetWidth:Tt/sn,targetHeight:Jn/jt})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const ec=Fk(Ds);var Bk=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],zk=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},Hk=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,a=t.popupElement,s=t.animation,l=t.transitionName,u=t.dropdownStyle,c=t.dropdownClassName,d=t.direction,f=d===void 0?"ltr":d,h=t.placement,p=t.builtinPlacements,g=t.dropdownMatchSelectWidth,v=t.dropdownRender,b=t.dropdownAlign,y=t.getPopupContainer,E=t.empty,x=t.getTriggerDOMNode,O=t.onPopupVisibleChange,S=t.onPopupMouseEnter,T=yt(t,Bk),I="".concat(r,"-dropdown"),N=a;v&&(N=v(a));var _=m.useMemo(function(){return p||zk(g)},[p,g]),P=s?"".concat(I,"-").concat(s):l,A=typeof g=="number",M=m.useMemo(function(){return A?null:g===!1?"minWidth":"width"},[g,A]),D=u;A&&(D=U(U({},D),{},{width:g}));var R=m.useRef(null);return m.useImperativeHandle(n,function(){return{getPopupElement:function(){var F;return(F=R.current)===null||F===void 0?void 0:F.popupElement}}}),m.createElement(ec,Re({},T,{showAction:O?["click"]:[],hideAction:O?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_,prefixCls:I,popupTransitionName:P,popup:m.createElement("div",{onMouseEnter:S},N),ref:R,stretch:M,popupAlign:b,popupVisible:i,getPopupContainer:y,popupClassName:ie(c,V({},"".concat(I,"-empty"),E)),popupStyle:D,getTriggerDOMNode:x,onPopupVisibleChange:O}),o)},X1=m.forwardRef(Hk);process.env.NODE_ENV!=="production"&&(X1.displayName="SelectTrigger");function K1(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function Dh(e){return typeof e<"u"&&!Number.isNaN(e)}function G1(e,t){var n=e||{},r=n.label,i=n.value,o=n.options,a=n.groupLabel,s=r||(t?"children":"label");return{label:s,value:i||"value",options:o||"options",groupLabel:a||s}}function jk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=G1(n,!1),a=o.label,s=o.value,l=o.options,u=o.groupLabel;function c(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var p=h[s];i.push({key:K1(h,i.length),groupOption:f,data:h,label:h[a],value:p})}else{var g=h[u];g===void 0&&r&&(g=h.label),i.push({key:K1(h,i.length),group:!0,data:h,label:g}),c(h[l],!0)}})}return c(e,!1),i}function kh(e){var t=U({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return bt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Vk=function(t,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,u){var c=Tv(u),d=c[0],f=c.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(p,g){return[].concat(Ke(p),Ke(s(g,f)))},[]).filter(Boolean)},a=o(t,n);return i?typeof r<"u"?a.slice(0,r):a:null},Rh=m.createContext(null);function Uk(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return m.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(lt(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Wk=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Yk=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],tc=function(t){return t==="tags"||t==="multiple"},Q1=m.forwardRef(function(e,t){var n,r=e.id,i=e.prefixCls,o=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,u=e.omitDomProps,c=e.displayValues,d=e.onDisplayValuesChange,f=e.emptyOptions,h=e.notFoundContent,p=h===void 0?"Not Found":h,g=e.onClear,v=e.mode,b=e.disabled,y=e.loading,E=e.getInputElement,x=e.getRawInputElement,O=e.open,S=e.defaultOpen,T=e.onDropdownVisibleChange,I=e.activeValue,N=e.onActiveValueChange,_=e.activeDescendantId,P=e.searchValue,A=e.autoClearSearchValue,M=e.onSearch,D=e.onSearchSplit,R=e.tokenSeparators,$=e.allowClear,F=e.prefix,B=e.suffixIcon,z=e.clearIcon,L=e.OptionList,H=e.animation,W=e.transitionName,k=e.dropdownStyle,G=e.dropdownClassName,Y=e.dropdownMatchSelectWidth,te=e.dropdownRender,se=e.dropdownAlign,ce=e.placement,ue=e.builtinPlacements,de=e.getPopupContainer,J=e.showAction,Z=J===void 0?[]:J,oe=e.onFocus,X=e.onBlur,ee=e.onKeyUp,ne=e.onKeyDown,be=e.onMouseDown,Ce=yt(e,Wk),Se=tc(v),ve=(a!==void 0?a:Se)||v==="combobox",he=U({},Ce);Yk.forEach(function(zt){delete he[zt]}),u==null||u.forEach(function(zt){delete he[zt]});var Ae=m.useState(!1),Ie=ae(Ae,2),me=Ie[0],Me=Ie[1];m.useEffect(function(){Me(Ah())},[]);var Q=m.useRef(null),le=m.useRef(null),pe=m.useRef(null),ye=m.useRef(null),Fe=m.useRef(null),je=m.useRef(!1),De=rk(),we=ae(De,3),Le=we[0],Ue=we[1],Te=we[2];m.useImperativeHandle(t,function(){var zt,st;return{focus:(zt=ye.current)===null||zt===void 0?void 0:zt.focus,blur:(st=ye.current)===null||st===void 0?void 0:st.blur,scrollTo:function(Mt){var qt;return(qt=Fe.current)===null||qt===void 0?void 0:qt.scrollTo(Mt)},nativeElement:Q.current||le.current}});var Be=m.useMemo(function(){var zt;if(v!=="combobox")return P;var st=(zt=c[0])===null||zt===void 0?void 0:zt.value;return typeof st=="string"||typeof st=="number"?String(st):""},[P,v,c]),it=v==="combobox"&&typeof E=="function"&&E()||null,wt=typeof x=="function"&&x(),Dt=vi(le,wt==null||(n=wt.props)===null||n===void 0?void 0:n.ref),Pt=m.useState(!1),xt=ae(Pt,2),Ht=xt[0],kt=xt[1];Kt(function(){kt(!0)},[]);var at=Cn(!1,{defaultValue:S,value:O}),dt=ae(at,2),$e=dt[0],Ve=dt[1],Ye=Ht?$e:!1,ot=!p&&f;(b||ot&&Ye&&v==="combobox")&&(Ye=!1);var Pe=ot?!1:Ye,_e=m.useCallback(function(zt){var st=zt!==void 0?zt:!Ye;b||(Ve(st),Ye!==st&&(T==null||T(st)))},[b,Ye,Ve,T]),xe=m.useMemo(function(){return(R||[]).some(function(zt){return[`
176
+ ${c}-confirm ${c}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${c}-info ${c}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${c}-success ${c}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},W4=Pf(["Modal","confirm"],e=>{const t=m1(e);return[U4(t)]},p1,{order:-1e3});var Y4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function b1(e){const{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:o,type:a,okCancel:s,footer:l,locale:u}=e,c=Y4(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const T=on("Modal");process.env.NODE_ENV!=="production"&&T(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=m.createElement(Uf,null);break;case"success":d=m.createElement(jf,null);break;case"error":d=m.createElement(Is,null);break;default:d=m.createElement(Vf,null)}const f=s??a==="confirm",h=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[p]=Vi("Modal"),g=u||p,v=r||(f?g==null?void 0:g.okText:g==null?void 0:g.justOkText),b=i||(g==null?void 0:g.cancelText),y=Object.assign({autoFocusButton:h,cancelTextLocale:b,okTextLocale:v,mergedOkCancel:f},c),E=m.useMemo(()=>y,Ke(Object.values(y))),x=m.createElement(m.Fragment,null,m.createElement(Ty,null),m.createElement(Oy,null)),O=e.title!==void 0&&e.title!==null,S=`${o}-body`;return m.createElement("div",{className:`${o}-body-wrapper`},m.createElement("div",{className:ie(S,{[`${S}-has-title`]:O})},d,m.createElement("div",{className:`${o}-paragraph`},O&&m.createElement("span",{className:`${o}-title`},e.title),m.createElement("div",{className:`${o}-content`},e.content))),l===void 0||typeof l=="function"?m.createElement(xy,{value:E},m.createElement("div",{className:`${o}-btns`},typeof l=="function"?l(x,{OkBtn:Oy,CancelBtn:Ty}):x)):l,m.createElement(W4,{prefixCls:t}))}const y1=e=>{const{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:u=!1,onConfirm:c,styles:d}=e;if(process.env.NODE_ENV!=="production"){const x=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(([O,S])=>{x.deprecated(!(O in e),O,S)})}const f=`${o}-confirm`,h=e.width||416,p=e.style||{},g=e.mask===void 0?!0:e.mask,v=e.maskClosable===void 0?!1:e.maskClosable,b=ie(f,`${f}-${e.type}`,{[`${f}-rtl`]:i==="rtl"},e.className),[,y]=gr(),E=m.useMemo(()=>n!==void 0?n:y.zIndexPopupBase+Ub,[n,y]);return m.createElement(v1,Object.assign({},e,{className:b,wrapClassName:ie({[`${f}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),c==null||c(!1)},title:"",footer:null,transitionName:qi(s||"","zoom",e.transitionName),maskTransitionName:qi(s||"","fade",e.maskTransitionName),mask:g,maskClosable:v,style:p,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:E,closable:u}),m.createElement(b1,Object.assign({},e,{confirmPrefixCls:f})))},Ih=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return m.createElement(wi,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},m.createElement(y1,Object.assign({},e)))};process.env.NODE_ENV!=="production"&&(y1.displayName="ConfirmDialog",Ih.displayName="ConfirmDialogWrapper");const Ro=[];let E1="";function S1(){return E1}const q4=e=>{var t,n;const{prefixCls:r,getContainer:i,direction:o}=e,a=kv(),s=C.useContext(Qt),l=S1()||s.getPrefixCls(),u=r||`${l}-modal`;let c=i;return c===!1&&(c=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&oo(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),C.createElement(Ih,Object.assign({},e,{rootPrefixCls:l,prefixCls:u,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(t=s.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:c}))};function Hs(e){const t=uM();process.env.NODE_ENV!=="production"&&!t.holderRender&&iM("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:l,open:!0}),i,o;function a(...c){var d;if(c.some(p=>p==null?void 0:p.triggerCancel)){var h;(d=e.onCancel)===null||d===void 0||(h=d).call.apply(h,[e,()=>{}].concat(Ke(c.slice(1))))}for(let p=0;p<Ro.length;p++)if(Ro[p]===l){Ro.splice(p,1);break}o()}function s(c){clearTimeout(i),i=setTimeout(()=>{const d=t.getPrefixCls(void 0,S1()),f=t.getIconPrefixCls(),h=t.getTheme(),p=C.createElement(q4,Object.assign({},c));o=Qb()(C.createElement(wi,{prefixCls:d,iconPrefixCls:f,theme:h},t.holderRender?t.holderRender(p):p),n)})}function l(...c){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,c)}}),r.visible&&delete r.visible,s(r)}function u(c){typeof c=="function"?r=c(r):r=Object.assign(Object.assign({},r),c),s(r)}return s(r),Ro.push(l),{destroy:l,update:u}}function C1(e){return Object.assign(Object.assign({},e),{type:"warning"})}function w1(e){return Object.assign(Object.assign({},e),{type:"info"})}function x1(e){return Object.assign(Object.assign({},e),{type:"success"})}function T1(e){return Object.assign(Object.assign({},e),{type:"error"})}function O1(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function X4({rootPrefixCls:e}){process.env.NODE_ENV!=="production"&&oo(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),E1=e}var K4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const G4=(e,t)=>{var n,{afterClose:r,config:i}=e,o=K4(e,["afterClose","config"]);const[a,s]=m.useState(!0),[l,u]=m.useState(i),{direction:c,getPrefixCls:d}=m.useContext(Qt),f=d("modal"),h=d(),p=()=>{var y;r(),(y=l.afterClose)===null||y===void 0||y.call(l)},g=(...y)=>{var E;if(s(!1),y.some(S=>S==null?void 0:S.triggerCancel)){var O;(E=l.onCancel)===null||E===void 0||(O=E).call.apply(O,[l,()=>{}].concat(Ke(y.slice(1))))}};m.useImperativeHandle(t,()=>({destroy:g,update:y=>{u(E=>{const x=typeof y=="function"?y(E):y;return Object.assign(Object.assign({},E),x)})}}));const v=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[b]=Vi("Modal",ao.Modal);return m.createElement(Ih,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:g,open:a,afterClose:p,okText:l.okText||(v?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:l.direction||c,cancelText:l.cancelText||(b==null?void 0:b.cancelText)},o))},Q4=m.forwardRef(G4);let N1=0;const Z4=m.memo(m.forwardRef((e,t)=>{const[n,r]=KM();return m.useImperativeHandle(t,()=>({patchElement:r}),[]),m.createElement(m.Fragment,null,n)}));function J4(){const e=m.useRef(null),[t,n]=m.useState([]);m.useEffect(()=>{t.length&&(Ke(t).forEach(a=>{a()}),n([]))},[t]);const r=m.useCallback(o=>function(s){var l;N1+=1;const u=m.createRef();let c;const d=new Promise(v=>{c=v});let f=!1,h;const p=m.createElement(Q4,{key:`modal-${N1}`,config:o(s),ref:u,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:v=>{c(v)}});return h=(l=e.current)===null||l===void 0?void 0:l.patchElement(p),h&&Ro.push(h),{destroy:()=>{function v(){var b;(b=u.current)===null||b===void 0||b.destroy()}u.current?v():n(b=>[].concat(Ke(b),[v]))},update:v=>{function b(){var y;(y=u.current)===null||y===void 0||y.update(v)}u.current?b():n(y=>[].concat(Ke(y),[b]))},then:v=>(f=!0,d.then(v))}},[]);return[m.useMemo(()=>({info:r(w1),success:r(x1),error:r(T1),warning:r(C1),confirm:r(O1)}),[]),m.createElement(Z4,{key:"modal-holder",ref:e})]}function _1(e){return t=>m.createElement(wi,{theme:{token:{motion:!1,zIndexPopupBase:0}}},m.createElement(e,Object.assign({},t)))}const ek=(e,t,n,r,i)=>_1(a=>{const{prefixCls:s,style:l}=a,u=m.useRef(null),[c,d]=m.useState(0),[f,h]=m.useState(0),[p,g]=Cn(!1,{value:a.open}),{getPrefixCls:v}=m.useContext(Qt),b=v("select",s);m.useEffect(()=>{if(g(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(S=>{const T=S[0].target;d(T.offsetHeight+8),h(T.offsetWidth)}),O=setInterval(()=>{var S;const T=`.${b}-dropdown`,I=(S=u.current)===null||S===void 0?void 0:S.querySelector(T);I&&(clearInterval(O),x.observe(I))},10);return()=>{clearInterval(O),x.disconnect()}}},[]);let y=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>u.current});Object.assign(y,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const E={paddingBottom:c,position:"relative",minWidth:f};return m.createElement("div",{ref:u,style:E},m.createElement(e,Object.assign({},y)))}),Ah=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Zu=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,s=t.onClick,l=typeof r=="function"?r(i):r;return m.createElement("span",{className:n,onMouseDown:function(c){c.preventDefault(),a==null||a(c)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:m.createElement("span",{className:ie(n.split(/\s+/).map(function(u){return"".concat(u,"-icon")}))},o))},tk=function(t,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,u=C.useMemo(function(){if(lt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),c=C.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:c,clearIcon:C.createElement(Zu,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:u},"×")}},I1=m.createContext(null);function nk(){return m.useContext(I1)}function rk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=m.useState(!1),n=ae(t,2),r=n[0],i=n[1],o=m.useRef(null),a=function(){window.clearTimeout(o.current)};m.useEffect(function(){return a},[]);var s=function(u,c){a(),o.current=window.setTimeout(function(){i(u),c&&c()},e)};return[r,s,a]}function A1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=m.useRef(null),n=m.useRef(null);m.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function ik(e,t,n,r){var i=m.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},m.useEffect(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&e().filter(function(u){return u}).every(function(u){return!u.contains(l)&&u!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function ok(e){return e&&![Xe.ESC,Xe.SHIFT,Xe.BACKSPACE,Xe.TAB,Xe.WIN_KEY,Xe.ALT,Xe.META,Xe.WIN_KEY_RIGHT,Xe.CTRL,Xe.SEMICOLON,Xe.EQUALS,Xe.CAPS_LOCK,Xe.CONTEXT_MENU,Xe.F1,Xe.F2,Xe.F3,Xe.F4,Xe.F5,Xe.F6,Xe.F7,Xe.F8,Xe.F9,Xe.F10,Xe.F11,Xe.F12].includes(e)}var ak=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Pa=void 0;function sk(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,u=e.itemKey,c=e.className,d=e.style,f=e.children,h=e.display,p=e.order,g=e.component,v=g===void 0?"div":g,b=yt(e,ak),y=a&&!h;function E(I){l(u,I)}m.useEffect(function(){return function(){E(null)}},[]);var x=o&&i!==Pa?o(i,{index:p}):f,O;r||(O={opacity:y?0:1,height:y?0:Pa,overflowY:y?"hidden":Pa,order:a?p:Pa,pointerEvents:y?"none":Pa,position:y?"absolute":Pa});var S={};y&&(S["aria-hidden"]=!0);var T=m.createElement(v,Re({className:ie(!r&&n,c),style:U(U({},O),d)},S,b,{ref:t}),x);return a&&(T=m.createElement(pr,{onResize:function(N){var _=N.offsetWidth;E(_)},disabled:s},T)),T}var js=m.forwardRef(sk);js.displayName="Item";function lk(e){if(typeof MessageChannel>"u")Xt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function uk(){var e=m.useRef(null),t=function(r){e.current||(e.current=[],lk(function(){zr.unstable_batchedUpdates(function(){e.current.forEach(function(i){i()}),e.current=null})})),e.current.push(r)};return t}function Vs(e,t){var n=m.useState(t),r=ae(n,2),i=r[0],o=r[1],a=an(function(s){e(function(){o(s)})});return[i,a]}var Ju=C.createContext(null),ck=["component"],dk=["className"],fk=["className"],hk=function(t,n){var r=m.useContext(Ju);if(!r){var i=t.component,o=i===void 0?"div":i,a=yt(t,ck);return m.createElement(o,Re({},a,{ref:n}))}var s=r.className,l=yt(r,dk),u=t.className,c=yt(t,fk);return m.createElement(Ju.Provider,{value:null},m.createElement(js,Re({ref:n,className:ie(s,u)},l,c)))},P1=m.forwardRef(hk);P1.displayName="RawItem";var mk=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],M1="responsive",L1="invalidate";function pk(e){return"+ ".concat(e.length," ...")}function gk(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,u=e.itemWidth,c=u===void 0?10:u,d=e.ssr,f=e.style,h=e.className,p=e.maxCount,g=e.renderRest,v=e.renderRawRest,b=e.suffix,y=e.component,E=y===void 0?"div":y,x=e.itemComponent,O=e.onVisibleChange,S=yt(e,mk),T=d==="full",I=uk(),N=Vs(I,null),_=ae(N,2),P=_[0],A=_[1],M=P||0,D=Vs(I,new Map),R=ae(D,2),$=R[0],F=R[1],B=Vs(I,0),z=ae(B,2),L=z[0],H=z[1],W=Vs(I,0),k=ae(W,2),G=k[0],Y=k[1],te=Vs(I,0),se=ae(te,2),ce=se[0],ue=se[1],de=C.useState(null),J=ae(de,2),Z=J[0],oe=J[1],X=C.useState(null),ee=ae(X,2),ne=ee[0],be=ee[1],Ce=m.useMemo(function(){return ne===null&&T?Number.MAX_SAFE_INTEGER:ne||0},[ne,P]),Se=C.useState(!1),ve=ae(Se,2),he=ve[0],Ae=ve[1],Ie="".concat(r,"-item"),me=Math.max(L,G),Me=p===M1,Q=o.length&&Me,le=p===L1,pe=Q||typeof p=="number"&&o.length>p,ye=C.useMemo(function(){var $e=o;return Q?P===null&&T?$e=o:$e=o.slice(0,Math.min(o.length,M/c)):typeof p=="number"&&($e=o.slice(0,p)),$e},[o,c,P,p,Q]),Fe=C.useMemo(function(){return Q?o.slice(Ce+1):o.slice(ye.length)},[o,ye,Q,Ce]),je=C.useCallback(function($e,Ve){var Ye;return typeof l=="function"?l($e):(Ye=l&&($e==null?void 0:$e[l]))!==null&&Ye!==void 0?Ye:Ve},[l]),De=C.useCallback(a||function($e){return $e},[a]);function we($e,Ve,Ye){ne===$e&&(Ve===void 0||Ve===Z)||(be($e),Ye||(Ae($e<o.length-1),O==null||O($e)),Ve!==void 0&&oe(Ve))}function Le($e,Ve){A(Ve.clientWidth)}function Ue($e,Ve){F(function(Ye){var ot=new Map(Ye);return Ve===null?ot.delete($e):ot.set($e,Ve),ot})}function Te($e,Ve){Y(Ve),H(G)}function Be($e,Ve){ue(Ve)}function it($e){return $.get(je(ye[$e],$e))}Kt(function(){if(M&&typeof me=="number"&&ye){var $e=ce,Ve=ye.length,Ye=Ve-1;if(!Ve){we(0,null);return}for(var ot=0;ot<Ve;ot+=1){var Pe=it(ot);if(T&&(Pe=Pe||0),Pe===void 0){we(ot-1,void 0,!0);break}if($e+=Pe,Ye===0&&$e<=M||ot===Ye-1&&$e+it(Ye)<=M){we(Ye,null);break}else if($e+me>M){we(ot-1,$e-Pe-ce+G);break}}b&&it(0)+ce>M&&oe(null)}},[M,$,G,ce,je,ye]);var Ct=he&&!!Fe.length,Dt={};Z!==null&&Q&&(Dt={position:"absolute",left:Z,top:0});var Pt={prefixCls:Ie,responsive:Q,component:x,invalidate:le},wt=s?function($e,Ve){var Ye=je($e,Ve);return m.createElement(Ju.Provider,{key:Ye,value:U(U({},Pt),{},{order:Ve,item:$e,itemKey:Ye,registerSize:Ue,display:Ve<=Ce})},s($e,Ve))}:function($e,Ve){var Ye=je($e,Ve);return m.createElement(js,Re({},Pt,{order:Ve,key:Ye,item:$e,renderItem:De,itemKey:Ye,registerSize:Ue,display:Ve<=Ce}))},Ht={order:Ct?Ce:Number.MAX_SAFE_INTEGER,className:"".concat(Ie,"-rest"),registerSize:Te,display:Ct},kt=g||pk,at=v?m.createElement(Ju.Provider,{value:U(U({},Pt),Ht)},v(Fe)):m.createElement(js,Re({},Pt,Ht),typeof kt=="function"?kt(Fe):kt),dt=m.createElement(E,Re({className:ie(!le&&r,h),style:f,ref:t},S),ye.map(wt),pe?at:null,b&&m.createElement(js,Re({},Pt,{responsive:Me,responsiveDisabled:!Q,order:Ce,className:"".concat(Ie,"-suffix"),registerSize:Be,display:!0,style:Dt}),b));return Me?m.createElement(pr,{onResize:Le,disabled:!Q},dt):dt}var Ti=m.forwardRef(gk);Ti.displayName="Overflow",Ti.Item=P1,Ti.RESPONSIVE=M1,Ti.INVALIDATE=L1;function vk(e,t,n){var r=U(U({},e),t);return Object.keys(t).forEach(function(i){var o=t[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return o.apply(void 0,l),(a=e[i])===null||a===void 0?void 0:a.call.apply(a,[e].concat(l))})}),r}var bk=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],yk=function(t,n){var r=t.prefixCls,i=t.id,o=t.inputElement,a=t.autoFocus,s=t.autoComplete,l=t.editable,u=t.activeDescendantId,c=t.value,d=t.open,f=t.attrs,h=yt(t,bk),p=o||m.createElement("input",null),g=p,v=g.ref,b=g.props;return gi(!("maxLength"in p.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),p=m.cloneElement(p,U(U(U({type:"search"},vk(h,b)),{},{id:i,ref:dr(n,v),autoComplete:s||"off",autoFocus:a,className:ie("".concat(r,"-selection-search-input"),b==null?void 0:b.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":d?u:void 0},f),{},{value:l?c:"",readOnly:!l,unselectable:l?null:"on",style:U(U({},b.style),{},{opacity:l?null:0})})),p},Ph=m.forwardRef(yk);process.env.NODE_ENV!=="production"&&(Ph.displayName="Input");function Mh(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var Ek=typeof window<"u"&&window.document&&window.document.documentElement,Sk=process.env.NODE_ENV!=="test"&&Ek;function Ck(e){return e!=null}function wk(e){return!e&&e!==0}function D1(e){return["string","number"].includes(lt(e))}function k1(e){var t=void 0;return e&&(D1(e.title)?t=e.title.toString():D1(e.label)&&(t=e.label.toString())),t}function xk(e,t){Sk?m.useLayoutEffect(e,t):m.useEffect(e,t)}function Tk(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var R1=function(t){t.preventDefault(),t.stopPropagation()},Ok=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,a=t.searchValue,s=t.autoClearSearchValue,l=t.inputRef,u=t.placeholder,c=t.disabled,d=t.mode,f=t.showSearch,h=t.autoFocus,p=t.autoComplete,g=t.activeDescendantId,v=t.tabIndex,b=t.removeIcon,y=t.maxTagCount,E=t.maxTagTextLength,x=t.maxTagPlaceholder,O=x===void 0?function(X){return"+ ".concat(X.length," ...")}:x,S=t.tagRender,T=t.onToggleOpen,I=t.onRemove,N=t.onInputChange,_=t.onInputPaste,P=t.onInputKeyDown,A=t.onInputMouseDown,M=t.onInputCompositionStart,D=t.onInputCompositionEnd,R=t.onInputBlur,$=m.useRef(null),F=C.useState(0),B=ae(F,2),z=B[0],L=B[1],H=C.useState(!1),W=ae(H,2),k=W[0],G=W[1],Y="".concat(r,"-selection"),te=o||d==="multiple"&&s===!1||d==="tags"?a:"",se=d==="tags"||d==="multiple"&&s===!1||f&&(o||k);xk(function(){L($.current.scrollWidth)},[te]);var ce=function(ee,ne,be,Ce,Se){return m.createElement("span",{title:k1(ee),className:ie("".concat(Y,"-item"),V({},"".concat(Y,"-item-disabled"),be))},m.createElement("span",{className:"".concat(Y,"-item-content")},ne),Ce&&m.createElement(Zu,{className:"".concat(Y,"-item-remove"),onMouseDown:R1,onClick:Se,customizeIcon:b},"×"))},ue=function(ee,ne,be,Ce,Se,ve){var he=function(Ie){R1(Ie),T(!o)};return m.createElement("span",{onMouseDown:he},S({label:ne,value:ee,disabled:be,closable:Ce,onClose:Se,isMaxTag:!!ve}))},de=function(ee){var ne=ee.disabled,be=ee.label,Ce=ee.value,Se=!c&&!ne,ve=be;if(typeof E=="number"&&(typeof be=="string"||typeof be=="number")){var he=String(ve);he.length>E&&(ve="".concat(he.slice(0,E),"..."))}var Ae=function(me){me&&me.stopPropagation(),I(ee)};return typeof S=="function"?ue(Ce,ve,ne,Se,Ae):ce(ee,ve,ne,Se,Ae)},J=function(ee){if(!i.length)return null;var ne=typeof O=="function"?O(ee):O;return typeof S=="function"?ue(void 0,ne,!1,!1,void 0,!0):ce({title:ne},ne,!1)},Z=m.createElement("div",{className:"".concat(Y,"-search"),style:{width:z},onFocus:function(){G(!0)},onBlur:function(){G(!1)}},m.createElement(Ph,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:c,autoFocus:h,autoComplete:p,editable:se,activeDescendantId:g,value:te,onKeyDown:P,onMouseDown:A,onChange:N,onPaste:_,onCompositionStart:M,onCompositionEnd:D,onBlur:R,tabIndex:v,attrs:Nr(t,!0)}),m.createElement("span",{ref:$,className:"".concat(Y,"-search-mirror"),"aria-hidden":!0},te," ")),oe=m.createElement(Ti,{prefixCls:"".concat(Y,"-overflow"),data:i,renderItem:de,renderRest:J,suffix:Z,itemKey:Tk,maxCount:y});return m.createElement("span",{className:"".concat(Y,"-wrap")},oe,!i.length&&!te&&m.createElement("span",{className:"".concat(Y,"-placeholder")},u))},Nk=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,u=t.activeDescendantId,c=t.mode,d=t.open,f=t.values,h=t.placeholder,p=t.tabIndex,g=t.showSearch,v=t.searchValue,b=t.activeValue,y=t.maxLength,E=t.onInputKeyDown,x=t.onInputMouseDown,O=t.onInputChange,S=t.onInputPaste,T=t.onInputCompositionStart,I=t.onInputCompositionEnd,N=t.onInputBlur,_=t.title,P=m.useState(!1),A=ae(P,2),M=A[0],D=A[1],R=c==="combobox",$=R||g,F=f[0],B=v||"";R&&b&&!M&&(B=b),m.useEffect(function(){R&&D(!1)},[R,b]);var z=c!=="combobox"&&!d&&!g?!1:!!B,L=_===void 0?k1(F):_,H=m.useMemo(function(){return F?null:m.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:z?{visibility:"hidden"}:void 0},h)},[F,z,h,r]);return m.createElement("span",{className:"".concat(r,"-selection-wrap")},m.createElement("span",{className:"".concat(r,"-selection-search")},m.createElement(Ph,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:$,activeDescendantId:u,value:B,onKeyDown:E,onMouseDown:x,onChange:function(k){D(!0),O(k)},onPaste:S,onCompositionStart:T,onCompositionEnd:I,onBlur:N,tabIndex:p,attrs:Nr(t,!0),maxLength:R?y:void 0})),!R&&F?m.createElement("span",{className:"".concat(r,"-selection-item"),title:L,style:z?{visibility:"hidden"}:void 0},F.label):null,H)},_k=function(t,n){var r=C.useRef(null),i=C.useRef(!1),o=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,u=t.tokenWithEnter,c=t.disabled,d=t.prefix,f=t.autoClearSearchValue,h=t.onSearch,p=t.onSearchSubmit,g=t.onToggleOpen,v=t.onInputKeyDown,b=t.onInputBlur,y=t.domRef;m.useImperativeHandle(n,function(){return{focus:function(L){r.current.focus(L)},blur:function(){r.current.blur()}}});var E=A1(0),x=ae(E,2),O=x[0],S=x[1],T=function(L){var H=L.which,W=r.current instanceof HTMLTextAreaElement;!W&&a&&(H===Xe.UP||H===Xe.DOWN)&&L.preventDefault(),v&&v(L),H===Xe.ENTER&&s==="tags"&&!i.current&&!a&&(p==null||p(L.target.value)),!(W&&!a&&~[Xe.UP,Xe.DOWN,Xe.LEFT,Xe.RIGHT].indexOf(H))&&ok(H)&&g(!0)},I=function(){S(!0)},N=C.useRef(null),_=function(L){h(L,!0,i.current)!==!1&&g(!0)},P=function(){i.current=!0},A=function(L){i.current=!1,s!=="combobox"&&_(L.target.value)},M=function(L){var H=L.target.value;if(u&&N.current&&/[\r\n]/.test(N.current)){var W=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");H=H.replace(W,N.current)}N.current=null,_(H)},D=function(L){var H=L.clipboardData,W=H==null?void 0:H.getData("text");N.current=W||""},R=function(L){var H=L.target;if(H!==r.current){var W=document.body.style.msTouchAction!==void 0;W?setTimeout(function(){r.current.focus()}):r.current.focus()}},$=function(L){var H=O();L.target!==r.current&&!H&&!(s==="combobox"&&c)&&L.preventDefault(),(s!=="combobox"&&(!l||!H)||!a)&&(a&&f!==!1&&h("",!0,!1),g())},F={inputRef:r,onInputKeyDown:T,onInputMouseDown:I,onInputChange:M,onInputPaste:D,onInputCompositionStart:P,onInputCompositionEnd:A,onInputBlur:b},B=s==="multiple"||s==="tags"?m.createElement(Ok,Re({},t,F)):m.createElement(Nk,Re({},t,F));return m.createElement("div",{ref:y,className:"".concat(o,"-selector"),onClick:R,onMouseDown:$},d&&m.createElement("div",{className:"".concat(o,"-prefix")},d),B)},$1=m.forwardRef(_k);process.env.NODE_ENV!=="production"&&($1.displayName="Selector");function Ik(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,u=l===void 0?0:l,c=i.y,d=c===void 0?0:c,f=m.useRef();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],g=n.points[1],v=p[0],b=p[1],y=g[0],E=g[1];v===y||!["t","b"].includes(v)?h.top=d:v==="t"?h.top=0:h.bottom=0,b===E||!["l","r"].includes(b)?h.left=u:b==="l"?h.left=0:h.right=0}return m.createElement("div",{ref:f,className:ie("".concat(t,"-arrow"),a),style:h},s)}function Ak(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?m.createElement(Or,Re({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return m.createElement("div",{style:{zIndex:r},className:ie("".concat(t,"-mask"),s)})}):null}var F1=m.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(F1.displayName="PopupContent");var B1=m.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,o=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,u=e.keepDom,c=e.fresh,d=e.onClick,f=e.mask,h=e.arrow,p=e.arrowPos,g=e.align,v=e.motion,b=e.maskMotion,y=e.forceRender,E=e.getPopupContainer,x=e.autoDestroy,O=e.portal,S=e.zIndex,T=e.onMouseEnter,I=e.onMouseLeave,N=e.onPointerEnter,_=e.onPointerDownCapture,P=e.ready,A=e.offsetX,M=e.offsetY,D=e.offsetR,R=e.offsetB,$=e.onAlign,F=e.onPrepare,B=e.stretch,z=e.targetWidth,L=e.targetHeight,H=typeof n=="function"?n():n,W=l||u,k=(E==null?void 0:E.length)>0,G=m.useState(!E||!k),Y=ae(G,2),te=Y[0],se=Y[1];if(Kt(function(){!te&&k&&a&&se(!0)},[te,k,a]),!te)return null;var ce="auto",ue={left:"-1000vw",top:"-1000vh",right:ce,bottom:ce};if(P||!l){var de,J=g.points,Z=g.dynamicInset||((de=g._experimental)===null||de===void 0?void 0:de.dynamicInset),oe=Z&&J[0][1]==="r",X=Z&&J[0][0]==="b";oe?(ue.right=D,ue.left=ce):(ue.left=A,ue.right=ce),X?(ue.bottom=R,ue.top=ce):(ue.top=M,ue.bottom=ce)}var ee={};return B&&(B.includes("height")&&L?ee.height=L:B.includes("minHeight")&&L&&(ee.minHeight=L),B.includes("width")&&z?ee.width=z:B.includes("minWidth")&&z&&(ee.minWidth=z)),l||(ee.pointerEvents="none"),m.createElement(O,{open:y||W,getContainer:E&&function(){return E(a)},autoDestroy:x},m.createElement(Ak,{prefixCls:i,open:l,zIndex:S,mask:f,motion:b}),m.createElement(pr,{onResize:$,disabled:!l},function(ne){return m.createElement(Or,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(i,"-hidden")},v,{onAppearPrepare:F,onEnterPrepare:F,visible:l,onVisibleChanged:function(Ce){var Se;v==null||(Se=v.onVisibleChanged)===null||Se===void 0||Se.call(v,Ce),s(Ce)}}),function(be,Ce){var Se=be.className,ve=be.style,he=ie(i,Se,r);return m.createElement("div",{ref:dr(ne,t,Ce),className:he,style:U(U(U(U({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},ue),ee),ve),{},{boxSizing:"border-box",zIndex:S},o),onMouseEnter:T,onMouseLeave:I,onPointerEnter:N,onClick:d,onPointerDownCapture:_},h&&m.createElement(Ik,{prefixCls:i,arrow:h,arrowPos:p,align:g}),m.createElement(F1,{cache:!l&&!c},H))})}))});process.env.NODE_ENV!=="production"&&(B1.displayName="Popup");var z1=m.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=_o(n),o=m.useCallback(function(s){jd(t,r?r(s):s)},[r]),a=vi(o,la(n));return i?m.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(z1.displayName="TriggerWrapper");var H1=m.createContext(null);function j1(e){return e?Array.isArray(e)?e:[e]:[]}function Pk(e,t,n,r){return m.useMemo(function(){var i=j1(n??t),o=j1(r??t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,n,r])}function Mk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Lk(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s,l=o[a];if(Mk((s=e[l])===null||s===void 0?void 0:s.points,i,r))return"".concat(t,"-placement-").concat(l)}return""}function V1(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Us(e){return e.ownerDocument.defaultView}function Lh(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=Us(n).getComputedStyle(n),o=i.overflowX,a=i.overflowY,s=i.overflow;[o,a,s].some(function(l){return r.includes(l)})&&t.push(n),n=n.parentElement}return t}function Ws(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Ys(e){return Ws(parseFloat(e),0)}function U1(e,t){var n=U({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Us(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,u=i.borderLeftWidth,c=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,g=r.clientWidth,v=Ys(s),b=Ys(l),y=Ys(u),E=Ys(c),x=Ws(Math.round(d.width/p*1e3)/1e3),O=Ws(Math.round(d.height/f*1e3)/1e3),S=(p-g-y-E)*x,T=(f-h-v-b)*O,I=v*O,N=b*O,_=y*x,P=E*x,A=0,M=0;if(o==="clip"){var D=Ys(a);A=D*x,M=D*O}var R=d.x+_-A,$=d.y+I-M,F=R+d.width+2*A-_-P-S,B=$+d.height+2*M-I-N-T;n.left=Math.max(n.left,R),n.top=Math.max(n.top,$),n.right=Math.min(n.right,F),n.bottom=Math.min(n.bottom,B)}}),n}function W1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function Y1(e,t){var n=t||[],r=ae(n,2),i=r[0],o=r[1];return[W1(e.width,i),W1(e.height,o)]}function q1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Ma(e,t){var n=t[0],r=t[1],i,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?i=e.x:r==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function co(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,i){return i===t?n[r]||"c":r}).join("")}function Dk(e,t,n,r,i,o,a){var s=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=ae(s,2),u=l[0],c=l[1],d=m.useRef(0),f=m.useMemo(function(){return t?Lh(t):[]},[t]),h=m.useRef({}),p=function(){h.current={}};e||p();var g=an(function(){if(t&&n&&e){let ei=function(Fl,to){var ra=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me,Cd=W.x+Fl,wd=W.y+to,Rg=Cd+X,$g=wd+oe,ft=Math.max(Cd,ra.left),Tt=Math.max(wd,ra.top),On=Math.min(Rg,ra.right),Fn=Math.min($g,ra.bottom);return Math.max(0,(On-ft)*(Fn-Tt))},ss=function(){Bt=W.y+ot,en=Bt+oe,fn=W.x+Ye,Ut=fn+X};var y,E,x,O,S=t,T=S.ownerDocument,I=Us(S),N=I.getComputedStyle(S),_=N.position,P=S.style.left,A=S.style.top,M=S.style.right,D=S.style.bottom,R=S.style.overflow,$=U(U({},i[r]),o),F=T.createElement("div");(y=S.parentElement)===null||y===void 0||y.appendChild(F),F.style.left="".concat(S.offsetLeft,"px"),F.style.top="".concat(S.offsetTop,"px"),F.style.position=_,F.style.height="".concat(S.offsetHeight,"px"),F.style.width="".concat(S.offsetWidth,"px"),S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";var B;if(Array.isArray(n))B={x:n[0],y:n[1],width:0,height:0};else{var z,L,H=n.getBoundingClientRect();H.x=(z=H.x)!==null&&z!==void 0?z:H.left,H.y=(L=H.y)!==null&&L!==void 0?L:H.top,B={x:H.x,y:H.y,width:H.width,height:H.height}}var W=S.getBoundingClientRect(),k=I.getComputedStyle(S),G=k.height,Y=k.width;W.x=(E=W.x)!==null&&E!==void 0?E:W.left,W.y=(x=W.y)!==null&&x!==void 0?x:W.top;var te=T.documentElement,se=te.clientWidth,ce=te.clientHeight,ue=te.scrollWidth,de=te.scrollHeight,J=te.scrollTop,Z=te.scrollLeft,oe=W.height,X=W.width,ee=B.height,ne=B.width,be={left:0,top:0,right:se,bottom:ce},Ce={left:-Z,top:-J,right:ue-Z,bottom:de-J},Se=$.htmlRegion,ve="visible",he="visibleFirst";Se!=="scroll"&&Se!==he&&(Se=ve);var Ae=Se===he,Ie=U1(Ce,f),me=U1(be,f),Me=Se===ve?me:Ie,Q=Ae?me:Me;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";var le=S.getBoundingClientRect();S.style.left=P,S.style.top=A,S.style.right=M,S.style.bottom=D,S.style.overflow=R,(O=S.parentElement)===null||O===void 0||O.removeChild(F);var pe=Ws(Math.round(X/parseFloat(Y)*1e3)/1e3),ye=Ws(Math.round(oe/parseFloat(G)*1e3)/1e3);if(pe===0||ye===0||hs(n)&&!Gf(n))return;var Fe=$.offset,je=$.targetOffset,De=Y1(W,Fe),we=ae(De,2),Le=we[0],Ue=we[1],Te=Y1(B,je),Be=ae(Te,2),it=Be[0],Ct=Be[1];B.x-=it,B.y-=Ct;var Dt=$.points||[],Pt=ae(Dt,2),wt=Pt[0],Ht=Pt[1],kt=q1(Ht),at=q1(wt),dt=Ma(B,kt),$e=Ma(W,at),Ve=U({},$),Ye=dt.x-$e.x+Le,ot=dt.y-$e.y+Ue,Pe=ei(Ye,ot),_e=ei(Ye,ot,me),xe=Ma(B,["t","l"]),ze=Ma(W,["t","l"]),qe=Ma(B,["b","r"]),et=Ma(W,["b","r"]),nt=$.overflow||{},mt=nt.adjustX,vt=nt.adjustY,ht=nt.shiftX,St=nt.shiftY,At=function(to){return typeof to=="boolean"?to:to>=0},Bt,en,fn,Ut;ss();var Rt=At(vt),tt=at[0]===kt[0];if(Rt&&at[0]==="t"&&(en>Q.bottom||h.current.bt)){var He=ot;tt?He-=oe-ee:He=xe.y-et.y-Ue;var ke=ei(Ye,He),Oe=ei(Ye,He,me);ke>Pe||ke===Pe&&(!Ae||Oe>=_e)?(h.current.bt=!0,ot=He,Ue=-Ue,Ve.points=[co(at,0),co(kt,0)]):h.current.bt=!1}if(Rt&&at[0]==="b"&&(Bt<Q.top||h.current.tb)){var Qe=ot;tt?Qe+=oe-ee:Qe=qe.y-ze.y-Ue;var ut=ei(Ye,Qe),pt=ei(Ye,Qe,me);ut>Pe||ut===Pe&&(!Ae||pt>=_e)?(h.current.tb=!0,ot=Qe,Ue=-Ue,Ve.points=[co(at,0),co(kt,0)]):h.current.tb=!1}var $t=At(mt),sn=at[1]===kt[1];if($t&&at[1]==="l"&&(Ut>Q.right||h.current.rl)){var jt=Ye;sn?jt-=X-ne:jt=xe.x-et.x-Le;var rt=ei(jt,ot),gt=ei(jt,ot,me);rt>Pe||rt===Pe&&(!Ae||gt>=_e)?(h.current.rl=!0,Ye=jt,Le=-Le,Ve.points=[co(at,1),co(kt,1)]):h.current.rl=!1}if($t&&at[1]==="r"&&(fn<Q.left||h.current.lr)){var _t=Ye;sn?_t+=X-ne:_t=qe.x-ze.x-Le;var hn=ei(_t,ot),_n=ei(_t,ot,me);hn>Pe||hn===Pe&&(!Ae||_n>=_e)?(h.current.lr=!0,Ye=_t,Le=-Le,Ve.points=[co(at,1),co(kt,1)]):h.current.lr=!1}ss();var Un=ht===!0?0:ht;typeof Un=="number"&&(fn<me.left&&(Ye-=fn-me.left-Le,B.x+ne<me.left+Un&&(Ye+=B.x-me.left+ne-Un)),Ut>me.right&&(Ye-=Ut-me.right-Le,B.x>me.right-Un&&(Ye+=B.x-me.right+Un)));var Fr=St===!0?0:St;typeof Fr=="number"&&(Bt<me.top&&(ot-=Bt-me.top-Ue,B.y+ee<me.top+Fr&&(ot+=B.y-me.top+ee-Fr)),en>me.bottom&&(ot-=en-me.bottom-Ue,B.y>me.bottom-Fr&&(ot+=B.y-me.bottom+Fr)));var Zr=W.x+Ye,Jr=Zr+X,Ri=W.y+ot,eo=Ri+oe,zt=B.x,st=zt+ne,xt=B.y,Mt=xt+ee,qt=Math.max(Zr,zt),Zt=Math.min(Jr,st),Jn=(qt+Zt)/2,er=Jn-Zr,Cr=Math.max(Ri,xt),Br=Math.min(eo,Mt),wr=(Cr+Br)/2,xr=wr-Ri;a==null||a(t,Ve);var Yn=le.right-W.x-(Ye+W.width),na=le.bottom-W.y-(ot+W.height);pe===1&&(Ye=Math.round(Ye),Yn=Math.round(Yn)),ye===1&&(ot=Math.round(ot),na=Math.round(na));var kg={ready:!0,offsetX:Ye/pe,offsetY:ot/ye,offsetR:Yn/pe,offsetB:na/ye,arrowX:er/pe,arrowY:xr/ye,scaleX:pe,scaleY:ye,align:Ve};c(kg)}}),v=function(){d.current+=1;var E=d.current;Promise.resolve().then(function(){d.current===E&&g()})},b=function(){c(function(E){return U(U({},E),{},{ready:!1})})};return Kt(b,[r]),Kt(function(){e||b()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,v]}function kk(e,t,n,r,i){Kt(function(){if(e&&t&&n){let d=function(){r(),i()};var o=t,a=n,s=Lh(o),l=Lh(a),u=Us(a),c=new Set([u].concat(Ke(s),Ke(l)));return c.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),u.addEventListener("resize",d,{passive:!0}),r(),function(){c.forEach(function(f){f.removeEventListener("scroll",d),u.removeEventListener("resize",d)})}}},[e,t,n])}function Rk(e,t,n,r,i,o,a,s){var l=m.useRef(e);l.current=e;var u=m.useRef(!1);m.useEffect(function(){if(t&&r&&(!i||o)){var d=function(){u.current=!1},f=function(x){var O;l.current&&!a(((O=x.composedPath)===null||O===void 0||(O=O.call(x))===null||O===void 0?void 0:O[0])||x.target)&&!u.current&&s(!1)},h=Us(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var p=_u(n);if(p&&(p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var g,v,b=n==null||(g=n.getRootNode)===null||g===void 0?void 0:g.call(n),y=(v=r.getRootNode)===null||v===void 0?void 0:v.call(r);gi(b===y,"trigger element and popup element should in same shadow root.")}return function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),p&&(p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0))}}},[t,n,r,i,o]);function c(){u.current=!0}return c}var $k=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Fk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ds,t=m.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,u=n.showAction,c=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,g=n.mouseEnterDelay,v=n.mouseLeaveDelay,b=v===void 0?.1:v,y=n.focusDelay,E=n.blurDelay,x=n.mask,O=n.maskClosable,S=O===void 0?!0:O,T=n.getPopupContainer,I=n.forceRender,N=n.autoDestroy,_=n.destroyPopupOnHide,P=n.popup,A=n.popupClassName,M=n.popupStyle,D=n.popupPlacement,R=n.builtinPlacements,$=R===void 0?{}:R,F=n.popupAlign,B=n.zIndex,z=n.stretch,L=n.getPopupClassNameFromAlign,H=n.fresh,W=n.alignPoint,k=n.onPopupClick,G=n.onPopupAlign,Y=n.arrow,te=n.popupMotion,se=n.maskMotion,ce=n.popupTransitionName,ue=n.popupAnimation,de=n.maskTransitionName,J=n.maskAnimation,Z=n.className,oe=n.getTriggerDOMNode,X=yt(n,$k),ee=N||_||!1,ne=m.useState(!1),be=ae(ne,2),Ce=be[0],Se=be[1];Kt(function(){Se(Ah())},[]);var ve=m.useRef({}),he=m.useContext(H1),Ae=m.useMemo(function(){return{registerSubPopup:function(Tt,On){ve.current[Tt]=On,he==null||he.registerSubPopup(Tt,On)}}},[he]),Ie=ks(),me=m.useState(null),Me=ae(me,2),Q=Me[0],le=Me[1],pe=m.useRef(null),ye=an(function(ft){pe.current=ft,hs(ft)&&Q!==ft&&le(ft),he==null||he.registerSubPopup(Ie,ft)}),Fe=m.useState(null),je=ae(Fe,2),De=je[0],we=je[1],Le=m.useRef(null),Ue=an(function(ft){hs(ft)&&De!==ft&&(we(ft),Le.current=ft)}),Te=m.Children.only(a),Be=(Te==null?void 0:Te.props)||{},it={},Ct=an(function(ft){var Tt,On,Fn=De;return(Fn==null?void 0:Fn.contains(ft))||((Tt=_u(Fn))===null||Tt===void 0?void 0:Tt.host)===ft||ft===Fn||(Q==null?void 0:Q.contains(ft))||((On=_u(Q))===null||On===void 0?void 0:On.host)===ft||ft===Q||Object.values(ve.current).some(function(Mn){return(Mn==null?void 0:Mn.contains(ft))||ft===Mn})}),Dt=V1(o,te,ue,ce),Pt=V1(o,se,J,de),wt=m.useState(f||!1),Ht=ae(wt,2),kt=Ht[0],at=Ht[1],dt=d??kt,$e=an(function(ft){d===void 0&&at(ft)});Kt(function(){at(d||!1)},[d]);var Ve=m.useRef(dt);Ve.current=dt;var Ye=m.useRef([]);Ye.current=[];var ot=an(function(ft){var Tt;$e(ft),((Tt=Ye.current[Ye.current.length-1])!==null&&Tt!==void 0?Tt:dt)!==ft&&(Ye.current.push(ft),h==null||h(ft))}),Pe=m.useRef(),_e=function(){clearTimeout(Pe.current)},xe=function(Tt){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_e(),On===0?ot(Tt):Pe.current=setTimeout(function(){ot(Tt)},On*1e3)};m.useEffect(function(){return _e},[]);var ze=m.useState(!1),qe=ae(ze,2),et=qe[0],nt=qe[1];Kt(function(ft){(!ft||dt)&&nt(!0)},[dt]);var mt=m.useState(null),vt=ae(mt,2),ht=vt[0],St=vt[1],At=m.useState(null),Bt=ae(At,2),en=Bt[0],fn=Bt[1],Ut=function(Tt){fn([Tt.clientX,Tt.clientY])},Rt=Dk(dt,Q,W&&en!==null?en:De,D,$,F,G),tt=ae(Rt,11),He=tt[0],ke=tt[1],Oe=tt[2],Qe=tt[3],ut=tt[4],pt=tt[5],$t=tt[6],sn=tt[7],jt=tt[8],rt=tt[9],gt=tt[10],_t=Pk(Ce,l,u,c),hn=ae(_t,2),_n=hn[0],Un=hn[1],Fr=_n.has("click"),Zr=Un.has("click")||Un.has("contextMenu"),Jr=an(function(){et||gt()}),Ri=function(){Ve.current&&W&&Zr&&xe(!1)};kk(dt,De,Q,Jr,Ri),Kt(function(){Jr()},[en,D]),Kt(function(){dt&&!($!=null&&$[D])&&Jr()},[JSON.stringify(F)]);var eo=m.useMemo(function(){var ft=Lk($,o,rt,W);return ie(ft,L==null?void 0:L(rt))},[rt,L,$,o,W]);m.useImperativeHandle(r,function(){return{nativeElement:Le.current,popupElement:pe.current,forceAlign:Jr}});var zt=m.useState(0),st=ae(zt,2),xt=st[0],Mt=st[1],qt=m.useState(0),Zt=ae(qt,2),Jn=Zt[0],er=Zt[1],Cr=function(){if(z&&De){var Tt=De.getBoundingClientRect();Mt(Tt.width),er(Tt.height)}},Br=function(){Cr(),Jr()},wr=function(Tt){nt(!1),gt(),p==null||p(Tt)},xr=function(){return new Promise(function(Tt){Cr(),St(function(){return Tt})})};Kt(function(){ht&&(gt(),ht(),St(null))},[ht]);function Yn(ft,Tt,On,Fn){it[ft]=function(Mn){var xd;Fn==null||Fn(Mn),xe(Tt,On);for(var Fg=arguments.length,TN=new Array(Fg>1?Fg-1:0),Td=1;Td<Fg;Td++)TN[Td-1]=arguments[Td];(xd=Be[ft])===null||xd===void 0||xd.call.apply(xd,[Be,Mn].concat(TN))}}(Fr||Zr)&&(it.onClick=function(ft){var Tt;Ve.current&&Zr?xe(!1):!Ve.current&&Fr&&(Ut(ft),xe(!0));for(var On=arguments.length,Fn=new Array(On>1?On-1:0),Mn=1;Mn<On;Mn++)Fn[Mn-1]=arguments[Mn];(Tt=Be.onClick)===null||Tt===void 0||Tt.call.apply(Tt,[Be,ft].concat(Fn))});var na=Rk(dt,Zr,De,Q,x,S,Ct,xe),kg=_n.has("hover"),ei=Un.has("hover"),ss,Fl;kg&&(Yn("onMouseEnter",!0,g,function(ft){Ut(ft)}),Yn("onPointerEnter",!0,g,function(ft){Ut(ft)}),ss=function(Tt){(dt||et)&&Q!==null&&Q!==void 0&&Q.contains(Tt.target)&&xe(!0,g)},W&&(it.onMouseMove=function(ft){var Tt;(Tt=Be.onMouseMove)===null||Tt===void 0||Tt.call(Be,ft)})),ei&&(Yn("onMouseLeave",!1,b),Yn("onPointerLeave",!1,b),Fl=function(){xe(!1,b)}),_n.has("focus")&&Yn("onFocus",!0,y),Un.has("focus")&&Yn("onBlur",!1,E),_n.has("contextMenu")&&(it.onContextMenu=function(ft){var Tt;Ve.current&&Un.has("contextMenu")?xe(!1):(Ut(ft),xe(!0)),ft.preventDefault();for(var On=arguments.length,Fn=new Array(On>1?On-1:0),Mn=1;Mn<On;Mn++)Fn[Mn-1]=arguments[Mn];(Tt=Be.onContextMenu)===null||Tt===void 0||Tt.call.apply(Tt,[Be,ft].concat(Fn))}),Z&&(it.className=ie(Be.className,Z));var to=U(U({},Be),it),ra={},Cd=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Cd.forEach(function(ft){X[ft]&&(ra[ft]=function(){for(var Tt,On=arguments.length,Fn=new Array(On),Mn=0;Mn<On;Mn++)Fn[Mn]=arguments[Mn];(Tt=to[ft])===null||Tt===void 0||Tt.call.apply(Tt,[to].concat(Fn)),X[ft].apply(X,Fn)})});var wd=m.cloneElement(Te,U(U({},to),ra)),Rg={x:pt,y:$t},$g=Y?U({},Y!==!0?Y:{}):null;return m.createElement(m.Fragment,null,m.createElement(pr,{disabled:!dt,ref:Ue,onResize:Br},m.createElement(z1,{getTriggerDOMNode:oe},wd)),m.createElement(H1.Provider,{value:Ae},m.createElement(B1,{portal:e,ref:ye,prefixCls:o,popup:P,className:ie(A,eo),style:M,target:De,onMouseEnter:ss,onMouseLeave:Fl,onPointerEnter:ss,zIndex:B,open:dt,keepDom:et,fresh:H,onClick:k,onPointerDownCapture:na,mask:x,motion:Dt,maskMotion:Pt,onVisibleChanged:wr,onPrepare:xr,forceRender:I,autoDestroy:ee,getPopupContainer:T,align:rt,arrow:$g,arrowPos:Rg,ready:He,offsetX:ke,offsetY:Oe,offsetR:Qe,offsetB:ut,onAlign:Jr,stretch:z,targetWidth:xt/sn,targetHeight:Jn/jt})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const ec=Fk(Ds);var Bk=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],zk=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},Hk=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,a=t.popupElement,s=t.animation,l=t.transitionName,u=t.dropdownStyle,c=t.dropdownClassName,d=t.direction,f=d===void 0?"ltr":d,h=t.placement,p=t.builtinPlacements,g=t.dropdownMatchSelectWidth,v=t.dropdownRender,b=t.dropdownAlign,y=t.getPopupContainer,E=t.empty,x=t.getTriggerDOMNode,O=t.onPopupVisibleChange,S=t.onPopupMouseEnter,T=yt(t,Bk),I="".concat(r,"-dropdown"),N=a;v&&(N=v(a));var _=m.useMemo(function(){return p||zk(g)},[p,g]),P=s?"".concat(I,"-").concat(s):l,A=typeof g=="number",M=m.useMemo(function(){return A?null:g===!1?"minWidth":"width"},[g,A]),D=u;A&&(D=U(U({},D),{},{width:g}));var R=m.useRef(null);return m.useImperativeHandle(n,function(){return{getPopupElement:function(){var F;return(F=R.current)===null||F===void 0?void 0:F.popupElement}}}),m.createElement(ec,Re({},T,{showAction:O?["click"]:[],hideAction:O?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_,prefixCls:I,popupTransitionName:P,popup:m.createElement("div",{onMouseEnter:S},N),ref:R,stretch:M,popupAlign:b,popupVisible:i,getPopupContainer:y,popupClassName:ie(c,V({},"".concat(I,"-empty"),E)),popupStyle:D,getTriggerDOMNode:x,onPopupVisibleChange:O}),o)},X1=m.forwardRef(Hk);process.env.NODE_ENV!=="production"&&(X1.displayName="SelectTrigger");function K1(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function Dh(e){return typeof e<"u"&&!Number.isNaN(e)}function G1(e,t){var n=e||{},r=n.label,i=n.value,o=n.options,a=n.groupLabel,s=r||(t?"children":"label");return{label:s,value:i||"value",options:o||"options",groupLabel:a||s}}function jk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=G1(n,!1),a=o.label,s=o.value,l=o.options,u=o.groupLabel;function c(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var p=h[s];i.push({key:K1(h,i.length),groupOption:f,data:h,label:h[a],value:p})}else{var g=h[u];g===void 0&&r&&(g=h.label),i.push({key:K1(h,i.length),group:!0,data:h,label:g}),c(h[l],!0)}})}return c(e,!1),i}function kh(e){var t=U({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return bt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Vk=function(t,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,u){var c=Tv(u),d=c[0],f=c.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(p,g){return[].concat(Ke(p),Ke(s(g,f)))},[]).filter(Boolean)},a=o(t,n);return i?typeof r<"u"?a.slice(0,r):a:null},Rh=m.createContext(null);function Uk(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return m.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(lt(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Wk=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Yk=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],tc=function(t){return t==="tags"||t==="multiple"},Q1=m.forwardRef(function(e,t){var n,r=e.id,i=e.prefixCls,o=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,u=e.omitDomProps,c=e.displayValues,d=e.onDisplayValuesChange,f=e.emptyOptions,h=e.notFoundContent,p=h===void 0?"Not Found":h,g=e.onClear,v=e.mode,b=e.disabled,y=e.loading,E=e.getInputElement,x=e.getRawInputElement,O=e.open,S=e.defaultOpen,T=e.onDropdownVisibleChange,I=e.activeValue,N=e.onActiveValueChange,_=e.activeDescendantId,P=e.searchValue,A=e.autoClearSearchValue,M=e.onSearch,D=e.onSearchSplit,R=e.tokenSeparators,$=e.allowClear,F=e.prefix,B=e.suffixIcon,z=e.clearIcon,L=e.OptionList,H=e.animation,W=e.transitionName,k=e.dropdownStyle,G=e.dropdownClassName,Y=e.dropdownMatchSelectWidth,te=e.dropdownRender,se=e.dropdownAlign,ce=e.placement,ue=e.builtinPlacements,de=e.getPopupContainer,J=e.showAction,Z=J===void 0?[]:J,oe=e.onFocus,X=e.onBlur,ee=e.onKeyUp,ne=e.onKeyDown,be=e.onMouseDown,Ce=yt(e,Wk),Se=tc(v),ve=(a!==void 0?a:Se)||v==="combobox",he=U({},Ce);Yk.forEach(function(zt){delete he[zt]}),u==null||u.forEach(function(zt){delete he[zt]});var Ae=m.useState(!1),Ie=ae(Ae,2),me=Ie[0],Me=Ie[1];m.useEffect(function(){Me(Ah())},[]);var Q=m.useRef(null),le=m.useRef(null),pe=m.useRef(null),ye=m.useRef(null),Fe=m.useRef(null),je=m.useRef(!1),De=rk(),we=ae(De,3),Le=we[0],Ue=we[1],Te=we[2];m.useImperativeHandle(t,function(){var zt,st;return{focus:(zt=ye.current)===null||zt===void 0?void 0:zt.focus,blur:(st=ye.current)===null||st===void 0?void 0:st.blur,scrollTo:function(Mt){var qt;return(qt=Fe.current)===null||qt===void 0?void 0:qt.scrollTo(Mt)},nativeElement:Q.current||le.current}});var Be=m.useMemo(function(){var zt;if(v!=="combobox")return P;var st=(zt=c[0])===null||zt===void 0?void 0:zt.value;return typeof st=="string"||typeof st=="number"?String(st):""},[P,v,c]),it=v==="combobox"&&typeof E=="function"&&E()||null,Ct=typeof x=="function"&&x(),Dt=vi(le,Ct==null||(n=Ct.props)===null||n===void 0?void 0:n.ref),Pt=m.useState(!1),wt=ae(Pt,2),Ht=wt[0],kt=wt[1];Kt(function(){kt(!0)},[]);var at=Cn(!1,{defaultValue:S,value:O}),dt=ae(at,2),$e=dt[0],Ve=dt[1],Ye=Ht?$e:!1,ot=!p&&f;(b||ot&&Ye&&v==="combobox")&&(Ye=!1);var Pe=ot?!1:Ye,_e=m.useCallback(function(zt){var st=zt!==void 0?zt:!Ye;b||(Ve(st),Ye!==st&&(T==null||T(st)))},[b,Ye,Ve,T]),xe=m.useMemo(function(){return(R||[]).some(function(zt){return[`
177
177
  `,`\r
178
- `].includes(zt)})},[R]),ze=m.useContext(Rh)||{},qe=ze.maxCount,et=ze.rawValues,nt=function(st,Tt,Mt){if(!(Se&&Dh(qe)&&(et==null?void 0:et.size)>=qe)){var qt=!0,Zt=st;N==null||N(null);var Jn=Vk(st,R,Dh(qe)?qe-et.size:void 0),er=Mt?null:Jn;return v!=="combobox"&&er&&(Zt="",D==null||D(er),_e(!1),qt=!1),M&&Be!==Zt&&M(Zt,{source:Tt?"typing":"effect"}),qt}},mt=function(st){!st||!st.trim()||M(st,{source:"submit"})};m.useEffect(function(){!Ye&&!Se&&v!=="combobox"&&nt("",!1,!1)},[Ye]),m.useEffect(function(){$e&&b&&Ve(!1),b&&!je.current&&Ue(!1)},[b]);var vt=A1(),ht=ae(vt,2),St=ht[0],At=ht[1],Bt=m.useRef(!1),en=function(st){var Tt=St(),Mt=st.key,qt=Mt==="Enter";if(qt&&(v!=="combobox"&&st.preventDefault(),Ye||_e(!0)),At(!!Be),Mt==="Backspace"&&!Tt&&Se&&!Be&&c.length){for(var Zt=Ke(c),Jn=null,er=Zt.length-1;er>=0;er-=1){var Cr=Zt[er];if(!Cr.disabled){Zt.splice(er,1),Jn=Cr;break}}Jn&&d(Zt,{type:"remove",values:[Jn]})}for(var Br=arguments.length,wr=new Array(Br>1?Br-1:0),xr=1;xr<Br;xr++)wr[xr-1]=arguments[xr];if(Ye&&(!qt||!Bt.current)){var Yn;qt&&(Bt.current=!0),(Yn=Fe.current)===null||Yn===void 0||Yn.onKeyDown.apply(Yn,[st].concat(wr))}ne==null||ne.apply(void 0,[st].concat(wr))},fn=function(st){for(var Tt=arguments.length,Mt=new Array(Tt>1?Tt-1:0),qt=1;qt<Tt;qt++)Mt[qt-1]=arguments[qt];if(Ye){var Zt;(Zt=Fe.current)===null||Zt===void 0||Zt.onKeyUp.apply(Zt,[st].concat(Mt))}st.key==="Enter"&&(Bt.current=!1),ee==null||ee.apply(void 0,[st].concat(Mt))},Ut=function(st){var Tt=c.filter(function(Mt){return Mt!==st});d(Tt,{type:"remove",values:[st]})},Rt=function(){Bt.current=!1},tt=m.useRef(!1),He=function(){Ue(!0),b||(oe&&!tt.current&&oe.apply(void 0,arguments),Z.includes("focus")&&_e(!0)),tt.current=!0},ke=function(){je.current=!0,Ue(!1,function(){tt.current=!1,je.current=!1,_e(!1)}),!b&&(Be&&(v==="tags"?M(Be,{source:"submit"}):v==="multiple"&&M("",{source:"blur"})),X&&X.apply(void 0,arguments))},Oe=[];m.useEffect(function(){return function(){Oe.forEach(function(zt){return clearTimeout(zt)}),Oe.splice(0,Oe.length)}},[]);var Qe=function(st){var Tt,Mt=st.target,qt=(Tt=pe.current)===null||Tt===void 0?void 0:Tt.getPopupElement();if(qt&&qt.contains(Mt)){var Zt=setTimeout(function(){var Br=Oe.indexOf(Zt);if(Br!==-1&&Oe.splice(Br,1),Te(),!me&&!qt.contains(document.activeElement)){var wr;(wr=ye.current)===null||wr===void 0||wr.focus()}});Oe.push(Zt)}for(var Jn=arguments.length,er=new Array(Jn>1?Jn-1:0),Cr=1;Cr<Jn;Cr++)er[Cr-1]=arguments[Cr];be==null||be.apply(void 0,[st].concat(er))},ut=m.useState({}),pt=ae(ut,2),$t=pt[1];function sn(){$t({})}var jt;wt&&(jt=function(st){_e(st)}),ik(function(){var zt;return[Q.current,(zt=pe.current)===null||zt===void 0?void 0:zt.getPopupElement()]},Pe,_e,!!wt);var rt=m.useMemo(function(){return U(U({},e),{},{notFoundContent:p,open:Ye,triggerOpen:Pe,id:r,showSearch:ve,multiple:Se,toggleOpen:_e})},[e,p,Pe,Ye,r,ve,Se,_e]),gt=!!B||y,It;gt&&(It=m.createElement(Zu,{className:ie("".concat(i,"-arrow"),V({},"".concat(i,"-arrow-loading"),y)),customizeIcon:B,customizeIconProps:{loading:y,searchValue:Be,open:Ye,focused:Le,showSearch:ve}}));var hn=function(){var st;g==null||g(),(st=ye.current)===null||st===void 0||st.focus(),d([],{type:"clear",values:c}),nt("",!1,!1)},_n=tk(i,hn,c,$,z,b,Be,v),Un=_n.allowClear,Fr=_n.clearIcon,Zr=m.createElement(L,{ref:Fe}),Jr=ie(i,o,V(V(V(V(V(V(V(V(V(V({},"".concat(i,"-focused"),Le),"".concat(i,"-multiple"),Se),"".concat(i,"-single"),!Se),"".concat(i,"-allow-clear"),$),"".concat(i,"-show-arrow"),gt),"".concat(i,"-disabled"),b),"".concat(i,"-loading"),y),"".concat(i,"-open"),Ye),"".concat(i,"-customize-input"),it),"".concat(i,"-show-search"),ve)),Ri=m.createElement(X1,{ref:pe,disabled:b,prefixCls:i,visible:Pe,popupElement:Zr,animation:H,transitionName:W,dropdownStyle:k,dropdownClassName:G,direction:l,dropdownMatchSelectWidth:Y,dropdownRender:te,dropdownAlign:se,placement:ce,builtinPlacements:ue,getPopupContainer:de,empty:f,getTriggerDOMNode:function(st){return le.current||st},onPopupVisibleChange:jt,onPopupMouseEnter:sn},wt?m.cloneElement(wt,{ref:Dt}):m.createElement($1,Re({},e,{domRef:le,prefixCls:i,inputElement:it,ref:ye,id:r,prefix:F,showSearch:ve,autoClearSearchValue:A,mode:v,activeDescendantId:_,tagRender:s,values:c,open:Ye,onToggleOpen:_e,activeValue:I,searchValue:Be,onSearch:nt,onSearchSubmit:mt,onRemove:Ut,tokenWithEnter:xe,onInputBlur:Rt}))),eo;return wt?eo=Ri:eo=m.createElement("div",Re({className:Jr},he,{ref:Q,onMouseDown:Qe,onKeyDown:en,onKeyUp:fn,onFocus:He,onBlur:ke}),m.createElement(Uk,{visible:Le&&!Ye,values:c}),Ri,It,Un&&Fr),m.createElement(I1.Provider,{value:rt},eo)});process.env.NODE_ENV!=="production"&&(Q1.displayName="BaseSelect");var $h=function(){return null};$h.isSelectOptGroup=!0;var Fh=function(){return null};Fh.isSelectOption=!0;var Z1=m.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,o=e.children,a=e.prefixCls,s=e.onInnerResize,l=e.innerProps,u=e.rtl,c=e.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=U(U({},f),{},V(V(V(V(V({transform:"translateY(".concat(r,"px)")},u?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),m.createElement("div",{style:d},m.createElement(pr,{onResize:function(p){var g=p.offsetHeight;g&&s&&s()}},m.createElement("div",Re({style:f,className:ie(V({},"".concat(a,"-holder-inner"),a)),ref:t},l),o,c)))});Z1.displayName="Filler";function qk(e){var t=e.children,n=e.setRef,r=m.useCallback(function(i){n(i)},[]);return m.cloneElement(t,{ref:r})}function Xk(e,t,n,r,i,o,a,s){var l=s.getKey;return e.slice(t,n+1).map(function(u,c){var d=t+c,f=a(u,d,{style:{width:r},offsetX:i}),h=l(u);return m.createElement(qk,{key:h,setRef:function(g){return o(u,g)}},f)})}function Kk(e,t,n){var r=e.length,i=t.length,o,a;if(r===0&&i===0)return null;r<i?(o=e,a=t):(o=t,a=e);var s={__EMPTY_ITEM__:!0};function l(p){return p!==void 0?n(p):s}for(var u=null,c=Math.abs(r-i)!==1,d=0;d<a.length;d+=1){var f=l(o[d]),h=l(a[d]);if(f!==h){u=d,c=c||f!==l(a[d+1]);break}}return u===null?null:{index:u,multiple:c}}function Gk(e,t,n){var r=m.useState(e),i=ae(r,2),o=i[0],a=i[1],s=m.useState(null),l=ae(s,2),u=l[0],c=l[1];return m.useEffect(function(){var d=Kk(o||[],e||[],t);(d==null?void 0:d.index)!==void 0&&c(e[d.index]),a(e)},[e]),[u]}var J1=(typeof navigator>"u"?"undefined":lt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const eE=function(e,t,n,r){var i=C.useRef(!1),o=C.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=C.useRef({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,function(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?u<0&&s.current.left||u>0&&s.current.right:u<0&&s.current.top||u>0&&s.current.bottom;return c&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function Qk(e,t,n,r,i,o,a){var s=C.useRef(0),l=C.useRef(null),u=C.useRef(null),c=C.useRef(!1),d=eE(t,n,r,i);function f(y,E){if(Xt.cancel(l.current),!d(!1,E)){var x=y;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=E,u.current=E,J1||x.preventDefault(),l.current=Xt(function(){var O=c.current?10:1;a(s.current*O,!1),s.current=0})}}function h(y,E){a(E,!0),J1||y.preventDefault()}var p=C.useRef(null),g=C.useRef(null);function v(y){if(e){Xt.cancel(g.current),g.current=Xt(function(){p.current=null},2);var E=y.deltaX,x=y.deltaY,O=y.shiftKey,S=E,T=x;(p.current==="sx"||!p.current&&O&&x&&!E)&&(S=x,T=0,p.current="sx");var I=Math.abs(S),N=Math.abs(T);p.current===null&&(p.current=o&&I>N?"x":"y"),p.current==="y"?f(y,T):h(y,S)}}function b(y){e&&(c.current=y.detail===u.current)}return[v,b]}function Zk(e,t,n,r){var i=m.useMemo(function(){return[new Map,[]]},[e,n.id,r]),o=ae(i,2),a=o[0],s=o[1],l=function(c){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,f=a.get(c),h=a.get(d);if(f===void 0||h===void 0)for(var p=e.length,g=s.length;g<p;g+=1){var v,b=e[g],y=t(b);a.set(y,g);var E=(v=n.get(y))!==null&&v!==void 0?v:r;if(s[g]=(s[g-1]||0)+E,y===c&&(f=g),y===d&&(h=g),f!==void 0&&h!==void 0)break}return{top:s[f-1]||0,bottom:s[h]}};return l}var Jk=function(){function e(){Dn(this,e),V(this,"maps",void 0),V(this,"id",0),V(this,"diffRecords",new Map),this.maps=Object.create(null)}return kn(e,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function tE(e){var t=parseFloat(e);return isNaN(t)?0:t}function e3(e,t,n){var r=m.useState(0),i=ae(r,2),o=i[0],a=i[1],s=C.useRef(new Map),l=C.useRef(new Jk),u=C.useRef(0);function c(){u.current+=1}function d(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;c();var p=function(){var b=!1;s.current.forEach(function(y,E){if(y&&y.offsetParent){var x=y.offsetHeight,O=getComputedStyle(y),S=O.marginTop,T=O.marginBottom,I=tE(S),N=tE(T),_=x+I+N;l.current.get(E)!==_&&(l.current.set(E,_),b=!0)}}),b&&a(function(y){return y+1})};if(h)p();else{u.current+=1;var g=u.current;Promise.resolve().then(function(){g===u.current&&p()})}}function f(h,p){var g=e(h);s.current.get(g),p?(s.current.set(g,p),d()):s.current.delete(g)}return C.useEffect(function(){return c},[]),[f,d,l.current,o]}var nE=14/15;function t3(e,t,n){var r=C.useRef(!1),i=C.useRef(0),o=C.useRef(0),a=C.useRef(null),s=C.useRef(null),l,u=function(h){if(r.current){var p=Math.ceil(h.touches[0].pageX),g=Math.ceil(h.touches[0].pageY),v=i.current-p,b=o.current-g,y=Math.abs(v)>Math.abs(b);y?i.current=p:o.current=g;var E=n(y,y?v:b,!1,h);E&&h.preventDefault(),clearInterval(s.current),E&&(s.current=setInterval(function(){y?v*=nE:b*=nE;var x=Math.floor(y?v:b);(!n(y,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},c=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",u,{passive:!1}),a.current.addEventListener("touchend",c,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",u),a.current.removeEventListener("touchend",c))},Kt(function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[e])}function rE(e){return Math.floor(Math.pow(e,.5))}function Bh(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function n3(e,t,n){m.useEffect(function(){var r=t.current;if(e&&r){var i=!1,o,a,s=function(){Xt.cancel(o)},l=function f(){s(),o=Xt(function(){n(a),f()})},u=function(h){if(!(h.target.draggable||h.button!==0)){var p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)}},c=function(){i=!1,s()},d=function(h){if(i){var p=Bh(h,!1),g=r.getBoundingClientRect(),v=g.top,b=g.bottom;if(p<=v){var y=v-p;a=-rE(y),l()}else if(p>=b){var E=p-b;a=rE(E),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[e])}var iE=10;function r3(e,t,n,r,i,o,a,s){var l=m.useRef(),u=m.useState(null),c=ae(u,2),d=c[0],f=c[1];return Kt(function(){if(d&&d.times<iE){if(!e.current){f(function(z){return U({},z)});return}o();var h=d.targetAlign,p=d.originAlign,g=d.index,v=d.offset,b=e.current.clientHeight,y=!1,E=h,x=null;if(b){for(var O=h||p,S=0,T=0,I=0,N=Math.min(t.length-1,g),_=0;_<=N;_+=1){var P=i(t[_]);T=S;var A=n.get(P);I=T+(A===void 0?r:A),S=I}for(var M=O==="top"?v:b-v,D=N;D>=0;D-=1){var R=i(t[D]),$=n.get(R);if($===void 0){y=!0;break}if(M-=$,M<=0)break}switch(O){case"top":x=T-v;break;case"bottom":x=I-b+v;break;default:{var F=e.current.scrollTop,B=F+b;T<F?E="top":I>B&&(E="bottom")}}x!==null&&a(x),x!==d.lastTop&&(y=!0)}y&&f(U(U({},d),{},{times:d.times+1,targetAlign:E,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===iE&&bt(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,e.current]),function(h){if(h==null){s();return}if(Xt.cancel(l.current),typeof h=="number")a(h);else if(h&&lt(h)==="object"){var p,g=h.align;"index"in h?p=h.index:p=t.findIndex(function(y){return i(y)===h.key});var v=h.offset,b=v===void 0?0:v;f({times:0,index:p,offset:b,originAlign:g})}}}var zh=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,o=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,u=e.horizontal,c=e.spinSize,d=e.containerSize,f=e.style,h=e.thumbStyle,p=e.showScrollBar,g=m.useState(!1),v=ae(g,2),b=v[0],y=v[1],E=m.useState(null),x=ae(E,2),O=x[0],S=x[1],T=m.useState(null),I=ae(T,2),N=I[0],_=I[1],P=!r,A=m.useRef(),M=m.useRef(),D=m.useState(p),R=ae(D,2),$=R[0],F=R[1],B=m.useRef(),z=function(){p===!0||p===!1||(clearTimeout(B.current),F(!0),B.current=setTimeout(function(){F(!1)},3e3))},L=o-d||0,H=d-c||0,W=m.useMemo(function(){if(i===0||L===0)return 0;var J=i/L;return J*H},[i,L,H]),k=function(Z){Z.stopPropagation(),Z.preventDefault()},G=m.useRef({top:W,dragging:b,pageY:O,startTop:N});G.current={top:W,dragging:b,pageY:O,startTop:N};var Y=function(Z){y(!0),S(Bh(Z,u)),_(G.current.top),a(),Z.stopPropagation(),Z.preventDefault()};m.useEffect(function(){var J=function(ee){ee.preventDefault()},Z=A.current,oe=M.current;return Z.addEventListener("touchstart",J,{passive:!1}),oe.addEventListener("touchstart",Y,{passive:!1}),function(){Z.removeEventListener("touchstart",J),oe.removeEventListener("touchstart",Y)}},[]);var te=m.useRef();te.current=L;var se=m.useRef();se.current=H,m.useEffect(function(){if(b){var J,Z=function(ee){var ne=G.current,be=ne.dragging,Ce=ne.pageY,Se=ne.startTop;Xt.cancel(J);var ve=A.current.getBoundingClientRect(),he=d/(u?ve.width:ve.height);if(be){var Ae=(Bh(ee,u)-Ce)*he,Ie=Se;!P&&u?Ie-=Ae:Ie+=Ae;var me=te.current,Me=se.current,Q=Me?Ie/Me:0,le=Math.ceil(Q*me);le=Math.max(le,0),le=Math.min(le,me),J=Xt(function(){l(le,u)})}},oe=function(){y(!1),s()};return window.addEventListener("mousemove",Z,{passive:!0}),window.addEventListener("touchmove",Z,{passive:!0}),window.addEventListener("mouseup",oe,{passive:!0}),window.addEventListener("touchend",oe,{passive:!0}),function(){window.removeEventListener("mousemove",Z),window.removeEventListener("touchmove",Z),window.removeEventListener("mouseup",oe),window.removeEventListener("touchend",oe),Xt.cancel(J)}}},[b]),m.useEffect(function(){return z(),function(){clearTimeout(B.current)}},[i]),m.useImperativeHandle(t,function(){return{delayHidden:z}});var ce="".concat(n,"-scrollbar"),ue={position:"absolute",visibility:$?null:"hidden"},de={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return u?(Object.assign(ue,{height:8,left:0,right:0,bottom:0}),Object.assign(de,V({height:"100%",width:c},P?"left":"right",W))):(Object.assign(ue,V({width:8,top:0,bottom:0},P?"right":"left",0)),Object.assign(de,{width:"100%",height:c,top:W})),m.createElement("div",{ref:A,className:ie(ce,V(V(V({},"".concat(ce,"-horizontal"),u),"".concat(ce,"-vertical"),!u),"".concat(ce,"-visible"),$)),style:U(U({},ue),f),onMouseDown:k,onMouseMove:z},m.createElement("div",{ref:M,className:ie("".concat(ce,"-thumb"),V({},"".concat(ce,"-thumb-moving"),b)),style:U(U({},de),h),onMouseDown:Y}))});process.env.NODE_ENV!=="production"&&(zh.displayName="ScrollBar");var i3=20;function oE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,i3),Math.floor(n)}var o3=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],a3=[],s3={overflowY:"auto",overflowAnchor:"none"};function l3(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,u=e.style,c=e.data,d=e.children,f=e.itemKey,h=e.virtual,p=e.direction,g=e.scrollWidth,v=e.component,b=v===void 0?"div":v,y=e.onScroll,E=e.onVirtualScroll,x=e.onVisibleChange,O=e.innerProps,S=e.extraRender,T=e.styles,I=e.showScrollBar,N=I===void 0?"optional":I,_=yt(e,o3),P=m.useCallback(function(tt){return typeof f=="function"?f(tt):tt==null?void 0:tt[f]},[f]),A=e3(P),M=ae(A,4),D=M[0],R=M[1],$=M[2],F=M[3],B=!!(h!==!1&&o&&a),z=m.useMemo(function(){return Object.values($.maps).reduce(function(tt,He){return tt+He},0)},[$.id,$.maps]),L=B&&c&&(Math.max(a*c.length,z)>o||!!g),H=p==="rtl",W=ie(r,V({},"".concat(r,"-rtl"),H),i),k=c||a3,G=C.useRef(),Y=C.useRef(),te=C.useRef(),se=C.useState(0),ce=ae(se,2),ue=ce[0],de=ce[1],J=C.useState(0),Z=ae(J,2),oe=Z[0],X=Z[1],ee=C.useState(!1),ne=ae(ee,2),be=ne[0],Ce=ne[1],Se=function(){Ce(!0)},ve=function(){Ce(!1)},he={getKey:P};function Ae(tt){de(function(He){var ke;typeof tt=="function"?ke=tt(He):ke=tt;var Oe=kt(ke);return G.current.scrollTop=Oe,Oe})}var Ie=C.useRef({start:0,end:k.length}),me=C.useRef(),Me=Gk(k,P),Q=ae(Me,1),le=Q[0];me.current=le;var pe=m.useMemo(function(){if(!B)return{scrollHeight:void 0,start:0,end:k.length-1,offset:void 0};if(!L){var tt;return{scrollHeight:((tt=Y.current)===null||tt===void 0?void 0:tt.offsetHeight)||0,start:0,end:k.length-1,offset:void 0}}for(var He=0,ke,Oe,Qe,ut=k.length,pt=0;pt<ut;pt+=1){var $t=k[pt],sn=P($t),jt=$.get(sn),rt=He+(jt===void 0?a:jt);rt>=ue&&ke===void 0&&(ke=pt,Oe=He),rt>ue+o&&Qe===void 0&&(Qe=pt),He=rt}return ke===void 0&&(ke=0,Oe=0,Qe=Math.ceil(o/a)),Qe===void 0&&(Qe=k.length-1),Qe=Math.min(Qe+1,k.length-1),{scrollHeight:He,start:ke,end:Qe,offset:Oe}},[L,B,ue,k,F,o]),ye=pe.scrollHeight,Fe=pe.start,je=pe.end,De=pe.offset;Ie.current.start=Fe,Ie.current.end=je,m.useLayoutEffect(function(){var tt=$.getRecord();if(tt.size===1){var He=Array.from(tt.keys())[0],ke=tt.get(He),Oe=k[Fe];if(Oe&&ke===void 0){var Qe=P(Oe);if(Qe===He){var ut=$.get(He),pt=ut-a;Ae(function($t){return $t+pt})}}}$.resetRecord()},[ye]);var we=m.useState({width:0,height:o}),Le=ae(we,2),Ue=Le[0],Te=Le[1],Be=function(He){Te({width:He.offsetWidth,height:He.offsetHeight})},it=C.useRef(),wt=C.useRef(),Dt=m.useMemo(function(){return oE(Ue.width,g)},[Ue.width,g]),Pt=m.useMemo(function(){return oE(Ue.height,ye)},[Ue.height,ye]),xt=ye-o,Ht=C.useRef(xt);Ht.current=xt;function kt(tt){var He=tt;return Number.isNaN(Ht.current)||(He=Math.min(He,Ht.current)),He=Math.max(He,0),He}var at=ue<=0,dt=ue>=xt,$e=oe<=0,Ve=oe>=g,Ye=eE(at,dt,$e,Ve),ot=function(){return{x:H?-oe:oe,y:ue}},Pe=C.useRef(ot()),_e=an(function(tt){if(E){var He=U(U({},ot()),tt);(Pe.current.x!==He.x||Pe.current.y!==He.y)&&(E(He),Pe.current=He)}});function xe(tt,He){var ke=tt;He?(zr.flushSync(function(){X(ke)}),_e()):Ae(ke)}function ze(tt){var He=tt.currentTarget.scrollTop;He!==ue&&Ae(He),y==null||y(tt),_e()}var qe=function(He){var ke=He,Oe=g?g-Ue.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,Oe),ke},et=an(function(tt,He){He?(zr.flushSync(function(){X(function(ke){var Oe=ke+(H?-tt:tt);return qe(Oe)})}),_e()):Ae(function(ke){var Oe=ke+tt;return Oe})}),nt=Qk(B,at,dt,$e,Ve,!!g,et),mt=ae(nt,2),vt=mt[0],ht=mt[1];t3(B,G,function(tt,He,ke,Oe){var Qe=Oe;return Ye(tt,He,ke)?!1:!Qe||!Qe._virtualHandled?(Qe&&(Qe._virtualHandled=!0),vt({preventDefault:function(){},deltaX:tt?He:0,deltaY:tt?0:He}),!0):!1}),n3(L,G,function(tt){Ae(function(He){return He+tt})}),Kt(function(){function tt(ke){var Oe=at&&ke.detail<0,Qe=dt&&ke.detail>0;B&&!Oe&&!Qe&&ke.preventDefault()}var He=G.current;return He.addEventListener("wheel",vt,{passive:!1}),He.addEventListener("DOMMouseScroll",ht,{passive:!0}),He.addEventListener("MozMousePixelScroll",tt,{passive:!1}),function(){He.removeEventListener("wheel",vt),He.removeEventListener("DOMMouseScroll",ht),He.removeEventListener("MozMousePixelScroll",tt)}},[B,at,dt]),Kt(function(){if(g){var tt=qe(oe);X(tt),_e({x:tt})}},[Ue.width,g]);var St=function(){var He,ke;(He=it.current)===null||He===void 0||He.delayHidden(),(ke=wt.current)===null||ke===void 0||ke.delayHidden()},At=r3(G,k,$,a,P,function(){return R(!0)},Ae,St);m.useImperativeHandle(t,function(){return{nativeElement:te.current,getScrollInfo:ot,scrollTo:function(He){function ke(Oe){return Oe&&lt(Oe)==="object"&&("left"in Oe||"top"in Oe)}ke(He)?(He.left!==void 0&&X(qe(He.left)),At(He.top)):At(He)}}}),Kt(function(){if(x){var tt=k.slice(Fe,je+1);x(tt,k)}},[Fe,je,k]);var Bt=Zk(k,P,$,a),en=S==null?void 0:S({start:Fe,end:je,virtual:L,offsetX:oe,offsetY:De,rtl:H,getSize:Bt}),fn=Xk(k,Fe,je,g,oe,D,d,he),Ut=null;o&&(Ut=U(V({},l?"height":"maxHeight",o),s3),B&&(Ut.overflowY="hidden",g&&(Ut.overflowX="hidden"),be&&(Ut.pointerEvents="none")));var Rt={};return H&&(Rt.dir="rtl"),m.createElement("div",Re({ref:te,style:U(U({},u),{},{position:"relative"}),className:W},Rt,_),m.createElement(pr,{onResize:Be},m.createElement(b,{className:"".concat(r,"-holder"),style:Ut,ref:G,onScroll:ze,onMouseEnter:St},m.createElement(Z1,{prefixCls:r,height:ye,offsetX:oe,offsetY:De,scrollWidth:g,onInnerResize:R,ref:Y,innerProps:O,rtl:H,extra:en},fn))),L&&ye>o&&m.createElement(zh,{ref:it,prefixCls:r,scrollOffset:ue,scrollRange:ye,rtl:H,onScroll:xe,onStartMove:Se,onStopMove:ve,spinSize:Pt,containerSize:Ue.height,style:T==null?void 0:T.verticalScrollBar,thumbStyle:T==null?void 0:T.verticalScrollBarThumb,showScrollBar:N}),L&&g>Ue.width&&m.createElement(zh,{ref:wt,prefixCls:r,scrollOffset:oe,scrollRange:g,rtl:H,onScroll:xe,onStartMove:Se,onStopMove:ve,spinSize:Dt,containerSize:Ue.width,horizontal:!0,style:T==null?void 0:T.horizontalScrollBar,thumbStyle:T==null?void 0:T.horizontalScrollBarThumb,showScrollBar:N}))}var aE=m.forwardRef(l3);aE.displayName="List";function u3(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var c3=["disabled","title","children","style","className"];function sE(e){return typeof e=="string"||typeof e=="number"}var d3=function(t,n){var r=nk(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,u=r.searchValue,c=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=m.useContext(Rh),p=h.maxCount,g=h.flattenOptions,v=h.onActiveValue,b=h.defaultActiveFirstOption,y=h.onSelect,E=h.menuItemSelectedIcon,x=h.rawValues,O=h.fieldNames,S=h.virtual,T=h.direction,I=h.listHeight,N=h.listItemHeight,_=h.optionRender,P="".concat(i,"-item"),A=ms(function(){return g},[a,g],function(J,Z){return Z[0]&&J[1]!==Z[1]}),M=m.useRef(null),D=m.useMemo(function(){return s&&Dh(p)&&(x==null?void 0:x.size)>=p},[s,p,x==null?void 0:x.size]),R=function(Z){Z.preventDefault()},$=function(Z){var oe;(oe=M.current)===null||oe===void 0||oe.scrollTo(typeof Z=="number"?{index:Z}:Z)},F=m.useCallback(function(J){return l==="combobox"?!1:x.has(J)},[l,Ke(x).toString(),x.size]),B=function(Z){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=A.length,ee=0;ee<X;ee+=1){var ne=(Z+ee*oe+X)%X,be=A[ne]||{},Ce=be.group,Se=be.data;if(!Ce&&!(Se!=null&&Se.disabled)&&(F(Se.value)||!D))return ne}return-1},z=m.useState(function(){return B(0)}),L=ae(z,2),H=L[0],W=L[1],k=function(Z){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;W(Z);var X={source:oe?"keyboard":"mouse"},ee=A[Z];if(!ee){v(null,-1,X);return}v(ee.value,Z,X)};C.useEffect(function(){k(b!==!1?B(0):-1)},[A.length,u]);var G=m.useCallback(function(J){return l==="combobox"?String(J).toLowerCase()===u.toLowerCase():x.has(J)},[l,u,Ke(x).toString(),x.size]);C.useEffect(function(){var J=setTimeout(function(){if(!s&&a&&x.size===1){var oe=Array.from(x)[0],X=A.findIndex(function(ee){var ne=ee.data;return u?String(ne.value).startsWith(u):ne.value===oe});X!==-1&&(k(X),$(X))}});if(a){var Z;(Z=M.current)===null||Z===void 0||Z.scrollTo(void 0)}return function(){return clearTimeout(J)}},[a,u]);var Y=function(Z){Z!==void 0&&y(Z,{selected:!x.has(Z)}),s||c(!1)};if(m.useImperativeHandle(n,function(){return{onKeyDown:function(Z){var oe=Z.which,X=Z.ctrlKey;switch(oe){case Xe.N:case Xe.P:case Xe.UP:case Xe.DOWN:{var ee=0;if(oe===Xe.UP?ee=-1:oe===Xe.DOWN?ee=1:u3()&&X&&(oe===Xe.N?ee=1:oe===Xe.P&&(ee=-1)),ee!==0){var ne=B(H+ee,ee);$(ne),k(ne,!0)}break}case Xe.TAB:case Xe.ENTER:{var be,Ce=A[H];Ce&&!(Ce!=null&&(be=Ce.data)!==null&&be!==void 0&&be.disabled)&&!D?Y(Ce.value):Y(void 0),a&&Z.preventDefault();break}case Xe.ESC:c(!1),a&&Z.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Z){$(Z)}}}),A.length===0)return m.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(P,"-empty"),onMouseDown:R},d);var te=Object.keys(O).map(function(J){return O[J]}),se=function(Z){return Z.label};function ce(J,Z){var oe=J.group;return{role:oe?"presentation":"option",id:"".concat(o,"_list_").concat(Z)}}var ue=function(Z){var oe=A[Z];if(!oe)return null;var X=oe.data||{},ee=X.value,ne=oe.group,be=Nr(X,!0),Ce=se(oe);return oe?m.createElement("div",Re({"aria-label":typeof Ce=="string"&&!ne?Ce:null},be,{key:Z},ce(oe,Z),{"aria-selected":G(ee)}),ee):null},de={role:"listbox",id:"".concat(o,"_list")};return m.createElement(m.Fragment,null,S&&m.createElement("div",Re({},de,{style:{height:0,width:0,overflow:"hidden"}}),ue(H-1),ue(H),ue(H+1)),m.createElement(aE,{itemKey:"key",ref:M,data:A,height:I,itemHeight:N,fullHeight:!1,onMouseDown:R,onScroll:f,virtual:S,direction:T,innerProps:S?null:de},function(J,Z){var oe=J.group,X=J.groupOption,ee=J.data,ne=J.label,be=J.value,Ce=ee.key;if(oe){var Se,ve=(Se=ee.title)!==null&&Se!==void 0?Se:sE(ne)?ne.toString():void 0;return m.createElement("div",{className:ie(P,"".concat(P,"-group"),ee.className),title:ve},ne!==void 0?ne:Ce)}var he=ee.disabled,Ae=ee.title;ee.children;var Ie=ee.style,me=ee.className,Me=yt(ee,c3),Q=_r(Me,te),le=F(be),pe=he||!le&&D,ye="".concat(P,"-option"),Fe=ie(P,ye,me,V(V(V(V({},"".concat(ye,"-grouped"),X),"".concat(ye,"-active"),H===Z&&!pe),"".concat(ye,"-disabled"),pe),"".concat(ye,"-selected"),le)),je=se(J),De=!E||typeof E=="function"||le,we=typeof je=="number"?je:je||be,Le=sE(we)?we.toString():void 0;return Ae!==void 0&&(Le=Ae),m.createElement("div",Re({},Nr(Q),S?{}:ce(J,Z),{"aria-selected":G(be),className:Fe,title:Le,onMouseMove:function(){H===Z||pe||k(Z)},onClick:function(){pe||Y(be)},style:Ie}),m.createElement("div",{className:"".concat(ye,"-content")},typeof _=="function"?_(J,{index:Z}):we),m.isValidElement(E)||le,De&&m.createElement(Zu,{className:"".concat(P,"-option-state"),customizeIcon:E,customizeIconProps:{value:be,disabled:pe,isSelected:le}},le?"✓":null))}))},lE=m.forwardRef(d3);process.env.NODE_ENV!=="production"&&(lE.displayName="OptionList");const f3=function(e,t){var n=m.useRef({values:new Map,options:new Map}),r=m.useMemo(function(){var o=n.current,a=o.values,s=o.options,l=e.map(function(d){if(d.label===void 0){var f;return U(U({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),u=new Map,c=new Map;return l.forEach(function(d){u.set(d.value,d),c.set(d.value,t.get(d.value)||s.get(d.value))}),n.current.values=u,n.current.options=c,l},[e,t]),i=m.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]};function Hh(e,t){return Mh(e).join("").toUpperCase().includes(t)}const h3=function(e,t,n,r,i){return m.useMemo(function(){if(!n||r===!1)return e;var o=t.options,a=t.label,s=t.value,l=[],u=typeof r=="function",c=n.toUpperCase(),d=u?r:function(h,p){return i?Hh(p[i],c):p[o]?Hh(p[a!=="children"?a:"label"],c):Hh(p[s],c)},f=u?function(h){return kh(h)}:function(h){return h};return e.forEach(function(h){if(h[o]){var p=d(n,f(h));if(p)l.push(h);else{var g=h[o].filter(function(v){return d(n,f(v))});g.length&&l.push(U(U({},h),{},V({},o,g)))}return}d(n,f(h))&&l.push(h)}),l},[e,r,i,n,t])};var uE=0,m3=process.env.NODE_ENV!=="test"&&Xn();function p3(){var e;return m3?(e=uE,uE+=1):e="TEST_OR_SSR",e}function g3(e){var t=m.useState(),n=ae(t,2),r=n[0],i=n[1];return m.useEffect(function(){i("rc_select_".concat(p3()))},[]),e||r}var v3=["children","value"],b3=["children"];function y3(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,a=yt(r,v3);return U({key:n,value:o!==void 0?o:n,children:i},a)}function jh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return mr(e).map(function(n,r){if(!m.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,u=yt(s,b3);return t||!o?y3(n):U(U({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},u),{},{options:jh(l)})}).filter(function(n){return n})}var E3=function(t,n,r,i,o){return m.useMemo(function(){var a=t,s=!t;s&&(a=jh(n));var l=new Map,u=new Map,c=function(h,p,g){g&&typeof g=="string"&&h.set(p[g],p)},d=function f(h){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=0;g<h.length;g+=1){var v=h[g];!v[r.options]||p?(l.set(v[r.value],v),c(u,v,r.label),c(u,v,i),c(u,v,o)):f(v[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:u}},[t,n,r,i,o])};function cE(e){var t=m.useRef();t.current=e;var n=m.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function S3(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,s=e.getInputElement,l=e.showSearch,u=e.onSearch,c=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,h=e.value,p=e.inputValue,g=e.optionLabelProp,v=tc(t),b=l!==void 0?l:v||t==="combobox",y=n||jh(r);if(bt(t!=="tags"||y.every(function(S){return!S.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),t==="tags"||t==="combobox"){var E=y.some(function(S){return S.options?S.options.some(function(T){return typeof("value"in T?T.value:T.key)=="number"}):typeof("value"in S?S.value:S.key)=="number"});bt(!E,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(bt(t!=="combobox"||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),bt(t==="combobox"||!i,"`backfill` only works with `combobox` mode."),bt(t==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),Bd(t!=="combobox"||!s||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&t!=="combobox"&&t!=="tags"&&bt(!1,"`onSearch` should work with `showSearch` instead of use alone."),Bd(!c||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),h!=null){var x=Mh(h);bt(!f||x.every(function(S){return lt(S)==="object"&&("key"in S||"value"in S)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),bt(!v||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var O=null;mr(r).some(function(S){if(!m.isValidElement(S)||!S.type)return!1;var T=S,I=T.type;if(I.isSelectOption)return!1;if(I.isSelectOptGroup){var N=mr(S.props.children).every(function(_){return!m.isValidElement(_)||!S.type||_.type.isSelectOption?!0:(O=_.type,!1)});return!N}return O=I,!0}),O&&bt(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(O.displayName||O.name||O,"`.")),bt(p===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function C3(e,t){if(e){var n=function r(i){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<i.length;a++){var s=i[a];if(s[t==null?void 0:t.value]===null)return bt(!1,"`value` in Select options should not be `null`."),!0;if(!o&&Array.isArray(s[t==null?void 0:t.options])&&r(s[t==null?void 0:t.options],!0))break}};n(e)}}var w3=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],x3=["inputValue"];function T3(e){return!e||lt(e)!=="object"}var dE=m.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,a=e.backfill,s=e.fieldNames,l=e.inputValue,u=e.searchValue,c=e.onSearch,d=e.autoClearSearchValue,f=d===void 0?!0:d,h=e.onSelect,p=e.onDeselect,g=e.dropdownMatchSelectWidth,v=g===void 0?!0:g,b=e.filterOption,y=e.filterSort,E=e.optionFilterProp,x=e.optionLabelProp,O=e.options,S=e.optionRender,T=e.children,I=e.defaultActiveFirstOption,N=e.menuItemSelectedIcon,_=e.virtual,P=e.direction,A=e.listHeight,M=A===void 0?200:A,D=e.listItemHeight,R=D===void 0?20:D,$=e.labelRender,F=e.value,B=e.defaultValue,z=e.labelInValue,L=e.onChange,H=e.maxCount,W=yt(e,w3),k=g3(n),G=tc(r),Y=!!(!O&&T),te=m.useMemo(function(){return b===void 0&&r==="combobox"?!1:b},[b,r]),se=m.useMemo(function(){return G1(s,Y)},[JSON.stringify(s),Y]),ce=Cn("",{value:u!==void 0?u:l,postState:function(xe){return xe||""}}),ue=ae(ce,2),de=ue[0],J=ue[1],Z=E3(O,T,se,E,x),oe=Z.valueOptions,X=Z.labelOptions,ee=Z.options,ne=m.useCallback(function(_e){var xe=Mh(_e);return xe.map(function(ze){var qe,et,nt,mt,vt;if(T3(ze))qe=ze;else{var ht;nt=ze.key,et=ze.label,qe=(ht=ze.value)!==null&&ht!==void 0?ht:nt}var St=oe.get(qe);if(St){var At;if(et===void 0&&(et=St==null?void 0:St[x||se.label]),nt===void 0&&(nt=(At=St==null?void 0:St.key)!==null&&At!==void 0?At:qe),mt=St==null?void 0:St.disabled,vt=St==null?void 0:St.title,process.env.NODE_ENV!=="production"&&!x){var Bt=St==null?void 0:St[se.label];Bt!==void 0&&!m.isValidElement(Bt)&&!m.isValidElement(et)&&Bt!==et&&bt(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:et,value:qe,key:nt,disabled:mt,title:vt}})},[se,x,oe]),be=Cn(B,{value:F}),Ce=ae(be,2),Se=Ce[0],ve=Ce[1],he=m.useMemo(function(){var _e,xe=G&&Se===null?[]:Se,ze=ne(xe);return r==="combobox"&&wk((_e=ze[0])===null||_e===void 0?void 0:_e.value)?[]:ze},[Se,ne,r,G]),Ae=f3(he,oe),Ie=ae(Ae,2),me=Ie[0],Me=Ie[1],Q=m.useMemo(function(){if(!r&&me.length===1){var _e=me[0];if(_e.value===null&&(_e.label===null||_e.label===void 0))return[]}return me.map(function(xe){var ze;return U(U({},xe),{},{label:(ze=typeof $=="function"?$(xe):xe.label)!==null&&ze!==void 0?ze:xe.value})})},[r,me,$]),le=m.useMemo(function(){return new Set(me.map(function(_e){return _e.value}))},[me]);m.useEffect(function(){if(r==="combobox"){var _e,xe=(_e=me[0])===null||_e===void 0?void 0:_e.value;J(Ck(xe)?String(xe):"")}},[me]);var pe=cE(function(_e,xe){var ze=xe??_e;return V(V({},se.value,_e),se.label,ze)}),ye=m.useMemo(function(){if(r!=="tags")return ee;var _e=Ke(ee),xe=function(qe){return oe.has(qe)};return Ke(me).sort(function(ze,qe){return ze.value<qe.value?-1:1}).forEach(function(ze){var qe=ze.value;xe(qe)||_e.push(pe(qe,ze.label))}),_e},[pe,ee,oe,me,r]),Fe=h3(ye,se,de,te,E),je=m.useMemo(function(){return r!=="tags"||!de||Fe.some(function(_e){return _e[E||"value"]===de})||Fe.some(function(_e){return _e[se.value]===de})?Fe:[pe(de)].concat(Ke(Fe))},[pe,E,r,Fe,de,se]),De=function _e(xe){var ze=Ke(xe).sort(function(qe,et){return y(qe,et,{searchValue:de})});return ze.map(function(qe){return Array.isArray(qe.options)?U(U({},qe),{},{options:qe.options.length>0?_e(qe.options):qe.options}):qe})},we=m.useMemo(function(){return y?De(je):je},[je,y,de]),Le=m.useMemo(function(){return jk(we,{fieldNames:se,childrenAsData:Y})},[we,se,Y]),Ue=function(xe){var ze=ne(xe);if(ve(ze),L&&(ze.length!==me.length||ze.some(function(nt,mt){var vt;return((vt=me[mt])===null||vt===void 0?void 0:vt.value)!==(nt==null?void 0:nt.value)}))){var qe=z?ze:ze.map(function(nt){return nt.value}),et=ze.map(function(nt){return kh(Me(nt.value))});L(G?qe:qe[0],G?et:et[0])}},Te=m.useState(null),Be=ae(Te,2),it=Be[0],wt=Be[1],Dt=m.useState(0),Pt=ae(Dt,2),xt=Pt[0],Ht=Pt[1],kt=I!==void 0?I:r!=="combobox",at=m.useCallback(function(_e,xe){var ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},qe=ze.source,et=qe===void 0?"keyboard":qe;Ht(xe),a&&r==="combobox"&&_e!==null&&et==="keyboard"&&wt(String(_e))},[a,r]),dt=function(xe,ze,qe){var et=function(){var Ut,Rt=Me(xe);return[z?{label:Rt==null?void 0:Rt[se.label],value:xe,key:(Ut=Rt==null?void 0:Rt.key)!==null&&Ut!==void 0?Ut:xe}:xe,kh(Rt)]};if(ze&&h){var nt=et(),mt=ae(nt,2),vt=mt[0],ht=mt[1];h(vt,ht)}else if(!ze&&p&&qe!=="clear"){var St=et(),At=ae(St,2),Bt=At[0],en=At[1];p(Bt,en)}},$e=cE(function(_e,xe){var ze,qe=G?xe.selected:!0;qe?ze=G?[].concat(Ke(me),[_e]):[_e]:ze=me.filter(function(et){return et.value!==_e}),Ue(ze),dt(_e,qe),r==="combobox"?wt(""):(!tc||f)&&(J(""),wt(""))}),Ve=function(xe,ze){Ue(xe);var qe=ze.type,et=ze.values;(qe==="remove"||qe==="clear")&&et.forEach(function(nt){dt(nt.value,!1,qe)})},Ye=function(xe,ze){if(J(xe),wt(null),ze.source==="submit"){var qe=(xe||"").trim();if(qe){var et=Array.from(new Set([].concat(Ke(le),[qe])));Ue(et),dt(qe,!0),J("")}return}ze.source!=="blur"&&(r==="combobox"&&Ue(xe),c==null||c(xe))},ot=function(xe){var ze=xe;r!=="tags"&&(ze=xe.map(function(et){var nt=X.get(et);return nt==null?void 0:nt.value}).filter(function(et){return et!==void 0}));var qe=Array.from(new Set([].concat(Ke(le),Ke(ze))));Ue(qe),qe.forEach(function(et){dt(et,!0)})},Pe=m.useMemo(function(){var _e=_!==!1&&v!==!1;return U(U({},Z),{},{flattenOptions:Le,onActiveValue:at,defaultActiveFirstOption:kt,onSelect:$e,menuItemSelectedIcon:N,rawValues:le,fieldNames:se,virtual:_e,direction:P,listHeight:M,listItemHeight:R,childrenAsData:Y,maxCount:H,optionRender:S})},[H,Z,Le,at,kt,$e,N,le,se,_,v,P,M,R,Y,S]);return process.env.NODE_ENV!=="production"&&(S3(e),C3(ee,se)),m.createElement(Rh.Provider,{value:Pe},m.createElement(Q1,Re({},W,{id:k,prefixCls:o,ref:t,omitDomProps:x3,mode:r,displayValues:Q,onDisplayValuesChange:Ve,direction:P,searchValue:de,onSearch:Ye,autoClearSearchValue:f,onSearchSplit:ot,dropdownMatchSelectWidth:v,OptionList:lE,emptyOptions:!Le.length,activeValue:it,activeDescendantId:"".concat(k,"_list_").concat(xt)})))});process.env.NODE_ENV!=="production"&&(dE.displayName="Select");var Vh=dE;Vh.Option=Fh,Vh.OptGroup=$h;function nc(e,t,n){return ie({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Uh=(e,t)=>t||e,fE=()=>{const[,e]=gr(),[t]=Vi("Empty"),r=new cn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return m.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},m.createElement("title",null,(t==null?void 0:t.description)||"Empty"),m.createElement("g",{fill:"none",fillRule:"evenodd"},m.createElement("g",{transform:"translate(24 31.67)"},m.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),m.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),m.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),m.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),m.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),m.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),m.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},m.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),m.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(fE.displayName="EmptyImage");const hE=()=>{const[,e]=gr(),[t]=Vi("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:s,contentColor:l}=C.useMemo(()=>({borderColor:new cn(n).onBackground(o).toHexString(),shadowColor:new cn(r).onBackground(o).toHexString(),contentColor:new cn(i).onBackground(o).toHexString()}),[n,r,i,o]);return m.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},m.createElement("title",null,(t==null?void 0:t.description)||"Empty"),m.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},m.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),m.createElement("g",{fillRule:"nonzero",stroke:a},m.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))};process.env.NODE_ENV!=="production"&&(hE.displayName="SimpleImage");const O3=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},N3=wn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,i=rn(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[O3(i)]});var _3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mE=m.createElement(fE,null),pE=m.createElement(hE,null),fo=e=>{const{className:t,rootClassName:n,prefixCls:r,image:i=mE,description:o,children:a,imageStyle:s,style:l,classNames:u,styles:c}=e,d=_3(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:h,className:p,style:g,classNames:v,styles:b}=Gn("empty"),y=f("empty",r),[E,x,O]=N3(y),[S]=Vi("Empty"),T=typeof o<"u"?o:S==null?void 0:S.description,I=typeof T=="string"?T:"empty";let N=null;if(typeof i=="string"?N=m.createElement("img",{alt:I,src:i}):N=i,process.env.NODE_ENV!=="production"){const _=on("Empty");[["imageStyle","styles: { image: {} }"]].forEach(([P,A])=>{_.deprecated(!(P in e),P,A)})}return E(m.createElement("div",Object.assign({className:ie(x,O,y,p,{[`${y}-normal`]:i===pE,[`${y}-rtl`]:h==="rtl"},t,n,v.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),g),c==null?void 0:c.root),l)},d),m.createElement("div",{className:ie(`${y}-image`,v.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},s),b.image),c==null?void 0:c.image)},N),T&&m.createElement("div",{className:ie(`${y}-description`,v.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},b.description),c==null?void 0:c.description)},T),a&&m.createElement("div",{className:ie(`${y}-footer`,v.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},b.footer),c==null?void 0:c.footer)},a)))};fo.PRESENTED_IMAGE_DEFAULT=mE,fo.PRESENTED_IMAGE_SIMPLE=pE,process.env.NODE_ENV!=="production"&&(fo.displayName="Empty");const I3=e=>{const{componentName:t}=e,{getPrefixCls:n}=C.useContext(Qt),r=n("empty");switch(t){case"Table":case"List":return C.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return C.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return C.createElement(fo,null)}},Wh=(e,t,n=void 0)=>{var r,i;const{variant:o,[e]:a}=m.useContext(Qt),s=m.useContext(a4),l=a==null?void 0:a.variant;let u;typeof t<"u"?u=t:n===!1?u="borderless":u=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const c=rP.includes(u);return[u,c]},A3=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function P3(e,t){return e||A3(t)}const gE=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},M3=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
178
+ `].includes(zt)})},[R]),ze=m.useContext(Rh)||{},qe=ze.maxCount,et=ze.rawValues,nt=function(st,xt,Mt){if(!(Se&&Dh(qe)&&(et==null?void 0:et.size)>=qe)){var qt=!0,Zt=st;N==null||N(null);var Jn=Vk(st,R,Dh(qe)?qe-et.size:void 0),er=Mt?null:Jn;return v!=="combobox"&&er&&(Zt="",D==null||D(er),_e(!1),qt=!1),M&&Be!==Zt&&M(Zt,{source:xt?"typing":"effect"}),qt}},mt=function(st){!st||!st.trim()||M(st,{source:"submit"})};m.useEffect(function(){!Ye&&!Se&&v!=="combobox"&&nt("",!1,!1)},[Ye]),m.useEffect(function(){$e&&b&&Ve(!1),b&&!je.current&&Ue(!1)},[b]);var vt=A1(),ht=ae(vt,2),St=ht[0],At=ht[1],Bt=m.useRef(!1),en=function(st){var xt=St(),Mt=st.key,qt=Mt==="Enter";if(qt&&(v!=="combobox"&&st.preventDefault(),Ye||_e(!0)),At(!!Be),Mt==="Backspace"&&!xt&&Se&&!Be&&c.length){for(var Zt=Ke(c),Jn=null,er=Zt.length-1;er>=0;er-=1){var Cr=Zt[er];if(!Cr.disabled){Zt.splice(er,1),Jn=Cr;break}}Jn&&d(Zt,{type:"remove",values:[Jn]})}for(var Br=arguments.length,wr=new Array(Br>1?Br-1:0),xr=1;xr<Br;xr++)wr[xr-1]=arguments[xr];if(Ye&&(!qt||!Bt.current)){var Yn;qt&&(Bt.current=!0),(Yn=Fe.current)===null||Yn===void 0||Yn.onKeyDown.apply(Yn,[st].concat(wr))}ne==null||ne.apply(void 0,[st].concat(wr))},fn=function(st){for(var xt=arguments.length,Mt=new Array(xt>1?xt-1:0),qt=1;qt<xt;qt++)Mt[qt-1]=arguments[qt];if(Ye){var Zt;(Zt=Fe.current)===null||Zt===void 0||Zt.onKeyUp.apply(Zt,[st].concat(Mt))}st.key==="Enter"&&(Bt.current=!1),ee==null||ee.apply(void 0,[st].concat(Mt))},Ut=function(st){var xt=c.filter(function(Mt){return Mt!==st});d(xt,{type:"remove",values:[st]})},Rt=function(){Bt.current=!1},tt=m.useRef(!1),He=function(){Ue(!0),b||(oe&&!tt.current&&oe.apply(void 0,arguments),Z.includes("focus")&&_e(!0)),tt.current=!0},ke=function(){je.current=!0,Ue(!1,function(){tt.current=!1,je.current=!1,_e(!1)}),!b&&(Be&&(v==="tags"?M(Be,{source:"submit"}):v==="multiple"&&M("",{source:"blur"})),X&&X.apply(void 0,arguments))},Oe=[];m.useEffect(function(){return function(){Oe.forEach(function(zt){return clearTimeout(zt)}),Oe.splice(0,Oe.length)}},[]);var Qe=function(st){var xt,Mt=st.target,qt=(xt=pe.current)===null||xt===void 0?void 0:xt.getPopupElement();if(qt&&qt.contains(Mt)){var Zt=setTimeout(function(){var Br=Oe.indexOf(Zt);if(Br!==-1&&Oe.splice(Br,1),Te(),!me&&!qt.contains(document.activeElement)){var wr;(wr=ye.current)===null||wr===void 0||wr.focus()}});Oe.push(Zt)}for(var Jn=arguments.length,er=new Array(Jn>1?Jn-1:0),Cr=1;Cr<Jn;Cr++)er[Cr-1]=arguments[Cr];be==null||be.apply(void 0,[st].concat(er))},ut=m.useState({}),pt=ae(ut,2),$t=pt[1];function sn(){$t({})}var jt;Ct&&(jt=function(st){_e(st)}),ik(function(){var zt;return[Q.current,(zt=pe.current)===null||zt===void 0?void 0:zt.getPopupElement()]},Pe,_e,!!Ct);var rt=m.useMemo(function(){return U(U({},e),{},{notFoundContent:p,open:Ye,triggerOpen:Pe,id:r,showSearch:ve,multiple:Se,toggleOpen:_e})},[e,p,Pe,Ye,r,ve,Se,_e]),gt=!!B||y,_t;gt&&(_t=m.createElement(Zu,{className:ie("".concat(i,"-arrow"),V({},"".concat(i,"-arrow-loading"),y)),customizeIcon:B,customizeIconProps:{loading:y,searchValue:Be,open:Ye,focused:Le,showSearch:ve}}));var hn=function(){var st;g==null||g(),(st=ye.current)===null||st===void 0||st.focus(),d([],{type:"clear",values:c}),nt("",!1,!1)},_n=tk(i,hn,c,$,z,b,Be,v),Un=_n.allowClear,Fr=_n.clearIcon,Zr=m.createElement(L,{ref:Fe}),Jr=ie(i,o,V(V(V(V(V(V(V(V(V(V({},"".concat(i,"-focused"),Le),"".concat(i,"-multiple"),Se),"".concat(i,"-single"),!Se),"".concat(i,"-allow-clear"),$),"".concat(i,"-show-arrow"),gt),"".concat(i,"-disabled"),b),"".concat(i,"-loading"),y),"".concat(i,"-open"),Ye),"".concat(i,"-customize-input"),it),"".concat(i,"-show-search"),ve)),Ri=m.createElement(X1,{ref:pe,disabled:b,prefixCls:i,visible:Pe,popupElement:Zr,animation:H,transitionName:W,dropdownStyle:k,dropdownClassName:G,direction:l,dropdownMatchSelectWidth:Y,dropdownRender:te,dropdownAlign:se,placement:ce,builtinPlacements:ue,getPopupContainer:de,empty:f,getTriggerDOMNode:function(st){return le.current||st},onPopupVisibleChange:jt,onPopupMouseEnter:sn},Ct?m.cloneElement(Ct,{ref:Dt}):m.createElement($1,Re({},e,{domRef:le,prefixCls:i,inputElement:it,ref:ye,id:r,prefix:F,showSearch:ve,autoClearSearchValue:A,mode:v,activeDescendantId:_,tagRender:s,values:c,open:Ye,onToggleOpen:_e,activeValue:I,searchValue:Be,onSearch:nt,onSearchSubmit:mt,onRemove:Ut,tokenWithEnter:xe,onInputBlur:Rt}))),eo;return Ct?eo=Ri:eo=m.createElement("div",Re({className:Jr},he,{ref:Q,onMouseDown:Qe,onKeyDown:en,onKeyUp:fn,onFocus:He,onBlur:ke}),m.createElement(Uk,{visible:Le&&!Ye,values:c}),Ri,_t,Un&&Fr),m.createElement(I1.Provider,{value:rt},eo)});process.env.NODE_ENV!=="production"&&(Q1.displayName="BaseSelect");var $h=function(){return null};$h.isSelectOptGroup=!0;var Fh=function(){return null};Fh.isSelectOption=!0;var Z1=m.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,o=e.children,a=e.prefixCls,s=e.onInnerResize,l=e.innerProps,u=e.rtl,c=e.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=U(U({},f),{},V(V(V(V(V({transform:"translateY(".concat(r,"px)")},u?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),m.createElement("div",{style:d},m.createElement(pr,{onResize:function(p){var g=p.offsetHeight;g&&s&&s()}},m.createElement("div",Re({style:f,className:ie(V({},"".concat(a,"-holder-inner"),a)),ref:t},l),o,c)))});Z1.displayName="Filler";function qk(e){var t=e.children,n=e.setRef,r=m.useCallback(function(i){n(i)},[]);return m.cloneElement(t,{ref:r})}function Xk(e,t,n,r,i,o,a,s){var l=s.getKey;return e.slice(t,n+1).map(function(u,c){var d=t+c,f=a(u,d,{style:{width:r},offsetX:i}),h=l(u);return m.createElement(qk,{key:h,setRef:function(g){return o(u,g)}},f)})}function Kk(e,t,n){var r=e.length,i=t.length,o,a;if(r===0&&i===0)return null;r<i?(o=e,a=t):(o=t,a=e);var s={__EMPTY_ITEM__:!0};function l(p){return p!==void 0?n(p):s}for(var u=null,c=Math.abs(r-i)!==1,d=0;d<a.length;d+=1){var f=l(o[d]),h=l(a[d]);if(f!==h){u=d,c=c||f!==l(a[d+1]);break}}return u===null?null:{index:u,multiple:c}}function Gk(e,t,n){var r=m.useState(e),i=ae(r,2),o=i[0],a=i[1],s=m.useState(null),l=ae(s,2),u=l[0],c=l[1];return m.useEffect(function(){var d=Kk(o||[],e||[],t);(d==null?void 0:d.index)!==void 0&&c(e[d.index]),a(e)},[e]),[u]}var J1=(typeof navigator>"u"?"undefined":lt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const eE=function(e,t,n,r){var i=C.useRef(!1),o=C.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=C.useRef({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,function(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?u<0&&s.current.left||u>0&&s.current.right:u<0&&s.current.top||u>0&&s.current.bottom;return c&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function Qk(e,t,n,r,i,o,a){var s=C.useRef(0),l=C.useRef(null),u=C.useRef(null),c=C.useRef(!1),d=eE(t,n,r,i);function f(y,E){if(Xt.cancel(l.current),!d(!1,E)){var x=y;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=E,u.current=E,J1||x.preventDefault(),l.current=Xt(function(){var O=c.current?10:1;a(s.current*O,!1),s.current=0})}}function h(y,E){a(E,!0),J1||y.preventDefault()}var p=C.useRef(null),g=C.useRef(null);function v(y){if(e){Xt.cancel(g.current),g.current=Xt(function(){p.current=null},2);var E=y.deltaX,x=y.deltaY,O=y.shiftKey,S=E,T=x;(p.current==="sx"||!p.current&&O&&x&&!E)&&(S=x,T=0,p.current="sx");var I=Math.abs(S),N=Math.abs(T);p.current===null&&(p.current=o&&I>N?"x":"y"),p.current==="y"?f(y,T):h(y,S)}}function b(y){e&&(c.current=y.detail===u.current)}return[v,b]}function Zk(e,t,n,r){var i=m.useMemo(function(){return[new Map,[]]},[e,n.id,r]),o=ae(i,2),a=o[0],s=o[1],l=function(c){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,f=a.get(c),h=a.get(d);if(f===void 0||h===void 0)for(var p=e.length,g=s.length;g<p;g+=1){var v,b=e[g],y=t(b);a.set(y,g);var E=(v=n.get(y))!==null&&v!==void 0?v:r;if(s[g]=(s[g-1]||0)+E,y===c&&(f=g),y===d&&(h=g),f!==void 0&&h!==void 0)break}return{top:s[f-1]||0,bottom:s[h]}};return l}var Jk=function(){function e(){Dn(this,e),V(this,"maps",void 0),V(this,"id",0),V(this,"diffRecords",new Map),this.maps=Object.create(null)}return kn(e,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function tE(e){var t=parseFloat(e);return isNaN(t)?0:t}function e3(e,t,n){var r=m.useState(0),i=ae(r,2),o=i[0],a=i[1],s=C.useRef(new Map),l=C.useRef(new Jk),u=C.useRef(0);function c(){u.current+=1}function d(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;c();var p=function(){var b=!1;s.current.forEach(function(y,E){if(y&&y.offsetParent){var x=y.offsetHeight,O=getComputedStyle(y),S=O.marginTop,T=O.marginBottom,I=tE(S),N=tE(T),_=x+I+N;l.current.get(E)!==_&&(l.current.set(E,_),b=!0)}}),b&&a(function(y){return y+1})};if(h)p();else{u.current+=1;var g=u.current;Promise.resolve().then(function(){g===u.current&&p()})}}function f(h,p){var g=e(h);s.current.get(g),p?(s.current.set(g,p),d()):s.current.delete(g)}return C.useEffect(function(){return c},[]),[f,d,l.current,o]}var nE=14/15;function t3(e,t,n){var r=C.useRef(!1),i=C.useRef(0),o=C.useRef(0),a=C.useRef(null),s=C.useRef(null),l,u=function(h){if(r.current){var p=Math.ceil(h.touches[0].pageX),g=Math.ceil(h.touches[0].pageY),v=i.current-p,b=o.current-g,y=Math.abs(v)>Math.abs(b);y?i.current=p:o.current=g;var E=n(y,y?v:b,!1,h);E&&h.preventDefault(),clearInterval(s.current),E&&(s.current=setInterval(function(){y?v*=nE:b*=nE;var x=Math.floor(y?v:b);(!n(y,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},c=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",u,{passive:!1}),a.current.addEventListener("touchend",c,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",u),a.current.removeEventListener("touchend",c))},Kt(function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[e])}function rE(e){return Math.floor(Math.pow(e,.5))}function Bh(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function n3(e,t,n){m.useEffect(function(){var r=t.current;if(e&&r){var i=!1,o,a,s=function(){Xt.cancel(o)},l=function f(){s(),o=Xt(function(){n(a),f()})},u=function(h){if(!(h.target.draggable||h.button!==0)){var p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)}},c=function(){i=!1,s()},d=function(h){if(i){var p=Bh(h,!1),g=r.getBoundingClientRect(),v=g.top,b=g.bottom;if(p<=v){var y=v-p;a=-rE(y),l()}else if(p>=b){var E=p-b;a=rE(E),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[e])}var iE=10;function r3(e,t,n,r,i,o,a,s){var l=m.useRef(),u=m.useState(null),c=ae(u,2),d=c[0],f=c[1];return Kt(function(){if(d&&d.times<iE){if(!e.current){f(function(z){return U({},z)});return}o();var h=d.targetAlign,p=d.originAlign,g=d.index,v=d.offset,b=e.current.clientHeight,y=!1,E=h,x=null;if(b){for(var O=h||p,S=0,T=0,I=0,N=Math.min(t.length-1,g),_=0;_<=N;_+=1){var P=i(t[_]);T=S;var A=n.get(P);I=T+(A===void 0?r:A),S=I}for(var M=O==="top"?v:b-v,D=N;D>=0;D-=1){var R=i(t[D]),$=n.get(R);if($===void 0){y=!0;break}if(M-=$,M<=0)break}switch(O){case"top":x=T-v;break;case"bottom":x=I-b+v;break;default:{var F=e.current.scrollTop,B=F+b;T<F?E="top":I>B&&(E="bottom")}}x!==null&&a(x),x!==d.lastTop&&(y=!0)}y&&f(U(U({},d),{},{times:d.times+1,targetAlign:E,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===iE&&bt(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,e.current]),function(h){if(h==null){s();return}if(Xt.cancel(l.current),typeof h=="number")a(h);else if(h&&lt(h)==="object"){var p,g=h.align;"index"in h?p=h.index:p=t.findIndex(function(y){return i(y)===h.key});var v=h.offset,b=v===void 0?0:v;f({times:0,index:p,offset:b,originAlign:g})}}}var zh=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,o=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,u=e.horizontal,c=e.spinSize,d=e.containerSize,f=e.style,h=e.thumbStyle,p=e.showScrollBar,g=m.useState(!1),v=ae(g,2),b=v[0],y=v[1],E=m.useState(null),x=ae(E,2),O=x[0],S=x[1],T=m.useState(null),I=ae(T,2),N=I[0],_=I[1],P=!r,A=m.useRef(),M=m.useRef(),D=m.useState(p),R=ae(D,2),$=R[0],F=R[1],B=m.useRef(),z=function(){p===!0||p===!1||(clearTimeout(B.current),F(!0),B.current=setTimeout(function(){F(!1)},3e3))},L=o-d||0,H=d-c||0,W=m.useMemo(function(){if(i===0||L===0)return 0;var J=i/L;return J*H},[i,L,H]),k=function(Z){Z.stopPropagation(),Z.preventDefault()},G=m.useRef({top:W,dragging:b,pageY:O,startTop:N});G.current={top:W,dragging:b,pageY:O,startTop:N};var Y=function(Z){y(!0),S(Bh(Z,u)),_(G.current.top),a(),Z.stopPropagation(),Z.preventDefault()};m.useEffect(function(){var J=function(ee){ee.preventDefault()},Z=A.current,oe=M.current;return Z.addEventListener("touchstart",J,{passive:!1}),oe.addEventListener("touchstart",Y,{passive:!1}),function(){Z.removeEventListener("touchstart",J),oe.removeEventListener("touchstart",Y)}},[]);var te=m.useRef();te.current=L;var se=m.useRef();se.current=H,m.useEffect(function(){if(b){var J,Z=function(ee){var ne=G.current,be=ne.dragging,Ce=ne.pageY,Se=ne.startTop;Xt.cancel(J);var ve=A.current.getBoundingClientRect(),he=d/(u?ve.width:ve.height);if(be){var Ae=(Bh(ee,u)-Ce)*he,Ie=Se;!P&&u?Ie-=Ae:Ie+=Ae;var me=te.current,Me=se.current,Q=Me?Ie/Me:0,le=Math.ceil(Q*me);le=Math.max(le,0),le=Math.min(le,me),J=Xt(function(){l(le,u)})}},oe=function(){y(!1),s()};return window.addEventListener("mousemove",Z,{passive:!0}),window.addEventListener("touchmove",Z,{passive:!0}),window.addEventListener("mouseup",oe,{passive:!0}),window.addEventListener("touchend",oe,{passive:!0}),function(){window.removeEventListener("mousemove",Z),window.removeEventListener("touchmove",Z),window.removeEventListener("mouseup",oe),window.removeEventListener("touchend",oe),Xt.cancel(J)}}},[b]),m.useEffect(function(){return z(),function(){clearTimeout(B.current)}},[i]),m.useImperativeHandle(t,function(){return{delayHidden:z}});var ce="".concat(n,"-scrollbar"),ue={position:"absolute",visibility:$?null:"hidden"},de={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return u?(Object.assign(ue,{height:8,left:0,right:0,bottom:0}),Object.assign(de,V({height:"100%",width:c},P?"left":"right",W))):(Object.assign(ue,V({width:8,top:0,bottom:0},P?"right":"left",0)),Object.assign(de,{width:"100%",height:c,top:W})),m.createElement("div",{ref:A,className:ie(ce,V(V(V({},"".concat(ce,"-horizontal"),u),"".concat(ce,"-vertical"),!u),"".concat(ce,"-visible"),$)),style:U(U({},ue),f),onMouseDown:k,onMouseMove:z},m.createElement("div",{ref:M,className:ie("".concat(ce,"-thumb"),V({},"".concat(ce,"-thumb-moving"),b)),style:U(U({},de),h),onMouseDown:Y}))});process.env.NODE_ENV!=="production"&&(zh.displayName="ScrollBar");var i3=20;function oE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,i3),Math.floor(n)}var o3=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],a3=[],s3={overflowY:"auto",overflowAnchor:"none"};function l3(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,u=e.style,c=e.data,d=e.children,f=e.itemKey,h=e.virtual,p=e.direction,g=e.scrollWidth,v=e.component,b=v===void 0?"div":v,y=e.onScroll,E=e.onVirtualScroll,x=e.onVisibleChange,O=e.innerProps,S=e.extraRender,T=e.styles,I=e.showScrollBar,N=I===void 0?"optional":I,_=yt(e,o3),P=m.useCallback(function(tt){return typeof f=="function"?f(tt):tt==null?void 0:tt[f]},[f]),A=e3(P),M=ae(A,4),D=M[0],R=M[1],$=M[2],F=M[3],B=!!(h!==!1&&o&&a),z=m.useMemo(function(){return Object.values($.maps).reduce(function(tt,He){return tt+He},0)},[$.id,$.maps]),L=B&&c&&(Math.max(a*c.length,z)>o||!!g),H=p==="rtl",W=ie(r,V({},"".concat(r,"-rtl"),H),i),k=c||a3,G=C.useRef(),Y=C.useRef(),te=C.useRef(),se=C.useState(0),ce=ae(se,2),ue=ce[0],de=ce[1],J=C.useState(0),Z=ae(J,2),oe=Z[0],X=Z[1],ee=C.useState(!1),ne=ae(ee,2),be=ne[0],Ce=ne[1],Se=function(){Ce(!0)},ve=function(){Ce(!1)},he={getKey:P};function Ae(tt){de(function(He){var ke;typeof tt=="function"?ke=tt(He):ke=tt;var Oe=kt(ke);return G.current.scrollTop=Oe,Oe})}var Ie=C.useRef({start:0,end:k.length}),me=C.useRef(),Me=Gk(k,P),Q=ae(Me,1),le=Q[0];me.current=le;var pe=m.useMemo(function(){if(!B)return{scrollHeight:void 0,start:0,end:k.length-1,offset:void 0};if(!L){var tt;return{scrollHeight:((tt=Y.current)===null||tt===void 0?void 0:tt.offsetHeight)||0,start:0,end:k.length-1,offset:void 0}}for(var He=0,ke,Oe,Qe,ut=k.length,pt=0;pt<ut;pt+=1){var $t=k[pt],sn=P($t),jt=$.get(sn),rt=He+(jt===void 0?a:jt);rt>=ue&&ke===void 0&&(ke=pt,Oe=He),rt>ue+o&&Qe===void 0&&(Qe=pt),He=rt}return ke===void 0&&(ke=0,Oe=0,Qe=Math.ceil(o/a)),Qe===void 0&&(Qe=k.length-1),Qe=Math.min(Qe+1,k.length-1),{scrollHeight:He,start:ke,end:Qe,offset:Oe}},[L,B,ue,k,F,o]),ye=pe.scrollHeight,Fe=pe.start,je=pe.end,De=pe.offset;Ie.current.start=Fe,Ie.current.end=je,m.useLayoutEffect(function(){var tt=$.getRecord();if(tt.size===1){var He=Array.from(tt.keys())[0],ke=tt.get(He),Oe=k[Fe];if(Oe&&ke===void 0){var Qe=P(Oe);if(Qe===He){var ut=$.get(He),pt=ut-a;Ae(function($t){return $t+pt})}}}$.resetRecord()},[ye]);var we=m.useState({width:0,height:o}),Le=ae(we,2),Ue=Le[0],Te=Le[1],Be=function(He){Te({width:He.offsetWidth,height:He.offsetHeight})},it=C.useRef(),Ct=C.useRef(),Dt=m.useMemo(function(){return oE(Ue.width,g)},[Ue.width,g]),Pt=m.useMemo(function(){return oE(Ue.height,ye)},[Ue.height,ye]),wt=ye-o,Ht=C.useRef(wt);Ht.current=wt;function kt(tt){var He=tt;return Number.isNaN(Ht.current)||(He=Math.min(He,Ht.current)),He=Math.max(He,0),He}var at=ue<=0,dt=ue>=wt,$e=oe<=0,Ve=oe>=g,Ye=eE(at,dt,$e,Ve),ot=function(){return{x:H?-oe:oe,y:ue}},Pe=C.useRef(ot()),_e=an(function(tt){if(E){var He=U(U({},ot()),tt);(Pe.current.x!==He.x||Pe.current.y!==He.y)&&(E(He),Pe.current=He)}});function xe(tt,He){var ke=tt;He?(zr.flushSync(function(){X(ke)}),_e()):Ae(ke)}function ze(tt){var He=tt.currentTarget.scrollTop;He!==ue&&Ae(He),y==null||y(tt),_e()}var qe=function(He){var ke=He,Oe=g?g-Ue.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,Oe),ke},et=an(function(tt,He){He?(zr.flushSync(function(){X(function(ke){var Oe=ke+(H?-tt:tt);return qe(Oe)})}),_e()):Ae(function(ke){var Oe=ke+tt;return Oe})}),nt=Qk(B,at,dt,$e,Ve,!!g,et),mt=ae(nt,2),vt=mt[0],ht=mt[1];t3(B,G,function(tt,He,ke,Oe){var Qe=Oe;return Ye(tt,He,ke)?!1:!Qe||!Qe._virtualHandled?(Qe&&(Qe._virtualHandled=!0),vt({preventDefault:function(){},deltaX:tt?He:0,deltaY:tt?0:He}),!0):!1}),n3(L,G,function(tt){Ae(function(He){return He+tt})}),Kt(function(){function tt(ke){var Oe=at&&ke.detail<0,Qe=dt&&ke.detail>0;B&&!Oe&&!Qe&&ke.preventDefault()}var He=G.current;return He.addEventListener("wheel",vt,{passive:!1}),He.addEventListener("DOMMouseScroll",ht,{passive:!0}),He.addEventListener("MozMousePixelScroll",tt,{passive:!1}),function(){He.removeEventListener("wheel",vt),He.removeEventListener("DOMMouseScroll",ht),He.removeEventListener("MozMousePixelScroll",tt)}},[B,at,dt]),Kt(function(){if(g){var tt=qe(oe);X(tt),_e({x:tt})}},[Ue.width,g]);var St=function(){var He,ke;(He=it.current)===null||He===void 0||He.delayHidden(),(ke=Ct.current)===null||ke===void 0||ke.delayHidden()},At=r3(G,k,$,a,P,function(){return R(!0)},Ae,St);m.useImperativeHandle(t,function(){return{nativeElement:te.current,getScrollInfo:ot,scrollTo:function(He){function ke(Oe){return Oe&&lt(Oe)==="object"&&("left"in Oe||"top"in Oe)}ke(He)?(He.left!==void 0&&X(qe(He.left)),At(He.top)):At(He)}}}),Kt(function(){if(x){var tt=k.slice(Fe,je+1);x(tt,k)}},[Fe,je,k]);var Bt=Zk(k,P,$,a),en=S==null?void 0:S({start:Fe,end:je,virtual:L,offsetX:oe,offsetY:De,rtl:H,getSize:Bt}),fn=Xk(k,Fe,je,g,oe,D,d,he),Ut=null;o&&(Ut=U(V({},l?"height":"maxHeight",o),s3),B&&(Ut.overflowY="hidden",g&&(Ut.overflowX="hidden"),be&&(Ut.pointerEvents="none")));var Rt={};return H&&(Rt.dir="rtl"),m.createElement("div",Re({ref:te,style:U(U({},u),{},{position:"relative"}),className:W},Rt,_),m.createElement(pr,{onResize:Be},m.createElement(b,{className:"".concat(r,"-holder"),style:Ut,ref:G,onScroll:ze,onMouseEnter:St},m.createElement(Z1,{prefixCls:r,height:ye,offsetX:oe,offsetY:De,scrollWidth:g,onInnerResize:R,ref:Y,innerProps:O,rtl:H,extra:en},fn))),L&&ye>o&&m.createElement(zh,{ref:it,prefixCls:r,scrollOffset:ue,scrollRange:ye,rtl:H,onScroll:xe,onStartMove:Se,onStopMove:ve,spinSize:Pt,containerSize:Ue.height,style:T==null?void 0:T.verticalScrollBar,thumbStyle:T==null?void 0:T.verticalScrollBarThumb,showScrollBar:N}),L&&g>Ue.width&&m.createElement(zh,{ref:Ct,prefixCls:r,scrollOffset:oe,scrollRange:g,rtl:H,onScroll:xe,onStartMove:Se,onStopMove:ve,spinSize:Dt,containerSize:Ue.width,horizontal:!0,style:T==null?void 0:T.horizontalScrollBar,thumbStyle:T==null?void 0:T.horizontalScrollBarThumb,showScrollBar:N}))}var aE=m.forwardRef(l3);aE.displayName="List";function u3(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var c3=["disabled","title","children","style","className"];function sE(e){return typeof e=="string"||typeof e=="number"}var d3=function(t,n){var r=nk(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,u=r.searchValue,c=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=m.useContext(Rh),p=h.maxCount,g=h.flattenOptions,v=h.onActiveValue,b=h.defaultActiveFirstOption,y=h.onSelect,E=h.menuItemSelectedIcon,x=h.rawValues,O=h.fieldNames,S=h.virtual,T=h.direction,I=h.listHeight,N=h.listItemHeight,_=h.optionRender,P="".concat(i,"-item"),A=ms(function(){return g},[a,g],function(J,Z){return Z[0]&&J[1]!==Z[1]}),M=m.useRef(null),D=m.useMemo(function(){return s&&Dh(p)&&(x==null?void 0:x.size)>=p},[s,p,x==null?void 0:x.size]),R=function(Z){Z.preventDefault()},$=function(Z){var oe;(oe=M.current)===null||oe===void 0||oe.scrollTo(typeof Z=="number"?{index:Z}:Z)},F=m.useCallback(function(J){return l==="combobox"?!1:x.has(J)},[l,Ke(x).toString(),x.size]),B=function(Z){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,X=A.length,ee=0;ee<X;ee+=1){var ne=(Z+ee*oe+X)%X,be=A[ne]||{},Ce=be.group,Se=be.data;if(!Ce&&!(Se!=null&&Se.disabled)&&(F(Se.value)||!D))return ne}return-1},z=m.useState(function(){return B(0)}),L=ae(z,2),H=L[0],W=L[1],k=function(Z){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;W(Z);var X={source:oe?"keyboard":"mouse"},ee=A[Z];if(!ee){v(null,-1,X);return}v(ee.value,Z,X)};C.useEffect(function(){k(b!==!1?B(0):-1)},[A.length,u]);var G=m.useCallback(function(J){return l==="combobox"?String(J).toLowerCase()===u.toLowerCase():x.has(J)},[l,u,Ke(x).toString(),x.size]);C.useEffect(function(){var J=setTimeout(function(){if(!s&&a&&x.size===1){var oe=Array.from(x)[0],X=A.findIndex(function(ee){var ne=ee.data;return u?String(ne.value).startsWith(u):ne.value===oe});X!==-1&&(k(X),$(X))}});if(a){var Z;(Z=M.current)===null||Z===void 0||Z.scrollTo(void 0)}return function(){return clearTimeout(J)}},[a,u]);var Y=function(Z){Z!==void 0&&y(Z,{selected:!x.has(Z)}),s||c(!1)};if(m.useImperativeHandle(n,function(){return{onKeyDown:function(Z){var oe=Z.which,X=Z.ctrlKey;switch(oe){case Xe.N:case Xe.P:case Xe.UP:case Xe.DOWN:{var ee=0;if(oe===Xe.UP?ee=-1:oe===Xe.DOWN?ee=1:u3()&&X&&(oe===Xe.N?ee=1:oe===Xe.P&&(ee=-1)),ee!==0){var ne=B(H+ee,ee);$(ne),k(ne,!0)}break}case Xe.TAB:case Xe.ENTER:{var be,Ce=A[H];Ce&&!(Ce!=null&&(be=Ce.data)!==null&&be!==void 0&&be.disabled)&&!D?Y(Ce.value):Y(void 0),a&&Z.preventDefault();break}case Xe.ESC:c(!1),a&&Z.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Z){$(Z)}}}),A.length===0)return m.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(P,"-empty"),onMouseDown:R},d);var te=Object.keys(O).map(function(J){return O[J]}),se=function(Z){return Z.label};function ce(J,Z){var oe=J.group;return{role:oe?"presentation":"option",id:"".concat(o,"_list_").concat(Z)}}var ue=function(Z){var oe=A[Z];if(!oe)return null;var X=oe.data||{},ee=X.value,ne=oe.group,be=Nr(X,!0),Ce=se(oe);return oe?m.createElement("div",Re({"aria-label":typeof Ce=="string"&&!ne?Ce:null},be,{key:Z},ce(oe,Z),{"aria-selected":G(ee)}),ee):null},de={role:"listbox",id:"".concat(o,"_list")};return m.createElement(m.Fragment,null,S&&m.createElement("div",Re({},de,{style:{height:0,width:0,overflow:"hidden"}}),ue(H-1),ue(H),ue(H+1)),m.createElement(aE,{itemKey:"key",ref:M,data:A,height:I,itemHeight:N,fullHeight:!1,onMouseDown:R,onScroll:f,virtual:S,direction:T,innerProps:S?null:de},function(J,Z){var oe=J.group,X=J.groupOption,ee=J.data,ne=J.label,be=J.value,Ce=ee.key;if(oe){var Se,ve=(Se=ee.title)!==null&&Se!==void 0?Se:sE(ne)?ne.toString():void 0;return m.createElement("div",{className:ie(P,"".concat(P,"-group"),ee.className),title:ve},ne!==void 0?ne:Ce)}var he=ee.disabled,Ae=ee.title;ee.children;var Ie=ee.style,me=ee.className,Me=yt(ee,c3),Q=_r(Me,te),le=F(be),pe=he||!le&&D,ye="".concat(P,"-option"),Fe=ie(P,ye,me,V(V(V(V({},"".concat(ye,"-grouped"),X),"".concat(ye,"-active"),H===Z&&!pe),"".concat(ye,"-disabled"),pe),"".concat(ye,"-selected"),le)),je=se(J),De=!E||typeof E=="function"||le,we=typeof je=="number"?je:je||be,Le=sE(we)?we.toString():void 0;return Ae!==void 0&&(Le=Ae),m.createElement("div",Re({},Nr(Q),S?{}:ce(J,Z),{"aria-selected":G(be),className:Fe,title:Le,onMouseMove:function(){H===Z||pe||k(Z)},onClick:function(){pe||Y(be)},style:Ie}),m.createElement("div",{className:"".concat(ye,"-content")},typeof _=="function"?_(J,{index:Z}):we),m.isValidElement(E)||le,De&&m.createElement(Zu,{className:"".concat(P,"-option-state"),customizeIcon:E,customizeIconProps:{value:be,disabled:pe,isSelected:le}},le?"✓":null))}))},lE=m.forwardRef(d3);process.env.NODE_ENV!=="production"&&(lE.displayName="OptionList");const f3=function(e,t){var n=m.useRef({values:new Map,options:new Map}),r=m.useMemo(function(){var o=n.current,a=o.values,s=o.options,l=e.map(function(d){if(d.label===void 0){var f;return U(U({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),u=new Map,c=new Map;return l.forEach(function(d){u.set(d.value,d),c.set(d.value,t.get(d.value)||s.get(d.value))}),n.current.values=u,n.current.options=c,l},[e,t]),i=m.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]};function Hh(e,t){return Mh(e).join("").toUpperCase().includes(t)}const h3=function(e,t,n,r,i){return m.useMemo(function(){if(!n||r===!1)return e;var o=t.options,a=t.label,s=t.value,l=[],u=typeof r=="function",c=n.toUpperCase(),d=u?r:function(h,p){return i?Hh(p[i],c):p[o]?Hh(p[a!=="children"?a:"label"],c):Hh(p[s],c)},f=u?function(h){return kh(h)}:function(h){return h};return e.forEach(function(h){if(h[o]){var p=d(n,f(h));if(p)l.push(h);else{var g=h[o].filter(function(v){return d(n,f(v))});g.length&&l.push(U(U({},h),{},V({},o,g)))}return}d(n,f(h))&&l.push(h)}),l},[e,r,i,n,t])};var uE=0,m3=process.env.NODE_ENV!=="test"&&Xn();function p3(){var e;return m3?(e=uE,uE+=1):e="TEST_OR_SSR",e}function g3(e){var t=m.useState(),n=ae(t,2),r=n[0],i=n[1];return m.useEffect(function(){i("rc_select_".concat(p3()))},[]),e||r}var v3=["children","value"],b3=["children"];function y3(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,a=yt(r,v3);return U({key:n,value:o!==void 0?o:n,children:i},a)}function jh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return mr(e).map(function(n,r){if(!m.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,u=yt(s,b3);return t||!o?y3(n):U(U({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},u),{},{options:jh(l)})}).filter(function(n){return n})}var E3=function(t,n,r,i,o){return m.useMemo(function(){var a=t,s=!t;s&&(a=jh(n));var l=new Map,u=new Map,c=function(h,p,g){g&&typeof g=="string"&&h.set(p[g],p)},d=function f(h){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=0;g<h.length;g+=1){var v=h[g];!v[r.options]||p?(l.set(v[r.value],v),c(u,v,r.label),c(u,v,i),c(u,v,o)):f(v[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:u}},[t,n,r,i,o])};function cE(e){var t=m.useRef();t.current=e;var n=m.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function S3(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,s=e.getInputElement,l=e.showSearch,u=e.onSearch,c=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,h=e.value,p=e.inputValue,g=e.optionLabelProp,v=tc(t),b=l!==void 0?l:v||t==="combobox",y=n||jh(r);if(bt(t!=="tags"||y.every(function(S){return!S.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),t==="tags"||t==="combobox"){var E=y.some(function(S){return S.options?S.options.some(function(T){return typeof("value"in T?T.value:T.key)=="number"}):typeof("value"in S?S.value:S.key)=="number"});bt(!E,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(bt(t!=="combobox"||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),bt(t==="combobox"||!i,"`backfill` only works with `combobox` mode."),bt(t==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),Bd(t!=="combobox"||!s||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&t!=="combobox"&&t!=="tags"&&bt(!1,"`onSearch` should work with `showSearch` instead of use alone."),Bd(!c||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),h!=null){var x=Mh(h);bt(!f||x.every(function(S){return lt(S)==="object"&&("key"in S||"value"in S)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),bt(!v||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var O=null;mr(r).some(function(S){if(!m.isValidElement(S)||!S.type)return!1;var T=S,I=T.type;if(I.isSelectOption)return!1;if(I.isSelectOptGroup){var N=mr(S.props.children).every(function(_){return!m.isValidElement(_)||!S.type||_.type.isSelectOption?!0:(O=_.type,!1)});return!N}return O=I,!0}),O&&bt(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(O.displayName||O.name||O,"`.")),bt(p===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function C3(e,t){if(e){var n=function r(i){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<i.length;a++){var s=i[a];if(s[t==null?void 0:t.value]===null)return bt(!1,"`value` in Select options should not be `null`."),!0;if(!o&&Array.isArray(s[t==null?void 0:t.options])&&r(s[t==null?void 0:t.options],!0))break}};n(e)}}var w3=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],x3=["inputValue"];function T3(e){return!e||lt(e)!=="object"}var dE=m.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,a=e.backfill,s=e.fieldNames,l=e.inputValue,u=e.searchValue,c=e.onSearch,d=e.autoClearSearchValue,f=d===void 0?!0:d,h=e.onSelect,p=e.onDeselect,g=e.dropdownMatchSelectWidth,v=g===void 0?!0:g,b=e.filterOption,y=e.filterSort,E=e.optionFilterProp,x=e.optionLabelProp,O=e.options,S=e.optionRender,T=e.children,I=e.defaultActiveFirstOption,N=e.menuItemSelectedIcon,_=e.virtual,P=e.direction,A=e.listHeight,M=A===void 0?200:A,D=e.listItemHeight,R=D===void 0?20:D,$=e.labelRender,F=e.value,B=e.defaultValue,z=e.labelInValue,L=e.onChange,H=e.maxCount,W=yt(e,w3),k=g3(n),G=tc(r),Y=!!(!O&&T),te=m.useMemo(function(){return b===void 0&&r==="combobox"?!1:b},[b,r]),se=m.useMemo(function(){return G1(s,Y)},[JSON.stringify(s),Y]),ce=Cn("",{value:u!==void 0?u:l,postState:function(xe){return xe||""}}),ue=ae(ce,2),de=ue[0],J=ue[1],Z=E3(O,T,se,E,x),oe=Z.valueOptions,X=Z.labelOptions,ee=Z.options,ne=m.useCallback(function(_e){var xe=Mh(_e);return xe.map(function(ze){var qe,et,nt,mt,vt;if(T3(ze))qe=ze;else{var ht;nt=ze.key,et=ze.label,qe=(ht=ze.value)!==null&&ht!==void 0?ht:nt}var St=oe.get(qe);if(St){var At;if(et===void 0&&(et=St==null?void 0:St[x||se.label]),nt===void 0&&(nt=(At=St==null?void 0:St.key)!==null&&At!==void 0?At:qe),mt=St==null?void 0:St.disabled,vt=St==null?void 0:St.title,process.env.NODE_ENV!=="production"&&!x){var Bt=St==null?void 0:St[se.label];Bt!==void 0&&!m.isValidElement(Bt)&&!m.isValidElement(et)&&Bt!==et&&bt(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:et,value:qe,key:nt,disabled:mt,title:vt}})},[se,x,oe]),be=Cn(B,{value:F}),Ce=ae(be,2),Se=Ce[0],ve=Ce[1],he=m.useMemo(function(){var _e,xe=G&&Se===null?[]:Se,ze=ne(xe);return r==="combobox"&&wk((_e=ze[0])===null||_e===void 0?void 0:_e.value)?[]:ze},[Se,ne,r,G]),Ae=f3(he,oe),Ie=ae(Ae,2),me=Ie[0],Me=Ie[1],Q=m.useMemo(function(){if(!r&&me.length===1){var _e=me[0];if(_e.value===null&&(_e.label===null||_e.label===void 0))return[]}return me.map(function(xe){var ze;return U(U({},xe),{},{label:(ze=typeof $=="function"?$(xe):xe.label)!==null&&ze!==void 0?ze:xe.value})})},[r,me,$]),le=m.useMemo(function(){return new Set(me.map(function(_e){return _e.value}))},[me]);m.useEffect(function(){if(r==="combobox"){var _e,xe=(_e=me[0])===null||_e===void 0?void 0:_e.value;J(Ck(xe)?String(xe):"")}},[me]);var pe=cE(function(_e,xe){var ze=xe??_e;return V(V({},se.value,_e),se.label,ze)}),ye=m.useMemo(function(){if(r!=="tags")return ee;var _e=Ke(ee),xe=function(qe){return oe.has(qe)};return Ke(me).sort(function(ze,qe){return ze.value<qe.value?-1:1}).forEach(function(ze){var qe=ze.value;xe(qe)||_e.push(pe(qe,ze.label))}),_e},[pe,ee,oe,me,r]),Fe=h3(ye,se,de,te,E),je=m.useMemo(function(){return r!=="tags"||!de||Fe.some(function(_e){return _e[E||"value"]===de})||Fe.some(function(_e){return _e[se.value]===de})?Fe:[pe(de)].concat(Ke(Fe))},[pe,E,r,Fe,de,se]),De=function _e(xe){var ze=Ke(xe).sort(function(qe,et){return y(qe,et,{searchValue:de})});return ze.map(function(qe){return Array.isArray(qe.options)?U(U({},qe),{},{options:qe.options.length>0?_e(qe.options):qe.options}):qe})},we=m.useMemo(function(){return y?De(je):je},[je,y,de]),Le=m.useMemo(function(){return jk(we,{fieldNames:se,childrenAsData:Y})},[we,se,Y]),Ue=function(xe){var ze=ne(xe);if(ve(ze),L&&(ze.length!==me.length||ze.some(function(nt,mt){var vt;return((vt=me[mt])===null||vt===void 0?void 0:vt.value)!==(nt==null?void 0:nt.value)}))){var qe=z?ze:ze.map(function(nt){return nt.value}),et=ze.map(function(nt){return kh(Me(nt.value))});L(G?qe:qe[0],G?et:et[0])}},Te=m.useState(null),Be=ae(Te,2),it=Be[0],Ct=Be[1],Dt=m.useState(0),Pt=ae(Dt,2),wt=Pt[0],Ht=Pt[1],kt=I!==void 0?I:r!=="combobox",at=m.useCallback(function(_e,xe){var ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},qe=ze.source,et=qe===void 0?"keyboard":qe;Ht(xe),a&&r==="combobox"&&_e!==null&&et==="keyboard"&&Ct(String(_e))},[a,r]),dt=function(xe,ze,qe){var et=function(){var Ut,Rt=Me(xe);return[z?{label:Rt==null?void 0:Rt[se.label],value:xe,key:(Ut=Rt==null?void 0:Rt.key)!==null&&Ut!==void 0?Ut:xe}:xe,kh(Rt)]};if(ze&&h){var nt=et(),mt=ae(nt,2),vt=mt[0],ht=mt[1];h(vt,ht)}else if(!ze&&p&&qe!=="clear"){var St=et(),At=ae(St,2),Bt=At[0],en=At[1];p(Bt,en)}},$e=cE(function(_e,xe){var ze,qe=G?xe.selected:!0;qe?ze=G?[].concat(Ke(me),[_e]):[_e]:ze=me.filter(function(et){return et.value!==_e}),Ue(ze),dt(_e,qe),r==="combobox"?Ct(""):(!tc||f)&&(J(""),Ct(""))}),Ve=function(xe,ze){Ue(xe);var qe=ze.type,et=ze.values;(qe==="remove"||qe==="clear")&&et.forEach(function(nt){dt(nt.value,!1,qe)})},Ye=function(xe,ze){if(J(xe),Ct(null),ze.source==="submit"){var qe=(xe||"").trim();if(qe){var et=Array.from(new Set([].concat(Ke(le),[qe])));Ue(et),dt(qe,!0),J("")}return}ze.source!=="blur"&&(r==="combobox"&&Ue(xe),c==null||c(xe))},ot=function(xe){var ze=xe;r!=="tags"&&(ze=xe.map(function(et){var nt=X.get(et);return nt==null?void 0:nt.value}).filter(function(et){return et!==void 0}));var qe=Array.from(new Set([].concat(Ke(le),Ke(ze))));Ue(qe),qe.forEach(function(et){dt(et,!0)})},Pe=m.useMemo(function(){var _e=_!==!1&&v!==!1;return U(U({},Z),{},{flattenOptions:Le,onActiveValue:at,defaultActiveFirstOption:kt,onSelect:$e,menuItemSelectedIcon:N,rawValues:le,fieldNames:se,virtual:_e,direction:P,listHeight:M,listItemHeight:R,childrenAsData:Y,maxCount:H,optionRender:S})},[H,Z,Le,at,kt,$e,N,le,se,_,v,P,M,R,Y,S]);return process.env.NODE_ENV!=="production"&&(S3(e),C3(ee,se)),m.createElement(Rh.Provider,{value:Pe},m.createElement(Q1,Re({},W,{id:k,prefixCls:o,ref:t,omitDomProps:x3,mode:r,displayValues:Q,onDisplayValuesChange:Ve,direction:P,searchValue:de,onSearch:Ye,autoClearSearchValue:f,onSearchSplit:ot,dropdownMatchSelectWidth:v,OptionList:lE,emptyOptions:!Le.length,activeValue:it,activeDescendantId:"".concat(k,"_list_").concat(wt)})))});process.env.NODE_ENV!=="production"&&(dE.displayName="Select");var Vh=dE;Vh.Option=Fh,Vh.OptGroup=$h;function nc(e,t,n){return ie({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Uh=(e,t)=>t||e,fE=()=>{const[,e]=gr(),[t]=Vi("Empty"),r=new cn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return m.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},m.createElement("title",null,(t==null?void 0:t.description)||"Empty"),m.createElement("g",{fill:"none",fillRule:"evenodd"},m.createElement("g",{transform:"translate(24 31.67)"},m.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),m.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),m.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),m.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),m.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),m.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),m.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},m.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),m.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(fE.displayName="EmptyImage");const hE=()=>{const[,e]=gr(),[t]=Vi("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:s,contentColor:l}=C.useMemo(()=>({borderColor:new cn(n).onBackground(o).toHexString(),shadowColor:new cn(r).onBackground(o).toHexString(),contentColor:new cn(i).onBackground(o).toHexString()}),[n,r,i,o]);return m.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},m.createElement("title",null,(t==null?void 0:t.description)||"Empty"),m.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},m.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),m.createElement("g",{fillRule:"nonzero",stroke:a},m.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))};process.env.NODE_ENV!=="production"&&(hE.displayName="SimpleImage");const O3=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},N3=wn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,i=rn(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[O3(i)]});var _3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mE=m.createElement(fE,null),pE=m.createElement(hE,null),fo=e=>{const{className:t,rootClassName:n,prefixCls:r,image:i=mE,description:o,children:a,imageStyle:s,style:l,classNames:u,styles:c}=e,d=_3(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:h,className:p,style:g,classNames:v,styles:b}=Gn("empty"),y=f("empty",r),[E,x,O]=N3(y),[S]=Vi("Empty"),T=typeof o<"u"?o:S==null?void 0:S.description,I=typeof T=="string"?T:"empty";let N=null;if(typeof i=="string"?N=m.createElement("img",{alt:I,src:i}):N=i,process.env.NODE_ENV!=="production"){const _=on("Empty");[["imageStyle","styles: { image: {} }"]].forEach(([P,A])=>{_.deprecated(!(P in e),P,A)})}return E(m.createElement("div",Object.assign({className:ie(x,O,y,p,{[`${y}-normal`]:i===pE,[`${y}-rtl`]:h==="rtl"},t,n,v.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),g),c==null?void 0:c.root),l)},d),m.createElement("div",{className:ie(`${y}-image`,v.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},s),b.image),c==null?void 0:c.image)},N),T&&m.createElement("div",{className:ie(`${y}-description`,v.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},b.description),c==null?void 0:c.description)},T),a&&m.createElement("div",{className:ie(`${y}-footer`,v.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},b.footer),c==null?void 0:c.footer)},a)))};fo.PRESENTED_IMAGE_DEFAULT=mE,fo.PRESENTED_IMAGE_SIMPLE=pE,process.env.NODE_ENV!=="production"&&(fo.displayName="Empty");const I3=e=>{const{componentName:t}=e,{getPrefixCls:n}=C.useContext(Qt),r=n("empty");switch(t){case"Table":case"List":return C.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return C.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return C.createElement(fo,null)}},Wh=(e,t,n=void 0)=>{var r,i;const{variant:o,[e]:a}=m.useContext(Qt),s=m.useContext(a4),l=a==null?void 0:a.variant;let u;typeof t<"u"?u=t:n===!1?u="borderless":u=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const c=rP.includes(u);return[u,c]},A3=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function P3(e,t){return e||A3(t)}const gE=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},M3=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
179
179
  ${i}${s}bottomLeft,
180
180
  ${o}${s}bottomLeft
181
181
  `]:{animationName:hy},[`
@@ -201,7 +201,7 @@ html body {
201
201
  `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${fe(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:e.fontSize},"&:after":{lineHeight:fe(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${fe(r)}`,"&:after":{display:"none"}}}}}}}function F3(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[qh(e),qh(rn(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${fe(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
202
202
  &${t}-show-arrow ${t}-selection-item,
203
203
  &${t}-show-arrow ${t}-selection-placeholder
204
- `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},qh(rn(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const B3=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:u,colorText:c,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:p,colorFillSecondary:g,colorBgContainerDisabled:v,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:E,controlOutline:x}=e,O=s*2,S=r*2,T=Math.min(i-O,i-S),I=Math.min(o-O,o-S),N=Math.min(a-O,a-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:u+50,optionSelectedColor:c,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:T,multipleItemHeightSM:I,multipleItemHeightLG:N,multipleSelectorBgDisabled:v,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:E,activeOutlineColor:x,selectAffixPadding:s}},vE=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${fe(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${fe(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},bE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},vE(e,t))}),z3=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},vE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),bE(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),bE(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),yE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${fe(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},EE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},yE(e,t))}),H3=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},yE(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),EE(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),EE(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),j3=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${fe(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),SE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${fe(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},CE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},SE(e,t))}),V3=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},SE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),CE(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),CE(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),U3=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},z3(e)),H3(e)),j3(e)),V3(e))}),W3=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Y3=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},q3=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},W3(e)),Y3(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ns),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Ns),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Su()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},X3=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},q3(e),F3(e),$3(e),M3(e),{[`${t}-rtl`]:{direction:"rtl"}},ah(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},K3=wn("Select",(e,{rootPrefixCls:t})=>{const n=rn(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[X3(n),U3(n)]},B3,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var G3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Q3=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:G3}))},Xh=m.forwardRef(Q3);process.env.NODE_ENV!=="production"&&(Xh.displayName="CheckOutlined");var Z3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},J3=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:Z3}))},Kh=m.forwardRef(J3);process.env.NODE_ENV!=="production"&&(Kh.displayName="DownOutlined");var eR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},tR=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:eR}))},wE=m.forwardRef(tR);process.env.NODE_ENV!=="production"&&(wE.displayName="SearchOutlined");function nR({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:u,showArrow:c,componentName:d}){process.env.NODE_ENV!=="production"&&on(d).deprecated(!t,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const f=t??m.createElement(Is,null),h=b=>e===null&&!a&&!c?null:m.createElement(m.Fragment,null,l!==!1&&b,a&&u);let p=null;if(e!==void 0)p=h(e);else if(i)p=h(m.createElement(wa,{spin:!0}));else{const b=`${s}-suffix`;p=({open:y,showSearch:E})=>h(y&&E?m.createElement(wE,{className:b}):m.createElement(Kh,{className:b}))}let g=null;n!==void 0?g=n:o?g=m.createElement(Xh,null):g=null;let v=null;return r!==void 0?v=r:v=m.createElement(Ui,null),{clearIcon:f,suffixIcon:p,itemIcon:g,removeIcon:v}}function rR(e,t){return t!==void 0?t:e!==null}var iR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const xE="SECRET_COMBOBOX_MODE_DO_NOT_USE",TE=(e,t)=>{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:u,rootClassName:c,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:p=256,placement:g,listItemHeight:v,size:b,disabled:y,notFoundContent:E,status:x,builtinPlacements:O,dropdownMatchSelectWidth:S,popupMatchSelectWidth:T,direction:I,style:N,allowClear:_,variant:P,dropdownStyle:A,transitionName:M,tagRender:D,maxCount:R,prefix:$,dropdownRender:F,popupRender:B,onDropdownVisibleChange:z,onOpenChange:L,styles:H,classNames:W}=e,k=iR(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:G,getPrefixCls:Y,renderEmpty:te,direction:se,virtual:ce,popupMatchSelectWidth:ue,popupOverflow:de}=m.useContext(Qt),{showSearch:J,style:Z,styles:oe,className:X,classNames:ee}=Gn("select"),[,ne]=gr(),be=v??(ne==null?void 0:ne.controlHeight),Ce=Y("select",s),Se=Y(),ve=I??se,{compactSize:he,compactItemClassnames:Ae}=Ru(Ce,ve),[Ie,me]=Wh("select",P,l),Me=Wi(Ce),[Q,le,pe]=K3(Ce,Me),ye=m.useMemo(()=>{const{mode:qe}=e;if(qe!=="combobox")return qe===xE?"combobox":qe},[e.mode]),Fe=ye==="multiple"||ye==="tags",je=rR(e.suffixIcon,e.showArrow),De=(n=T??S)!==null&&n!==void 0?n:ue,we=((r=H==null?void 0:H.popup)===null||r===void 0?void 0:r.root)||((i=oe.popup)===null||i===void 0?void 0:i.root)||A,Le=B||F,Ue=L||z,{status:Te,hasFeedback:Be,isFormItemInput:it,feedbackIcon:wt}=m.useContext(ko),Dt=Uh(Te,x);let Pt;E!==void 0?Pt=E:ye==="combobox"?Pt=null:Pt=(te==null?void 0:te("Select"))||m.createElement(I3,{componentName:"Select"});const{suffixIcon:xt,itemIcon:Ht,removeIcon:kt,clearIcon:at}=nR(Object.assign(Object.assign({},k),{multiple:Fe,hasFeedback:Be,feedbackIcon:wt,showSuffixIcon:je,prefixCls:Ce,componentName:"Select"})),dt=_===!0?{clearIcon:at}:_,$e=_r(k,["suffixIcon","itemIcon"]),Ve=ie(((o=W==null?void 0:W.popup)===null||o===void 0?void 0:o.root)||((a=ee==null?void 0:ee.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${Ce}-dropdown-${ve}`]:ve==="rtl"},c,ee.root,W==null?void 0:W.root,pe,Me,le),Ye=ai(qe=>{var et;return(et=b??he)!==null&&et!==void 0?et:qe}),ot=m.useContext(Si),Pe=y??ot,_e=ie({[`${Ce}-lg`]:Ye==="large",[`${Ce}-sm`]:Ye==="small",[`${Ce}-rtl`]:ve==="rtl",[`${Ce}-${Ie}`]:me,[`${Ce}-in-form-item`]:it},nc(Ce,Dt,Be),Ae,X,u,ee.root,W==null?void 0:W.root,c,pe,Me,le),xe=m.useMemo(()=>g!==void 0?g:ve==="rtl"?"bottomRight":"bottomLeft",[g,ve]);if(process.env.NODE_ENV!=="production"){const qe=on("Select");Object.entries({dropdownMatchSelectWidth:"popupMatchSelectWidth",dropdownStyle:"styles.popup.root",dropdownClassName:"classNames.popup.root",popupClassName:"classNames.popup.root",dropdownRender:"popupRender",onDropdownVisibleChange:"onOpenChange",bordered:"variant"}).forEach(([nt,mt])=>{qe.deprecated(!(nt in e),nt,mt)}),process.env.NODE_ENV!=="production"&&qe(!("showArrow"in e),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),process.env.NODE_ENV!=="production"&&qe(!(typeof R<"u"&&!Fe),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[ze]=Au("SelectLike",we==null?void 0:we.zIndex);return Q(m.createElement(Vh,Object.assign({ref:t,virtual:ce,showSearch:J},$e,{style:Object.assign(Object.assign(Object.assign(Object.assign({},oe.root),H==null?void 0:H.root),Z),N),dropdownMatchSelectWidth:De,transitionName:qi(Se,"slide-up",M),builtinPlacements:P3(O,de),listHeight:p,listItemHeight:be,mode:ye,prefixCls:Ce,placement:xe,direction:ve,prefix:$,suffixIcon:xt,menuItemSelectedIcon:Ht,removeIcon:kt,allowClear:dt,notFoundContent:Pt,className:_e,getPopupContainer:d||G,dropdownClassName:Ve,disabled:Pe,dropdownStyle:Object.assign(Object.assign({},we),{zIndex:ze}),maxCount:Fe?R:void 0,tagRender:Fe?D:void 0,dropdownRender:Le,onDropdownVisibleChange:Ue})))};process.env.NODE_ENV!=="production"&&(TE.displayName="Select");const vr=m.forwardRef(TE),oR=ek(vr,"dropdownAlign");vr.SECRET_COMBOBOX_MODE_DO_NOT_USE=xE,vr.Option=Fh,vr.OptGroup=$h,vr._InternalPanelDoNotUseOrYouWillBeFired=oR,process.env.NODE_ENV!=="production"&&(vr.displayName="Select");const aR=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},sR=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},qs=["xxl","xl","lg","md","sm","xs"],lR=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),uR=e=>{const t=e,n=[].concat(qs).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(t[a]<=t[s]))throw new Error(`${a}<=${s} fails : !(${t[a]}<=${t[s]})`);if(i<n.length-1){const l=`screen${o}Max`;if(!(t[s]<=t[l]))throw new Error(`${s}<=${l} fails : !(${t[s]}<=${t[l]})`);const c=`screen${n[i+1].toUpperCase()}Min`;if(!(t[l]<=t[c]))throw new Error(`${l}<=${c} fails : !(${t[l]}<=${t[c]})`)}}),e},cR=()=>{const[,e]=gr(),t=lR(uR(e));return C.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(t).forEach(([o,a])=>{const s=({matches:u})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:u}))},l=window.matchMedia(a);aR(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(t).forEach(o=>{const a=this.matchHandlers[o];sR(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[e])};function dR(){const[,e]=m.useReducer(t=>t+1,0);return e}function OE(e=!0,t={}){const n=C.useRef(t),r=dR(),i=cR();return Kt(()=>{const o=i.subscribe(a=>{n.current=a,e&&r()});return()=>i.unsubscribe(o)},[]),n.current}function NE(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,o=e.bodyClassName,a=e.className,s=e.style;return m.createElement("div",{className:ie("".concat(n,"-content"),a),style:s},m.createElement("div",{className:ie("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof t=="function"?t():t))}var La={shiftX:64,adjustY:1},Da={adjustX:1,shiftY:!0},Ur=[0,0],fR={left:{points:["cr","cl"],overflow:Da,offset:[-4,0],targetOffset:Ur},right:{points:["cl","cr"],overflow:Da,offset:[4,0],targetOffset:Ur},top:{points:["bc","tc"],overflow:La,offset:[0,-4],targetOffset:Ur},bottom:{points:["tc","bc"],overflow:La,offset:[0,4],targetOffset:Ur},topLeft:{points:["bl","tl"],overflow:La,offset:[0,-4],targetOffset:Ur},leftTop:{points:["tr","tl"],overflow:Da,offset:[-4,0],targetOffset:Ur},topRight:{points:["br","tr"],overflow:La,offset:[0,-4],targetOffset:Ur},rightTop:{points:["tl","tr"],overflow:Da,offset:[4,0],targetOffset:Ur},bottomRight:{points:["tr","br"],overflow:La,offset:[0,4],targetOffset:Ur},rightBottom:{points:["bl","br"],overflow:Da,offset:[4,0],targetOffset:Ur},bottomLeft:{points:["tl","bl"],overflow:La,offset:[0,4],targetOffset:Ur},leftBottom:{points:["br","bl"],overflow:Da,offset:[-4,0],targetOffset:Ur}},hR=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],mR=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,u=l===void 0?.1:l,c=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,h=t.children,p=t.onVisibleChange,g=t.afterVisibleChange,v=t.transitionName,b=t.animation,y=t.motion,E=t.placement,x=E===void 0?"right":E,O=t.align,S=O===void 0?{}:O,T=t.destroyTooltipOnHide,I=T===void 0?!1:T,N=t.defaultVisible,_=t.getTooltipContainer,P=t.overlayInnerStyle;t.arrowContent;var A=t.overlay,M=t.id,D=t.showArrow,R=D===void 0?!0:D,$=t.classNames,F=t.styles,B=yt(t,hR),z=ks(M),L=C.useRef(null);C.useImperativeHandle(n,function(){return L.current});var H=U({},B);"visible"in t&&(H.popupVisible=t.visible);var W=function(){return m.createElement(NE,{key:"content",prefixCls:f,id:z,bodyClassName:$==null?void 0:$.body,overlayInnerStyle:U(U({},P),F==null?void 0:F.body)},A)},k=function(){var Y=m.Children.only(h),te=(Y==null?void 0:Y.props)||{},se=U(U({},te),{},{"aria-describedby":A?z:null});return m.cloneElement(h,se)};return m.createElement(ec,Re({popupClassName:ie(r,$==null?void 0:$.root),prefixCls:f,popup:W,action:o,builtinPlacements:fR,popupPlacement:x,ref:L,popupAlign:S,getPopupContainer:_,onPopupVisibleChange:p,afterPopupVisibleChange:g,popupTransitionName:v,popupAnimation:b,popupMotion:y,defaultPopupVisible:N,autoDestroy:I,mouseLeaveDelay:u,popupStyle:U(U({},c),F==null?void 0:F.root),mouseEnterDelay:s,arrow:R},H),k())};const pR=C.forwardRef(mR);function gR(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),u=i-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-u,f=c,h=2*i-s,p=l,g=2*i-o,v=a,b=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1),E=`polygon(${y}px 100%, 50% ${y}px, ${2*i-y}px 100%, ${y}px 100%)`,x=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${u} ${c} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${p} A ${r} ${r} 0 0 0 ${g} ${v} Z')`;return{arrowShadowWidth:b,arrowPath:x,arrowPolygon:E}}const vR=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${fe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},_E=8;function IE(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?_E:r}}function rc(e,t){return e?t:{}}function bR(e,t,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}={};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},vR(e,t,i)),{"&:before":{background:t}})]},rc(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${fe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),rc(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${fe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),rc(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),rc(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function yR(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const AE={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ER={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},SR=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function CR(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o}=e,a=t/2,s={};return Object.keys(AE).forEach(l=>{const u=r&&ER[l]||AE[l],c=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(s[l]=c,SR.has(l)&&(c.autoArrow=!1),l){case"top":case"topLeft":case"topRight":c.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":c.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":c.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":c.offset[0]=a+i;break}const d=IE({contentRadius:o,limitVerticalRadius:!0});if(r)switch(l){case"topLeft":case"bottomLeft":c.offset[0]=-d.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":c.offset[0]=d.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":c.offset[1]=-d.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":c.offset[1]=d.arrowOffsetHorizontal*2-a;break}c.overflow=yR(l,d,t,n),c.htmlRegion="visibleFirst"}),s}const wR=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:u,paddingSM:c,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=e,p=t(a).add(h).add(f).equal(),g=t(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:g,minHeight:l,padding:`${fe(e.calc(c).div(2).equal())} ${fe(d)}`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:u,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:p},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,_E)}},[`${n}-content`]:{position:"relative"}}),IP(e,(v,{darkColor:b})=>({[`&${n}-${v}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},bR(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},xR=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},IE({contentRadius:e.borderRadius,limitVerticalRadius:!0})),gR(rn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),PE=(e,t=!0)=>wn("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=rn(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[wR(s),yy(r,"zoom-big-fast")]},xR,{resetStyle:!1,injectStyle:t})(e),TR=Mo.map(e=>`${e}-inverse`);function OR(e,t=!0){return t?[].concat(Ke(TR),Ke(Mo)).includes(e):Mo.includes(e)}function ME(e,t){const n=OR(t),r=ie({[`${e}-${t}`]:t&&n}),i={},o={};return t&&!n&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const NR=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("tooltip",t),[u,c,d]=PE(l),f=ME(l,o),h=f.arrowStyle,p=Object.assign(Object.assign({},a),f.overlayStyle),g=ie(c,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return u(m.createElement("div",{className:g,style:h},m.createElement("div",{className:`${l}-arrow`}),m.createElement(NE,Object.assign({},e,{className:c,prefixCls:l,overlayInnerStyle:p}),i)))};var _R=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ki=m.forwardRef((e,t)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:u,afterOpenChange:c,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:p=!0,title:g,overlay:v,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:E=!0,motion:x,getPopupContainer:O,placement:S="top",mouseEnterDelay:T=.1,mouseLeaveDelay:I=.1,overlayStyle:N,rootClassName:_,overlayClassName:P,styles:A,classNames:M}=e,D=_R(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),R=!!p,[,$]=gr(),{getPopupContainer:F,getPrefixCls:B,direction:z,className:L,style:H,classNames:W,styles:k}=Gn("tooltip"),G=on("Tooltip"),Y=m.useRef(null),te=()=>{var je;(je=Y.current)===null||je===void 0||je.forceAlign()};m.useImperativeHandle(t,()=>{var je,De;return{forceAlign:te,forcePopupAlign:()=>{G.deprecated(!1,"forcePopupAlign","forceAlign"),te()},nativeElement:(je=Y.current)===null||je===void 0?void 0:je.nativeElement,popupElement:(De=Y.current)===null||De===void 0?void 0:De.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["destroyTooltipOnHide","destroyOnHidden"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(([je,De])=>{G.deprecated(!(je in e),je,De)}),process.env.NODE_ENV!=="production"&&G(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&G(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[se,ce]=Cn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),ue=!g&&!v&&g!==0,de=je=>{var De,we;ce(ue?!1:je),ue||((De=e.onOpenChange)===null||De===void 0||De.call(e,je),(we=e.onVisibleChange)===null||we===void 0||we.call(e,je))},J=m.useMemo(()=>{var je,De;let we=y;return typeof p=="object"&&(we=(De=(je=p.pointAtCenter)!==null&&je!==void 0?je:p.arrowPointAtCenter)!==null&&De!==void 0?De:y),b||CR({arrowPointAtCenter:we,autoAdjustOverflow:E,arrowWidth:R?$.sizePopupArrow:0,borderRadius:$.borderRadius,offset:$.marginXXS})},[y,p,b,$]),Z=m.useMemo(()=>g===0?g:v||g||"",[v,g]),oe=m.createElement(zs,{space:!0},typeof Z=="function"?Z():Z),X=B("tooltip",i),ee=B(),ne=e["data-popover-inject"];let be=se;!("open"in e)&&!("visible"in e)&&ue&&(be=!1);const Ce=m.isValidElement(u)&&!zb(u)?u:m.createElement("span",null,u),Se=Ce.props,ve=!Se.className||typeof Se.className=="string"?ie(Se.className,o||`${X}-open`):Se.className,[he,Ae,Ie]=PE(X,!ne),me=ME(X,s),Me=me.arrowStyle,Q=ie(P,{[`${X}-rtl`]:z==="rtl"},me.className,_,Ae,Ie,L,W.root,M==null?void 0:M.root),le=ie(W.body,M==null?void 0:M.body),[pe,ye]=Au("Tooltip",D.zIndex),Fe=m.createElement(pR,Object.assign({},D,{zIndex:pe,showArrow:R,placement:S,mouseEnterDelay:T,mouseLeaveDelay:I,prefixCls:X,classNames:{root:Q,body:le},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Me),k.root),H),N),A==null?void 0:A.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},k.body),l),A==null?void 0:A.body),me.overlayStyle)},getTooltipContainer:O||a||F,ref:Y,builtinPlacements:J,overlay:oe,visible:be,onVisibleChange:de,afterVisibleChange:c??d,arrowContent:m.createElement("span",{className:`${X}-arrow-content`}),motion:{motionName:qi(ee,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),be?As(Ce,{className:ve}):Ce);return he(m.createElement(Ps.Provider,{value:ye},Fe))});process.env.NODE_ENV!=="production"&&(Ki.displayName="Tooltip"),Ki._InternalPanelDoNotUseOrYouWillBeFired=NR;var IR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},AR=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:IR}))},ic=m.forwardRef(AR);process.env.NODE_ENV!=="production"&&(ic.displayName="LeftOutlined");var PR=Xe.ESC,MR=Xe.TAB;function LR(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=m.useRef(!1),s=function(){if(t){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),a.current=!0,!0):!1},u=function(d){switch(d.keyCode){case PR:s();break;case MR:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};m.useEffect(function(){return t?(window.addEventListener("keydown",u),i&&Xt(l,3),function(){window.removeEventListener("keydown",u),a.current=!1}):function(){a.current=!1}},[t])}var DR=C.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=C.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=dr(t,la(o));return C.createElement(C.Fragment,null,r&&C.createElement("div",{className:"".concat(i,"-arrow")}),C.cloneElement(o,{ref:_o(o)?a:void 0}))}),ka={adjustX:1,adjustY:1},Ra=[0,0],kR={topLeft:{points:["bl","tl"],overflow:ka,offset:[0,-4],targetOffset:Ra},top:{points:["bc","tc"],overflow:ka,offset:[0,-4],targetOffset:Ra},topRight:{points:["br","tr"],overflow:ka,offset:[0,-4],targetOffset:Ra},bottomLeft:{points:["tl","bl"],overflow:ka,offset:[0,4],targetOffset:Ra},bottom:{points:["tc","bc"],overflow:ka,offset:[0,4],targetOffset:Ra},bottomRight:{points:["tr","br"],overflow:ka,offset:[0,4],targetOffset:Ra}},RR=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function $R(e,t){var n,r=e.arrow,i=r===void 0?!1:r,o=e.prefixCls,a=o===void 0?"rc-dropdown":o,s=e.transitionName,l=e.animation,u=e.align,c=e.placement,d=c===void 0?"bottomLeft":c,f=e.placements,h=f===void 0?kR:f,p=e.getPopupContainer,g=e.showAction,v=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,E=e.visible,x=e.trigger,O=x===void 0?["hover"]:x,S=e.autoFocus,T=e.overlay,I=e.children,N=e.onVisibleChange,_=yt(e,RR),P=C.useState(),A=ae(P,2),M=A[0],D=A[1],R="visible"in e?E:M,$=C.useRef(null),F=C.useRef(null),B=C.useRef(null);C.useImperativeHandle(t,function(){return $.current});var z=function(ce){D(ce),N==null||N(ce)};LR({visible:R,triggerRef:B,onVisibleChange:z,autoFocus:S,overlayRef:F});var L=function(ce){var ue=e.onOverlayClick;D(!1),ue&&ue(ce)},H=function(){return C.createElement(DR,{ref:F,overlay:T,prefixCls:a,arrow:i})},W=function(){return typeof T=="function"?H:H()},k=function(){var ce=e.minOverlayWidthMatchTrigger,ue=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?ce:!ue},G=function(){var ce=e.openClassName;return ce!==void 0?ce:"".concat(a,"-open")},Y=C.cloneElement(I,{className:ie((n=I.props)===null||n===void 0?void 0:n.className,R&&G()),ref:_o(I)?dr(B,la(I)):void 0}),te=v;return!te&&O.indexOf("contextMenu")!==-1&&(te=["click"]),C.createElement(ec,Re({builtinPlacements:h},_,{prefixCls:a,ref:$,popupClassName:ie(b,V({},"".concat(a,"-show-arrow"),i)),popupStyle:y,action:O,showAction:g,hideAction:te,popupPlacement:d,popupAlign:u,popupTransitionName:s,popupAnimation:l,popupVisible:R,stretch:k()?"minWidth":"",popup:W(),onPopupVisibleChange:z,onPopupClick:L,getPopupContainer:p}),Y)}const FR=C.forwardRef($R);var LE=m.createContext(null);function DE(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function kE(e){var t=m.useContext(LE);return DE(t,e)}var BR=["children","locked"],si=m.createContext(null);function zR(e,t){var n=U({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Xs(e){var t=e.children,n=e.locked,r=yt(e,BR),i=m.useContext(si),o=ms(function(){return zR(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!ca(a[1],s[1],!0))});return m.createElement(si.Provider,{value:o},t)}var HR=[],RE=m.createContext(null);function oc(){return m.useContext(RE)}var $E=m.createContext(HR);function Ks(e){var t=m.useContext($E);return m.useMemo(function(){return e!==void 0?[].concat(Ke(t),[e]):t},[t,e])}var FE=m.createContext(null),Gh=m.createContext({});function BE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Gf(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function jR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ke(e.querySelectorAll("*")).filter(function(r){return BE(r,t)});return BE(e,t)&&n.unshift(e),n}var Qh=Xe.LEFT,Zh=Xe.RIGHT,Jh=Xe.UP,ac=Xe.DOWN,sc=Xe.ENTER,zE=Xe.ESC,Gs=Xe.HOME,Qs=Xe.END,HE=[Jh,ac,Qh,Zh];function VR(e,t,n,r){var i,o="prev",a="next",s="children",l="parent";if(e==="inline"&&r===sc)return{inlineTrigger:!0};var u=V(V({},Jh,o),ac,a),c=V(V(V(V({},Qh,n?a:o),Zh,n?o:a),ac,s),sc,s),d=V(V(V(V(V(V({},Jh,o),ac,a),sc,s),zE,l),Qh,n?s:l),Zh,n?l:s),f={inline:u,horizontal:c,vertical:d,inlineSub:u,horizontalSub:d,verticalSub:d},h=(i=f["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function UR(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function WR(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function em(e,t){var n=jR(e,!0);return n.filter(function(r){return t.has(r)})}function jE(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=em(e,t),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var tm=function(t,n){var r=new Set,i=new Map,o=new Map;return t.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(DE(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function YR(e,t,n,r,i,o,a,s,l,u){var c=m.useRef(),d=m.useRef();d.current=t;var f=function(){Xt.cancel(c.current)};return m.useEffect(function(){return function(){f()}},[]),function(h){var p=h.which;if([].concat(HE,[sc,zE,Gs,Qs]).includes(p)){var g=o(),v=tm(g,r),b=v,y=b.elements,E=b.key2element,x=b.element2key,O=E.get(t),S=WR(O,y),T=x.get(S),I=VR(e,a(T,!0).length===1,n,p);if(!I&&p!==Gs&&p!==Qs)return;(HE.includes(p)||[Gs,Qs].includes(p))&&h.preventDefault();var N=function(F){if(F){var B=F,z=F.querySelector("a");z!=null&&z.getAttribute("href")&&(B=z);var L=x.get(F);s(L),f(),c.current=Xt(function(){d.current===L&&B.focus()})}};if([Gs,Qs].includes(p)||I.sibling||!S){var _;!S||e==="inline"?_=i.current:_=UR(S);var P,A=em(_,y);p===Gs?P=A[0]:p===Qs?P=A[A.length-1]:P=jE(_,y,S,I.offset),N(P)}else if(I.inlineTrigger)l(T);else if(I.offset>0)l(T,!0),f(),c.current=Xt(function(){v=tm(g,r);var $=S.getAttribute("aria-controls"),F=document.getElementById($),B=jE(F,v.elements);N(B)},5);else if(I.offset<0){var M=a(T,!0),D=M[M.length-2],R=E.get(D);l(D,!1),N(R)}}u==null||u(h)}}function qR(e){Promise.resolve().then(e)}var nm="__RC_UTIL_PATH_SPLIT__",VE=function(t){return t.join(nm)},XR=function(t){return t.split(nm)},rm="rc-menu-more";function KR(){var e=m.useState({}),t=ae(e,2),n=t[1],r=C.useRef(new Map),i=C.useRef(new Map),o=m.useState([]),a=ae(o,2),s=a[0],l=a[1],u=C.useRef(0),c=C.useRef(!1),d=function(){c.current||n({})},f=C.useCallback(function(E,x){process.env.NODE_ENV!=="production"&&bt(!r.current.has(E),"Duplicated key '".concat(E,"' used in Menu by path [").concat(x.join(" > "),"]"));var O=VE(x);i.current.set(O,E),r.current.set(E,O),u.current+=1;var S=u.current;qR(function(){S===u.current&&d()})},[]),h=C.useCallback(function(E,x){var O=VE(x);i.current.delete(O),r.current.delete(E)},[]),p=C.useCallback(function(E){l(E)},[]),g=C.useCallback(function(E,x){var O=r.current.get(E)||"",S=XR(O);return x&&s.includes(S[0])&&S.unshift(rm),S},[s]),v=C.useCallback(function(E,x){return E.filter(function(O){return O!==void 0}).some(function(O){var S=g(O,!0);return S.includes(x)})},[g]),b=function(){var x=Ke(r.current.keys());return s.length&&x.push(rm),x},y=C.useCallback(function(E){var x="".concat(r.current.get(E)).concat(nm),O=new Set;return Ke(i.current.keys()).forEach(function(S){S.startsWith(x)&&O.add(i.current.get(S))}),O},[]);return m.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:v,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Zs(e){var t=m.useRef(e);t.current=e;var n=m.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var GR=Math.random().toFixed(5).toString().slice(2),UE=0;function QR(e){var t=Cn(e,{value:e}),n=ae(t,2),r=n[0],i=n[1];return m.useEffect(function(){UE+=1;var o=process.env.NODE_ENV==="test"?"test":"".concat(GR,"-").concat(UE);i("rc-menu-uuid-".concat(o))},[]),r}function WE(e,t,n,r){var i=m.useContext(si),o=i.activeKey,a=i.onActive,s=i.onInactive,l={active:o===e};return t||(l.onMouseEnter=function(u){n==null||n({key:e,domEvent:u}),a(e)},l.onMouseLeave=function(u){r==null||r({key:e,domEvent:u}),s(e)}),l}function YE(e){var t=m.useContext(si),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function qE(e){var t=e.icon,n=e.props,r=e.children,i;return t===null||t===!1?null:(typeof t=="function"?i=m.createElement(t,U({},n)):typeof t!="boolean"&&(i=t),i||r||null)}var ZR=["item"];function lc(e){var t=e.item,n=yt(e,ZR);return Object.defineProperty(n,"item",{get:function(){return bt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var JR=["title","attribute","elementRef"],e$=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],t$=["active"],n$=function(e){bi(n,e);var t=zi(n);function n(){return Dn(this,n),t.apply(this,arguments)}return kn(n,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,s=i.elementRef,l=yt(i,JR),u=_r(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return bt(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(Ti.Item,Re({},a,{title:typeof o=="string"?o:void 0},u,{ref:s}))}}]),n}(m.Component),r$=m.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.eventKey,o=e.warnKey,a=e.disabled,s=e.itemIcon,l=e.children,u=e.role,c=e.onMouseEnter,d=e.onMouseLeave,f=e.onClick,h=e.onKeyDown,p=e.onFocus,g=yt(e,e$),v=kE(i),b=m.useContext(si),y=b.prefixCls,E=b.onItemClick,x=b.disabled,O=b.overflowDisabled,S=b.itemIcon,T=b.selectedKeys,I=b.onActive,N=m.useContext(Gh),_=N._internalRenderMenuItem,P="".concat(y,"-item"),A=m.useRef(),M=m.useRef(),D=x||a,R=vi(t,M),$=Ks(i);process.env.NODE_ENV!=="production"&&o&&bt(!1,"MenuItem should not leave undefined `key`.");var F=function(de){return{key:i,keyPath:Ke($).reverse(),item:A.current,domEvent:de}},B=s||S,z=WE(i,D,c,d),L=z.active,H=yt(z,t$),W=T.includes(i),k=YE($.length),G=function(de){if(!D){var J=F(de);f==null||f(lc(J)),E(J)}},Y=function(de){if(h==null||h(de),de.which===Xe.ENTER){var J=F(de);f==null||f(lc(J)),E(J)}},te=function(de){I(i),p==null||p(de)},se={};e.role==="option"&&(se["aria-selected"]=W);var ce=m.createElement(n$,Re({ref:A,elementRef:R,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":O&&v?null:v},_r(g,["extra"]),H,se,{component:"li","aria-disabled":a,style:U(U({},k),n),className:ie(P,V(V(V({},"".concat(P,"-active"),L),"".concat(P,"-selected"),W),"".concat(P,"-disabled"),D),r),onClick:G,onKeyDown:Y,onFocus:te}),l,m.createElement(qE,{props:U(U({},e),{},{isSelected:W}),icon:B}));return _&&(ce=_(ce,e,{selected:W})),ce});function i$(e,t){var n=e.eventKey,r=oc(),i=Ks(n);return m.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:m.createElement(r$,Re({},e,{ref:t}))}const uc=m.forwardRef(i$);var o$=["className","children"],a$=function(t,n){var r=t.className,i=t.children,o=yt(t,o$),a=m.useContext(si),s=a.prefixCls,l=a.mode,u=a.rtl;return m.createElement("ul",Re({className:ie(s,u&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},im=m.forwardRef(a$);im.displayName="SubMenuList";function om(e,t){return mr(e).map(function(n,r){if(m.isValidElement(n)){var i,o,a=n.key,s=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,l=s==null;l&&(s="tmp_key-".concat([].concat(Ke(t),[r]).join("-")));var u={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(u.warnKey=!0),m.cloneElement(n,u)}return n})}var rr={adjustX:1,adjustY:1},s$={topLeft:{points:["bl","tl"],overflow:rr},topRight:{points:["br","tr"],overflow:rr},bottomLeft:{points:["tl","bl"],overflow:rr},bottomRight:{points:["tr","br"],overflow:rr},leftTop:{points:["tr","tl"],overflow:rr},leftBottom:{points:["br","bl"],overflow:rr},rightTop:{points:["tl","tr"],overflow:rr},rightBottom:{points:["bl","br"],overflow:rr}},l$={topLeft:{points:["bl","tl"],overflow:rr},topRight:{points:["br","tr"],overflow:rr},bottomLeft:{points:["tl","bl"],overflow:rr},bottomRight:{points:["tr","br"],overflow:rr},rightTop:{points:["tr","tl"],overflow:rr},rightBottom:{points:["br","bl"],overflow:rr},leftTop:{points:["tl","tr"],overflow:rr},leftBottom:{points:["bl","br"],overflow:rr}};function XE(e,t,n){if(t)return t;if(n)return n[e]||n.other}var u$={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function c$(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,s=e.popupOffset,l=e.disabled,u=e.mode,c=e.onVisibleChange,d=m.useContext(si),f=d.getPopupContainer,h=d.rtl,p=d.subMenuOpenDelay,g=d.subMenuCloseDelay,v=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,E=d.rootClassName,x=d.motion,O=d.defaultMotions,S=m.useState(!1),T=ae(S,2),I=T[0],N=T[1],_=U(h?U({},l$):U({},s$),v),P=u$[u],A=XE(u,x,O),M=m.useRef(A);u!=="inline"&&(M.current=A);var D=U(U({},M.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),R=m.useRef();return m.useEffect(function(){return R.current=Xt(function(){N(n)}),function(){Xt.cancel(R.current)}},[n]),m.createElement(ec,{prefixCls:t,popupClassName:ie("".concat(t,"-popup"),V({},"".concat(t,"-rtl"),h),a,E),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:_,popupPlacement:P,popupVisible:I,popup:i,popupStyle:o,popupAlign:s&&{offset:s},action:l?[]:[b],mouseEnterDelay:p,mouseLeaveDelay:g,onPopupVisibleChange:c,forceRender:y,popupMotion:D,fresh:!0},r)}function d$(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",a=m.useContext(si),s=a.prefixCls,l=a.forceSubMenuRender,u=a.motion,c=a.defaultMotions,d=a.mode,f=m.useRef(!1);f.current=d===o;var h=m.useState(!f.current),p=ae(h,2),g=p[0],v=p[1],b=f.current?n:!1;m.useEffect(function(){f.current&&v(!1)},[d]);var y=U({},XE(o,u,c));r.length>1&&(y.motionAppear=!1);var E=y.onVisibleChanged;return y.onVisibleChanged=function(x){return!f.current&&!x&&v(!0),E==null?void 0:E(x)},g?null:m.createElement(Xs,{mode:o,locked:!f.current},m.createElement(Or,Re({visible:b},y,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var O=x.className,S=x.style;return m.createElement(im,{id:t,className:O,style:S},i)}))}var f$=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],h$=["active"],m$=m.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.title,o=e.eventKey,a=e.warnKey,s=e.disabled,l=e.internalPopupClose,u=e.children,c=e.itemIcon,d=e.expandIcon,f=e.popupClassName,h=e.popupOffset,p=e.popupStyle,g=e.onClick,v=e.onMouseEnter,b=e.onMouseLeave,y=e.onTitleClick,E=e.onTitleMouseEnter,x=e.onTitleMouseLeave,O=yt(e,f$),S=kE(o),T=m.useContext(si),I=T.prefixCls,N=T.mode,_=T.openKeys,P=T.disabled,A=T.overflowDisabled,M=T.activeKey,D=T.selectedKeys,R=T.itemIcon,$=T.expandIcon,F=T.onItemClick,B=T.onOpenChange,z=T.onActive,L=m.useContext(Gh),H=L._internalRenderSubMenuItem,W=m.useContext(FE),k=W.isSubPathKey,G=Ks(),Y="".concat(I,"-submenu"),te=P||s,se=m.useRef(),ce=m.useRef();process.env.NODE_ENV!=="production"&&a&&bt(!1,"SubMenu should not leave undefined `key`.");var ue=c??R,de=d??$,J=_.includes(o),Z=!A&&J,oe=k(D,o),X=WE(o,te,E,x),ee=X.active,ne=yt(X,h$),be=m.useState(!1),Ce=ae(be,2),Se=Ce[0],ve=Ce[1],he=function(Be){te||ve(Be)},Ae=function(Be){he(!0),v==null||v({key:o,domEvent:Be})},Ie=function(Be){he(!1),b==null||b({key:o,domEvent:Be})},me=m.useMemo(function(){return ee||(N!=="inline"?Se||k([M],o):!1)},[N,ee,M,Se,o,k]),Me=YE(G.length),Q=function(Be){te||(y==null||y({key:o,domEvent:Be}),N==="inline"&&B(o,!J))},le=Zs(function(Te){g==null||g(lc(Te)),F(Te)}),pe=function(Be){N!=="inline"&&B(o,Be)},ye=function(){z(o)},Fe=S&&"".concat(S,"-popup"),je=m.useMemo(function(){return m.createElement(qE,{icon:N!=="horizontal"?de:void 0,props:U(U({},e),{},{isOpen:Z,isSubMenu:!0})},m.createElement("i",{className:"".concat(Y,"-arrow")}))},[N,de,e,Z,Y]),De=m.createElement("div",Re({role:"menuitem",style:Me,className:"".concat(Y,"-title"),tabIndex:te?null:-1,ref:se,title:typeof i=="string"?i:null,"data-menu-id":A&&S?null:S,"aria-expanded":Z,"aria-haspopup":!0,"aria-controls":Fe,"aria-disabled":te,onClick:Q,onFocus:ye},ne),i,je),we=m.useRef(N);if(N!=="inline"&&G.length>1?we.current="vertical":we.current=N,!A){var Le=we.current;De=m.createElement(c$,{mode:Le,prefixCls:Y,visible:!l&&Z&&N!=="inline",popupClassName:f,popupOffset:h,popupStyle:p,popup:m.createElement(Xs,{mode:Le==="horizontal"?"vertical":Le},m.createElement(im,{id:Fe,ref:ce},u)),disabled:te,onVisibleChange:pe},De)}var Ue=m.createElement(Ti.Item,Re({ref:t,role:"none"},O,{component:"li",style:n,className:ie(Y,"".concat(Y,"-").concat(N),r,V(V(V(V({},"".concat(Y,"-open"),Z),"".concat(Y,"-active"),me),"".concat(Y,"-selected"),oe),"".concat(Y,"-disabled"),te)),onMouseEnter:Ae,onMouseLeave:Ie}),De,!A&&m.createElement(d$,{id:Fe,open:Z,keyPath:G},u));return H&&(Ue=H(Ue,e,{selected:oe,active:me,open:Z,disabled:te})),m.createElement(Xs,{onItemClick:le,mode:N==="horizontal"?"vertical":N,itemIcon:ue,expandIcon:de},Ue)}),cc=m.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=Ks(n),o=om(r,i),a=oc();m.useEffect(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=m.createElement(m$,Re({ref:t},e),o),m.createElement($E.Provider,{value:i},s)});process.env.NODE_ENV!=="production"&&(cc.displayName="SubMenu");function KE(e){var t=e.className,n=e.style,r=m.useContext(si),i=r.prefixCls,o=oc();return o?null:m.createElement("li",{role:"separator",className:ie("".concat(i,"-item-divider"),t),style:n})}var p$=["className","title","eventKey","children"],g$=m.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var i=e.children,o=yt(e,p$),a=m.useContext(si),s=a.prefixCls,l="".concat(s,"-item-group");return m.createElement("li",Re({ref:t,role:"presentation"},o,{onClick:function(c){return c.stopPropagation()},className:ie(l,n)}),m.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),m.createElement("ul",{role:"group",className:"".concat(l,"-list")},i))}),am=m.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=Ks(n),o=om(r,i),a=oc();return a?o:m.createElement(g$,Re({ref:t},_r(e,["warnKey"])),o)});process.env.NODE_ENV!=="production"&&(am.displayName="MenuItemGroup");var v$=["label","children","key","type","extra"];function sm(e,t,n){var r=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map(function(s,l){if(s&&lt(s)==="object"){var u=s,c=u.label,d=u.children,f=u.key,h=u.type,p=u.extra,g=yt(u,v$),v=f??"tmp-".concat(l);return d||h==="group"?h==="group"?m.createElement(i,Re({key:v},g,{title:c}),sm(d,t,n)):m.createElement(o,Re({key:v},g,{title:c}),sm(d,t,n)):h==="divider"?m.createElement(a,Re({key:v},g)):m.createElement(r,Re({key:v},g,{extra:p}),c,(!!p||p===0)&&m.createElement("span",{className:"".concat(n,"-item-extra")},p))}return null}).filter(function(s){return s})}function GE(e,t,n,r,i){var o=e,a=U({divider:KE,item:uc,group:am,submenu:cc},r);return t&&(o=sm(t,a,i)),om(o,n)}var b$=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],$o=[],y$=m.forwardRef(function(e,t){var n,r=e,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,u=r.tabIndex,c=u===void 0?0:u,d=r.items,f=r.children,h=r.direction,p=r.id,g=r.mode,v=g===void 0?"vertical":g,b=r.inlineCollapsed,y=r.disabled,E=r.disabledOverflow,x=r.subMenuOpenDelay,O=x===void 0?.1:x,S=r.subMenuCloseDelay,T=S===void 0?.1:S,I=r.forceSubMenuRender,N=r.defaultOpenKeys,_=r.openKeys,P=r.activeKey,A=r.defaultActiveFirst,M=r.selectable,D=M===void 0?!0:M,R=r.multiple,$=R===void 0?!1:R,F=r.defaultSelectedKeys,B=r.selectedKeys,z=r.onSelect,L=r.onDeselect,H=r.inlineIndent,W=H===void 0?24:H,k=r.motion,G=r.defaultMotions,Y=r.triggerSubMenuAction,te=Y===void 0?"hover":Y,se=r.builtinPlacements,ce=r.itemIcon,ue=r.expandIcon,de=r.overflowedIndicator,J=de===void 0?"...":de,Z=r.overflowedIndicatorPopupClassName,oe=r.getPopupContainer,X=r.onClick,ee=r.onOpenChange,ne=r.onKeyDown,be=r.openAnimation,Ce=r.openTransitionName,Se=r._internalRenderMenuItem,ve=r._internalRenderSubMenuItem,he=r._internalComponents,Ae=yt(r,b$),Ie=m.useMemo(function(){return[GE(f,d,$o,he,o),GE(f,d,$o,{},o)]},[f,d,he]),me=ae(Ie,2),Me=me[0],Q=me[1],le=m.useState(!1),pe=ae(le,2),ye=pe[0],Fe=pe[1],je=m.useRef(),De=QR(p),we=h==="rtl";process.env.NODE_ENV!=="production"&&bt(!be&&!Ce,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Le=Cn(N,{value:_,postState:function(Tt){return Tt||$o}}),Ue=ae(Le,2),Te=Ue[0],Be=Ue[1],it=function(Tt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function qt(){Be(Tt),ee==null||ee(Tt)}Mt?zr.flushSync(qt):qt()},wt=m.useState(Te),Dt=ae(wt,2),Pt=Dt[0],xt=Dt[1],Ht=m.useRef(!1),kt=m.useMemo(function(){return(v==="inline"||v==="vertical")&&b?["vertical",b]:[v,!1]},[v,b]),at=ae(kt,2),dt=at[0],$e=at[1],Ve=dt==="inline",Ye=m.useState(dt),ot=ae(Ye,2),Pe=ot[0],_e=ot[1],xe=m.useState($e),ze=ae(xe,2),qe=ze[0],et=ze[1];m.useEffect(function(){_e(dt),et($e),Ht.current&&(Ve?Be(Pt):it($o))},[dt,$e]);var nt=m.useState(0),mt=ae(nt,2),vt=mt[0],ht=mt[1],St=vt>=Me.length-1||Pe!=="horizontal"||E;m.useEffect(function(){Ve&&xt(Te)},[Te]),m.useEffect(function(){return Ht.current=!0,function(){Ht.current=!1}},[]);var At=KR(),Bt=At.registerPath,en=At.unregisterPath,fn=At.refreshOverflowKeys,Ut=At.isSubPathKey,Rt=At.getKeyPath,tt=At.getKeys,He=At.getSubPathKeys,ke=m.useMemo(function(){return{registerPath:Bt,unregisterPath:en}},[Bt,en]),Oe=m.useMemo(function(){return{isSubPathKey:Ut}},[Ut]);m.useEffect(function(){fn(St?$o:Me.slice(vt+1).map(function(st){return st.key}))},[vt,St]);var Qe=Cn(P||A&&((n=Me[0])===null||n===void 0?void 0:n.key),{value:P}),ut=ae(Qe,2),pt=ut[0],$t=ut[1],sn=Zs(function(st){$t(st)}),jt=Zs(function(){$t(void 0)});C.useImperativeHandle(t,function(){return{list:je.current,focus:function(Tt){var Mt,qt=tt(),Zt=tm(qt,De),Jn=Zt.elements,er=Zt.key2element,Cr=Zt.element2key,Br=em(je.current,Jn),wr=pt??(Br[0]?Cr.get(Br[0]):(Mt=Me.find(function(na){return!na.props.disabled}))===null||Mt===void 0?void 0:Mt.key),xr=er.get(wr);if(wr&&xr){var Yn;xr==null||(Yn=xr.focus)===null||Yn===void 0||Yn.call(xr,Tt)}}}});var rt=Cn(F||[],{value:B,postState:function(Tt){return Array.isArray(Tt)?Tt:Tt==null?$o:[Tt]}}),gt=ae(rt,2),It=gt[0],hn=gt[1],_n=function(Tt){if(D){var Mt=Tt.key,qt=It.includes(Mt),Zt;$?qt?Zt=It.filter(function(er){return er!==Mt}):Zt=[].concat(Ke(It),[Mt]):Zt=[Mt],hn(Zt);var Jn=U(U({},Tt),{},{selectedKeys:Zt});qt?L==null||L(Jn):z==null||z(Jn)}!$&&Te.length&&Pe!=="inline"&&it($o)},Un=Zs(function(st){X==null||X(lc(st)),_n(st)}),Fr=Zs(function(st,Tt){var Mt=Te.filter(function(Zt){return Zt!==st});if(Tt)Mt.push(st);else if(Pe!=="inline"){var qt=He(st);Mt=Mt.filter(function(Zt){return!qt.has(Zt)})}ca(Te,Mt,!0)||it(Mt,!0)}),Zr=function(Tt,Mt){var qt=Mt??!Te.includes(Tt);Fr(Tt,qt)},Jr=YR(Pe,pt,we,De,je,tt,Rt,$t,Zr,ne);m.useEffect(function(){Fe(!0)},[]);var Ri=m.useMemo(function(){return{_internalRenderMenuItem:Se,_internalRenderSubMenuItem:ve}},[Se,ve]),eo=Pe!=="horizontal"||E?Me:Me.map(function(st,Tt){return m.createElement(Xs,{key:st.key,overflowDisabled:Tt>vt},st)}),zt=m.createElement(Ti,Re({id:p,ref:je,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:uc,className:ie(o,"".concat(o,"-root"),"".concat(o,"-").concat(Pe),l,V(V({},"".concat(o,"-inline-collapsed"),qe),"".concat(o,"-rtl"),we),a),dir:h,style:s,role:"menu",tabIndex:c,data:eo,renderRawItem:function(Tt){return Tt},renderRawRest:function(Tt){var Mt=Tt.length,qt=Mt?Me.slice(-Mt):null;return m.createElement(cc,{eventKey:rm,title:J,disabled:St,internalPopupClose:Mt===0,popupClassName:Z},qt)},maxCount:Pe!=="horizontal"||E?Ti.INVALIDATE:Ti.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Tt){ht(Tt)},onKeyDown:Jr},Ae));return m.createElement(Gh.Provider,{value:Ri},m.createElement(LE.Provider,{value:De},m.createElement(Xs,{prefixCls:o,rootClassName:a,mode:Pe,openKeys:Te,rtl:we,disabled:y,motion:ye?k:null,defaultMotions:ye?G:null,activeKey:pt,onActive:sn,onInactive:jt,selectedKeys:It,inlineIndent:W,subMenuOpenDelay:O,subMenuCloseDelay:T,forceSubMenuRender:I,builtinPlacements:se,triggerSubMenuAction:te,getPopupContainer:oe,itemIcon:ce,expandIcon:ue,onItemClick:Un,onOpenChange:Fr},m.createElement(FE.Provider,{value:Oe},zt),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(RE.Provider,{value:ke},Q)))))}),Js=y$;Js.Item=uc,Js.SubMenu=cc,Js.ItemGroup=am,Js.Divider=KE;var E$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},S$=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:E$}))},QE=m.forwardRef(S$);process.env.NODE_ENV!=="production"&&(QE.displayName="EllipsisOutlined");const ZE=m.createContext(null),C$=ZE.Provider,JE=m.createContext(null),w$=JE.Provider;var x$=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],T$=C.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,i=e.className,o=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,u=l===void 0?!1:l,c=e.type,d=c===void 0?"checkbox":c,f=e.title,h=e.onChange,p=yt(e,x$),g=C.useRef(null),v=C.useRef(null),b=Cn(u,{value:a}),y=ae(b,2),E=y[0],x=y[1];C.useImperativeHandle(t,function(){return{focus:function(I){var N;(N=g.current)===null||N===void 0||N.focus(I)},blur:function(){var I;(I=g.current)===null||I===void 0||I.blur()},input:g.current,nativeElement:v.current}});var O=ie(r,i,V(V({},"".concat(r,"-checked"),E),"".concat(r,"-disabled"),s)),S=function(I){s||("checked"in e||x(I.target.checked),h==null||h({target:U(U({},e),{},{type:d,checked:I.target.checked}),stopPropagation:function(){I.stopPropagation()},preventDefault:function(){I.preventDefault()},nativeEvent:I.nativeEvent}))};return m.createElement("span",{className:O,title:f,style:o,ref:v},m.createElement("input",Re({},p,{className:"".concat(r,"-input"),ref:g,onChange:S,disabled:s,checked:!!E,type:d})),m.createElement("span",{className:"".concat(r,"-inner")}))});function O$(e){const t=C.useRef(null),n=()=>{Xt.cancel(t.current),t.current=null};return[()=>{n(),t.current=Xt(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}const N$=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},zn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},_$=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:u,lineWidth:c,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:h,dotColorDisabled:p,lineType:g,radioColor:v,radioBgColor:b,calc:y}=e,E=`${t}-inner`,O=y(i).sub(y(4).mul(2)),S=y(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},zn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${fe(c)} ${g} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
204
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},qh(rn(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const B3=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:u,colorText:c,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:p,colorFillSecondary:g,colorBgContainerDisabled:v,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:E,controlOutline:x}=e,O=s*2,S=r*2,T=Math.min(i-O,i-S),I=Math.min(o-O,o-S),N=Math.min(a-O,a-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:u+50,optionSelectedColor:c,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:T,multipleItemHeightSM:I,multipleItemHeightLG:N,multipleSelectorBgDisabled:v,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:E,activeOutlineColor:x,selectAffixPadding:s}},vE=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${fe(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${fe(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},bE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},vE(e,t))}),z3=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},vE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),bE(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),bE(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),yE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${fe(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},EE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},yE(e,t))}),H3=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},yE(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),EE(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),EE(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),j3=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${fe(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),SE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${fe(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},CE=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},SE(e,t))}),V3=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},SE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),CE(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),CE(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),U3=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},z3(e)),H3(e)),j3(e)),V3(e))}),W3=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Y3=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},q3=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},W3(e)),Y3(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ns),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Ns),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Su()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},X3=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},q3(e),F3(e),$3(e),M3(e),{[`${t}-rtl`]:{direction:"rtl"}},ah(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},K3=wn("Select",(e,{rootPrefixCls:t})=>{const n=rn(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[X3(n),U3(n)]},B3,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var G3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Q3=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:G3}))},Xh=m.forwardRef(Q3);process.env.NODE_ENV!=="production"&&(Xh.displayName="CheckOutlined");var Z3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},J3=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:Z3}))},Kh=m.forwardRef(J3);process.env.NODE_ENV!=="production"&&(Kh.displayName="DownOutlined");var eR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},tR=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:eR}))},wE=m.forwardRef(tR);process.env.NODE_ENV!=="production"&&(wE.displayName="SearchOutlined");function nR({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:u,showArrow:c,componentName:d}){process.env.NODE_ENV!=="production"&&on(d).deprecated(!t,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const f=t??m.createElement(Is,null),h=b=>e===null&&!a&&!c?null:m.createElement(m.Fragment,null,l!==!1&&b,a&&u);let p=null;if(e!==void 0)p=h(e);else if(i)p=h(m.createElement(wa,{spin:!0}));else{const b=`${s}-suffix`;p=({open:y,showSearch:E})=>h(y&&E?m.createElement(wE,{className:b}):m.createElement(Kh,{className:b}))}let g=null;n!==void 0?g=n:o?g=m.createElement(Xh,null):g=null;let v=null;return r!==void 0?v=r:v=m.createElement(Ui,null),{clearIcon:f,suffixIcon:p,itemIcon:g,removeIcon:v}}function rR(e,t){return t!==void 0?t:e!==null}var iR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const xE="SECRET_COMBOBOX_MODE_DO_NOT_USE",TE=(e,t)=>{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:u,rootClassName:c,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:p=256,placement:g,listItemHeight:v,size:b,disabled:y,notFoundContent:E,status:x,builtinPlacements:O,dropdownMatchSelectWidth:S,popupMatchSelectWidth:T,direction:I,style:N,allowClear:_,variant:P,dropdownStyle:A,transitionName:M,tagRender:D,maxCount:R,prefix:$,dropdownRender:F,popupRender:B,onDropdownVisibleChange:z,onOpenChange:L,styles:H,classNames:W}=e,k=iR(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:G,getPrefixCls:Y,renderEmpty:te,direction:se,virtual:ce,popupMatchSelectWidth:ue,popupOverflow:de}=m.useContext(Qt),{showSearch:J,style:Z,styles:oe,className:X,classNames:ee}=Gn("select"),[,ne]=gr(),be=v??(ne==null?void 0:ne.controlHeight),Ce=Y("select",s),Se=Y(),ve=I??se,{compactSize:he,compactItemClassnames:Ae}=Ru(Ce,ve),[Ie,me]=Wh("select",P,l),Me=Wi(Ce),[Q,le,pe]=K3(Ce,Me),ye=m.useMemo(()=>{const{mode:qe}=e;if(qe!=="combobox")return qe===xE?"combobox":qe},[e.mode]),Fe=ye==="multiple"||ye==="tags",je=rR(e.suffixIcon,e.showArrow),De=(n=T??S)!==null&&n!==void 0?n:ue,we=((r=H==null?void 0:H.popup)===null||r===void 0?void 0:r.root)||((i=oe.popup)===null||i===void 0?void 0:i.root)||A,Le=B||F,Ue=L||z,{status:Te,hasFeedback:Be,isFormItemInput:it,feedbackIcon:Ct}=m.useContext(ko),Dt=Uh(Te,x);let Pt;E!==void 0?Pt=E:ye==="combobox"?Pt=null:Pt=(te==null?void 0:te("Select"))||m.createElement(I3,{componentName:"Select"});const{suffixIcon:wt,itemIcon:Ht,removeIcon:kt,clearIcon:at}=nR(Object.assign(Object.assign({},k),{multiple:Fe,hasFeedback:Be,feedbackIcon:Ct,showSuffixIcon:je,prefixCls:Ce,componentName:"Select"})),dt=_===!0?{clearIcon:at}:_,$e=_r(k,["suffixIcon","itemIcon"]),Ve=ie(((o=W==null?void 0:W.popup)===null||o===void 0?void 0:o.root)||((a=ee==null?void 0:ee.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${Ce}-dropdown-${ve}`]:ve==="rtl"},c,ee.root,W==null?void 0:W.root,pe,Me,le),Ye=ai(qe=>{var et;return(et=b??he)!==null&&et!==void 0?et:qe}),ot=m.useContext(Si),Pe=y??ot,_e=ie({[`${Ce}-lg`]:Ye==="large",[`${Ce}-sm`]:Ye==="small",[`${Ce}-rtl`]:ve==="rtl",[`${Ce}-${Ie}`]:me,[`${Ce}-in-form-item`]:it},nc(Ce,Dt,Be),Ae,X,u,ee.root,W==null?void 0:W.root,c,pe,Me,le),xe=m.useMemo(()=>g!==void 0?g:ve==="rtl"?"bottomRight":"bottomLeft",[g,ve]);if(process.env.NODE_ENV!=="production"){const qe=on("Select");Object.entries({dropdownMatchSelectWidth:"popupMatchSelectWidth",dropdownStyle:"styles.popup.root",dropdownClassName:"classNames.popup.root",popupClassName:"classNames.popup.root",dropdownRender:"popupRender",onDropdownVisibleChange:"onOpenChange",bordered:"variant"}).forEach(([nt,mt])=>{qe.deprecated(!(nt in e),nt,mt)}),process.env.NODE_ENV!=="production"&&qe(!("showArrow"in e),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),process.env.NODE_ENV!=="production"&&qe(!(typeof R<"u"&&!Fe),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[ze]=Au("SelectLike",we==null?void 0:we.zIndex);return Q(m.createElement(Vh,Object.assign({ref:t,virtual:ce,showSearch:J},$e,{style:Object.assign(Object.assign(Object.assign(Object.assign({},oe.root),H==null?void 0:H.root),Z),N),dropdownMatchSelectWidth:De,transitionName:qi(Se,"slide-up",M),builtinPlacements:P3(O,de),listHeight:p,listItemHeight:be,mode:ye,prefixCls:Ce,placement:xe,direction:ve,prefix:$,suffixIcon:wt,menuItemSelectedIcon:Ht,removeIcon:kt,allowClear:dt,notFoundContent:Pt,className:_e,getPopupContainer:d||G,dropdownClassName:Ve,disabled:Pe,dropdownStyle:Object.assign(Object.assign({},we),{zIndex:ze}),maxCount:Fe?R:void 0,tagRender:Fe?D:void 0,dropdownRender:Le,onDropdownVisibleChange:Ue})))};process.env.NODE_ENV!=="production"&&(TE.displayName="Select");const vr=m.forwardRef(TE),oR=ek(vr,"dropdownAlign");vr.SECRET_COMBOBOX_MODE_DO_NOT_USE=xE,vr.Option=Fh,vr.OptGroup=$h,vr._InternalPanelDoNotUseOrYouWillBeFired=oR,process.env.NODE_ENV!=="production"&&(vr.displayName="Select");const aR=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},sR=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},qs=["xxl","xl","lg","md","sm","xs"],lR=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),uR=e=>{const t=e,n=[].concat(qs).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(t[a]<=t[s]))throw new Error(`${a}<=${s} fails : !(${t[a]}<=${t[s]})`);if(i<n.length-1){const l=`screen${o}Max`;if(!(t[s]<=t[l]))throw new Error(`${s}<=${l} fails : !(${t[s]}<=${t[l]})`);const c=`screen${n[i+1].toUpperCase()}Min`;if(!(t[l]<=t[c]))throw new Error(`${l}<=${c} fails : !(${t[l]}<=${t[c]})`)}}),e},cR=()=>{const[,e]=gr(),t=lR(uR(e));return C.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(t).forEach(([o,a])=>{const s=({matches:u})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:u}))},l=window.matchMedia(a);aR(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(t).forEach(o=>{const a=this.matchHandlers[o];sR(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[e])};function dR(){const[,e]=m.useReducer(t=>t+1,0);return e}function OE(e=!0,t={}){const n=C.useRef(t),r=dR(),i=cR();return Kt(()=>{const o=i.subscribe(a=>{n.current=a,e&&r()});return()=>i.unsubscribe(o)},[]),n.current}function NE(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,o=e.bodyClassName,a=e.className,s=e.style;return m.createElement("div",{className:ie("".concat(n,"-content"),a),style:s},m.createElement("div",{className:ie("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof t=="function"?t():t))}var La={shiftX:64,adjustY:1},Da={adjustX:1,shiftY:!0},Ur=[0,0],fR={left:{points:["cr","cl"],overflow:Da,offset:[-4,0],targetOffset:Ur},right:{points:["cl","cr"],overflow:Da,offset:[4,0],targetOffset:Ur},top:{points:["bc","tc"],overflow:La,offset:[0,-4],targetOffset:Ur},bottom:{points:["tc","bc"],overflow:La,offset:[0,4],targetOffset:Ur},topLeft:{points:["bl","tl"],overflow:La,offset:[0,-4],targetOffset:Ur},leftTop:{points:["tr","tl"],overflow:Da,offset:[-4,0],targetOffset:Ur},topRight:{points:["br","tr"],overflow:La,offset:[0,-4],targetOffset:Ur},rightTop:{points:["tl","tr"],overflow:Da,offset:[4,0],targetOffset:Ur},bottomRight:{points:["tr","br"],overflow:La,offset:[0,4],targetOffset:Ur},rightBottom:{points:["bl","br"],overflow:Da,offset:[4,0],targetOffset:Ur},bottomLeft:{points:["tl","bl"],overflow:La,offset:[0,4],targetOffset:Ur},leftBottom:{points:["br","bl"],overflow:Da,offset:[-4,0],targetOffset:Ur}},hR=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],mR=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,u=l===void 0?.1:l,c=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,h=t.children,p=t.onVisibleChange,g=t.afterVisibleChange,v=t.transitionName,b=t.animation,y=t.motion,E=t.placement,x=E===void 0?"right":E,O=t.align,S=O===void 0?{}:O,T=t.destroyTooltipOnHide,I=T===void 0?!1:T,N=t.defaultVisible,_=t.getTooltipContainer,P=t.overlayInnerStyle;t.arrowContent;var A=t.overlay,M=t.id,D=t.showArrow,R=D===void 0?!0:D,$=t.classNames,F=t.styles,B=yt(t,hR),z=ks(M),L=C.useRef(null);C.useImperativeHandle(n,function(){return L.current});var H=U({},B);"visible"in t&&(H.popupVisible=t.visible);var W=function(){return m.createElement(NE,{key:"content",prefixCls:f,id:z,bodyClassName:$==null?void 0:$.body,overlayInnerStyle:U(U({},P),F==null?void 0:F.body)},A)},k=function(){var Y=m.Children.only(h),te=(Y==null?void 0:Y.props)||{},se=U(U({},te),{},{"aria-describedby":A?z:null});return m.cloneElement(h,se)};return m.createElement(ec,Re({popupClassName:ie(r,$==null?void 0:$.root),prefixCls:f,popup:W,action:o,builtinPlacements:fR,popupPlacement:x,ref:L,popupAlign:S,getPopupContainer:_,onPopupVisibleChange:p,afterPopupVisibleChange:g,popupTransitionName:v,popupAnimation:b,popupMotion:y,defaultPopupVisible:N,autoDestroy:I,mouseLeaveDelay:u,popupStyle:U(U({},c),F==null?void 0:F.root),mouseEnterDelay:s,arrow:R},H),k())};const pR=C.forwardRef(mR);function gR(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),u=i-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-u,f=c,h=2*i-s,p=l,g=2*i-o,v=a,b=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1),E=`polygon(${y}px 100%, 50% ${y}px, ${2*i-y}px 100%, ${y}px 100%)`,x=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${u} ${c} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${p} A ${r} ${r} 0 0 0 ${g} ${v} Z')`;return{arrowShadowWidth:b,arrowPath:x,arrowPolygon:E}}const vR=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${fe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},_E=8;function IE(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?_E:r}}function rc(e,t){return e?t:{}}function bR(e,t,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}={};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},vR(e,t,i)),{"&:before":{background:t}})]},rc(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${fe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),rc(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${fe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),rc(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),rc(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function yR(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const AE={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ER={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},SR=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function CR(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o}=e,a=t/2,s={};return Object.keys(AE).forEach(l=>{const u=r&&ER[l]||AE[l],c=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(s[l]=c,SR.has(l)&&(c.autoArrow=!1),l){case"top":case"topLeft":case"topRight":c.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":c.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":c.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":c.offset[0]=a+i;break}const d=IE({contentRadius:o,limitVerticalRadius:!0});if(r)switch(l){case"topLeft":case"bottomLeft":c.offset[0]=-d.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":c.offset[0]=d.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":c.offset[1]=-d.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":c.offset[1]=d.arrowOffsetHorizontal*2-a;break}c.overflow=yR(l,d,t,n),c.htmlRegion="visibleFirst"}),s}const wR=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:u,paddingSM:c,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=e,p=t(a).add(h).add(f).equal(),g=t(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:g,minHeight:l,padding:`${fe(e.calc(c).div(2).equal())} ${fe(d)}`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:u,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:p},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,_E)}},[`${n}-content`]:{position:"relative"}}),IP(e,(v,{darkColor:b})=>({[`&${n}-${v}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},bR(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},xR=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},IE({contentRadius:e.borderRadius,limitVerticalRadius:!0})),gR(rn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),PE=(e,t=!0)=>wn("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=rn(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[wR(s),yy(r,"zoom-big-fast")]},xR,{resetStyle:!1,injectStyle:t})(e),TR=Mo.map(e=>`${e}-inverse`);function OR(e,t=!0){return t?[].concat(Ke(TR),Ke(Mo)).includes(e):Mo.includes(e)}function ME(e,t){const n=OR(t),r=ie({[`${e}-${t}`]:t&&n}),i={},o={};return t&&!n&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const NR=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:s}=m.useContext(Qt),l=s("tooltip",t),[u,c,d]=PE(l),f=ME(l,o),h=f.arrowStyle,p=Object.assign(Object.assign({},a),f.overlayStyle),g=ie(c,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return u(m.createElement("div",{className:g,style:h},m.createElement("div",{className:`${l}-arrow`}),m.createElement(NE,Object.assign({},e,{className:c,prefixCls:l,overlayInnerStyle:p}),i)))};var _R=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ki=m.forwardRef((e,t)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:u,afterOpenChange:c,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:p=!0,title:g,overlay:v,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:E=!0,motion:x,getPopupContainer:O,placement:S="top",mouseEnterDelay:T=.1,mouseLeaveDelay:I=.1,overlayStyle:N,rootClassName:_,overlayClassName:P,styles:A,classNames:M}=e,D=_R(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),R=!!p,[,$]=gr(),{getPopupContainer:F,getPrefixCls:B,direction:z,className:L,style:H,classNames:W,styles:k}=Gn("tooltip"),G=on("Tooltip"),Y=m.useRef(null),te=()=>{var je;(je=Y.current)===null||je===void 0||je.forceAlign()};m.useImperativeHandle(t,()=>{var je,De;return{forceAlign:te,forcePopupAlign:()=>{G.deprecated(!1,"forcePopupAlign","forceAlign"),te()},nativeElement:(je=Y.current)===null||je===void 0?void 0:je.nativeElement,popupElement:(De=Y.current)===null||De===void 0?void 0:De.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["destroyTooltipOnHide","destroyOnHidden"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(([je,De])=>{G.deprecated(!(je in e),je,De)}),process.env.NODE_ENV!=="production"&&G(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&G(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[se,ce]=Cn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),ue=!g&&!v&&g!==0,de=je=>{var De,we;ce(ue?!1:je),ue||((De=e.onOpenChange)===null||De===void 0||De.call(e,je),(we=e.onVisibleChange)===null||we===void 0||we.call(e,je))},J=m.useMemo(()=>{var je,De;let we=y;return typeof p=="object"&&(we=(De=(je=p.pointAtCenter)!==null&&je!==void 0?je:p.arrowPointAtCenter)!==null&&De!==void 0?De:y),b||CR({arrowPointAtCenter:we,autoAdjustOverflow:E,arrowWidth:R?$.sizePopupArrow:0,borderRadius:$.borderRadius,offset:$.marginXXS})},[y,p,b,$]),Z=m.useMemo(()=>g===0?g:v||g||"",[v,g]),oe=m.createElement(zs,{space:!0},typeof Z=="function"?Z():Z),X=B("tooltip",i),ee=B(),ne=e["data-popover-inject"];let be=se;!("open"in e)&&!("visible"in e)&&ue&&(be=!1);const Ce=m.isValidElement(u)&&!zb(u)?u:m.createElement("span",null,u),Se=Ce.props,ve=!Se.className||typeof Se.className=="string"?ie(Se.className,o||`${X}-open`):Se.className,[he,Ae,Ie]=PE(X,!ne),me=ME(X,s),Me=me.arrowStyle,Q=ie(P,{[`${X}-rtl`]:z==="rtl"},me.className,_,Ae,Ie,L,W.root,M==null?void 0:M.root),le=ie(W.body,M==null?void 0:M.body),[pe,ye]=Au("Tooltip",D.zIndex),Fe=m.createElement(pR,Object.assign({},D,{zIndex:pe,showArrow:R,placement:S,mouseEnterDelay:T,mouseLeaveDelay:I,prefixCls:X,classNames:{root:Q,body:le},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Me),k.root),H),N),A==null?void 0:A.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},k.body),l),A==null?void 0:A.body),me.overlayStyle)},getTooltipContainer:O||a||F,ref:Y,builtinPlacements:J,overlay:oe,visible:be,onVisibleChange:de,afterVisibleChange:c??d,arrowContent:m.createElement("span",{className:`${X}-arrow-content`}),motion:{motionName:qi(ee,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),be?As(Ce,{className:ve}):Ce);return he(m.createElement(Ps.Provider,{value:ye},Fe))});process.env.NODE_ENV!=="production"&&(Ki.displayName="Tooltip"),Ki._InternalPanelDoNotUseOrYouWillBeFired=NR;var IR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},AR=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:IR}))},ic=m.forwardRef(AR);process.env.NODE_ENV!=="production"&&(ic.displayName="LeftOutlined");var PR=Xe.ESC,MR=Xe.TAB;function LR(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=m.useRef(!1),s=function(){if(t){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),a.current=!0,!0):!1},u=function(d){switch(d.keyCode){case PR:s();break;case MR:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};m.useEffect(function(){return t?(window.addEventListener("keydown",u),i&&Xt(l,3),function(){window.removeEventListener("keydown",u),a.current=!1}):function(){a.current=!1}},[t])}var DR=C.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=C.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=dr(t,la(o));return C.createElement(C.Fragment,null,r&&C.createElement("div",{className:"".concat(i,"-arrow")}),C.cloneElement(o,{ref:_o(o)?a:void 0}))}),ka={adjustX:1,adjustY:1},Ra=[0,0],kR={topLeft:{points:["bl","tl"],overflow:ka,offset:[0,-4],targetOffset:Ra},top:{points:["bc","tc"],overflow:ka,offset:[0,-4],targetOffset:Ra},topRight:{points:["br","tr"],overflow:ka,offset:[0,-4],targetOffset:Ra},bottomLeft:{points:["tl","bl"],overflow:ka,offset:[0,4],targetOffset:Ra},bottom:{points:["tc","bc"],overflow:ka,offset:[0,4],targetOffset:Ra},bottomRight:{points:["tr","br"],overflow:ka,offset:[0,4],targetOffset:Ra}},RR=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function $R(e,t){var n,r=e.arrow,i=r===void 0?!1:r,o=e.prefixCls,a=o===void 0?"rc-dropdown":o,s=e.transitionName,l=e.animation,u=e.align,c=e.placement,d=c===void 0?"bottomLeft":c,f=e.placements,h=f===void 0?kR:f,p=e.getPopupContainer,g=e.showAction,v=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,E=e.visible,x=e.trigger,O=x===void 0?["hover"]:x,S=e.autoFocus,T=e.overlay,I=e.children,N=e.onVisibleChange,_=yt(e,RR),P=C.useState(),A=ae(P,2),M=A[0],D=A[1],R="visible"in e?E:M,$=C.useRef(null),F=C.useRef(null),B=C.useRef(null);C.useImperativeHandle(t,function(){return $.current});var z=function(ce){D(ce),N==null||N(ce)};LR({visible:R,triggerRef:B,onVisibleChange:z,autoFocus:S,overlayRef:F});var L=function(ce){var ue=e.onOverlayClick;D(!1),ue&&ue(ce)},H=function(){return C.createElement(DR,{ref:F,overlay:T,prefixCls:a,arrow:i})},W=function(){return typeof T=="function"?H:H()},k=function(){var ce=e.minOverlayWidthMatchTrigger,ue=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?ce:!ue},G=function(){var ce=e.openClassName;return ce!==void 0?ce:"".concat(a,"-open")},Y=C.cloneElement(I,{className:ie((n=I.props)===null||n===void 0?void 0:n.className,R&&G()),ref:_o(I)?dr(B,la(I)):void 0}),te=v;return!te&&O.indexOf("contextMenu")!==-1&&(te=["click"]),C.createElement(ec,Re({builtinPlacements:h},_,{prefixCls:a,ref:$,popupClassName:ie(b,V({},"".concat(a,"-show-arrow"),i)),popupStyle:y,action:O,showAction:g,hideAction:te,popupPlacement:d,popupAlign:u,popupTransitionName:s,popupAnimation:l,popupVisible:R,stretch:k()?"minWidth":"",popup:W(),onPopupVisibleChange:z,onPopupClick:L,getPopupContainer:p}),Y)}const FR=C.forwardRef($R);var LE=m.createContext(null);function DE(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function kE(e){var t=m.useContext(LE);return DE(t,e)}var BR=["children","locked"],si=m.createContext(null);function zR(e,t){var n=U({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Xs(e){var t=e.children,n=e.locked,r=yt(e,BR),i=m.useContext(si),o=ms(function(){return zR(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!ca(a[1],s[1],!0))});return m.createElement(si.Provider,{value:o},t)}var HR=[],RE=m.createContext(null);function oc(){return m.useContext(RE)}var $E=m.createContext(HR);function Ks(e){var t=m.useContext($E);return m.useMemo(function(){return e!==void 0?[].concat(Ke(t),[e]):t},[t,e])}var FE=m.createContext(null),Gh=m.createContext({});function BE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Gf(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function jR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ke(e.querySelectorAll("*")).filter(function(r){return BE(r,t)});return BE(e,t)&&n.unshift(e),n}var Qh=Xe.LEFT,Zh=Xe.RIGHT,Jh=Xe.UP,ac=Xe.DOWN,sc=Xe.ENTER,zE=Xe.ESC,Gs=Xe.HOME,Qs=Xe.END,HE=[Jh,ac,Qh,Zh];function VR(e,t,n,r){var i,o="prev",a="next",s="children",l="parent";if(e==="inline"&&r===sc)return{inlineTrigger:!0};var u=V(V({},Jh,o),ac,a),c=V(V(V(V({},Qh,n?a:o),Zh,n?o:a),ac,s),sc,s),d=V(V(V(V(V(V({},Jh,o),ac,a),sc,s),zE,l),Qh,n?s:l),Zh,n?l:s),f={inline:u,horizontal:c,vertical:d,inlineSub:u,horizontalSub:d,verticalSub:d},h=(i=f["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function UR(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function WR(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function em(e,t){var n=jR(e,!0);return n.filter(function(r){return t.has(r)})}function jE(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=em(e,t),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var tm=function(t,n){var r=new Set,i=new Map,o=new Map;return t.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(DE(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function YR(e,t,n,r,i,o,a,s,l,u){var c=m.useRef(),d=m.useRef();d.current=t;var f=function(){Xt.cancel(c.current)};return m.useEffect(function(){return function(){f()}},[]),function(h){var p=h.which;if([].concat(HE,[sc,zE,Gs,Qs]).includes(p)){var g=o(),v=tm(g,r),b=v,y=b.elements,E=b.key2element,x=b.element2key,O=E.get(t),S=WR(O,y),T=x.get(S),I=VR(e,a(T,!0).length===1,n,p);if(!I&&p!==Gs&&p!==Qs)return;(HE.includes(p)||[Gs,Qs].includes(p))&&h.preventDefault();var N=function(F){if(F){var B=F,z=F.querySelector("a");z!=null&&z.getAttribute("href")&&(B=z);var L=x.get(F);s(L),f(),c.current=Xt(function(){d.current===L&&B.focus()})}};if([Gs,Qs].includes(p)||I.sibling||!S){var _;!S||e==="inline"?_=i.current:_=UR(S);var P,A=em(_,y);p===Gs?P=A[0]:p===Qs?P=A[A.length-1]:P=jE(_,y,S,I.offset),N(P)}else if(I.inlineTrigger)l(T);else if(I.offset>0)l(T,!0),f(),c.current=Xt(function(){v=tm(g,r);var $=S.getAttribute("aria-controls"),F=document.getElementById($),B=jE(F,v.elements);N(B)},5);else if(I.offset<0){var M=a(T,!0),D=M[M.length-2],R=E.get(D);l(D,!1),N(R)}}u==null||u(h)}}function qR(e){Promise.resolve().then(e)}var nm="__RC_UTIL_PATH_SPLIT__",VE=function(t){return t.join(nm)},XR=function(t){return t.split(nm)},rm="rc-menu-more";function KR(){var e=m.useState({}),t=ae(e,2),n=t[1],r=C.useRef(new Map),i=C.useRef(new Map),o=m.useState([]),a=ae(o,2),s=a[0],l=a[1],u=C.useRef(0),c=C.useRef(!1),d=function(){c.current||n({})},f=C.useCallback(function(E,x){process.env.NODE_ENV!=="production"&&bt(!r.current.has(E),"Duplicated key '".concat(E,"' used in Menu by path [").concat(x.join(" > "),"]"));var O=VE(x);i.current.set(O,E),r.current.set(E,O),u.current+=1;var S=u.current;qR(function(){S===u.current&&d()})},[]),h=C.useCallback(function(E,x){var O=VE(x);i.current.delete(O),r.current.delete(E)},[]),p=C.useCallback(function(E){l(E)},[]),g=C.useCallback(function(E,x){var O=r.current.get(E)||"",S=XR(O);return x&&s.includes(S[0])&&S.unshift(rm),S},[s]),v=C.useCallback(function(E,x){return E.filter(function(O){return O!==void 0}).some(function(O){var S=g(O,!0);return S.includes(x)})},[g]),b=function(){var x=Ke(r.current.keys());return s.length&&x.push(rm),x},y=C.useCallback(function(E){var x="".concat(r.current.get(E)).concat(nm),O=new Set;return Ke(i.current.keys()).forEach(function(S){S.startsWith(x)&&O.add(i.current.get(S))}),O},[]);return m.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:v,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Zs(e){var t=m.useRef(e);t.current=e;var n=m.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var GR=Math.random().toFixed(5).toString().slice(2),UE=0;function QR(e){var t=Cn(e,{value:e}),n=ae(t,2),r=n[0],i=n[1];return m.useEffect(function(){UE+=1;var o=process.env.NODE_ENV==="test"?"test":"".concat(GR,"-").concat(UE);i("rc-menu-uuid-".concat(o))},[]),r}function WE(e,t,n,r){var i=m.useContext(si),o=i.activeKey,a=i.onActive,s=i.onInactive,l={active:o===e};return t||(l.onMouseEnter=function(u){n==null||n({key:e,domEvent:u}),a(e)},l.onMouseLeave=function(u){r==null||r({key:e,domEvent:u}),s(e)}),l}function YE(e){var t=m.useContext(si),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function qE(e){var t=e.icon,n=e.props,r=e.children,i;return t===null||t===!1?null:(typeof t=="function"?i=m.createElement(t,U({},n)):typeof t!="boolean"&&(i=t),i||r||null)}var ZR=["item"];function lc(e){var t=e.item,n=yt(e,ZR);return Object.defineProperty(n,"item",{get:function(){return bt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var JR=["title","attribute","elementRef"],e$=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],t$=["active"],n$=function(e){bi(n,e);var t=zi(n);function n(){return Dn(this,n),t.apply(this,arguments)}return kn(n,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,s=i.elementRef,l=yt(i,JR),u=_r(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return bt(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(Ti.Item,Re({},a,{title:typeof o=="string"?o:void 0},u,{ref:s}))}}]),n}(m.Component),r$=m.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.eventKey,o=e.warnKey,a=e.disabled,s=e.itemIcon,l=e.children,u=e.role,c=e.onMouseEnter,d=e.onMouseLeave,f=e.onClick,h=e.onKeyDown,p=e.onFocus,g=yt(e,e$),v=kE(i),b=m.useContext(si),y=b.prefixCls,E=b.onItemClick,x=b.disabled,O=b.overflowDisabled,S=b.itemIcon,T=b.selectedKeys,I=b.onActive,N=m.useContext(Gh),_=N._internalRenderMenuItem,P="".concat(y,"-item"),A=m.useRef(),M=m.useRef(),D=x||a,R=vi(t,M),$=Ks(i);process.env.NODE_ENV!=="production"&&o&&bt(!1,"MenuItem should not leave undefined `key`.");var F=function(de){return{key:i,keyPath:Ke($).reverse(),item:A.current,domEvent:de}},B=s||S,z=WE(i,D,c,d),L=z.active,H=yt(z,t$),W=T.includes(i),k=YE($.length),G=function(de){if(!D){var J=F(de);f==null||f(lc(J)),E(J)}},Y=function(de){if(h==null||h(de),de.which===Xe.ENTER){var J=F(de);f==null||f(lc(J)),E(J)}},te=function(de){I(i),p==null||p(de)},se={};e.role==="option"&&(se["aria-selected"]=W);var ce=m.createElement(n$,Re({ref:A,elementRef:R,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":O&&v?null:v},_r(g,["extra"]),H,se,{component:"li","aria-disabled":a,style:U(U({},k),n),className:ie(P,V(V(V({},"".concat(P,"-active"),L),"".concat(P,"-selected"),W),"".concat(P,"-disabled"),D),r),onClick:G,onKeyDown:Y,onFocus:te}),l,m.createElement(qE,{props:U(U({},e),{},{isSelected:W}),icon:B}));return _&&(ce=_(ce,e,{selected:W})),ce});function i$(e,t){var n=e.eventKey,r=oc(),i=Ks(n);return m.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:m.createElement(r$,Re({},e,{ref:t}))}const uc=m.forwardRef(i$);var o$=["className","children"],a$=function(t,n){var r=t.className,i=t.children,o=yt(t,o$),a=m.useContext(si),s=a.prefixCls,l=a.mode,u=a.rtl;return m.createElement("ul",Re({className:ie(s,u&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},im=m.forwardRef(a$);im.displayName="SubMenuList";function om(e,t){return mr(e).map(function(n,r){if(m.isValidElement(n)){var i,o,a=n.key,s=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,l=s==null;l&&(s="tmp_key-".concat([].concat(Ke(t),[r]).join("-")));var u={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(u.warnKey=!0),m.cloneElement(n,u)}return n})}var rr={adjustX:1,adjustY:1},s$={topLeft:{points:["bl","tl"],overflow:rr},topRight:{points:["br","tr"],overflow:rr},bottomLeft:{points:["tl","bl"],overflow:rr},bottomRight:{points:["tr","br"],overflow:rr},leftTop:{points:["tr","tl"],overflow:rr},leftBottom:{points:["br","bl"],overflow:rr},rightTop:{points:["tl","tr"],overflow:rr},rightBottom:{points:["bl","br"],overflow:rr}},l$={topLeft:{points:["bl","tl"],overflow:rr},topRight:{points:["br","tr"],overflow:rr},bottomLeft:{points:["tl","bl"],overflow:rr},bottomRight:{points:["tr","br"],overflow:rr},rightTop:{points:["tr","tl"],overflow:rr},rightBottom:{points:["br","bl"],overflow:rr},leftTop:{points:["tl","tr"],overflow:rr},leftBottom:{points:["bl","br"],overflow:rr}};function XE(e,t,n){if(t)return t;if(n)return n[e]||n.other}var u$={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function c$(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,s=e.popupOffset,l=e.disabled,u=e.mode,c=e.onVisibleChange,d=m.useContext(si),f=d.getPopupContainer,h=d.rtl,p=d.subMenuOpenDelay,g=d.subMenuCloseDelay,v=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,E=d.rootClassName,x=d.motion,O=d.defaultMotions,S=m.useState(!1),T=ae(S,2),I=T[0],N=T[1],_=U(h?U({},l$):U({},s$),v),P=u$[u],A=XE(u,x,O),M=m.useRef(A);u!=="inline"&&(M.current=A);var D=U(U({},M.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),R=m.useRef();return m.useEffect(function(){return R.current=Xt(function(){N(n)}),function(){Xt.cancel(R.current)}},[n]),m.createElement(ec,{prefixCls:t,popupClassName:ie("".concat(t,"-popup"),V({},"".concat(t,"-rtl"),h),a,E),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:_,popupPlacement:P,popupVisible:I,popup:i,popupStyle:o,popupAlign:s&&{offset:s},action:l?[]:[b],mouseEnterDelay:p,mouseLeaveDelay:g,onPopupVisibleChange:c,forceRender:y,popupMotion:D,fresh:!0},r)}function d$(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",a=m.useContext(si),s=a.prefixCls,l=a.forceSubMenuRender,u=a.motion,c=a.defaultMotions,d=a.mode,f=m.useRef(!1);f.current=d===o;var h=m.useState(!f.current),p=ae(h,2),g=p[0],v=p[1],b=f.current?n:!1;m.useEffect(function(){f.current&&v(!1)},[d]);var y=U({},XE(o,u,c));r.length>1&&(y.motionAppear=!1);var E=y.onVisibleChanged;return y.onVisibleChanged=function(x){return!f.current&&!x&&v(!0),E==null?void 0:E(x)},g?null:m.createElement(Xs,{mode:o,locked:!f.current},m.createElement(Or,Re({visible:b},y,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var O=x.className,S=x.style;return m.createElement(im,{id:t,className:O,style:S},i)}))}var f$=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],h$=["active"],m$=m.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.title,o=e.eventKey,a=e.warnKey,s=e.disabled,l=e.internalPopupClose,u=e.children,c=e.itemIcon,d=e.expandIcon,f=e.popupClassName,h=e.popupOffset,p=e.popupStyle,g=e.onClick,v=e.onMouseEnter,b=e.onMouseLeave,y=e.onTitleClick,E=e.onTitleMouseEnter,x=e.onTitleMouseLeave,O=yt(e,f$),S=kE(o),T=m.useContext(si),I=T.prefixCls,N=T.mode,_=T.openKeys,P=T.disabled,A=T.overflowDisabled,M=T.activeKey,D=T.selectedKeys,R=T.itemIcon,$=T.expandIcon,F=T.onItemClick,B=T.onOpenChange,z=T.onActive,L=m.useContext(Gh),H=L._internalRenderSubMenuItem,W=m.useContext(FE),k=W.isSubPathKey,G=Ks(),Y="".concat(I,"-submenu"),te=P||s,se=m.useRef(),ce=m.useRef();process.env.NODE_ENV!=="production"&&a&&bt(!1,"SubMenu should not leave undefined `key`.");var ue=c??R,de=d??$,J=_.includes(o),Z=!A&&J,oe=k(D,o),X=WE(o,te,E,x),ee=X.active,ne=yt(X,h$),be=m.useState(!1),Ce=ae(be,2),Se=Ce[0],ve=Ce[1],he=function(Be){te||ve(Be)},Ae=function(Be){he(!0),v==null||v({key:o,domEvent:Be})},Ie=function(Be){he(!1),b==null||b({key:o,domEvent:Be})},me=m.useMemo(function(){return ee||(N!=="inline"?Se||k([M],o):!1)},[N,ee,M,Se,o,k]),Me=YE(G.length),Q=function(Be){te||(y==null||y({key:o,domEvent:Be}),N==="inline"&&B(o,!J))},le=Zs(function(Te){g==null||g(lc(Te)),F(Te)}),pe=function(Be){N!=="inline"&&B(o,Be)},ye=function(){z(o)},Fe=S&&"".concat(S,"-popup"),je=m.useMemo(function(){return m.createElement(qE,{icon:N!=="horizontal"?de:void 0,props:U(U({},e),{},{isOpen:Z,isSubMenu:!0})},m.createElement("i",{className:"".concat(Y,"-arrow")}))},[N,de,e,Z,Y]),De=m.createElement("div",Re({role:"menuitem",style:Me,className:"".concat(Y,"-title"),tabIndex:te?null:-1,ref:se,title:typeof i=="string"?i:null,"data-menu-id":A&&S?null:S,"aria-expanded":Z,"aria-haspopup":!0,"aria-controls":Fe,"aria-disabled":te,onClick:Q,onFocus:ye},ne),i,je),we=m.useRef(N);if(N!=="inline"&&G.length>1?we.current="vertical":we.current=N,!A){var Le=we.current;De=m.createElement(c$,{mode:Le,prefixCls:Y,visible:!l&&Z&&N!=="inline",popupClassName:f,popupOffset:h,popupStyle:p,popup:m.createElement(Xs,{mode:Le==="horizontal"?"vertical":Le},m.createElement(im,{id:Fe,ref:ce},u)),disabled:te,onVisibleChange:pe},De)}var Ue=m.createElement(Ti.Item,Re({ref:t,role:"none"},O,{component:"li",style:n,className:ie(Y,"".concat(Y,"-").concat(N),r,V(V(V(V({},"".concat(Y,"-open"),Z),"".concat(Y,"-active"),me),"".concat(Y,"-selected"),oe),"".concat(Y,"-disabled"),te)),onMouseEnter:Ae,onMouseLeave:Ie}),De,!A&&m.createElement(d$,{id:Fe,open:Z,keyPath:G},u));return H&&(Ue=H(Ue,e,{selected:oe,active:me,open:Z,disabled:te})),m.createElement(Xs,{onItemClick:le,mode:N==="horizontal"?"vertical":N,itemIcon:ue,expandIcon:de},Ue)}),cc=m.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=Ks(n),o=om(r,i),a=oc();m.useEffect(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=m.createElement(m$,Re({ref:t},e),o),m.createElement($E.Provider,{value:i},s)});process.env.NODE_ENV!=="production"&&(cc.displayName="SubMenu");function KE(e){var t=e.className,n=e.style,r=m.useContext(si),i=r.prefixCls,o=oc();return o?null:m.createElement("li",{role:"separator",className:ie("".concat(i,"-item-divider"),t),style:n})}var p$=["className","title","eventKey","children"],g$=m.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var i=e.children,o=yt(e,p$),a=m.useContext(si),s=a.prefixCls,l="".concat(s,"-item-group");return m.createElement("li",Re({ref:t,role:"presentation"},o,{onClick:function(c){return c.stopPropagation()},className:ie(l,n)}),m.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),m.createElement("ul",{role:"group",className:"".concat(l,"-list")},i))}),am=m.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=Ks(n),o=om(r,i),a=oc();return a?o:m.createElement(g$,Re({ref:t},_r(e,["warnKey"])),o)});process.env.NODE_ENV!=="production"&&(am.displayName="MenuItemGroup");var v$=["label","children","key","type","extra"];function sm(e,t,n){var r=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map(function(s,l){if(s&&lt(s)==="object"){var u=s,c=u.label,d=u.children,f=u.key,h=u.type,p=u.extra,g=yt(u,v$),v=f??"tmp-".concat(l);return d||h==="group"?h==="group"?m.createElement(i,Re({key:v},g,{title:c}),sm(d,t,n)):m.createElement(o,Re({key:v},g,{title:c}),sm(d,t,n)):h==="divider"?m.createElement(a,Re({key:v},g)):m.createElement(r,Re({key:v},g,{extra:p}),c,(!!p||p===0)&&m.createElement("span",{className:"".concat(n,"-item-extra")},p))}return null}).filter(function(s){return s})}function GE(e,t,n,r,i){var o=e,a=U({divider:KE,item:uc,group:am,submenu:cc},r);return t&&(o=sm(t,a,i)),om(o,n)}var b$=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],$o=[],y$=m.forwardRef(function(e,t){var n,r=e,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,u=r.tabIndex,c=u===void 0?0:u,d=r.items,f=r.children,h=r.direction,p=r.id,g=r.mode,v=g===void 0?"vertical":g,b=r.inlineCollapsed,y=r.disabled,E=r.disabledOverflow,x=r.subMenuOpenDelay,O=x===void 0?.1:x,S=r.subMenuCloseDelay,T=S===void 0?.1:S,I=r.forceSubMenuRender,N=r.defaultOpenKeys,_=r.openKeys,P=r.activeKey,A=r.defaultActiveFirst,M=r.selectable,D=M===void 0?!0:M,R=r.multiple,$=R===void 0?!1:R,F=r.defaultSelectedKeys,B=r.selectedKeys,z=r.onSelect,L=r.onDeselect,H=r.inlineIndent,W=H===void 0?24:H,k=r.motion,G=r.defaultMotions,Y=r.triggerSubMenuAction,te=Y===void 0?"hover":Y,se=r.builtinPlacements,ce=r.itemIcon,ue=r.expandIcon,de=r.overflowedIndicator,J=de===void 0?"...":de,Z=r.overflowedIndicatorPopupClassName,oe=r.getPopupContainer,X=r.onClick,ee=r.onOpenChange,ne=r.onKeyDown,be=r.openAnimation,Ce=r.openTransitionName,Se=r._internalRenderMenuItem,ve=r._internalRenderSubMenuItem,he=r._internalComponents,Ae=yt(r,b$),Ie=m.useMemo(function(){return[GE(f,d,$o,he,o),GE(f,d,$o,{},o)]},[f,d,he]),me=ae(Ie,2),Me=me[0],Q=me[1],le=m.useState(!1),pe=ae(le,2),ye=pe[0],Fe=pe[1],je=m.useRef(),De=QR(p),we=h==="rtl";process.env.NODE_ENV!=="production"&&bt(!be&&!Ce,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Le=Cn(N,{value:_,postState:function(xt){return xt||$o}}),Ue=ae(Le,2),Te=Ue[0],Be=Ue[1],it=function(xt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function qt(){Be(xt),ee==null||ee(xt)}Mt?zr.flushSync(qt):qt()},Ct=m.useState(Te),Dt=ae(Ct,2),Pt=Dt[0],wt=Dt[1],Ht=m.useRef(!1),kt=m.useMemo(function(){return(v==="inline"||v==="vertical")&&b?["vertical",b]:[v,!1]},[v,b]),at=ae(kt,2),dt=at[0],$e=at[1],Ve=dt==="inline",Ye=m.useState(dt),ot=ae(Ye,2),Pe=ot[0],_e=ot[1],xe=m.useState($e),ze=ae(xe,2),qe=ze[0],et=ze[1];m.useEffect(function(){_e(dt),et($e),Ht.current&&(Ve?Be(Pt):it($o))},[dt,$e]);var nt=m.useState(0),mt=ae(nt,2),vt=mt[0],ht=mt[1],St=vt>=Me.length-1||Pe!=="horizontal"||E;m.useEffect(function(){Ve&&wt(Te)},[Te]),m.useEffect(function(){return Ht.current=!0,function(){Ht.current=!1}},[]);var At=KR(),Bt=At.registerPath,en=At.unregisterPath,fn=At.refreshOverflowKeys,Ut=At.isSubPathKey,Rt=At.getKeyPath,tt=At.getKeys,He=At.getSubPathKeys,ke=m.useMemo(function(){return{registerPath:Bt,unregisterPath:en}},[Bt,en]),Oe=m.useMemo(function(){return{isSubPathKey:Ut}},[Ut]);m.useEffect(function(){fn(St?$o:Me.slice(vt+1).map(function(st){return st.key}))},[vt,St]);var Qe=Cn(P||A&&((n=Me[0])===null||n===void 0?void 0:n.key),{value:P}),ut=ae(Qe,2),pt=ut[0],$t=ut[1],sn=Zs(function(st){$t(st)}),jt=Zs(function(){$t(void 0)});C.useImperativeHandle(t,function(){return{list:je.current,focus:function(xt){var Mt,qt=tt(),Zt=tm(qt,De),Jn=Zt.elements,er=Zt.key2element,Cr=Zt.element2key,Br=em(je.current,Jn),wr=pt??(Br[0]?Cr.get(Br[0]):(Mt=Me.find(function(na){return!na.props.disabled}))===null||Mt===void 0?void 0:Mt.key),xr=er.get(wr);if(wr&&xr){var Yn;xr==null||(Yn=xr.focus)===null||Yn===void 0||Yn.call(xr,xt)}}}});var rt=Cn(F||[],{value:B,postState:function(xt){return Array.isArray(xt)?xt:xt==null?$o:[xt]}}),gt=ae(rt,2),_t=gt[0],hn=gt[1],_n=function(xt){if(D){var Mt=xt.key,qt=_t.includes(Mt),Zt;$?qt?Zt=_t.filter(function(er){return er!==Mt}):Zt=[].concat(Ke(_t),[Mt]):Zt=[Mt],hn(Zt);var Jn=U(U({},xt),{},{selectedKeys:Zt});qt?L==null||L(Jn):z==null||z(Jn)}!$&&Te.length&&Pe!=="inline"&&it($o)},Un=Zs(function(st){X==null||X(lc(st)),_n(st)}),Fr=Zs(function(st,xt){var Mt=Te.filter(function(Zt){return Zt!==st});if(xt)Mt.push(st);else if(Pe!=="inline"){var qt=He(st);Mt=Mt.filter(function(Zt){return!qt.has(Zt)})}ca(Te,Mt,!0)||it(Mt,!0)}),Zr=function(xt,Mt){var qt=Mt??!Te.includes(xt);Fr(xt,qt)},Jr=YR(Pe,pt,we,De,je,tt,Rt,$t,Zr,ne);m.useEffect(function(){Fe(!0)},[]);var Ri=m.useMemo(function(){return{_internalRenderMenuItem:Se,_internalRenderSubMenuItem:ve}},[Se,ve]),eo=Pe!=="horizontal"||E?Me:Me.map(function(st,xt){return m.createElement(Xs,{key:st.key,overflowDisabled:xt>vt},st)}),zt=m.createElement(Ti,Re({id:p,ref:je,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:uc,className:ie(o,"".concat(o,"-root"),"".concat(o,"-").concat(Pe),l,V(V({},"".concat(o,"-inline-collapsed"),qe),"".concat(o,"-rtl"),we),a),dir:h,style:s,role:"menu",tabIndex:c,data:eo,renderRawItem:function(xt){return xt},renderRawRest:function(xt){var Mt=xt.length,qt=Mt?Me.slice(-Mt):null;return m.createElement(cc,{eventKey:rm,title:J,disabled:St,internalPopupClose:Mt===0,popupClassName:Z},qt)},maxCount:Pe!=="horizontal"||E?Ti.INVALIDATE:Ti.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(xt){ht(xt)},onKeyDown:Jr},Ae));return m.createElement(Gh.Provider,{value:Ri},m.createElement(LE.Provider,{value:De},m.createElement(Xs,{prefixCls:o,rootClassName:a,mode:Pe,openKeys:Te,rtl:we,disabled:y,motion:ye?k:null,defaultMotions:ye?G:null,activeKey:pt,onActive:sn,onInactive:jt,selectedKeys:_t,inlineIndent:W,subMenuOpenDelay:O,subMenuCloseDelay:T,forceSubMenuRender:I,builtinPlacements:se,triggerSubMenuAction:te,getPopupContainer:oe,itemIcon:ce,expandIcon:ue,onItemClick:Un,onOpenChange:Fr},m.createElement(FE.Provider,{value:Oe},zt),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(RE.Provider,{value:ke},Q)))))}),Js=y$;Js.Item=uc,Js.SubMenu=cc,Js.ItemGroup=am,Js.Divider=KE;var E$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},S$=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:E$}))},QE=m.forwardRef(S$);process.env.NODE_ENV!=="production"&&(QE.displayName="EllipsisOutlined");const ZE=m.createContext(null),C$=ZE.Provider,JE=m.createContext(null),w$=JE.Provider;var x$=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],T$=C.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,i=e.className,o=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,u=l===void 0?!1:l,c=e.type,d=c===void 0?"checkbox":c,f=e.title,h=e.onChange,p=yt(e,x$),g=C.useRef(null),v=C.useRef(null),b=Cn(u,{value:a}),y=ae(b,2),E=y[0],x=y[1];C.useImperativeHandle(t,function(){return{focus:function(I){var N;(N=g.current)===null||N===void 0||N.focus(I)},blur:function(){var I;(I=g.current)===null||I===void 0||I.blur()},input:g.current,nativeElement:v.current}});var O=ie(r,i,V(V({},"".concat(r,"-checked"),E),"".concat(r,"-disabled"),s)),S=function(I){s||("checked"in e||x(I.target.checked),h==null||h({target:U(U({},e),{},{type:d,checked:I.target.checked}),stopPropagation:function(){I.stopPropagation()},preventDefault:function(){I.preventDefault()},nativeEvent:I.nativeEvent}))};return m.createElement("span",{className:O,title:f,style:o,ref:v},m.createElement("input",Re({},p,{className:"".concat(r,"-input"),ref:g,onChange:S,disabled:s,checked:!!E,type:d})),m.createElement("span",{className:"".concat(r,"-inner")}))});function O$(e){const t=C.useRef(null),n=()=>{Xt.cancel(t.current),t.current=null};return[()=>{n(),t.current=Xt(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}const N$=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},zn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},_$=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:u,lineWidth:c,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:h,dotColorDisabled:p,lineType:g,radioColor:v,radioBgColor:b,calc:y}=e,E=`${t}-inner`,O=y(i).sub(y(4).mul(2)),S=y(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},zn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${fe(c)} ${g} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
205
205
  &:hover ${E}`]:{borderColor:r},[`${t}-input:focus-visible + ${E}`]:Object.assign({},so(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:S,height:S,marginBlockStart:y(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:y(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:v,borderBlockStart:0,borderInlineStart:0,borderRadius:S,transform:"scale(0)",opacity:0,transition:`all ${o} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:S,height:S,backgroundColor:l,borderColor:u,borderStyle:"solid",borderWidth:c,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[E]:{borderColor:r,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${o} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[E]:{backgroundColor:d,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:p}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:f,cursor:"not-allowed"},[`&${t}-checked`]:{[E]:{"&::after":{transform:`scale(${y(O).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},I$=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:u,fontSize:c,buttonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:p,paddingXS:g,borderRadius:v,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:E,buttonSolidCheckedColor:x,colorTextDisabled:O,colorBgContainerDisabled:S,buttonCheckedBgDisabled:T,buttonCheckedColorDisabled:I,colorPrimary:N,colorPrimaryHover:_,colorPrimaryActive:P,buttonSolidCheckedBg:A,buttonSolidCheckedHoverBg:M,buttonSolidCheckedActiveBg:D,calc:R}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:fe(R(n).sub(R(i).mul(2)).equal()),background:d,border:`${fe(i)} ${o} ${a}`,borderBlockStartWidth:R(i).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:R(i).mul(-1).equal(),insetInlineStart:R(i).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${fe(i)} ${o} ${a}`,borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v},"&:first-child:last-child":{borderRadius:v},[`${r}-group-large &`]:{height:h,fontSize:f,lineHeight:fe(R(h).sub(R(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${r}-group-small &`]:{height:p,paddingInline:R(g).sub(i).equal(),paddingBlock:0,lineHeight:fe(R(p).sub(R(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:N},"&:has(:focus-visible)":Object.assign({},so(e)),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:N,background:E,borderColor:N,"&::before":{backgroundColor:N},"&:first-child":{borderColor:N},"&:hover":{color:_,borderColor:_,"&::before":{backgroundColor:_}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:A,borderColor:A,"&:hover":{color:x,background:M,borderColor:M},"&:active":{color:x,background:D,borderColor:D}},"&-disabled":{color:O,backgroundColor:S,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:O,backgroundColor:S,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:I,backgroundColor:T,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},eS=wn("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${fe(n)} ${t}`,o=rn(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[N$(o),_$(o),I$(o)]},e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:o,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:u,colorTextLightSolid:c,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:h,colorWhite:p}=e,g=4,v=o,b=t?v-g*2:v-(g+i)*2;return{radioSize:v,dotSize:b,dotColorDisabled:l,buttonSolidCheckedColor:c,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:h,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:u,buttonCheckedColorDisabled:l,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:p,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}});var A$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const P$=(e,t)=>{var n,r;const i=m.useContext(ZE),o=m.useContext(JE),{getPrefixCls:a,direction:s,radio:l}=m.useContext(Qt),u=m.useRef(null),c=dr(t,u),{isFormItemInput:d}=m.useContext(ko);if(process.env.NODE_ENV!=="production"){const $=on("Radio");process.env.NODE_ENV!=="production"&&$(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const f=$=>{var F,B;(F=e.onChange)===null||F===void 0||F.call(e,$),(B=i==null?void 0:i.onChange)===null||B===void 0||B.call(i,$)},{prefixCls:h,className:p,rootClassName:g,children:v,style:b,title:y}=e,E=A$(e,["prefixCls","className","rootClassName","children","style","title"]),x=a("radio",h),O=((i==null?void 0:i.optionType)||o)==="button",S=O?`${x}-button`:x,T=Wi(x),[I,N,_]=eS(x,T),P=Object.assign({},E),A=m.useContext(Si);i&&(P.name=i.name,P.onChange=f,P.checked=e.value===i.value,P.disabled=(n=P.disabled)!==null&&n!==void 0?n:i.disabled),P.disabled=(r=P.disabled)!==null&&r!==void 0?r:A;const M=ie(`${S}-wrapper`,{[`${S}-wrapper-checked`]:P.checked,[`${S}-wrapper-disabled`]:P.disabled,[`${S}-wrapper-rtl`]:s==="rtl",[`${S}-wrapper-in-form-item`]:d,[`${S}-wrapper-block`]:!!(i!=null&&i.block)},l==null?void 0:l.className,p,g,N,_,T),[D,R]=O$(P.onClick);return I(m.createElement(Du,{component:"Radio",disabled:P.disabled},m.createElement("label",{className:M,style:Object.assign(Object.assign({},l==null?void 0:l.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:D},m.createElement(T$,Object.assign({},P,{className:ie(P.className,{[Qf]:!O}),type:"radio",prefixCls:S,ref:c,onClick:R})),v!==void 0?m.createElement("span",{className:`${S}-label`},v):null)))},el=m.forwardRef(P$);process.env.NODE_ENV!=="production"&&(el.displayName="Radio");const M$=m.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=m.useContext(Qt),i=ks(),{prefixCls:o,className:a,rootClassName:s,options:l,buttonStyle:u="outline",disabled:c,children:d,size:f,style:h,id:p,optionType:g,name:v=i,defaultValue:b,value:y,block:E=!1,onChange:x,onMouseEnter:O,onMouseLeave:S,onFocus:T,onBlur:I}=e,[N,_]=Cn(b,{value:y}),P=m.useCallback(W=>{const k=N,G=W.target.value;"value"in e||_(G),G!==k&&(x==null||x(W))},[N,_,x]),A=n("radio",o),M=`${A}-group`,D=Wi(A),[R,$,F]=eS(A,D);let B=d;l&&l.length>0&&(B=l.map(W=>typeof W=="string"||typeof W=="number"?m.createElement(el,{key:W.toString(),prefixCls:A,disabled:c,value:W,checked:N===W},W):m.createElement(el,{key:`radio-group-value-options-${W.value}`,prefixCls:A,disabled:W.disabled||c,value:W.value,checked:N===W.value,title:W.title,style:W.style,className:W.className,id:W.id,required:W.required},W.label)));const z=ai(f),L=ie(M,`${M}-${u}`,{[`${M}-${z}`]:z,[`${M}-rtl`]:r==="rtl",[`${M}-block`]:E},a,s,$,F,D),H=m.useMemo(()=>({onChange:P,value:N,disabled:c,name:v,optionType:g,block:E}),[P,N,c,v,g,E]);return R(m.createElement("div",Object.assign({},Nr(e,{aria:!0,data:!0}),{className:L,style:h,onMouseEnter:O,onMouseLeave:S,onFocus:T,onBlur:I,id:p,ref:t}),m.createElement(C$,{value:H},B)))}),L$=m.memo(M$);var D$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const k$=(e,t)=>{const{getPrefixCls:n}=m.useContext(Qt),{prefixCls:r}=e,i=D$(e,["prefixCls"]),o=n("radio",r);return m.createElement(w$,{value:"button"},m.createElement(el,Object.assign({prefixCls:o},i,{type:"radio",ref:t})))},R$=m.forwardRef(k$),dc=el;dc.Button=R$,dc.Group=L$,dc.__ANT_RADIO=!0;function fc(e){return rn(e,{inputAffixPadding:e.paddingXXS})}const hc=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:u,controlPaddingHorizontalSM:c,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:p,controlOutlineWidth:g,controlOutline:v,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:E,inputFontSize:x,inputFontSizeLG:O,inputFontSizeSM:S}=e,T=x||n,I=S||T,N=O||s,_=Math.round((t-T*r)/2*10)/10-i,P=Math.round((o-I*r)/2*10)/10-i,A=Math.ceil((a-N*l)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(P,0),paddingBlockLG:Math.max(A,0),paddingInline:u-i,paddingInlineSM:c-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:p,hoverBorderColor:h,activeShadow:`0 0 0 ${g}px ${v}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:E,activeBg:E,inputFontSize:T,inputFontSizeLG:N,inputFontSizeSM:I}},$$=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),mc=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},$$(rn(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),lm=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),tS=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},lm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),F$=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},lm(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},mc(e))}),tS(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),tS(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),nS=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),B$=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},nS(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),nS(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},mc(e))}})}),z$=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},rS=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t==null?void 0:t.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},iS=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},rS(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),H$=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rS(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},mc(e))}),iS(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),iS(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),oS=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),j$=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},oS(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),oS(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),aS=(e,t)=>({background:e.colorBgContainer,borderWidth:`${fe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),sS=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},aS(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),V$=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},aS(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),sS(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),sS(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),U$=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),lS=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${fe(t)} ${fe(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},um=e=>({padding:`${fe(e.paddingBlockSM)} ${fe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),cm=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${fe(e.paddingBlock)} ${fe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},U$(e.colorTextPlaceholder)),{"&-lg":Object.assign({},lS(e)),"&-sm":Object.assign({},um(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),W$=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},lS(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},um(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${fe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${fe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${fe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${fe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${fe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},ub()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
206
206
  & > ${t}-affix-wrapper,
207
207
  & > ${t}-number-affix-wrapper,
@@ -217,9 +217,9 @@ html body {
217
217
  & > ${n}-cascader-picker:last-child ${t},
218
218
  & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},Y$=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),cm(e)),F$(e)),H$(e)),z$(e)),V$(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},q$=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${fe(e.inputAffixPadding)}`}}}},X$=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,u=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},cm(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),q$(e)),{[`${s}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[u]:{[`${s}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},K$=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},zn(e)),W$(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},B$(e)),j$(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},G$=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
219
219
  > ${t},
220
- ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Q$=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},uS=wn(["Input","Shared"],e=>{const t=rn(e,fc(e));return[Y$(t),X$(t)]},hc,{resetFont:!1}),Z$=wn(["Input","Component"],e=>{const t=rn(e,fc(e));return[K$(t),G$(t),Q$(t),ah(t)]},hc,{resetFont:!1});var J$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},e8=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:J$}))},cS=m.forwardRef(e8);process.env.NODE_ENV!=="production"&&(cS.displayName="PlusOutlined");const pc=C.createContext(null);var t8=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,o=t.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,u=l===void 0?"center":l,c=C.useState(),d=ae(c,2),f=d[0],h=d[1],p=C.useRef(),g=C.useCallback(function(b){return typeof s=="function"?s(b):typeof s=="number"?s:b},[s]);function v(){Xt.cancel(p.current)}return C.useEffect(function(){var b={};if(n)if(r){b.width=g(n.width);var y=i?"right":"left";u==="start"&&(b[y]=n[y]),u==="center"&&(b[y]=n[y]+n.width/2,b.transform=i?"translateX(50%)":"translateX(-50%)"),u==="end"&&(b[y]=n[y]+n.width,b.transform="translateX(-100%)")}else b.height=g(n.height),u==="start"&&(b.top=n.top),u==="center"&&(b.top=n.top+n.height/2,b.transform="translateY(-50%)"),u==="end"&&(b.top=n.top+n.height,b.transform="translateY(-100%)");return v(),p.current=Xt(function(){var E=f&&b&&Object.keys(b).every(function(x){var O=b[x],S=f[x];return typeof O=="number"&&typeof S=="number"?Math.round(O)===Math.round(S):O===S});E||h(b)}),v},[JSON.stringify(n),r,i,u,g]),{style:f}},dS={width:0,height:0,left:0,top:0};function n8(e,t,n){return C.useMemo(function(){for(var r,i=new Map,o=t.get((r=e[0])===null||r===void 0?void 0:r.key)||dS,a=o.left+o.width,s=0;s<e.length;s+=1){var l=e[s].key,u=t.get(l);if(!u){var c;u=t.get((c=e[s-1])===null||c===void 0?void 0:c.key)||dS}var d=i.get(l)||U({},u);d.right=a-d.left-d.width,i.set(l,d)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function fS(e,t){var n=m.useRef(e),r=m.useState({}),i=ae(r,2),o=i[1];function a(s){var l=typeof s=="function"?s(n.current):s;l!==n.current&&t(l,n.current),n.current=l,o({})}return[n.current,a]}var r8=.1,hS=.01,gc=20,mS=Math.pow(.995,gc);function i8(e,t){var n=C.useState(),r=ae(n,2),i=r[0],o=r[1],a=C.useState(0),s=ae(a,2),l=s[0],u=s[1],c=C.useState(0),d=ae(c,2),f=d[0],h=d[1],p=C.useState(),g=ae(p,2),v=g[0],b=g[1],y=C.useRef();function E(N){var _=N.touches[0],P=_.screenX,A=_.screenY;o({x:P,y:A}),window.clearInterval(y.current)}function x(N){if(i){var _=N.touches[0],P=_.screenX,A=_.screenY;o({x:P,y:A});var M=P-i.x,D=A-i.y;t(M,D);var R=Date.now();u(R),h(R-l),b({x:M,y:D})}}function O(){if(i&&(o(null),b(null),v)){var N=v.x/f,_=v.y/f,P=Math.abs(N),A=Math.abs(_);if(Math.max(P,A)<r8)return;var M=N,D=_;y.current=window.setInterval(function(){if(Math.abs(M)<hS&&Math.abs(D)<hS){window.clearInterval(y.current);return}M*=mS,D*=mS,t(M*gc,D*gc)},gc)}}var S=C.useRef();function T(N){var _=N.deltaX,P=N.deltaY,A=0,M=Math.abs(_),D=Math.abs(P);M===D?A=S.current==="x"?_:P:M>D?(A=_,S.current="x"):(A=P,S.current="y"),t(-A,-A)&&N.preventDefault()}var I=C.useRef(null);I.current={onTouchStart:E,onTouchMove:x,onTouchEnd:O,onWheel:T},m.useEffect(function(){function N(M){I.current.onTouchStart(M)}function _(M){I.current.onTouchMove(M)}function P(M){I.current.onTouchEnd(M)}function A(M){I.current.onWheel(M)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",P,{passive:!0}),e.current.addEventListener("touchstart",N,{passive:!0}),e.current.addEventListener("wheel",A,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",P)}},[])}function pS(e){var t=C.useState(0),n=ae(t,2),r=n[0],i=n[1],o=C.useRef(0),a=C.useRef();return a.current=e,nf(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function o8(e){var t=C.useRef([]),n=C.useState({}),r=ae(n,2),i=r[1],o=C.useRef(typeof e=="function"?e():e),a=pS(function(){var l=o.current;t.current.forEach(function(u){l=u(l)}),t.current=[],o.current=l,i({})});function s(l){t.current.push(l),a()}return[o.current,s]}var gS={width:0,height:0,left:0,top:0,right:0};function a8(e,t,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,u=a.rtl,c,d,f;return["top","bottom"].includes(l)?(c="width",d=u?"right":"left",f=Math.abs(n)):(c="height",d="top",f=-n),C.useMemo(function(){if(!s.length)return[0,0];for(var h=s.length,p=h,g=0;g<h;g+=1){var v=e.get(s[g].key)||gS;if(Math.floor(v[d]+v[c])>Math.floor(f+t)){p=g-1;break}}for(var b=0,y=h-1;y>=0;y-=1){var E=e.get(s[y].key)||gS;if(E[d]<f){b=y+1;break}}return b>=p?[0,0]:[b,p]},[e,t,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),u])}function vS(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var s8="TABS_DQ";function bS(e){return String(e).replace(/"/g,s8)}function dm(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var yS=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return!r||r.showAdd===!1?null:m.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),fm=m.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var o,a={};return lt(i)==="object"&&!m.isValidElement(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?m.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},o):null});process.env.NODE_ENV!=="production"&&(fm.displayName="ExtraContent");var l8=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,o=e.locale,a=e.mobile,s=e.more,l=s===void 0?{}:s,u=e.style,c=e.className,d=e.editable,f=e.tabBarGutter,h=e.rtl,p=e.removeAriaLabel,g=e.onTabClick,v=e.getPopupContainer,b=e.popupClassName,y=C.useState(!1),E=ae(y,2),x=E[0],O=E[1],S=C.useState(null),T=ae(S,2),I=T[0],N=T[1],_=l.icon,P=_===void 0?"More":_,A="".concat(r,"-more-popup"),M="".concat(n,"-dropdown"),D=I!==null?"".concat(A,"-").concat(I):null,R=o==null?void 0:o.dropdownAriaLabel;function $(k,G){k.preventDefault(),k.stopPropagation(),d.onEdit("remove",{key:G,event:k})}var F=m.createElement(Js,{onClick:function(G){var Y=G.key,te=G.domEvent;g(Y,te),O(!1)},prefixCls:"".concat(M,"-menu"),id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[I],"aria-label":R!==void 0?R:"expanded dropdown"},i.map(function(k){var G=k.closable,Y=k.disabled,te=k.closeIcon,se=k.key,ce=k.label,ue=dm(G,te,d,Y);return m.createElement(uc,{key:se,id:"".concat(A,"-").concat(se),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(se),disabled:Y},m.createElement("span",null,ce),ue&&m.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(M,"-menu-item-remove"),onClick:function(J){J.stopPropagation(),$(J,se)}},te||d.removeIcon||"×"))}));function B(k){for(var G=i.filter(function(ue){return!ue.disabled}),Y=G.findIndex(function(ue){return ue.key===I})||0,te=G.length,se=0;se<te;se+=1){Y=(Y+k+te)%te;var ce=G[Y];if(!ce.disabled){N(ce.key);return}}}function z(k){var G=k.which;if(!x){[Xe.DOWN,Xe.SPACE,Xe.ENTER].includes(G)&&(O(!0),k.preventDefault());return}switch(G){case Xe.UP:B(-1),k.preventDefault();break;case Xe.DOWN:B(1),k.preventDefault();break;case Xe.ESC:O(!1);break;case Xe.SPACE:case Xe.ENTER:I!==null&&g(I,k);break}}C.useEffect(function(){var k=document.getElementById(D);k&&k.scrollIntoView&&k.scrollIntoView(!1)},[I]),C.useEffect(function(){x||N(null)},[x]);var L=V({},h?"marginRight":"marginLeft",f);i.length||(L.visibility="hidden",L.order=1);var H=ie(V({},"".concat(M,"-rtl"),h)),W=a?null:m.createElement(FR,Re({prefixCls:M,overlay:F,visible:i.length?x:!1,onVisibleChange:O,overlayClassName:ie(H,b),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:v},l),m.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:L,"aria-haspopup":"listbox","aria-controls":A,id:"".concat(r,"-more"),"aria-expanded":x,onKeyDown:z},P));return m.createElement("div",{className:ie("".concat(n,"-nav-operations"),c),style:u,ref:t},W,m.createElement(yS,{prefixCls:n,locale:o,editable:d}))});const u8=m.memo(l8,function(e,t){return t.tabMoving});var c8=function(t){var n=t.prefixCls,r=t.id,i=t.active,o=t.focus,a=t.tab,s=a.key,l=a.label,u=a.disabled,c=a.closeIcon,d=a.icon,f=t.closable,h=t.renderWrapper,p=t.removeAriaLabel,g=t.editable,v=t.onClick,b=t.onFocus,y=t.onBlur,E=t.onKeyDown,x=t.onMouseDown,O=t.onMouseUp,S=t.style,T=t.tabCount,I=t.currentPosition,N="".concat(n,"-tab"),_=dm(f,c,g,u);function P($){u||v($)}function A($){$.preventDefault(),$.stopPropagation(),g.onEdit("remove",{key:s,event:$})}var M=m.useMemo(function(){return d&&typeof l=="string"?m.createElement("span",null,l):l},[l,d]),D=m.useRef(null);m.useEffect(function(){o&&D.current&&D.current.focus()},[o]);var R=m.createElement("div",{key:s,"data-node-key":bS(s),className:ie(N,V(V(V(V({},"".concat(N,"-with-remove"),_),"".concat(N,"-active"),i),"".concat(N,"-disabled"),u),"".concat(N,"-focus"),o)),style:S,onClick:P},m.createElement("div",{ref:D,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(s),className:"".concat(N,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(s),"aria-disabled":u,tabIndex:u?null:i?0:-1,onClick:function(F){F.stopPropagation(),P(F)},onKeyDown:E,onMouseDown:x,onMouseUp:O,onFocus:b,onBlur:y},o&&m.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(I," of ").concat(T)),d&&m.createElement("span",{className:"".concat(N,"-icon")},d),l&&M),_&&m.createElement("button",{type:"button",role:"tab","aria-label":p||"remove",tabIndex:i?0:-1,className:"".concat(N,"-remove"),onClick:function(F){F.stopPropagation(),A(F)}},c||g.removeIcon||"×"));return h?h(R):R},d8=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,o=t.offsetTop,a=t.offsetLeft,s=t.getBoundingClientRect(),l=s.width,u=s.height,c=s.left,d=s.top;return Math.abs(l-r)<1?[l,u,c-n.left,d-n.top]:[r,i,a,o]},$a=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,o=n.offsetHeight,a=o===void 0?0:o;if(t.current){var s=t.current.getBoundingClientRect(),l=s.width,u=s.height;if(Math.abs(l-i)<1)return[l,u]}return[i,a]},vc=function(t,n){return t[n?0:1]},ES=m.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,o=e.animated,a=e.activeKey,s=e.rtl,l=e.extra,u=e.editable,c=e.locale,d=e.tabPosition,f=e.tabBarGutter,h=e.children,p=e.onTabClick,g=e.onTabScroll,v=e.indicator,b=m.useContext(pc),y=b.prefixCls,E=b.tabs,x=C.useRef(null),O=C.useRef(null),S=C.useRef(null),T=C.useRef(null),I=C.useRef(null),N=C.useRef(null),_=C.useRef(null),P=d==="top"||d==="bottom",A=fS(0,function(ke,Oe){P&&g&&g({direction:ke>Oe?"left":"right"})}),M=ae(A,2),D=M[0],R=M[1],$=fS(0,function(ke,Oe){!P&&g&&g({direction:ke>Oe?"top":"bottom"})}),F=ae($,2),B=F[0],z=F[1],L=C.useState([0,0]),H=ae(L,2),W=H[0],k=H[1],G=C.useState([0,0]),Y=ae(G,2),te=Y[0],se=Y[1],ce=C.useState([0,0]),ue=ae(ce,2),de=ue[0],J=ue[1],Z=C.useState([0,0]),oe=ae(Z,2),X=oe[0],ee=oe[1],ne=o8(new Map),be=ae(ne,2),Ce=be[0],Se=be[1],ve=n8(E,Ce,te[0]),he=vc(W,P),Ae=vc(te,P),Ie=vc(de,P),me=vc(X,P),Me=Math.floor(he)<Math.floor(Ae+Ie),Q=Me?he-me:he-Ie,le="".concat(y,"-nav-operations-hidden"),pe=0,ye=0;P&&s?(pe=0,ye=Math.max(0,Ae-Q)):(pe=Math.min(0,Q-Ae),ye=0);function Fe(ke){return ke<pe?pe:ke>ye?ye:ke}var je=C.useRef(null),De=C.useState(),we=ae(De,2),Le=we[0],Ue=we[1];function Te(){Ue(Date.now())}function Be(){je.current&&clearTimeout(je.current)}i8(T,function(ke,Oe){function Qe(ut,pt){ut(function($t){var sn=Fe($t+pt);return sn})}return Me?(P?Qe(R,ke):Qe(z,Oe),Be(),Te(),!0):!1}),C.useEffect(function(){return Be(),Le&&(je.current=setTimeout(function(){Ue(0)},100)),Be},[Le]);var it=a8(ve,Q,P?D:B,Ae,Ie,me,U(U({},e),{},{tabs:E})),wt=ae(it,2),Dt=wt[0],Pt=wt[1],xt=an(function(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Oe=ve.get(ke)||{width:0,height:0,left:0,right:0,top:0};if(P){var Qe=D;s?Oe.right<D?Qe=Oe.right:Oe.right+Oe.width>D+Q&&(Qe=Oe.right+Oe.width-Q):Oe.left<-D?Qe=-Oe.left:Oe.left+Oe.width>-D+Q&&(Qe=-(Oe.left+Oe.width-Q)),z(0),R(Fe(Qe))}else{var ut=B;Oe.top<-B?ut=-Oe.top:Oe.top+Oe.height>-B+Q&&(ut=-(Oe.top+Oe.height-Q)),R(0),z(Fe(ut))}}),Ht=C.useState(),kt=ae(Ht,2),at=kt[0],dt=kt[1],$e=C.useState(!1),Ve=ae($e,2),Ye=Ve[0],ot=Ve[1],Pe=E.filter(function(ke){return!ke.disabled}).map(function(ke){return ke.key}),_e=function(Oe){var Qe=Pe.indexOf(at||a),ut=Pe.length,pt=(Qe+Oe+ut)%ut,$t=Pe[pt];dt($t)},xe=function(Oe){var Qe=Oe.code,ut=s&&P,pt=Pe[0],$t=Pe[Pe.length-1];switch(Qe){case"ArrowLeft":{P&&_e(ut?1:-1);break}case"ArrowRight":{P&&_e(ut?-1:1);break}case"ArrowUp":{Oe.preventDefault(),P||_e(-1);break}case"ArrowDown":{Oe.preventDefault(),P||_e(1);break}case"Home":{Oe.preventDefault(),dt(pt);break}case"End":{Oe.preventDefault(),dt($t);break}case"Enter":case"Space":{Oe.preventDefault(),p(at??a,Oe);break}case"Backspace":case"Delete":{var sn=Pe.indexOf(at),jt=E.find(function(gt){return gt.key===at}),rt=dm(jt==null?void 0:jt.closable,jt==null?void 0:jt.closeIcon,u,jt==null?void 0:jt.disabled);rt&&(Oe.preventDefault(),Oe.stopPropagation(),u.onEdit("remove",{key:at,event:Oe}),sn===Pe.length-1?_e(-1):_e(1));break}}},ze={};P?ze[s?"marginRight":"marginLeft"]=f:ze.marginTop=f;var qe=E.map(function(ke,Oe){var Qe=ke.key;return m.createElement(c8,{id:i,prefixCls:y,key:Qe,tab:ke,style:Oe===0?void 0:ze,closable:ke.closable,editable:u,active:Qe===a,focus:Qe===at,renderWrapper:h,removeAriaLabel:c==null?void 0:c.removeAriaLabel,tabCount:Pe.length,currentPosition:Oe+1,onClick:function(pt){p(Qe,pt)},onKeyDown:xe,onFocus:function(){Ye||dt(Qe),xt(Qe),Te(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:function(){dt(void 0)},onMouseDown:function(){ot(!0)},onMouseUp:function(){ot(!1)}})}),et=function(){return Se(function(){var Oe,Qe=new Map,ut=(Oe=I.current)===null||Oe===void 0?void 0:Oe.getBoundingClientRect();return E.forEach(function(pt){var $t,sn=pt.key,jt=($t=I.current)===null||$t===void 0?void 0:$t.querySelector('[data-node-key="'.concat(bS(sn),'"]'));if(jt){var rt=d8(jt,ut),gt=ae(rt,4),It=gt[0],hn=gt[1],_n=gt[2],Un=gt[3];Qe.set(sn,{width:It,height:hn,left:_n,top:Un})}}),Qe})};C.useEffect(function(){et()},[E.map(function(ke){return ke.key}).join("_")]);var nt=pS(function(){var ke=$a(x),Oe=$a(O),Qe=$a(S);k([ke[0]-Oe[0]-Qe[0],ke[1]-Oe[1]-Qe[1]]);var ut=$a(_);J(ut);var pt=$a(N);ee(pt);var $t=$a(I);se([$t[0]-ut[0],$t[1]-ut[1]]),et()}),mt=E.slice(0,Dt),vt=E.slice(Pt+1),ht=[].concat(Ke(mt),Ke(vt)),St=ve.get(a),At=t8({activeTabOffset:St,horizontal:P,indicator:v,rtl:s}),Bt=At.style;C.useEffect(function(){xt()},[a,pe,ye,vS(St),vS(ve),P]),C.useEffect(function(){nt()},[s]);var en=!!ht.length,fn="".concat(y,"-nav-wrap"),Ut,Rt,tt,He;return P?s?(Rt=D>0,Ut=D!==ye):(Ut=D<0,Rt=D!==pe):(tt=B<0,He=B!==pe),m.createElement(pr,{onResize:nt},m.createElement("div",{ref:vi(t,x),role:"tablist","aria-orientation":P?"horizontal":"vertical",className:ie("".concat(y,"-nav"),n),style:r,onKeyDown:function(){Te()}},m.createElement(fm,{ref:O,position:"left",extra:l,prefixCls:y}),m.createElement(pr,{onResize:nt},m.createElement("div",{className:ie(fn,V(V(V(V({},"".concat(fn,"-ping-left"),Ut),"".concat(fn,"-ping-right"),Rt),"".concat(fn,"-ping-top"),tt),"".concat(fn,"-ping-bottom"),He)),ref:T},m.createElement(pr,{onResize:nt},m.createElement("div",{ref:I,className:"".concat(y,"-nav-list"),style:{transform:"translate(".concat(D,"px, ").concat(B,"px)"),transition:Le?"none":void 0}},qe,m.createElement(yS,{ref:_,prefixCls:y,locale:c,editable:u,style:U(U({},qe.length===0?void 0:ze),{},{visibility:en?"hidden":null})}),m.createElement("div",{className:ie("".concat(y,"-ink-bar"),V({},"".concat(y,"-ink-bar-animated"),o.inkBar)),style:Bt}))))),m.createElement(u8,Re({},e,{removeAriaLabel:c==null?void 0:c.removeAriaLabel,ref:N,prefixCls:y,tabs:ht,className:!en&&le,tabMoving:!!Le})),m.createElement(fm,{ref:S,position:"right",extra:l,prefixCls:y})))}),hm=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.id,a=e.active,s=e.tabKey,l=e.children;return m.createElement("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:ie(n,a&&"".concat(n,"-active"),r),ref:t},l)});process.env.NODE_ENV!=="production"&&(hm.displayName="TabPane");var f8=["renderTabBar"],h8=["label","key"],SS=function(t){var n=t.renderTabBar,r=yt(t,f8),i=m.useContext(pc),o=i.tabs;if(n){var a=U(U({},r),{},{panes:o.map(function(s){var l=s.label,u=s.key,c=yt(s,h8);return m.createElement(hm,Re({tab:l,key:u,tabKey:u},c))})});return n(a,ES)}return m.createElement(ES,r)};process.env.NODE_ENV!=="production"&&(SS.displayName="TabNavListWrapper");var m8=["key","forceRender","style","className","destroyInactiveTabPane"],p8=function(t){var n=t.id,r=t.activeKey,i=t.animated,o=t.tabPosition,a=t.destroyInactiveTabPane,s=m.useContext(pc),l=s.prefixCls,u=s.tabs,c=i.tabPane,d="".concat(l,"-tabpane");return m.createElement("div",{className:ie("".concat(l,"-content-holder"))},m.createElement("div",{className:ie("".concat(l,"-content"),"".concat(l,"-content-").concat(o),V({},"".concat(l,"-content-animated"),c))},u.map(function(f){var h=f.key,p=f.forceRender,g=f.style,v=f.className,b=f.destroyInactiveTabPane,y=yt(f,m8),E=h===r;return m.createElement(Or,Re({key:h,visible:E,forceRender:p,removeOnLeave:!!(a||b),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(x,O){var S=x.style,T=x.className;return m.createElement(hm,Re({},y,{prefixCls:d,id:n,tabKey:h,animated:c,active:E,style:U(U({},g),S),className:ie(v,T),ref:O}))})})))};function g8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=U({inkBar:!0},lt(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(process.env.NODE_ENV!=="production"&&bt(!1,"`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."),t.tabPane=!1),t}var v8=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],CS=0,wS=m.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,o=e.className,a=e.items,s=e.direction,l=e.activeKey,u=e.defaultActiveKey,c=e.editable,d=e.animated,f=e.tabPosition,h=f===void 0?"top":f,p=e.tabBarGutter,g=e.tabBarStyle,v=e.tabBarExtraContent,b=e.locale,y=e.more,E=e.destroyInactiveTabPane,x=e.renderTabBar,O=e.onChange,S=e.onTabClick,T=e.onTabScroll,I=e.getPopupContainer,N=e.popupClassName,_=e.indicator,P=yt(e,v8),A=m.useMemo(function(){return(a||[]).filter(function(X){return X&&lt(X)==="object"&&"key"in X})},[a]),M=s==="rtl",D=g8(d),R=C.useState(!1),$=ae(R,2),F=$[0],B=$[1];C.useEffect(function(){B(Ah())},[]);var z=Cn(function(){var X;return(X=A[0])===null||X===void 0?void 0:X.key},{value:l,defaultValue:u}),L=ae(z,2),H=L[0],W=L[1],k=C.useState(function(){return A.findIndex(function(X){return X.key===H})}),G=ae(k,2),Y=G[0],te=G[1];C.useEffect(function(){var X=A.findIndex(function(ne){return ne.key===H});if(X===-1){var ee;X=Math.max(0,Math.min(Y,A.length-1)),W((ee=A[X])===null||ee===void 0?void 0:ee.key)}te(X)},[A.map(function(X){return X.key}).join("_"),H,Y]);var se=Cn(null,{value:n}),ce=ae(se,2),ue=ce[0],de=ce[1];C.useEffect(function(){n||(de("rc-tabs-".concat(process.env.NODE_ENV==="test"?"test":CS)),CS+=1)},[]);function J(X,ee){S==null||S(X,ee);var ne=X!==H;W(X),ne&&(O==null||O(X))}var Z={id:ue,activeKey:H,animated:D,tabPosition:h,rtl:M,mobile:F},oe=U(U({},Z),{},{editable:c,locale:b,more:y,tabBarGutter:p,onTabClick:J,onTabScroll:T,extra:v,style:g,panes:null,getPopupContainer:I,popupClassName:N,indicator:_});return m.createElement(pc.Provider,{value:{tabs:A,prefixCls:i}},m.createElement("div",Re({ref:t,id:n,className:ie(i,"".concat(i,"-").concat(h),V(V(V({},"".concat(i,"-mobile"),F),"".concat(i,"-editable"),c),"".concat(i,"-rtl"),M),o)},P),m.createElement(SS,Re({},oe,{renderTabBar:x})),m.createElement(p8,Re({destroyInactiveTabPane:E},Z,{animated:D}))))});process.env.NODE_ENV!=="production"&&(wS.displayName="Tabs");const b8={motionAppear:!1,motionEnter:!0,motionLeave:!0};function y8(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},b8),{motionName:qi(e,"switch")})),n}var E8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function S8(e){return e.filter(t=>t)}function C8(e,t){if(process.env.NODE_ENV!=="production"&&on("Tabs").deprecated(!t,"Tabs.TabPane","items"),e)return e.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=mr(t).map(r=>{if(m.isValidElement(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=E8(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return S8(n)}const w8=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[zu(e,"slide-up"),zu(e,"slide-down")]]},x8=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${fe(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:so(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:fe(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:fe(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${fe(e.borderRadiusLG)} 0 0 ${fe(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},T8=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${fe(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Ns),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${fe(e.paddingXXS)} ${fe(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},O8=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${fe(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
220
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Q$=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},uS=wn(["Input","Shared"],e=>{const t=rn(e,fc(e));return[Y$(t),X$(t)]},hc,{resetFont:!1}),Z$=wn(["Input","Component"],e=>{const t=rn(e,fc(e));return[K$(t),G$(t),Q$(t),ah(t)]},hc,{resetFont:!1});var J$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},e8=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:J$}))},cS=m.forwardRef(e8);process.env.NODE_ENV!=="production"&&(cS.displayName="PlusOutlined");const pc=C.createContext(null);var t8=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,o=t.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,u=l===void 0?"center":l,c=C.useState(),d=ae(c,2),f=d[0],h=d[1],p=C.useRef(),g=C.useCallback(function(b){return typeof s=="function"?s(b):typeof s=="number"?s:b},[s]);function v(){Xt.cancel(p.current)}return C.useEffect(function(){var b={};if(n)if(r){b.width=g(n.width);var y=i?"right":"left";u==="start"&&(b[y]=n[y]),u==="center"&&(b[y]=n[y]+n.width/2,b.transform=i?"translateX(50%)":"translateX(-50%)"),u==="end"&&(b[y]=n[y]+n.width,b.transform="translateX(-100%)")}else b.height=g(n.height),u==="start"&&(b.top=n.top),u==="center"&&(b.top=n.top+n.height/2,b.transform="translateY(-50%)"),u==="end"&&(b.top=n.top+n.height,b.transform="translateY(-100%)");return v(),p.current=Xt(function(){var E=f&&b&&Object.keys(b).every(function(x){var O=b[x],S=f[x];return typeof O=="number"&&typeof S=="number"?Math.round(O)===Math.round(S):O===S});E||h(b)}),v},[JSON.stringify(n),r,i,u,g]),{style:f}},dS={width:0,height:0,left:0,top:0};function n8(e,t,n){return C.useMemo(function(){for(var r,i=new Map,o=t.get((r=e[0])===null||r===void 0?void 0:r.key)||dS,a=o.left+o.width,s=0;s<e.length;s+=1){var l=e[s].key,u=t.get(l);if(!u){var c;u=t.get((c=e[s-1])===null||c===void 0?void 0:c.key)||dS}var d=i.get(l)||U({},u);d.right=a-d.left-d.width,i.set(l,d)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function fS(e,t){var n=m.useRef(e),r=m.useState({}),i=ae(r,2),o=i[1];function a(s){var l=typeof s=="function"?s(n.current):s;l!==n.current&&t(l,n.current),n.current=l,o({})}return[n.current,a]}var r8=.1,hS=.01,gc=20,mS=Math.pow(.995,gc);function i8(e,t){var n=C.useState(),r=ae(n,2),i=r[0],o=r[1],a=C.useState(0),s=ae(a,2),l=s[0],u=s[1],c=C.useState(0),d=ae(c,2),f=d[0],h=d[1],p=C.useState(),g=ae(p,2),v=g[0],b=g[1],y=C.useRef();function E(N){var _=N.touches[0],P=_.screenX,A=_.screenY;o({x:P,y:A}),window.clearInterval(y.current)}function x(N){if(i){var _=N.touches[0],P=_.screenX,A=_.screenY;o({x:P,y:A});var M=P-i.x,D=A-i.y;t(M,D);var R=Date.now();u(R),h(R-l),b({x:M,y:D})}}function O(){if(i&&(o(null),b(null),v)){var N=v.x/f,_=v.y/f,P=Math.abs(N),A=Math.abs(_);if(Math.max(P,A)<r8)return;var M=N,D=_;y.current=window.setInterval(function(){if(Math.abs(M)<hS&&Math.abs(D)<hS){window.clearInterval(y.current);return}M*=mS,D*=mS,t(M*gc,D*gc)},gc)}}var S=C.useRef();function T(N){var _=N.deltaX,P=N.deltaY,A=0,M=Math.abs(_),D=Math.abs(P);M===D?A=S.current==="x"?_:P:M>D?(A=_,S.current="x"):(A=P,S.current="y"),t(-A,-A)&&N.preventDefault()}var I=C.useRef(null);I.current={onTouchStart:E,onTouchMove:x,onTouchEnd:O,onWheel:T},m.useEffect(function(){function N(M){I.current.onTouchStart(M)}function _(M){I.current.onTouchMove(M)}function P(M){I.current.onTouchEnd(M)}function A(M){I.current.onWheel(M)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",P,{passive:!0}),e.current.addEventListener("touchstart",N,{passive:!0}),e.current.addEventListener("wheel",A,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",P)}},[])}function pS(e){var t=C.useState(0),n=ae(t,2),r=n[0],i=n[1],o=C.useRef(0),a=C.useRef();return a.current=e,nf(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function o8(e){var t=C.useRef([]),n=C.useState({}),r=ae(n,2),i=r[1],o=C.useRef(typeof e=="function"?e():e),a=pS(function(){var l=o.current;t.current.forEach(function(u){l=u(l)}),t.current=[],o.current=l,i({})});function s(l){t.current.push(l),a()}return[o.current,s]}var gS={width:0,height:0,left:0,top:0,right:0};function a8(e,t,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,u=a.rtl,c,d,f;return["top","bottom"].includes(l)?(c="width",d=u?"right":"left",f=Math.abs(n)):(c="height",d="top",f=-n),C.useMemo(function(){if(!s.length)return[0,0];for(var h=s.length,p=h,g=0;g<h;g+=1){var v=e.get(s[g].key)||gS;if(Math.floor(v[d]+v[c])>Math.floor(f+t)){p=g-1;break}}for(var b=0,y=h-1;y>=0;y-=1){var E=e.get(s[y].key)||gS;if(E[d]<f){b=y+1;break}}return b>=p?[0,0]:[b,p]},[e,t,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),u])}function vS(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var s8="TABS_DQ";function bS(e){return String(e).replace(/"/g,s8)}function dm(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var yS=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return!r||r.showAdd===!1?null:m.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),fm=m.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var o,a={};return lt(i)==="object"&&!m.isValidElement(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?m.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},o):null});process.env.NODE_ENV!=="production"&&(fm.displayName="ExtraContent");var l8=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,o=e.locale,a=e.mobile,s=e.more,l=s===void 0?{}:s,u=e.style,c=e.className,d=e.editable,f=e.tabBarGutter,h=e.rtl,p=e.removeAriaLabel,g=e.onTabClick,v=e.getPopupContainer,b=e.popupClassName,y=C.useState(!1),E=ae(y,2),x=E[0],O=E[1],S=C.useState(null),T=ae(S,2),I=T[0],N=T[1],_=l.icon,P=_===void 0?"More":_,A="".concat(r,"-more-popup"),M="".concat(n,"-dropdown"),D=I!==null?"".concat(A,"-").concat(I):null,R=o==null?void 0:o.dropdownAriaLabel;function $(k,G){k.preventDefault(),k.stopPropagation(),d.onEdit("remove",{key:G,event:k})}var F=m.createElement(Js,{onClick:function(G){var Y=G.key,te=G.domEvent;g(Y,te),O(!1)},prefixCls:"".concat(M,"-menu"),id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[I],"aria-label":R!==void 0?R:"expanded dropdown"},i.map(function(k){var G=k.closable,Y=k.disabled,te=k.closeIcon,se=k.key,ce=k.label,ue=dm(G,te,d,Y);return m.createElement(uc,{key:se,id:"".concat(A,"-").concat(se),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(se),disabled:Y},m.createElement("span",null,ce),ue&&m.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(M,"-menu-item-remove"),onClick:function(J){J.stopPropagation(),$(J,se)}},te||d.removeIcon||"×"))}));function B(k){for(var G=i.filter(function(ue){return!ue.disabled}),Y=G.findIndex(function(ue){return ue.key===I})||0,te=G.length,se=0;se<te;se+=1){Y=(Y+k+te)%te;var ce=G[Y];if(!ce.disabled){N(ce.key);return}}}function z(k){var G=k.which;if(!x){[Xe.DOWN,Xe.SPACE,Xe.ENTER].includes(G)&&(O(!0),k.preventDefault());return}switch(G){case Xe.UP:B(-1),k.preventDefault();break;case Xe.DOWN:B(1),k.preventDefault();break;case Xe.ESC:O(!1);break;case Xe.SPACE:case Xe.ENTER:I!==null&&g(I,k);break}}C.useEffect(function(){var k=document.getElementById(D);k&&k.scrollIntoView&&k.scrollIntoView(!1)},[I]),C.useEffect(function(){x||N(null)},[x]);var L=V({},h?"marginRight":"marginLeft",f);i.length||(L.visibility="hidden",L.order=1);var H=ie(V({},"".concat(M,"-rtl"),h)),W=a?null:m.createElement(FR,Re({prefixCls:M,overlay:F,visible:i.length?x:!1,onVisibleChange:O,overlayClassName:ie(H,b),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:v},l),m.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:L,"aria-haspopup":"listbox","aria-controls":A,id:"".concat(r,"-more"),"aria-expanded":x,onKeyDown:z},P));return m.createElement("div",{className:ie("".concat(n,"-nav-operations"),c),style:u,ref:t},W,m.createElement(yS,{prefixCls:n,locale:o,editable:d}))});const u8=m.memo(l8,function(e,t){return t.tabMoving});var c8=function(t){var n=t.prefixCls,r=t.id,i=t.active,o=t.focus,a=t.tab,s=a.key,l=a.label,u=a.disabled,c=a.closeIcon,d=a.icon,f=t.closable,h=t.renderWrapper,p=t.removeAriaLabel,g=t.editable,v=t.onClick,b=t.onFocus,y=t.onBlur,E=t.onKeyDown,x=t.onMouseDown,O=t.onMouseUp,S=t.style,T=t.tabCount,I=t.currentPosition,N="".concat(n,"-tab"),_=dm(f,c,g,u);function P($){u||v($)}function A($){$.preventDefault(),$.stopPropagation(),g.onEdit("remove",{key:s,event:$})}var M=m.useMemo(function(){return d&&typeof l=="string"?m.createElement("span",null,l):l},[l,d]),D=m.useRef(null);m.useEffect(function(){o&&D.current&&D.current.focus()},[o]);var R=m.createElement("div",{key:s,"data-node-key":bS(s),className:ie(N,V(V(V(V({},"".concat(N,"-with-remove"),_),"".concat(N,"-active"),i),"".concat(N,"-disabled"),u),"".concat(N,"-focus"),o)),style:S,onClick:P},m.createElement("div",{ref:D,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(s),className:"".concat(N,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(s),"aria-disabled":u,tabIndex:u?null:i?0:-1,onClick:function(F){F.stopPropagation(),P(F)},onKeyDown:E,onMouseDown:x,onMouseUp:O,onFocus:b,onBlur:y},o&&m.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(I," of ").concat(T)),d&&m.createElement("span",{className:"".concat(N,"-icon")},d),l&&M),_&&m.createElement("button",{type:"button",role:"tab","aria-label":p||"remove",tabIndex:i?0:-1,className:"".concat(N,"-remove"),onClick:function(F){F.stopPropagation(),A(F)}},c||g.removeIcon||"×"));return h?h(R):R},d8=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,o=t.offsetTop,a=t.offsetLeft,s=t.getBoundingClientRect(),l=s.width,u=s.height,c=s.left,d=s.top;return Math.abs(l-r)<1?[l,u,c-n.left,d-n.top]:[r,i,a,o]},$a=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,o=n.offsetHeight,a=o===void 0?0:o;if(t.current){var s=t.current.getBoundingClientRect(),l=s.width,u=s.height;if(Math.abs(l-i)<1)return[l,u]}return[i,a]},vc=function(t,n){return t[n?0:1]},ES=m.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,o=e.animated,a=e.activeKey,s=e.rtl,l=e.extra,u=e.editable,c=e.locale,d=e.tabPosition,f=e.tabBarGutter,h=e.children,p=e.onTabClick,g=e.onTabScroll,v=e.indicator,b=m.useContext(pc),y=b.prefixCls,E=b.tabs,x=C.useRef(null),O=C.useRef(null),S=C.useRef(null),T=C.useRef(null),I=C.useRef(null),N=C.useRef(null),_=C.useRef(null),P=d==="top"||d==="bottom",A=fS(0,function(ke,Oe){P&&g&&g({direction:ke>Oe?"left":"right"})}),M=ae(A,2),D=M[0],R=M[1],$=fS(0,function(ke,Oe){!P&&g&&g({direction:ke>Oe?"top":"bottom"})}),F=ae($,2),B=F[0],z=F[1],L=C.useState([0,0]),H=ae(L,2),W=H[0],k=H[1],G=C.useState([0,0]),Y=ae(G,2),te=Y[0],se=Y[1],ce=C.useState([0,0]),ue=ae(ce,2),de=ue[0],J=ue[1],Z=C.useState([0,0]),oe=ae(Z,2),X=oe[0],ee=oe[1],ne=o8(new Map),be=ae(ne,2),Ce=be[0],Se=be[1],ve=n8(E,Ce,te[0]),he=vc(W,P),Ae=vc(te,P),Ie=vc(de,P),me=vc(X,P),Me=Math.floor(he)<Math.floor(Ae+Ie),Q=Me?he-me:he-Ie,le="".concat(y,"-nav-operations-hidden"),pe=0,ye=0;P&&s?(pe=0,ye=Math.max(0,Ae-Q)):(pe=Math.min(0,Q-Ae),ye=0);function Fe(ke){return ke<pe?pe:ke>ye?ye:ke}var je=C.useRef(null),De=C.useState(),we=ae(De,2),Le=we[0],Ue=we[1];function Te(){Ue(Date.now())}function Be(){je.current&&clearTimeout(je.current)}i8(T,function(ke,Oe){function Qe(ut,pt){ut(function($t){var sn=Fe($t+pt);return sn})}return Me?(P?Qe(R,ke):Qe(z,Oe),Be(),Te(),!0):!1}),C.useEffect(function(){return Be(),Le&&(je.current=setTimeout(function(){Ue(0)},100)),Be},[Le]);var it=a8(ve,Q,P?D:B,Ae,Ie,me,U(U({},e),{},{tabs:E})),Ct=ae(it,2),Dt=Ct[0],Pt=Ct[1],wt=an(function(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Oe=ve.get(ke)||{width:0,height:0,left:0,right:0,top:0};if(P){var Qe=D;s?Oe.right<D?Qe=Oe.right:Oe.right+Oe.width>D+Q&&(Qe=Oe.right+Oe.width-Q):Oe.left<-D?Qe=-Oe.left:Oe.left+Oe.width>-D+Q&&(Qe=-(Oe.left+Oe.width-Q)),z(0),R(Fe(Qe))}else{var ut=B;Oe.top<-B?ut=-Oe.top:Oe.top+Oe.height>-B+Q&&(ut=-(Oe.top+Oe.height-Q)),R(0),z(Fe(ut))}}),Ht=C.useState(),kt=ae(Ht,2),at=kt[0],dt=kt[1],$e=C.useState(!1),Ve=ae($e,2),Ye=Ve[0],ot=Ve[1],Pe=E.filter(function(ke){return!ke.disabled}).map(function(ke){return ke.key}),_e=function(Oe){var Qe=Pe.indexOf(at||a),ut=Pe.length,pt=(Qe+Oe+ut)%ut,$t=Pe[pt];dt($t)},xe=function(Oe){var Qe=Oe.code,ut=s&&P,pt=Pe[0],$t=Pe[Pe.length-1];switch(Qe){case"ArrowLeft":{P&&_e(ut?1:-1);break}case"ArrowRight":{P&&_e(ut?-1:1);break}case"ArrowUp":{Oe.preventDefault(),P||_e(-1);break}case"ArrowDown":{Oe.preventDefault(),P||_e(1);break}case"Home":{Oe.preventDefault(),dt(pt);break}case"End":{Oe.preventDefault(),dt($t);break}case"Enter":case"Space":{Oe.preventDefault(),p(at??a,Oe);break}case"Backspace":case"Delete":{var sn=Pe.indexOf(at),jt=E.find(function(gt){return gt.key===at}),rt=dm(jt==null?void 0:jt.closable,jt==null?void 0:jt.closeIcon,u,jt==null?void 0:jt.disabled);rt&&(Oe.preventDefault(),Oe.stopPropagation(),u.onEdit("remove",{key:at,event:Oe}),sn===Pe.length-1?_e(-1):_e(1));break}}},ze={};P?ze[s?"marginRight":"marginLeft"]=f:ze.marginTop=f;var qe=E.map(function(ke,Oe){var Qe=ke.key;return m.createElement(c8,{id:i,prefixCls:y,key:Qe,tab:ke,style:Oe===0?void 0:ze,closable:ke.closable,editable:u,active:Qe===a,focus:Qe===at,renderWrapper:h,removeAriaLabel:c==null?void 0:c.removeAriaLabel,tabCount:Pe.length,currentPosition:Oe+1,onClick:function(pt){p(Qe,pt)},onKeyDown:xe,onFocus:function(){Ye||dt(Qe),wt(Qe),Te(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:function(){dt(void 0)},onMouseDown:function(){ot(!0)},onMouseUp:function(){ot(!1)}})}),et=function(){return Se(function(){var Oe,Qe=new Map,ut=(Oe=I.current)===null||Oe===void 0?void 0:Oe.getBoundingClientRect();return E.forEach(function(pt){var $t,sn=pt.key,jt=($t=I.current)===null||$t===void 0?void 0:$t.querySelector('[data-node-key="'.concat(bS(sn),'"]'));if(jt){var rt=d8(jt,ut),gt=ae(rt,4),_t=gt[0],hn=gt[1],_n=gt[2],Un=gt[3];Qe.set(sn,{width:_t,height:hn,left:_n,top:Un})}}),Qe})};C.useEffect(function(){et()},[E.map(function(ke){return ke.key}).join("_")]);var nt=pS(function(){var ke=$a(x),Oe=$a(O),Qe=$a(S);k([ke[0]-Oe[0]-Qe[0],ke[1]-Oe[1]-Qe[1]]);var ut=$a(_);J(ut);var pt=$a(N);ee(pt);var $t=$a(I);se([$t[0]-ut[0],$t[1]-ut[1]]),et()}),mt=E.slice(0,Dt),vt=E.slice(Pt+1),ht=[].concat(Ke(mt),Ke(vt)),St=ve.get(a),At=t8({activeTabOffset:St,horizontal:P,indicator:v,rtl:s}),Bt=At.style;C.useEffect(function(){wt()},[a,pe,ye,vS(St),vS(ve),P]),C.useEffect(function(){nt()},[s]);var en=!!ht.length,fn="".concat(y,"-nav-wrap"),Ut,Rt,tt,He;return P?s?(Rt=D>0,Ut=D!==ye):(Ut=D<0,Rt=D!==pe):(tt=B<0,He=B!==pe),m.createElement(pr,{onResize:nt},m.createElement("div",{ref:vi(t,x),role:"tablist","aria-orientation":P?"horizontal":"vertical",className:ie("".concat(y,"-nav"),n),style:r,onKeyDown:function(){Te()}},m.createElement(fm,{ref:O,position:"left",extra:l,prefixCls:y}),m.createElement(pr,{onResize:nt},m.createElement("div",{className:ie(fn,V(V(V(V({},"".concat(fn,"-ping-left"),Ut),"".concat(fn,"-ping-right"),Rt),"".concat(fn,"-ping-top"),tt),"".concat(fn,"-ping-bottom"),He)),ref:T},m.createElement(pr,{onResize:nt},m.createElement("div",{ref:I,className:"".concat(y,"-nav-list"),style:{transform:"translate(".concat(D,"px, ").concat(B,"px)"),transition:Le?"none":void 0}},qe,m.createElement(yS,{ref:_,prefixCls:y,locale:c,editable:u,style:U(U({},qe.length===0?void 0:ze),{},{visibility:en?"hidden":null})}),m.createElement("div",{className:ie("".concat(y,"-ink-bar"),V({},"".concat(y,"-ink-bar-animated"),o.inkBar)),style:Bt}))))),m.createElement(u8,Re({},e,{removeAriaLabel:c==null?void 0:c.removeAriaLabel,ref:N,prefixCls:y,tabs:ht,className:!en&&le,tabMoving:!!Le})),m.createElement(fm,{ref:S,position:"right",extra:l,prefixCls:y})))}),hm=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.id,a=e.active,s=e.tabKey,l=e.children;return m.createElement("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:ie(n,a&&"".concat(n,"-active"),r),ref:t},l)});process.env.NODE_ENV!=="production"&&(hm.displayName="TabPane");var f8=["renderTabBar"],h8=["label","key"],SS=function(t){var n=t.renderTabBar,r=yt(t,f8),i=m.useContext(pc),o=i.tabs;if(n){var a=U(U({},r),{},{panes:o.map(function(s){var l=s.label,u=s.key,c=yt(s,h8);return m.createElement(hm,Re({tab:l,key:u,tabKey:u},c))})});return n(a,ES)}return m.createElement(ES,r)};process.env.NODE_ENV!=="production"&&(SS.displayName="TabNavListWrapper");var m8=["key","forceRender","style","className","destroyInactiveTabPane"],p8=function(t){var n=t.id,r=t.activeKey,i=t.animated,o=t.tabPosition,a=t.destroyInactiveTabPane,s=m.useContext(pc),l=s.prefixCls,u=s.tabs,c=i.tabPane,d="".concat(l,"-tabpane");return m.createElement("div",{className:ie("".concat(l,"-content-holder"))},m.createElement("div",{className:ie("".concat(l,"-content"),"".concat(l,"-content-").concat(o),V({},"".concat(l,"-content-animated"),c))},u.map(function(f){var h=f.key,p=f.forceRender,g=f.style,v=f.className,b=f.destroyInactiveTabPane,y=yt(f,m8),E=h===r;return m.createElement(Or,Re({key:h,visible:E,forceRender:p,removeOnLeave:!!(a||b),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(x,O){var S=x.style,T=x.className;return m.createElement(hm,Re({},y,{prefixCls:d,id:n,tabKey:h,animated:c,active:E,style:U(U({},g),S),className:ie(v,T),ref:O}))})})))};function g8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=U({inkBar:!0},lt(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(process.env.NODE_ENV!=="production"&&bt(!1,"`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."),t.tabPane=!1),t}var v8=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],CS=0,wS=m.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,o=e.className,a=e.items,s=e.direction,l=e.activeKey,u=e.defaultActiveKey,c=e.editable,d=e.animated,f=e.tabPosition,h=f===void 0?"top":f,p=e.tabBarGutter,g=e.tabBarStyle,v=e.tabBarExtraContent,b=e.locale,y=e.more,E=e.destroyInactiveTabPane,x=e.renderTabBar,O=e.onChange,S=e.onTabClick,T=e.onTabScroll,I=e.getPopupContainer,N=e.popupClassName,_=e.indicator,P=yt(e,v8),A=m.useMemo(function(){return(a||[]).filter(function(X){return X&&lt(X)==="object"&&"key"in X})},[a]),M=s==="rtl",D=g8(d),R=C.useState(!1),$=ae(R,2),F=$[0],B=$[1];C.useEffect(function(){B(Ah())},[]);var z=Cn(function(){var X;return(X=A[0])===null||X===void 0?void 0:X.key},{value:l,defaultValue:u}),L=ae(z,2),H=L[0],W=L[1],k=C.useState(function(){return A.findIndex(function(X){return X.key===H})}),G=ae(k,2),Y=G[0],te=G[1];C.useEffect(function(){var X=A.findIndex(function(ne){return ne.key===H});if(X===-1){var ee;X=Math.max(0,Math.min(Y,A.length-1)),W((ee=A[X])===null||ee===void 0?void 0:ee.key)}te(X)},[A.map(function(X){return X.key}).join("_"),H,Y]);var se=Cn(null,{value:n}),ce=ae(se,2),ue=ce[0],de=ce[1];C.useEffect(function(){n||(de("rc-tabs-".concat(process.env.NODE_ENV==="test"?"test":CS)),CS+=1)},[]);function J(X,ee){S==null||S(X,ee);var ne=X!==H;W(X),ne&&(O==null||O(X))}var Z={id:ue,activeKey:H,animated:D,tabPosition:h,rtl:M,mobile:F},oe=U(U({},Z),{},{editable:c,locale:b,more:y,tabBarGutter:p,onTabClick:J,onTabScroll:T,extra:v,style:g,panes:null,getPopupContainer:I,popupClassName:N,indicator:_});return m.createElement(pc.Provider,{value:{tabs:A,prefixCls:i}},m.createElement("div",Re({ref:t,id:n,className:ie(i,"".concat(i,"-").concat(h),V(V(V({},"".concat(i,"-mobile"),F),"".concat(i,"-editable"),c),"".concat(i,"-rtl"),M),o)},P),m.createElement(SS,Re({},oe,{renderTabBar:x})),m.createElement(p8,Re({destroyInactiveTabPane:E},Z,{animated:D}))))});process.env.NODE_ENV!=="production"&&(wS.displayName="Tabs");const b8={motionAppear:!1,motionEnter:!0,motionLeave:!0};function y8(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},b8),{motionName:qi(e,"switch")})),n}var E8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function S8(e){return e.filter(t=>t)}function C8(e,t){if(process.env.NODE_ENV!=="production"&&on("Tabs").deprecated(!t,"Tabs.TabPane","items"),e)return e.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=mr(t).map(r=>{if(m.isValidElement(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=E8(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return S8(n)}const w8=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[zu(e,"slide-up"),zu(e,"slide-down")]]},x8=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${fe(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:so(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:fe(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:fe(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${fe(e.borderRadiusLG)} 0 0 ${fe(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},T8=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${fe(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Ns),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${fe(e.paddingXXS)} ${fe(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},O8=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${fe(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
221
221
  right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
222
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:fe(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},N8=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${fe(e.borderRadius)} ${fe(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${fe(e.borderRadius)} ${fe(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${fe(e.borderRadius)} ${fe(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${fe(e.borderRadius)} 0 0 ${fe(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},_8=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=e,u=`${t}-tab`;return{[u]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${u}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},Ci(e)),"&:hover":{color:r},[`&${u}-active ${u}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${u}-focus ${u}-btn:focus-visible`]:so(e),[`&${u}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${u}-disabled ${u}-btn, &${u}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${u}-remove ${i}`]:{margin:0},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${u} + ${u}`]:{margin:{_skip_check_:!0,value:o}}}},I8=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:fe(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:fe(e.marginXS)},marginLeft:{_skip_check_:!0,value:fe(o(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},A8=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${fe(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},Ci(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),_8(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},Ci(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},P8=wn("Tabs",e=>{const t=rn(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${fe(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${fe(e.horizontalItemGutter)}`});return[N8(t),I8(t),O8(t),T8(t),x8(t),A8(t),w8(t)]},e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=e,a=t||o,s=n||i,l=r||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),xS=()=>null;process.env.NODE_ENV!=="production"&&(xS.displayName="DeprecatedTabPane");var M8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mm=e=>{var t,n,r,i,o,a,s,l,u,c,d;const{type:f,className:h,rootClassName:p,size:g,onEdit:v,hideAdd:b,centered:y,addIcon:E,removeIcon:x,moreIcon:O,more:S,popupClassName:T,children:I,items:N,animated:_,style:P,indicatorSize:A,indicator:M,destroyInactiveTabPane:D,destroyOnHidden:R}=e,$=M8(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:F}=$,{direction:B,tabs:z,getPrefixCls:L,getPopupContainer:H}=m.useContext(Qt),W=L("tabs",F),k=Wi(W),[G,Y,te]=P8(W,k);let se;f==="editable-card"&&(se={onEdit:(X,{key:ee,event:ne})=>{v==null||v(X==="add"?ne:ee,X)},removeIcon:(t=x??(z==null?void 0:z.removeIcon))!==null&&t!==void 0?t:m.createElement(Ui,null),addIcon:(E??(z==null?void 0:z.addIcon))||m.createElement(cS,null),showAdd:b!==!0});const ce=L();if(process.env.NODE_ENV!=="production"){const X=on("Tabs");process.env.NODE_ENV!=="production"&&X(!("onPrevClick"in e)&&!("onNextClick"in e),"breaking","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),process.env.NODE_ENV!=="production"&&X(!(A||z!=null&&z.indicatorSize),"deprecated","`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."),X.deprecated(!("destroyInactiveTabPane"in e||N!=null&&N.some(ee=>"destroyInactiveTabPane"in ee)),"destroyInactiveTabPane","destroyOnHidden")}const ue=ai(g),de=C8(N,I),J=y8(W,_),Z=Object.assign(Object.assign({},z==null?void 0:z.style),P),oe={align:(n=M==null?void 0:M.align)!==null&&n!==void 0?n:(r=z==null?void 0:z.indicator)===null||r===void 0?void 0:r.align,size:(s=(o=(i=M==null?void 0:M.size)!==null&&i!==void 0?i:A)!==null&&o!==void 0?o:(a=z==null?void 0:z.indicator)===null||a===void 0?void 0:a.size)!==null&&s!==void 0?s:z==null?void 0:z.indicatorSize};return G(m.createElement(wS,Object.assign({direction:B,getPopupContainer:H},$,{items:de,className:ie({[`${W}-${ue}`]:ue,[`${W}-card`]:["card","editable-card"].includes(f),[`${W}-editable-card`]:f==="editable-card",[`${W}-centered`]:y},z==null?void 0:z.className,h,p,Y,te,k),popupClassName:ie(T,Y,te,k),style:Z,editable:se,more:Object.assign({icon:(d=(c=(u=(l=z==null?void 0:z.more)===null||l===void 0?void 0:l.icon)!==null&&u!==void 0?u:z==null?void 0:z.moreIcon)!==null&&c!==void 0?c:O)!==null&&d!==void 0?d:m.createElement(QE,null),transitionName:`${ce}-slide-up`},S),prefixCls:W,animated:J,indicator:oe,destroyInactiveTabPane:R??D})))};mm.TabPane=xS,process.env.NODE_ENV!=="production"&&(mm.displayName="Tabs");function L8(e,t,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,u=l===void 0?void 0:l,c,d=!1,f=0;function h(){c&&clearTimeout(c)}function p(v){var b=v||{},y=b.upcomingOnly,E=y===void 0?!1:y;h(),d=!E}function g(){for(var v=arguments.length,b=new Array(v),y=0;y<v;y++)b[y]=arguments[y];var E=this,x=Date.now()-f;if(d)return;function O(){f=Date.now(),t.apply(E,b)}function S(){c=void 0}!s&&u&&!c&&O(),h(),u===void 0&&x>e?s?(f=Date.now(),o||(c=setTimeout(u?S:O,e))):O():o!==!0&&(c=setTimeout(u?S:O,u===void 0?e-x:e))}return g.cancel=p,g}function D8(e,t,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return L8(e,t,{debounceMode:o!==!1})}const TS=C.createContext({});var k8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function OS(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const R8=["xs","sm","md","lg","xl","xxl"],pn=m.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=m.useContext(Qt),{gutter:i,wrap:o}=m.useContext(TS),{prefixCls:a,span:s,order:l,offset:u,push:c,pull:d,className:f,children:h,flex:p,style:g}=e,v=k8(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),b=n("col",a),[y,E,x]=$4(b),O={};let S={};R8.forEach(N=>{let _={};const P=e[N];typeof P=="number"?_.span=P:typeof P=="object"&&(_=P||{}),delete v[N],S=Object.assign(Object.assign({},S),{[`${b}-${N}-${_.span}`]:_.span!==void 0,[`${b}-${N}-order-${_.order}`]:_.order||_.order===0,[`${b}-${N}-offset-${_.offset}`]:_.offset||_.offset===0,[`${b}-${N}-push-${_.push}`]:_.push||_.push===0,[`${b}-${N}-pull-${_.pull}`]:_.pull||_.pull===0,[`${b}-rtl`]:r==="rtl"}),_.flex&&(S[`${b}-${N}-flex`]=!0,O[`--${b}-${N}-flex`]=OS(_.flex))});const T=ie(b,{[`${b}-${s}`]:s!==void 0,[`${b}-order-${l}`]:l,[`${b}-offset-${u}`]:u,[`${b}-push-${c}`]:c,[`${b}-pull-${d}`]:d},f,S,E,x),I={};if(i&&i[0]>0){const N=i[0]/2;I.paddingLeft=N,I.paddingRight=N}return p&&(I.flex=OS(p),o===!1&&!I.minWidth&&(I.minWidth=0)),y(m.createElement("div",Object.assign({},v,{style:Object.assign(Object.assign(Object.assign({},I),g),O),className:T,ref:t}),h))});process.env.NODE_ENV!=="production"&&(pn.displayName="Col");function $8(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s<qs.length;s++){const l=qs[s];if(i[l]&&o[l]!==void 0){n[a]=o[l];break}}else n[a]=o}),n}var F8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function NS(e,t){const[n,r]=m.useState(typeof e=="string"?e:""),i=()=>{if(typeof e=="string"&&r(e),typeof e=="object")for(let o=0;o<qs.length;o++){const a=qs[o];if(!t||!t[a])continue;const s=e[a];if(s!==void 0){r(s);return}}};return m.useEffect(()=>{i()},[JSON.stringify(e),t]),n}const Pr=m.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:u}=e,c=F8(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=m.useContext(Qt),h=OE(!0,null),p=NS(i,h),g=NS(r,h),v=d("row",n),[b,y,E]=R4(v),x=$8(l,h),O=ie(v,{[`${v}-no-wrap`]:u===!1,[`${v}-${g}`]:g,[`${v}-${p}`]:p,[`${v}-rtl`]:f==="rtl"},o,y,E),S={},T=x[0]!=null&&x[0]>0?x[0]/-2:void 0;T&&(S.marginLeft=T,S.marginRight=T);const[I,N]=x;S.rowGap=N;const _=m.useMemo(()=>({gutter:[I,N],wrap:u}),[I,N,u]);return b(m.createElement(TS.Provider,{value:_},m.createElement("div",Object.assign({},c,{className:O,style:Object.assign(Object.assign({},S),a),ref:t}),s)))});process.env.NODE_ENV!=="production"&&(Pr.displayName="Row");const B8=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},z8=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{borderBlockStart:`${fe(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${fe(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${fe(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${fe(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${fe(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${fe(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${fe(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},H8=wn("Divider",e=>{const t=rn(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[z8(t),B8(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var j8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const V8={small:"sm",middle:"md"},pm=e=>{const{getPrefixCls:t,direction:n,className:r,style:i}=Gn("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:u,rootClassName:c,children:d,dashed:f,variant:h="solid",plain:p,style:g,size:v}=e,b=j8(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),y=t("divider",o),[E,x,O]=H8(y),S=ai(v),T=V8[S],I=!!d,N=m.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=N==="start"&&l!=null,P=N==="end"&&l!=null,A=ie(y,r,x,O,`${y}-${a}`,{[`${y}-with-text`]:I,[`${y}-with-text-${N}`]:I,[`${y}-dashed`]:!!f,[`${y}-${h}`]:h!=="solid",[`${y}-plain`]:!!p,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:_,[`${y}-no-default-orientation-margin-end`]:P,[`${y}-${T}`]:!!T},u,c),M=m.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),D={marginInlineStart:_?M:void 0,marginInlineEnd:P?M:void 0};if(process.env.NODE_ENV!=="production"){const R=on("Divider");process.env.NODE_ENV!=="production"&&R(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return E(m.createElement("div",Object.assign({className:A,style:Object.assign(Object.assign({},i),g)},b,{role:"separator"}),d&&a!=="vertical"&&m.createElement("span",{className:`${y}-inner-text`,style:D},d)))};process.env.NODE_ENV!=="production"&&(pm.displayName="Divider");var _S=function(t,n){if(!t)return null;var r={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Oi=function(t){return t!==void 0?"".concat(t,"px"):void 0};function U8(e){var t=e.prefixCls,n=e.containerRef,r=e.value,i=e.getValueIndex,o=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,l=e.direction,u=e.vertical,c=u===void 0?!1:u,d=m.useRef(null),f=m.useState(r),h=ae(f,2),p=h[0],g=h[1],v=function(R){var $,F=i(R),B=($=n.current)===null||$===void 0?void 0:$.querySelectorAll(".".concat(t,"-item"))[F];return(B==null?void 0:B.offsetParent)&&B},b=m.useState(null),y=ae(b,2),E=y[0],x=y[1],O=m.useState(null),S=ae(O,2),T=S[0],I=S[1];Kt(function(){if(p!==r){var D=v(p),R=v(r),$=_S(D,c),F=_S(R,c);g(r),x($),I(F),D&&R?a():s()}},[r]);var N=m.useMemo(function(){if(c){var D;return Oi((D=E==null?void 0:E.top)!==null&&D!==void 0?D:0)}return Oi(l==="rtl"?-(E==null?void 0:E.right):E==null?void 0:E.left)},[c,l,E]),_=m.useMemo(function(){if(c){var D;return Oi((D=T==null?void 0:T.top)!==null&&D!==void 0?D:0)}return Oi(l==="rtl"?-(T==null?void 0:T.right):T==null?void 0:T.left)},[c,l,T]),P=function(){return c?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},A=function(){return c?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},M=function(){x(null),I(null),s()};return!E||!T?null:m.createElement(Or,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:P,onAppearActive:A,onVisibleChanged:M},function(D,R){var $=D.className,F=D.style,B=U(U({},F),{},{"--thumb-start-left":N,"--thumb-start-width":Oi(E==null?void 0:E.width),"--thumb-active-left":_,"--thumb-active-width":Oi(T==null?void 0:T.width),"--thumb-start-top":N,"--thumb-start-height":Oi(E==null?void 0:E.height),"--thumb-active-top":_,"--thumb-active-height":Oi(T==null?void 0:T.height)}),z={ref:dr(d,R),style:B,className:ie("".concat(t,"-thumb"),$)};return process.env.NODE_ENV==="test"&&(z["data-test-style"]=JSON.stringify(B)),m.createElement("div",z)})}var W8=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function Y8(e){if(typeof e.title<"u")return e.title;if(lt(e.label)!=="object"){var t;return(t=e.label)===null||t===void 0?void 0:t.toString()}}function q8(e){return e.map(function(t){if(lt(t)==="object"&&t!==null){var n=Y8(t);return U(U({},t),{},{title:n})}return{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t}})}var X8=function(t){var n=t.prefixCls,r=t.className,i=t.disabled,o=t.checked,a=t.label,s=t.title,l=t.value,u=t.name,c=t.onChange,d=t.onFocus,f=t.onBlur,h=t.onKeyDown,p=t.onKeyUp,g=t.onMouseDown,v=function(y){i||c(y,l)};return m.createElement("label",{className:ie(r,V({},"".concat(n,"-item-disabled"),i)),onMouseDown:g},m.createElement("input",{name:u,className:"".concat(n,"-item-input"),type:"radio",disabled:i,checked:o,onChange:v,onFocus:d,onBlur:f,onKeyDown:h,onKeyUp:p}),m.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":o},a))},IS=m.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=i===void 0?"rc-segmented":i,a=e.direction,s=e.vertical,l=e.options,u=l===void 0?[]:l,c=e.disabled,d=e.defaultValue,f=e.value,h=e.name,p=e.onChange,g=e.className,v=g===void 0?"":g,b=e.motionName,y=b===void 0?"thumb-motion":b,E=yt(e,W8),x=m.useRef(null),O=m.useMemo(function(){return dr(x,t)},[x,t]),S=m.useMemo(function(){return q8(u)},[u]),T=Cn((n=S[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),I=ae(T,2),N=I[0],_=I[1],P=m.useState(!1),A=ae(P,2),M=A[0],D=A[1],R=function(Z,oe){_(oe),p==null||p(oe)},$=_r(E,["children"]),F=m.useState(!1),B=ae(F,2),z=B[0],L=B[1],H=m.useState(!1),W=ae(H,2),k=W[0],G=W[1],Y=function(){G(!0)},te=function(){G(!1)},se=function(){L(!1)},ce=function(Z){Z.key==="Tab"&&L(!0)},ue=function(Z){var oe=S.findIndex(function(be){return be.value===N}),X=S.length,ee=(oe+Z+X)%X,ne=S[ee];ne&&(_(ne.value),p==null||p(ne.value))},de=function(Z){switch(Z.key){case"ArrowLeft":case"ArrowUp":ue(-1);break;case"ArrowRight":case"ArrowDown":ue(1);break}};return m.createElement("div",Re({role:"radiogroup","aria-label":"segmented control",tabIndex:c?void 0:0},$,{className:ie(o,(r={},V(r,"".concat(o,"-rtl"),a==="rtl"),V(r,"".concat(o,"-disabled"),c),V(r,"".concat(o,"-vertical"),s),r),v),ref:O}),m.createElement("div",{className:"".concat(o,"-group")},m.createElement(U8,{vertical:s,prefixCls:o,value:N,containerRef:x,motionName:"".concat(o,"-").concat(y),direction:a,getValueIndex:function(Z){return S.findIndex(function(oe){return oe.value===Z})},onMotionStart:function(){D(!0)},onMotionEnd:function(){D(!1)}}),S.map(function(J){var Z;return m.createElement(X8,Re({},J,{name:h,key:J.value,prefixCls:o,className:ie(J.className,"".concat(o,"-item"),(Z={},V(Z,"".concat(o,"-item-selected"),J.value===N&&!M),V(Z,"".concat(o,"-item-focused"),k&&z&&J.value===N),Z)),checked:J.value===N,onChange:R,onFocus:Y,onBlur:te,onKeyDown:de,onKeyUp:ce,onMouseDown:se,disabled:!!c||!!J.disabled}))})))});process.env.NODE_ENV!=="production"&&(IS.displayName="Segmented");var K8=IS;function AS(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function PS(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const G8=Object.assign({overflow:"hidden"},Ns),Q8=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),i=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),Ci(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${fe(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},PS(e)),{color:e.itemSelectedColor}),"&-focused":Object.assign({},so(e)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:fe(n),padding:`0 ${fe(e.segmentedPaddingHorizontal)}`},G8),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},PS(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${fe(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:fe(r),padding:`0 ${fe(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:i,lineHeight:fe(i),padding:`0 ${fe(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),AS(`&-disabled ${t}-item`,e)),AS(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},Z8=wn("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=rn(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return[Q8(r)]},e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:i,colorFill:o,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:i,itemActiveBg:o,itemSelectedColor:n}});var MS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function J8(e){return typeof e=="object"&&!!(e!=null&&e.icon)}const LS=m.forwardRef((e,t)=>{const n=ks(),{prefixCls:r,className:i,rootClassName:o,block:a,options:s=[],size:l="middle",style:u,vertical:c,shape:d="default",name:f=n}=e,h=MS(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:p,direction:g,className:v,style:b}=Gn("segmented"),y=p("segmented",r),[E,x,O]=Z8(y),S=ai(l),T=m.useMemo(()=>s.map(_=>{if(J8(_)){const{icon:P,label:A}=_,M=MS(_,["icon","label"]);return Object.assign(Object.assign({},M),{label:m.createElement(m.Fragment,null,m.createElement("span",{className:`${y}-item-icon`},P),A&&m.createElement("span",null,A))})}return _}),[s,y]),I=ie(i,o,v,{[`${y}-block`]:a,[`${y}-sm`]:S==="small",[`${y}-lg`]:S==="large",[`${y}-vertical`]:c,[`${y}-shape-${d}`]:d==="round"},x,O),N=Object.assign(Object.assign({},b),u);return E(m.createElement(K8,Object.assign({},h,{name:f,className:I,style:N,options:T,ref:t,prefixCls:y,direction:g,vertical:c})))});process.env.NODE_ENV!=="production"&&(LS.displayName="Segmented");var e5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},t5=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:e5}))},DS=m.forwardRef(t5);process.env.NODE_ENV!=="production"&&(DS.displayName="UpOutlined");function n5(e){return!!(e.addonBefore||e.addonAfter)}function r5(e){return!!(e.prefix||e.suffix||e.allowClear)}function kS(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function bc(e,t,n,r){if(n){var i=t;if(t.type==="click"){i=kS(t,e,""),n(i);return}if(e.type!=="file"&&r!==void 0){i=kS(t,e,r),n(i);return}n(i)}}function RS(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var $S=C.forwardRef(function(e,t){var n,r,i,o=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,u=e.suffix,c=e.addonBefore,d=e.addonAfter,f=e.className,h=e.style,p=e.disabled,g=e.readOnly,v=e.focused,b=e.triggerFocus,y=e.allowClear,E=e.value,x=e.handleReset,O=e.hidden,S=e.classes,T=e.classNames,I=e.dataAttrs,N=e.styles,_=e.components,P=e.onClear,A=a??o,M=(_==null?void 0:_.affixWrapper)||"span",D=(_==null?void 0:_.groupWrapper)||"span",R=(_==null?void 0:_.wrapper)||"span",$=(_==null?void 0:_.groupAddon)||"span",F=C.useRef(null),B=function(ee){var ne;(ne=F.current)!==null&&ne!==void 0&&ne.contains(ee.target)&&(b==null||b())},z=r5(e),L=C.cloneElement(A,{value:E,className:ie((n=A.props)===null||n===void 0?void 0:n.className,!z&&(T==null?void 0:T.variant))||null}),H=C.useRef(null);if(C.useImperativeHandle(t,function(){return{nativeElement:H.current||F.current}}),z){var W=null;if(y){var k=!p&&!g&&E,G="".concat(s,"-clear-icon"),Y=lt(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"✖";W=C.createElement("button",{type:"button",tabIndex:-1,onClick:function(ee){x==null||x(ee),P==null||P()},onMouseDown:function(ee){return ee.preventDefault()},className:ie(G,V(V({},"".concat(G,"-hidden"),!k),"".concat(G,"-has-suffix"),!!u))},Y)}var te="".concat(s,"-affix-wrapper"),se=ie(te,V(V(V(V(V({},"".concat(s,"-disabled"),p),"".concat(te,"-disabled"),p),"".concat(te,"-focused"),v),"".concat(te,"-readonly"),g),"".concat(te,"-input-with-clear-btn"),u&&y&&E),S==null?void 0:S.affixWrapper,T==null?void 0:T.affixWrapper,T==null?void 0:T.variant),ce=(u||y)&&C.createElement("span",{className:ie("".concat(s,"-suffix"),T==null?void 0:T.suffix),style:N==null?void 0:N.suffix},W,u);L=C.createElement(M,Re({className:se,style:N==null?void 0:N.affixWrapper,onClick:B},I==null?void 0:I.affixWrapper,{ref:F}),l&&C.createElement("span",{className:ie("".concat(s,"-prefix"),T==null?void 0:T.prefix),style:N==null?void 0:N.prefix},l),L,ce)}if(n5(e)){var ue="".concat(s,"-group"),de="".concat(ue,"-addon"),J="".concat(ue,"-wrapper"),Z=ie("".concat(s,"-wrapper"),ue,S==null?void 0:S.wrapper,T==null?void 0:T.wrapper),oe=ie(J,V({},"".concat(J,"-disabled"),p),S==null?void 0:S.group,T==null?void 0:T.groupWrapper);L=C.createElement(D,{className:oe,ref:H},C.createElement(R,{className:Z},c&&C.createElement($,{className:de},c),L,d&&C.createElement($,{className:de},d)))}return C.cloneElement(L,{className:ie((r=L.props)===null||r===void 0?void 0:r.className,f)||null,style:U(U({},(i=L.props)===null||i===void 0?void 0:i.style),h),hidden:O})}),i5=["show"];function FS(e,t){return m.useMemo(function(){var n={};t&&(n.show=lt(t)==="object"&&t.formatter?t.formatter:!!t),n=U(U({},n),e);var r=n,i=r.show,o=yt(r,i5);return U(U({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[e,t])}var o5=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],a5=C.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,o=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,c=u===void 0?"rc-input":u,d=e.disabled,f=e.htmlSize,h=e.className,p=e.maxLength,g=e.suffix,v=e.showCount,b=e.count,y=e.type,E=y===void 0?"text":y,x=e.classes,O=e.classNames,S=e.styles,T=e.onCompositionStart,I=e.onCompositionEnd,N=yt(e,o5),_=C.useState(!1),P=ae(_,2),A=P[0],M=P[1],D=C.useRef(!1),R=C.useRef(!1),$=C.useRef(null),F=C.useRef(null),B=function(me){$.current&&RS($.current,me)},z=Cn(e.defaultValue,{value:e.value}),L=ae(z,2),H=L[0],W=L[1],k=H==null?"":String(H),G=C.useState(null),Y=ae(G,2),te=Y[0],se=Y[1],ce=FS(b,v),ue=ce.max||p,de=ce.strategy(k),J=!!ue&&de>ue;C.useImperativeHandle(t,function(){var Ie;return{focus:B,blur:function(){var Me;(Me=$.current)===null||Me===void 0||Me.blur()},setSelectionRange:function(Me,Q,le){var pe;(pe=$.current)===null||pe===void 0||pe.setSelectionRange(Me,Q,le)},select:function(){var Me;(Me=$.current)===null||Me===void 0||Me.select()},input:$.current,nativeElement:((Ie=F.current)===null||Ie===void 0?void 0:Ie.nativeElement)||$.current}}),C.useEffect(function(){R.current&&(R.current=!1),M(function(Ie){return Ie&&d?!1:Ie})},[d]);var Z=function(me,Me,Q){var le=Me;if(!D.current&&ce.exceedFormatter&&ce.max&&ce.strategy(Me)>ce.max){if(le=ce.exceedFormatter(Me,{max:ce.max}),Me!==le){var pe,ye;se([((pe=$.current)===null||pe===void 0?void 0:pe.selectionStart)||0,((ye=$.current)===null||ye===void 0?void 0:ye.selectionEnd)||0])}}else if(Q.source==="compositionEnd")return;W(le),$.current&&bc($.current,me,r,le)};C.useEffect(function(){if(te){var Ie;(Ie=$.current)===null||Ie===void 0||Ie.setSelectionRange.apply(Ie,Ke(te))}},[te]);var oe=function(me){Z(me,me.target.value,{source:"change"})},X=function(me){D.current=!1,Z(me,me.currentTarget.value,{source:"compositionEnd"}),I==null||I(me)},ee=function(me){a&&me.key==="Enter"&&!R.current&&(R.current=!0,a(me)),s==null||s(me)},ne=function(me){me.key==="Enter"&&(R.current=!1),l==null||l(me)},be=function(me){M(!0),i==null||i(me)},Ce=function(me){R.current&&(R.current=!1),M(!1),o==null||o(me)},Se=function(me){W(""),B(),$.current&&bc($.current,me,r)},ve=J&&"".concat(c,"-out-of-range"),he=function(){var me=_r(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return C.createElement("input",Re({autoComplete:n},me,{onChange:oe,onFocus:be,onBlur:Ce,onKeyDown:ee,onKeyUp:ne,className:ie(c,V({},"".concat(c,"-disabled"),d),O==null?void 0:O.input),style:S==null?void 0:S.input,ref:$,size:f,type:E,onCompositionStart:function(Q){D.current=!0,T==null||T(Q)},onCompositionEnd:X}))},Ae=function(){var me=Number(ue)>0;if(g||ce.show){var Me=ce.showFormatter?ce.showFormatter({value:k,count:de,maxLength:ue}):"".concat(de).concat(me?" / ".concat(ue):"");return C.createElement(C.Fragment,null,ce.show&&C.createElement("span",{className:ie("".concat(c,"-show-count-suffix"),V({},"".concat(c,"-show-count-has-suffix"),!!g),O==null?void 0:O.count),style:U({},S==null?void 0:S.count)},Me),g)}return null};return C.createElement($S,Re({},N,{prefixCls:c,className:ie(h,ve),handleReset:Se,value:k,focused:A,triggerFocus:B,suffix:Ae(),disabled:d,classes:x,classNames:O,styles:S,ref:F}),he())});const BS=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:C.createElement(Is,null)}),t};function s5(e,t){const n=C.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=e.current)===null||i===void 0)&&i.input&&((o=e.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return C.useEffect(()=>(r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function l5(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var u5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const c5=C.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:u,allowClear:c,addonAfter:d,addonBefore:f,className:h,style:p,styles:g,rootClassName:v,onChange:b,classNames:y,variant:E}=e,x=u5(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Se}=on("Input");Se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:O,direction:S,allowClear:T,autoComplete:I,className:N,style:_,classNames:P,styles:A}=Gn("input"),M=O("input",n),D=C.useRef(null),R=Wi(M),[$,F,B]=uS(M,v),[z]=Z$(M,R),{compactSize:L,compactItemClassnames:H}=Ru(M,S),W=ai(Se=>{var ve;return(ve=o??L)!==null&&ve!==void 0?ve:Se}),k=C.useContext(Si),G=a??k,{status:Y,hasFeedback:te,feedbackIcon:se}=C.useContext(ko),ce=Uh(Y,i),ue=l5(e)||!!te,de=C.useRef(ue);if(process.env.NODE_ENV!=="production"){const Se=on("Input");C.useEffect(()=>{var ve;ue&&!de.current&&process.env.NODE_ENV!=="production"&&Se(document.activeElement===((ve=D.current)===null||ve===void 0?void 0:ve.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),de.current=ue},[ue])}const J=s5(D),Z=Se=>{J(),s==null||s(Se)},oe=Se=>{J(),l==null||l(Se)},X=Se=>{J(),b==null||b(Se)},ee=(te||u)&&C.createElement(C.Fragment,null,u,te&&se),ne=BS(c??T),[be,Ce]=Wh("input",E,r);return $(z(C.createElement(a5,Object.assign({ref:dr(t,D),prefixCls:M,autoComplete:I},x,{disabled:G,onBlur:Z,onFocus:oe,style:Object.assign(Object.assign({},_),p),styles:Object.assign(Object.assign({},A),g),suffix:ee,allowClear:ne,className:ie(h,v,B,R,H,N),onChange:X,addonBefore:f&&C.createElement(zs,{form:!0,space:!0},f),addonAfter:d&&C.createElement(zs,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},y),P),{input:ie({[`${M}-sm`]:W==="small",[`${M}-lg`]:W==="large",[`${M}-rtl`]:S==="rtl"},y==null?void 0:y.input,P.input,F),variant:ie({[`${M}-${be}`]:Ce},nc(M,ce)),affixWrapper:ie({[`${M}-affix-wrapper-sm`]:W==="small",[`${M}-affix-wrapper-lg`]:W==="large",[`${M}-affix-wrapper-rtl`]:S==="rtl"},F),wrapper:ie({[`${M}-group-rtl`]:S==="rtl"},F),groupWrapper:ie({[`${M}-group-wrapper-sm`]:W==="small",[`${M}-group-wrapper-lg`]:W==="large",[`${M}-group-wrapper-rtl`]:S==="rtl",[`${M}-group-wrapper-${be}`]:Ce},nc(`${M}-group-wrapper`,ce,te),F)})}))))});process.env.NODE_ENV!=="production"&&(c5.displayName="Input");function gm(e,t,n){return(e-t)/(n-t)}function vm(e,t,n,r){var i=gm(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Fo(e,t){return Array.isArray(e)?e[t]:e}var Bo=m.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),d5=m.createContext({}),f5=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],bm=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,i=e.valueIndex,o=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,u=e.dragging,c=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,h=e.onFocus,p=e.onMouseEnter,g=yt(e,f5),v=m.useContext(Bo),b=v.min,y=v.max,E=v.direction,x=v.disabled,O=v.keyboard,S=v.range,T=v.tabIndex,I=v.ariaLabelForHandle,N=v.ariaLabelledByForHandle,_=v.ariaRequired,P=v.ariaValueTextFormatterForHandle,A=v.styles,M=v.classNames,D="".concat(n,"-handle"),R=function(Y){x||o(Y,i)},$=function(Y){h==null||h(Y,i)},F=function(Y){p(Y,i)},B=function(Y){if(!x&&O){var te=null;switch(Y.which||Y.keyCode){case Xe.LEFT:te=E==="ltr"||E==="btt"?-1:1;break;case Xe.RIGHT:te=E==="ltr"||E==="btt"?1:-1;break;case Xe.UP:te=E!=="ttb"?1:-1;break;case Xe.DOWN:te=E!=="ttb"?-1:1;break;case Xe.HOME:te="min";break;case Xe.END:te="max";break;case Xe.PAGE_UP:te=2;break;case Xe.PAGE_DOWN:te=-2;break;case Xe.BACKSPACE:case Xe.DELETE:a(i);break}te!==null&&(Y.preventDefault(),d(te,i))}},z=function(Y){switch(Y.which||Y.keyCode){case Xe.LEFT:case Xe.RIGHT:case Xe.UP:case Xe.DOWN:case Xe.HOME:case Xe.END:case Xe.PAGE_UP:case Xe.PAGE_DOWN:f==null||f();break}},L=vm(E,r,b,y),H={};if(i!==null){var W;H={tabIndex:x?null:Fo(T,i),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":x,"aria-label":Fo(I,i),"aria-labelledby":Fo(N,i),"aria-required":Fo(_,i),"aria-valuetext":(W=Fo(P,i))===null||W===void 0?void 0:W(r),"aria-orientation":E==="ltr"||E==="rtl"?"horizontal":"vertical",onMouseDown:R,onTouchStart:R,onFocus:$,onMouseEnter:F,onKeyDown:B,onKeyUp:z}}var k=m.createElement("div",Re({ref:t,className:ie(D,V(V(V({},"".concat(D,"-").concat(i+1),i!==null&&S),"".concat(D,"-dragging"),u),"".concat(D,"-dragging-delete"),c),M.handle),style:U(U(U({},L),s),A.handle)},H,g));return l&&(k=l(k,{index:i,prefixCls:n,value:r,dragging:u,draggingDelete:c})),k});process.env.NODE_ENV!=="production"&&(bm.displayName="Handle");var h5=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],zS=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,u=e.draggingIndex,c=e.draggingDelete,d=e.onFocus,f=yt(e,h5),h=m.useRef({}),p=m.useState(!1),g=ae(p,2),v=g[0],b=g[1],y=m.useState(-1),E=ae(y,2),x=E[0],O=E[1],S=function(P){O(P),b(!0)},T=function(P,A){S(A),d==null||d(P)},I=function(P,A){S(A)};m.useImperativeHandle(t,function(){return{focus:function(P){var A;(A=h.current[P])===null||A===void 0||A.focus()},hideHelp:function(){zr.flushSync(function(){b(!1)})}}});var N=U({prefixCls:n,onStartMove:i,onOffsetChange:o,render:s,onFocus:T,onMouseEnter:I},f);return m.createElement(m.Fragment,null,a.map(function(_,P){var A=u===P;return m.createElement(bm,Re({ref:function(D){D?h.current[P]=D:delete h.current[P]},dragging:A,draggingDelete:A&&c,style:Fo(r,P),key:P,value:_,valueIndex:P},N))}),l&&v&&m.createElement(bm,Re({key:"a11y"},N,{value:a[x],valueIndex:null,dragging:u!==-1,draggingDelete:c,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(zS.displayName="Handles");var m5=function(t){var n=t.prefixCls,r=t.style,i=t.children,o=t.value,a=t.onClick,s=m.useContext(Bo),l=s.min,u=s.max,c=s.direction,d=s.includedStart,f=s.includedEnd,h=s.included,p="".concat(n,"-text"),g=vm(c,o,l,u);return m.createElement("span",{className:ie(p,V({},"".concat(p,"-active"),h&&d<=o&&o<=f)),style:U(U({},g),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){a(o)}},i)},p5=function(t){var n=t.prefixCls,r=t.marks,i=t.onClick,o="".concat(n,"-mark");return r.length?m.createElement("div",{className:o},r.map(function(a){var s=a.value,l=a.style,u=a.label;return m.createElement(m5,{key:s,prefixCls:o,style:l,value:s,onClick:i},u)})):null},g5=function(t){var n=t.prefixCls,r=t.value,i=t.style,o=t.activeStyle,a=m.useContext(Bo),s=a.min,l=a.max,u=a.direction,c=a.included,d=a.includedStart,f=a.includedEnd,h="".concat(n,"-dot"),p=c&&d<=r&&r<=f,g=U(U({},vm(u,r,s,l)),typeof i=="function"?i(r):i);return p&&(g=U(U({},g),typeof o=="function"?o(r):o)),m.createElement("span",{className:ie(h,V({},"".concat(h,"-active"),p)),style:g})},v5=function(t){var n=t.prefixCls,r=t.marks,i=t.dots,o=t.style,a=t.activeStyle,s=m.useContext(Bo),l=s.min,u=s.max,c=s.step,d=m.useMemo(function(){var f=new Set;if(r.forEach(function(p){f.add(p.value)}),i&&c!==null)for(var h=l;h<=u;)f.add(h),h+=c;return Array.from(f)},[l,u,c,i,r]);return m.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return m.createElement(g5,{prefixCls:n,key:f,value:f,style:o,activeStyle:a})}))},HS=function(t){var n=t.prefixCls,r=t.style,i=t.start,o=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,u=m.useContext(Bo),c=u.direction,d=u.min,f=u.max,h=u.disabled,p=u.range,g=u.classNames,v="".concat(n,"-track"),b=gm(i,d,f),y=gm(o,d,f),E=function(T){!h&&s&&s(T,-1)},x={};switch(c){case"rtl":x.right="".concat(b*100,"%"),x.width="".concat(y*100-b*100,"%");break;case"btt":x.bottom="".concat(b*100,"%"),x.height="".concat(y*100-b*100,"%");break;case"ttb":x.top="".concat(b*100,"%"),x.height="".concat(y*100-b*100,"%");break;default:x.left="".concat(b*100,"%"),x.width="".concat(y*100-b*100,"%")}var O=l||ie(v,V(V({},"".concat(v,"-").concat(a+1),a!==null&&p),"".concat(n,"-track-draggable"),s),g.track);return m.createElement("div",{className:O,style:U(U({},x),r),onMouseDown:E,onTouchStart:E})},b5=function(t){var n=t.prefixCls,r=t.style,i=t.values,o=t.startPoint,a=t.onStartMove,s=m.useContext(Bo),l=s.included,u=s.range,c=s.min,d=s.styles,f=s.classNames,h=m.useMemo(function(){if(!u){if(i.length===0)return[];var g=o??c,v=i[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],y=0;y<i.length-1;y+=1)b.push({start:i[y],end:i[y+1]});return b},[i,u,o,c]);if(!l)return null;var p=h!=null&&h.length&&(f.tracks||d.tracks)?m.createElement(HS,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:ie(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return m.createElement(m.Fragment,null,p,h.map(function(g,v){var b=g.start,y=g.end;return m.createElement(HS,{index:v,prefixCls:n,style:U(U({},Fo(r,v)),d.track),start:b,end:y,key:v,onStartMove:a})}))},y5=130;function jS(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function E5(e,t,n,r,i,o,a,s,l,u,c){var d=m.useState(null),f=ae(d,2),h=f[0],p=f[1],g=m.useState(-1),v=ae(g,2),b=v[0],y=v[1],E=m.useState(!1),x=ae(E,2),O=x[0],S=x[1],T=m.useState(n),I=ae(T,2),N=I[0],_=I[1],P=m.useState(n),A=ae(P,2),M=A[0],D=A[1],R=m.useRef(null),$=m.useRef(null),F=m.useRef(null),B=m.useContext(d5),z=B.onDragStart,L=B.onDragChange;Kt(function(){b===-1&&_(n)},[n,b]),m.useEffect(function(){return function(){document.removeEventListener("mousemove",R.current),document.removeEventListener("mouseup",$.current),F.current&&(F.current.removeEventListener("touchmove",R.current),F.current.removeEventListener("touchend",$.current))}},[]);var H=function(te,se,ce){se!==void 0&&p(se),_(te);var ue=te;ce&&(ue=te.filter(function(de,J){return J!==b})),a(ue),L&&L({rawValues:te,deleteIndex:ce?b:-1,draggingIndex:b,draggingValue:se})},W=an(function(Y,te,se){if(Y===-1){var ce=M[0],ue=M[M.length-1],de=r-ce,J=i-ue,Z=te*(i-r);Z=Math.max(Z,de),Z=Math.min(Z,J);var oe=o(ce+Z);Z=oe-ce;var X=M.map(function(Ce){return Ce+Z});H(X)}else{var ee=(i-r)*te,ne=Ke(N);ne[Y]=M[Y];var be=l(ne,ee,Y,"dist");H(be.values,be.value,se)}}),k=function(te,se,ce){te.stopPropagation();var ue=ce||n,de=ue[se];y(se),p(de),D(ue),_(ue),S(!1);var J=jS(te),Z=J.pageX,oe=J.pageY,X=!1;z&&z({rawValues:ue,draggingIndex:se,draggingValue:de});var ee=function(Ce){Ce.preventDefault();var Se=jS(Ce),ve=Se.pageX,he=Se.pageY,Ae=ve-Z,Ie=he-oe,me=e.current.getBoundingClientRect(),Me=me.width,Q=me.height,le,pe;switch(t){case"btt":le=-Ie/Q,pe=Ae;break;case"ttb":le=Ie/Q,pe=Ae;break;case"rtl":le=-Ae/Me,pe=Ie;break;default:le=Ae/Me,pe=Ie}X=u?Math.abs(pe)>y5&&c<N.length:!1,S(X),W(se,le,X)},ne=function be(Ce){Ce.preventDefault(),document.removeEventListener("mouseup",be),document.removeEventListener("mousemove",ee),F.current&&(F.current.removeEventListener("touchmove",R.current),F.current.removeEventListener("touchend",$.current)),R.current=null,$.current=null,F.current=null,s(X),y(-1),S(!1)};document.addEventListener("mouseup",ne),document.addEventListener("mousemove",ee),te.currentTarget.addEventListener("touchend",ne),te.currentTarget.addEventListener("touchmove",ee),R.current=ee,$.current=ne,F.current=te.currentTarget},G=m.useMemo(function(){var Y=Ke(n).sort(function(de,J){return de-J}),te=Ke(N).sort(function(de,J){return de-J}),se={};te.forEach(function(de){se[de]=(se[de]||0)+1}),Y.forEach(function(de){se[de]=(se[de]||0)-1});var ce=u?1:0,ue=Object.values(se).reduce(function(de,J){return de+Math.abs(J)},0);return ue<=ce?N:n},[n,N,u]);return[b,h,O,G,k]}function S5(e,t,n,r,i,o){var a=m.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),s=m.useCallback(function(h){if(n!==null){var p=e+Math.round((a(h)-e)/n)*n,g=function(E){return(String(E).split(".")[1]||"").length},v=Math.max(g(n),g(t),g(e)),b=Number(p.toFixed(v));return e<=b&&b<=t?b:null}return null},[n,e,t,a]),l=m.useCallback(function(h){var p=a(h),g=r.map(function(y){return y.value});n!==null&&g.push(s(h)),g.push(e,t);var v=g[0],b=t-e;return g.forEach(function(y){var E=Math.abs(p-y);E<=b&&(v=y,b=E)}),v},[e,t,r,n,a,s]),u=function h(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof g=="number"){var y,E=p[v],x=E+g,O=[];r.forEach(function(_){O.push(_.value)}),O.push(e,t),O.push(s(E));var S=g>0?1:-1;b==="unit"?O.push(s(E+S*n)):O.push(s(x)),O=O.filter(function(_){return _!==null}).filter(function(_){return g<0?_<=E:_>=E}),b==="unit"&&(O=O.filter(function(_){return _!==E}));var T=b==="unit"?E:x;y=O[0];var I=Math.abs(y-T);if(O.forEach(function(_){var P=Math.abs(_-T);P<I&&(y=_,I=P)}),y===void 0)return g<0?e:t;if(b==="dist")return y;if(Math.abs(g)>1){var N=Ke(p);return N[v]=y,h(N,g-S,v,b)}return y}else{if(g==="min")return e;if(g==="max")return t}},c=function(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=p[v],E=u(p,g,v,b);return{value:E,changed:E!==y}},d=function(p){return o===null&&p===0||typeof o=="number"&&p<o},f=function(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=p.map(l),E=y[v],x=u(y,g,v,b);if(y[v]=x,i===!1){var O=o||0;v>0&&y[v-1]!==E&&(y[v]=Math.max(y[v],y[v-1]+O)),v<y.length-1&&y[v+1]!==E&&(y[v]=Math.min(y[v],y[v+1]-O))}else if(typeof o=="number"||o===null){for(var S=v+1;S<y.length;S+=1)for(var T=!0;d(y[S]-y[S-1])&&T;){var I=c(y,1,S);y[S]=I.value,T=I.changed}for(var N=v;N>0;N-=1)for(var _=!0;d(y[N]-y[N-1])&&_;){var P=c(y,-1,N-1);y[N-1]=P.value,_=P.changed}for(var A=y.length-1;A>0;A-=1)for(var M=!0;d(y[A]-y[A-1])&&M;){var D=c(y,-1,A-1);y[A-1]=D.value,M=D.changed}for(var R=0;R<y.length-1;R+=1)for(var $=!0;d(y[R+1]-y[R])&&$;){var F=c(y,1,R+1);y[R+1]=F.value,$=F.changed}}return{value:y[v],values:y}};return[l,f]}function C5(e){return C.useMemo(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,i=e.maxCount;return process.env.NODE_ENV!=="production"&&gi(!t||!n,"`editable` can not work with `draggableTrack`."),[!0,t,!t&&n,r||0,i]},[e])}var VS=m.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,i=e.className,o=e.style,a=e.classNames,s=e.styles,l=e.id,u=e.disabled,c=u===void 0?!1:u,d=e.keyboard,f=d===void 0?!0:d,h=e.autoFocus,p=e.onFocus,g=e.onBlur,v=e.min,b=v===void 0?0:v,y=e.max,E=y===void 0?100:y,x=e.step,O=x===void 0?1:x,S=e.value,T=e.defaultValue,I=e.range,N=e.count,_=e.onChange,P=e.onBeforeChange,A=e.onAfterChange,M=e.onChangeComplete,D=e.allowCross,R=D===void 0?!0:D,$=e.pushable,F=$===void 0?!1:$,B=e.reverse,z=e.vertical,L=e.included,H=L===void 0?!0:L,W=e.startPoint,k=e.trackStyle,G=e.handleStyle,Y=e.railStyle,te=e.dotStyle,se=e.activeDotStyle,ce=e.marks,ue=e.dots,de=e.handleRender,J=e.activeHandleRender,Z=e.track,oe=e.tabIndex,X=oe===void 0?0:oe,ee=e.ariaLabelForHandle,ne=e.ariaLabelledByForHandle,be=e.ariaRequired,Ce=e.ariaValueTextFormatterForHandle,Se=m.useRef(null),ve=m.useRef(null),he=m.useMemo(function(){return z?B?"ttb":"btt":B?"rtl":"ltr"},[B,z]),Ae=C5(I),Ie=ae(Ae,5),me=Ie[0],Me=Ie[1],Q=Ie[2],le=Ie[3],pe=Ie[4],ye=m.useMemo(function(){return isFinite(b)?b:0},[b]),Fe=m.useMemo(function(){return isFinite(E)?E:100},[E]),je=m.useMemo(function(){return O!==null&&O<=0?1:O},[O]),De=m.useMemo(function(){return typeof F=="boolean"?F?je:!1:F>=0?F:!1},[F,je]),we=m.useMemo(function(){return Object.keys(ce||{}).map(function(ke){var Oe=ce[ke],Qe={value:Number(ke)};return Oe&&lt(Oe)==="object"&&!m.isValidElement(Oe)&&("label"in Oe||"style"in Oe)?(Qe.style=Oe.style,Qe.label=Oe.label):Qe.label=Oe,Qe}).filter(function(ke){var Oe=ke.label;return Oe||typeof Oe=="number"}).sort(function(ke,Oe){return ke.value-Oe.value})},[ce]),Le=S5(ye,Fe,je,we,R,De),Ue=ae(Le,2),Te=Ue[0],Be=Ue[1],it=Cn(T,{value:S}),wt=ae(it,2),Dt=wt[0],Pt=wt[1],xt=m.useMemo(function(){var ke=Dt==null?[]:Array.isArray(Dt)?Dt:[Dt],Oe=ae(ke,1),Qe=Oe[0],ut=Qe===void 0?ye:Qe,pt=Dt===null?[]:[ut];if(me){if(pt=Ke(ke),N||Dt===void 0){var $t=N>=0?N+1:2;for(pt=pt.slice(0,$t);pt.length<$t;){var sn;pt.push((sn=pt[pt.length-1])!==null&&sn!==void 0?sn:ye)}}pt.sort(function(jt,rt){return jt-rt})}return pt.forEach(function(jt,rt){pt[rt]=Te(jt)}),pt},[Dt,me,ye,N,Te]),Ht=function(Oe){return me?Oe:Oe[0]},kt=an(function(ke){var Oe=Ke(ke).sort(function(Qe,ut){return Qe-ut});_&&!ca(Oe,xt,!0)&&_(Ht(Oe)),Pt(Oe)}),at=an(function(ke){ke&&Se.current.hideHelp();var Oe=Ht(xt);A==null||A(Oe),bt(!A,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),M==null||M(Oe)}),dt=function(Oe){if(!(c||!Me||xt.length<=le)){var Qe=Ke(xt);Qe.splice(Oe,1),P==null||P(Ht(Qe)),kt(Qe);var ut=Math.max(0,Oe-1);Se.current.hideHelp(),Se.current.focus(ut)}},$e=E5(ve,he,xt,ye,Fe,Te,kt,at,Be,Me,le),Ve=ae($e,5),Ye=Ve[0],ot=Ve[1],Pe=Ve[2],_e=Ve[3],xe=Ve[4],ze=function(Oe,Qe){if(!c){var ut=Ke(xt),pt=0,$t=0,sn=Fe-ye;xt.forEach(function(hn,_n){var Un=Math.abs(Oe-hn);Un<=sn&&(sn=Un,pt=_n),hn<Oe&&($t=_n)});var jt=pt;Me&&sn!==0&&(!pe||xt.length<pe)?(ut.splice($t+1,0,Oe),jt=$t+1):ut[pt]=Oe,me&&!xt.length&&N===void 0&&ut.push(Oe);var rt=Ht(ut);if(P==null||P(rt),kt(ut),Qe){var gt,It;(gt=document.activeElement)===null||gt===void 0||(It=gt.blur)===null||It===void 0||It.call(gt),Se.current.focus(jt),xe(Qe,jt,ut)}else A==null||A(rt),bt(!A,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),M==null||M(rt)}},qe=function(Oe){Oe.preventDefault();var Qe=ve.current.getBoundingClientRect(),ut=Qe.width,pt=Qe.height,$t=Qe.left,sn=Qe.top,jt=Qe.bottom,rt=Qe.right,gt=Oe.clientX,It=Oe.clientY,hn;switch(he){case"btt":hn=(jt-It)/pt;break;case"ttb":hn=(It-sn)/pt;break;case"rtl":hn=(rt-gt)/ut;break;default:hn=(gt-$t)/ut}var _n=ye+hn*(Fe-ye);ze(Te(_n),Oe)},et=m.useState(null),nt=ae(et,2),mt=nt[0],vt=nt[1],ht=function(Oe,Qe){if(!c){var ut=Be(xt,Oe,Qe);P==null||P(Ht(xt)),kt(ut.values),vt(ut.value)}};m.useEffect(function(){if(mt!==null){var ke=xt.indexOf(mt);ke>=0&&Se.current.focus(ke)}vt(null)},[mt]);var St=m.useMemo(function(){return Q&&je===null?(process.env.NODE_ENV!=="production"&&bt(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Q},[Q,je]),At=an(function(ke,Oe){xe(ke,Oe),P==null||P(Ht(xt))}),Bt=Ye!==-1;m.useEffect(function(){if(!Bt){var ke=xt.lastIndexOf(ot);Se.current.focus(ke)}},[Bt]);var en=m.useMemo(function(){return Ke(_e).sort(function(ke,Oe){return ke-Oe})},[_e]),fn=m.useMemo(function(){return me?[en[0],en[en.length-1]]:[ye,en[0]]},[en,me,ye]),Ut=ae(fn,2),Rt=Ut[0],tt=Ut[1];m.useImperativeHandle(t,function(){return{focus:function(){Se.current.focus(0)},blur:function(){var Oe,Qe=document,ut=Qe.activeElement;(Oe=ve.current)!==null&&Oe!==void 0&&Oe.contains(ut)&&(ut==null||ut.blur())}}}),m.useEffect(function(){h&&Se.current.focus(0)},[]);var He=m.useMemo(function(){return{min:ye,max:Fe,direction:he,disabled:c,keyboard:f,step:je,included:H,includedStart:Rt,includedEnd:tt,range:me,tabIndex:X,ariaLabelForHandle:ee,ariaLabelledByForHandle:ne,ariaRequired:be,ariaValueTextFormatterForHandle:Ce,styles:s||{},classNames:a||{}}},[ye,Fe,he,c,f,je,H,Rt,tt,me,X,ee,ne,be,Ce,s,a]);return m.createElement(Bo.Provider,{value:He},m.createElement("div",{ref:ve,className:ie(r,i,V(V(V(V({},"".concat(r,"-disabled"),c),"".concat(r,"-vertical"),z),"".concat(r,"-horizontal"),!z),"".concat(r,"-with-marks"),we.length)),style:o,onMouseDown:qe,id:l},m.createElement("div",{className:ie("".concat(r,"-rail"),a==null?void 0:a.rail),style:U(U({},Y),s==null?void 0:s.rail)}),Z!==!1&&m.createElement(b5,{prefixCls:r,style:k,values:xt,startPoint:W,onStartMove:St?At:void 0}),m.createElement(v5,{prefixCls:r,marks:we,dots:ue,style:te,activeStyle:se}),m.createElement(zS,{ref:Se,prefixCls:r,style:G,values:_e,draggingIndex:Ye,draggingDelete:Pe,onStartMove:At,onOffsetChange:ht,onFocus:p,onBlur:g,handleRender:de,activeHandleRender:J,onChangeComplete:at,onDelete:Me?dt:void 0}),m.createElement(p5,{prefixCls:r,marks:we,onClick:ze})))});process.env.NODE_ENV!=="production"&&(VS.displayName="Slider");const w5=C.createContext({}),ym=m.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:i}=e,o=C.useRef(null),a=n&&!r,s=C.useRef(null);function l(){Xt.cancel(s.current),s.current=null}function u(){s.current=Xt(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),s.current=null})}return m.useEffect(()=>(a?u():l(),l),[a,e.title,i]),m.createElement(Ki,Object.assign({ref:dr(o,t)},e,{open:a}))});process.env.NODE_ENV!=="production"&&(ym.displayName="SliderTooltip");const x5=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:o,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:u,handleSize:c,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:h,handleLineWidth:p,handleLineWidthHover:g,motionDurationMid:v}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",height:r,margin:`${fe(a)} ${fe(o)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${fe(o)} ${fe(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${v}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${fe(p)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:c,height:c,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:u(p).mul(-1).equal(),insetBlockStart:u(p).mul(-1).equal(),width:u(c).add(u(p).mul(2)).equal(),height:u(c).add(u(p).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:c,height:c,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${fe(p)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
222
+ > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:fe(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},N8=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${fe(e.borderRadius)} ${fe(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${fe(e.borderRadius)} ${fe(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${fe(e.borderRadius)} ${fe(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${fe(e.borderRadius)} 0 0 ${fe(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},_8=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=e,u=`${t}-tab`;return{[u]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${u}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},Ci(e)),"&:hover":{color:r},[`&${u}-active ${u}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${u}-focus ${u}-btn:focus-visible`]:so(e),[`&${u}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${u}-disabled ${u}-btn, &${u}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${u}-remove ${i}`]:{margin:0},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${u} + ${u}`]:{margin:{_skip_check_:!0,value:o}}}},I8=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:fe(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:fe(e.marginXS)},marginLeft:{_skip_check_:!0,value:fe(o(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},A8=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${fe(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${fe(e.borderRadiusLG)} ${fe(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},Ci(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),_8(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},Ci(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},P8=wn("Tabs",e=>{const t=rn(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${fe(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${fe(e.horizontalItemGutter)}`});return[N8(t),I8(t),O8(t),T8(t),x8(t),A8(t),w8(t)]},e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=e,a=t||o,s=n||i,l=r||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),xS=()=>null;process.env.NODE_ENV!=="production"&&(xS.displayName="DeprecatedTabPane");var M8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mm=e=>{var t,n,r,i,o,a,s,l,u,c,d;const{type:f,className:h,rootClassName:p,size:g,onEdit:v,hideAdd:b,centered:y,addIcon:E,removeIcon:x,moreIcon:O,more:S,popupClassName:T,children:I,items:N,animated:_,style:P,indicatorSize:A,indicator:M,destroyInactiveTabPane:D,destroyOnHidden:R}=e,$=M8(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:F}=$,{direction:B,tabs:z,getPrefixCls:L,getPopupContainer:H}=m.useContext(Qt),W=L("tabs",F),k=Wi(W),[G,Y,te]=P8(W,k);let se;f==="editable-card"&&(se={onEdit:(X,{key:ee,event:ne})=>{v==null||v(X==="add"?ne:ee,X)},removeIcon:(t=x??(z==null?void 0:z.removeIcon))!==null&&t!==void 0?t:m.createElement(Ui,null),addIcon:(E??(z==null?void 0:z.addIcon))||m.createElement(cS,null),showAdd:b!==!0});const ce=L();if(process.env.NODE_ENV!=="production"){const X=on("Tabs");process.env.NODE_ENV!=="production"&&X(!("onPrevClick"in e)&&!("onNextClick"in e),"breaking","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),process.env.NODE_ENV!=="production"&&X(!(A||z!=null&&z.indicatorSize),"deprecated","`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."),X.deprecated(!("destroyInactiveTabPane"in e||N!=null&&N.some(ee=>"destroyInactiveTabPane"in ee)),"destroyInactiveTabPane","destroyOnHidden")}const ue=ai(g),de=C8(N,I),J=y8(W,_),Z=Object.assign(Object.assign({},z==null?void 0:z.style),P),oe={align:(n=M==null?void 0:M.align)!==null&&n!==void 0?n:(r=z==null?void 0:z.indicator)===null||r===void 0?void 0:r.align,size:(s=(o=(i=M==null?void 0:M.size)!==null&&i!==void 0?i:A)!==null&&o!==void 0?o:(a=z==null?void 0:z.indicator)===null||a===void 0?void 0:a.size)!==null&&s!==void 0?s:z==null?void 0:z.indicatorSize};return G(m.createElement(wS,Object.assign({direction:B,getPopupContainer:H},$,{items:de,className:ie({[`${W}-${ue}`]:ue,[`${W}-card`]:["card","editable-card"].includes(f),[`${W}-editable-card`]:f==="editable-card",[`${W}-centered`]:y},z==null?void 0:z.className,h,p,Y,te,k),popupClassName:ie(T,Y,te,k),style:Z,editable:se,more:Object.assign({icon:(d=(c=(u=(l=z==null?void 0:z.more)===null||l===void 0?void 0:l.icon)!==null&&u!==void 0?u:z==null?void 0:z.moreIcon)!==null&&c!==void 0?c:O)!==null&&d!==void 0?d:m.createElement(QE,null),transitionName:`${ce}-slide-up`},S),prefixCls:W,animated:J,indicator:oe,destroyInactiveTabPane:R??D})))};mm.TabPane=xS,process.env.NODE_ENV!=="production"&&(mm.displayName="Tabs");function L8(e,t,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,u=l===void 0?void 0:l,c,d=!1,f=0;function h(){c&&clearTimeout(c)}function p(v){var b=v||{},y=b.upcomingOnly,E=y===void 0?!1:y;h(),d=!E}function g(){for(var v=arguments.length,b=new Array(v),y=0;y<v;y++)b[y]=arguments[y];var E=this,x=Date.now()-f;if(d)return;function O(){f=Date.now(),t.apply(E,b)}function S(){c=void 0}!s&&u&&!c&&O(),h(),u===void 0&&x>e?s?(f=Date.now(),o||(c=setTimeout(u?S:O,e))):O():o!==!0&&(c=setTimeout(u?S:O,u===void 0?e-x:e))}return g.cancel=p,g}function D8(e,t,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return L8(e,t,{debounceMode:o!==!1})}const TS=C.createContext({});var k8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function OS(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const R8=["xs","sm","md","lg","xl","xxl"],pn=m.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=m.useContext(Qt),{gutter:i,wrap:o}=m.useContext(TS),{prefixCls:a,span:s,order:l,offset:u,push:c,pull:d,className:f,children:h,flex:p,style:g}=e,v=k8(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),b=n("col",a),[y,E,x]=$4(b),O={};let S={};R8.forEach(N=>{let _={};const P=e[N];typeof P=="number"?_.span=P:typeof P=="object"&&(_=P||{}),delete v[N],S=Object.assign(Object.assign({},S),{[`${b}-${N}-${_.span}`]:_.span!==void 0,[`${b}-${N}-order-${_.order}`]:_.order||_.order===0,[`${b}-${N}-offset-${_.offset}`]:_.offset||_.offset===0,[`${b}-${N}-push-${_.push}`]:_.push||_.push===0,[`${b}-${N}-pull-${_.pull}`]:_.pull||_.pull===0,[`${b}-rtl`]:r==="rtl"}),_.flex&&(S[`${b}-${N}-flex`]=!0,O[`--${b}-${N}-flex`]=OS(_.flex))});const T=ie(b,{[`${b}-${s}`]:s!==void 0,[`${b}-order-${l}`]:l,[`${b}-offset-${u}`]:u,[`${b}-push-${c}`]:c,[`${b}-pull-${d}`]:d},f,S,E,x),I={};if(i&&i[0]>0){const N=i[0]/2;I.paddingLeft=N,I.paddingRight=N}return p&&(I.flex=OS(p),o===!1&&!I.minWidth&&(I.minWidth=0)),y(m.createElement("div",Object.assign({},v,{style:Object.assign(Object.assign(Object.assign({},I),g),O),className:T,ref:t}),h))});process.env.NODE_ENV!=="production"&&(pn.displayName="Col");function $8(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s<qs.length;s++){const l=qs[s];if(i[l]&&o[l]!==void 0){n[a]=o[l];break}}else n[a]=o}),n}var F8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function NS(e,t){const[n,r]=m.useState(typeof e=="string"?e:""),i=()=>{if(typeof e=="string"&&r(e),typeof e=="object")for(let o=0;o<qs.length;o++){const a=qs[o];if(!t||!t[a])continue;const s=e[a];if(s!==void 0){r(s);return}}};return m.useEffect(()=>{i()},[JSON.stringify(e),t]),n}const Pr=m.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:u}=e,c=F8(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=m.useContext(Qt),h=OE(!0,null),p=NS(i,h),g=NS(r,h),v=d("row",n),[b,y,E]=R4(v),x=$8(l,h),O=ie(v,{[`${v}-no-wrap`]:u===!1,[`${v}-${g}`]:g,[`${v}-${p}`]:p,[`${v}-rtl`]:f==="rtl"},o,y,E),S={},T=x[0]!=null&&x[0]>0?x[0]/-2:void 0;T&&(S.marginLeft=T,S.marginRight=T);const[I,N]=x;S.rowGap=N;const _=m.useMemo(()=>({gutter:[I,N],wrap:u}),[I,N,u]);return b(m.createElement(TS.Provider,{value:_},m.createElement("div",Object.assign({},c,{className:O,style:Object.assign(Object.assign({},S),a),ref:t}),s)))});process.env.NODE_ENV!=="production"&&(Pr.displayName="Row");const B8=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},z8=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{borderBlockStart:`${fe(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${fe(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${fe(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${fe(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${fe(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${fe(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${fe(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},H8=wn("Divider",e=>{const t=rn(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[z8(t),B8(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var j8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const V8={small:"sm",middle:"md"},pm=e=>{const{getPrefixCls:t,direction:n,className:r,style:i}=Gn("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:u,rootClassName:c,children:d,dashed:f,variant:h="solid",plain:p,style:g,size:v}=e,b=j8(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),y=t("divider",o),[E,x,O]=H8(y),S=ai(v),T=V8[S],I=!!d,N=m.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=N==="start"&&l!=null,P=N==="end"&&l!=null,A=ie(y,r,x,O,`${y}-${a}`,{[`${y}-with-text`]:I,[`${y}-with-text-${N}`]:I,[`${y}-dashed`]:!!f,[`${y}-${h}`]:h!=="solid",[`${y}-plain`]:!!p,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:_,[`${y}-no-default-orientation-margin-end`]:P,[`${y}-${T}`]:!!T},u,c),M=m.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),D={marginInlineStart:_?M:void 0,marginInlineEnd:P?M:void 0};if(process.env.NODE_ENV!=="production"){const R=on("Divider");process.env.NODE_ENV!=="production"&&R(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return E(m.createElement("div",Object.assign({className:A,style:Object.assign(Object.assign({},i),g)},b,{role:"separator"}),d&&a!=="vertical"&&m.createElement("span",{className:`${y}-inner-text`,style:D},d)))};process.env.NODE_ENV!=="production"&&(pm.displayName="Divider");var _S=function(t,n){if(!t)return null;var r={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Oi=function(t){return t!==void 0?"".concat(t,"px"):void 0};function U8(e){var t=e.prefixCls,n=e.containerRef,r=e.value,i=e.getValueIndex,o=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,l=e.direction,u=e.vertical,c=u===void 0?!1:u,d=m.useRef(null),f=m.useState(r),h=ae(f,2),p=h[0],g=h[1],v=function(R){var $,F=i(R),B=($=n.current)===null||$===void 0?void 0:$.querySelectorAll(".".concat(t,"-item"))[F];return(B==null?void 0:B.offsetParent)&&B},b=m.useState(null),y=ae(b,2),E=y[0],x=y[1],O=m.useState(null),S=ae(O,2),T=S[0],I=S[1];Kt(function(){if(p!==r){var D=v(p),R=v(r),$=_S(D,c),F=_S(R,c);g(r),x($),I(F),D&&R?a():s()}},[r]);var N=m.useMemo(function(){if(c){var D;return Oi((D=E==null?void 0:E.top)!==null&&D!==void 0?D:0)}return Oi(l==="rtl"?-(E==null?void 0:E.right):E==null?void 0:E.left)},[c,l,E]),_=m.useMemo(function(){if(c){var D;return Oi((D=T==null?void 0:T.top)!==null&&D!==void 0?D:0)}return Oi(l==="rtl"?-(T==null?void 0:T.right):T==null?void 0:T.left)},[c,l,T]),P=function(){return c?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},A=function(){return c?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},M=function(){x(null),I(null),s()};return!E||!T?null:m.createElement(Or,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:P,onAppearActive:A,onVisibleChanged:M},function(D,R){var $=D.className,F=D.style,B=U(U({},F),{},{"--thumb-start-left":N,"--thumb-start-width":Oi(E==null?void 0:E.width),"--thumb-active-left":_,"--thumb-active-width":Oi(T==null?void 0:T.width),"--thumb-start-top":N,"--thumb-start-height":Oi(E==null?void 0:E.height),"--thumb-active-top":_,"--thumb-active-height":Oi(T==null?void 0:T.height)}),z={ref:dr(d,R),style:B,className:ie("".concat(t,"-thumb"),$)};return process.env.NODE_ENV==="test"&&(z["data-test-style"]=JSON.stringify(B)),m.createElement("div",z)})}var W8=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function Y8(e){if(typeof e.title<"u")return e.title;if(lt(e.label)!=="object"){var t;return(t=e.label)===null||t===void 0?void 0:t.toString()}}function q8(e){return e.map(function(t){if(lt(t)==="object"&&t!==null){var n=Y8(t);return U(U({},t),{},{title:n})}return{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t}})}var X8=function(t){var n=t.prefixCls,r=t.className,i=t.disabled,o=t.checked,a=t.label,s=t.title,l=t.value,u=t.name,c=t.onChange,d=t.onFocus,f=t.onBlur,h=t.onKeyDown,p=t.onKeyUp,g=t.onMouseDown,v=function(y){i||c(y,l)};return m.createElement("label",{className:ie(r,V({},"".concat(n,"-item-disabled"),i)),onMouseDown:g},m.createElement("input",{name:u,className:"".concat(n,"-item-input"),type:"radio",disabled:i,checked:o,onChange:v,onFocus:d,onBlur:f,onKeyDown:h,onKeyUp:p}),m.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":o},a))},IS=m.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=i===void 0?"rc-segmented":i,a=e.direction,s=e.vertical,l=e.options,u=l===void 0?[]:l,c=e.disabled,d=e.defaultValue,f=e.value,h=e.name,p=e.onChange,g=e.className,v=g===void 0?"":g,b=e.motionName,y=b===void 0?"thumb-motion":b,E=yt(e,W8),x=m.useRef(null),O=m.useMemo(function(){return dr(x,t)},[x,t]),S=m.useMemo(function(){return q8(u)},[u]),T=Cn((n=S[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),I=ae(T,2),N=I[0],_=I[1],P=m.useState(!1),A=ae(P,2),M=A[0],D=A[1],R=function(Z,oe){_(oe),p==null||p(oe)},$=_r(E,["children"]),F=m.useState(!1),B=ae(F,2),z=B[0],L=B[1],H=m.useState(!1),W=ae(H,2),k=W[0],G=W[1],Y=function(){G(!0)},te=function(){G(!1)},se=function(){L(!1)},ce=function(Z){Z.key==="Tab"&&L(!0)},ue=function(Z){var oe=S.findIndex(function(be){return be.value===N}),X=S.length,ee=(oe+Z+X)%X,ne=S[ee];ne&&(_(ne.value),p==null||p(ne.value))},de=function(Z){switch(Z.key){case"ArrowLeft":case"ArrowUp":ue(-1);break;case"ArrowRight":case"ArrowDown":ue(1);break}};return m.createElement("div",Re({role:"radiogroup","aria-label":"segmented control",tabIndex:c?void 0:0},$,{className:ie(o,(r={},V(r,"".concat(o,"-rtl"),a==="rtl"),V(r,"".concat(o,"-disabled"),c),V(r,"".concat(o,"-vertical"),s),r),v),ref:O}),m.createElement("div",{className:"".concat(o,"-group")},m.createElement(U8,{vertical:s,prefixCls:o,value:N,containerRef:x,motionName:"".concat(o,"-").concat(y),direction:a,getValueIndex:function(Z){return S.findIndex(function(oe){return oe.value===Z})},onMotionStart:function(){D(!0)},onMotionEnd:function(){D(!1)}}),S.map(function(J){var Z;return m.createElement(X8,Re({},J,{name:h,key:J.value,prefixCls:o,className:ie(J.className,"".concat(o,"-item"),(Z={},V(Z,"".concat(o,"-item-selected"),J.value===N&&!M),V(Z,"".concat(o,"-item-focused"),k&&z&&J.value===N),Z)),checked:J.value===N,onChange:R,onFocus:Y,onBlur:te,onKeyDown:de,onKeyUp:ce,onMouseDown:se,disabled:!!c||!!J.disabled}))})))});process.env.NODE_ENV!=="production"&&(IS.displayName="Segmented");var K8=IS;function AS(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function PS(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const G8=Object.assign({overflow:"hidden"},Ns),Q8=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),i=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),Ci(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${fe(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},PS(e)),{color:e.itemSelectedColor}),"&-focused":Object.assign({},so(e)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:fe(n),padding:`0 ${fe(e.segmentedPaddingHorizontal)}`},G8),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},PS(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${fe(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:fe(r),padding:`0 ${fe(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:i,lineHeight:fe(i),padding:`0 ${fe(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),AS(`&-disabled ${t}-item`,e)),AS(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},Z8=wn("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=rn(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return[Q8(r)]},e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:i,colorFill:o,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:i,itemActiveBg:o,itemSelectedColor:n}});var MS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function J8(e){return typeof e=="object"&&!!(e!=null&&e.icon)}const LS=m.forwardRef((e,t)=>{const n=ks(),{prefixCls:r,className:i,rootClassName:o,block:a,options:s=[],size:l="middle",style:u,vertical:c,shape:d="default",name:f=n}=e,h=MS(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:p,direction:g,className:v,style:b}=Gn("segmented"),y=p("segmented",r),[E,x,O]=Z8(y),S=ai(l),T=m.useMemo(()=>s.map(_=>{if(J8(_)){const{icon:P,label:A}=_,M=MS(_,["icon","label"]);return Object.assign(Object.assign({},M),{label:m.createElement(m.Fragment,null,m.createElement("span",{className:`${y}-item-icon`},P),A&&m.createElement("span",null,A))})}return _}),[s,y]),I=ie(i,o,v,{[`${y}-block`]:a,[`${y}-sm`]:S==="small",[`${y}-lg`]:S==="large",[`${y}-vertical`]:c,[`${y}-shape-${d}`]:d==="round"},x,O),N=Object.assign(Object.assign({},b),u);return E(m.createElement(K8,Object.assign({},h,{name:f,className:I,style:N,options:T,ref:t,prefixCls:y,direction:g,vertical:c})))});process.env.NODE_ENV!=="production"&&(LS.displayName="Segmented");var e5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},t5=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:e5}))},DS=m.forwardRef(t5);process.env.NODE_ENV!=="production"&&(DS.displayName="UpOutlined");function n5(e){return!!(e.addonBefore||e.addonAfter)}function r5(e){return!!(e.prefix||e.suffix||e.allowClear)}function kS(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function bc(e,t,n,r){if(n){var i=t;if(t.type==="click"){i=kS(t,e,""),n(i);return}if(e.type!=="file"&&r!==void 0){i=kS(t,e,r),n(i);return}n(i)}}function RS(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var $S=C.forwardRef(function(e,t){var n,r,i,o=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,u=e.suffix,c=e.addonBefore,d=e.addonAfter,f=e.className,h=e.style,p=e.disabled,g=e.readOnly,v=e.focused,b=e.triggerFocus,y=e.allowClear,E=e.value,x=e.handleReset,O=e.hidden,S=e.classes,T=e.classNames,I=e.dataAttrs,N=e.styles,_=e.components,P=e.onClear,A=a??o,M=(_==null?void 0:_.affixWrapper)||"span",D=(_==null?void 0:_.groupWrapper)||"span",R=(_==null?void 0:_.wrapper)||"span",$=(_==null?void 0:_.groupAddon)||"span",F=C.useRef(null),B=function(ee){var ne;(ne=F.current)!==null&&ne!==void 0&&ne.contains(ee.target)&&(b==null||b())},z=r5(e),L=C.cloneElement(A,{value:E,className:ie((n=A.props)===null||n===void 0?void 0:n.className,!z&&(T==null?void 0:T.variant))||null}),H=C.useRef(null);if(C.useImperativeHandle(t,function(){return{nativeElement:H.current||F.current}}),z){var W=null;if(y){var k=!p&&!g&&E,G="".concat(s,"-clear-icon"),Y=lt(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"✖";W=C.createElement("button",{type:"button",tabIndex:-1,onClick:function(ee){x==null||x(ee),P==null||P()},onMouseDown:function(ee){return ee.preventDefault()},className:ie(G,V(V({},"".concat(G,"-hidden"),!k),"".concat(G,"-has-suffix"),!!u))},Y)}var te="".concat(s,"-affix-wrapper"),se=ie(te,V(V(V(V(V({},"".concat(s,"-disabled"),p),"".concat(te,"-disabled"),p),"".concat(te,"-focused"),v),"".concat(te,"-readonly"),g),"".concat(te,"-input-with-clear-btn"),u&&y&&E),S==null?void 0:S.affixWrapper,T==null?void 0:T.affixWrapper,T==null?void 0:T.variant),ce=(u||y)&&C.createElement("span",{className:ie("".concat(s,"-suffix"),T==null?void 0:T.suffix),style:N==null?void 0:N.suffix},W,u);L=C.createElement(M,Re({className:se,style:N==null?void 0:N.affixWrapper,onClick:B},I==null?void 0:I.affixWrapper,{ref:F}),l&&C.createElement("span",{className:ie("".concat(s,"-prefix"),T==null?void 0:T.prefix),style:N==null?void 0:N.prefix},l),L,ce)}if(n5(e)){var ue="".concat(s,"-group"),de="".concat(ue,"-addon"),J="".concat(ue,"-wrapper"),Z=ie("".concat(s,"-wrapper"),ue,S==null?void 0:S.wrapper,T==null?void 0:T.wrapper),oe=ie(J,V({},"".concat(J,"-disabled"),p),S==null?void 0:S.group,T==null?void 0:T.groupWrapper);L=C.createElement(D,{className:oe,ref:H},C.createElement(R,{className:Z},c&&C.createElement($,{className:de},c),L,d&&C.createElement($,{className:de},d)))}return C.cloneElement(L,{className:ie((r=L.props)===null||r===void 0?void 0:r.className,f)||null,style:U(U({},(i=L.props)===null||i===void 0?void 0:i.style),h),hidden:O})}),i5=["show"];function FS(e,t){return m.useMemo(function(){var n={};t&&(n.show=lt(t)==="object"&&t.formatter?t.formatter:!!t),n=U(U({},n),e);var r=n,i=r.show,o=yt(r,i5);return U(U({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[e,t])}var o5=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],a5=C.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,o=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,c=u===void 0?"rc-input":u,d=e.disabled,f=e.htmlSize,h=e.className,p=e.maxLength,g=e.suffix,v=e.showCount,b=e.count,y=e.type,E=y===void 0?"text":y,x=e.classes,O=e.classNames,S=e.styles,T=e.onCompositionStart,I=e.onCompositionEnd,N=yt(e,o5),_=C.useState(!1),P=ae(_,2),A=P[0],M=P[1],D=C.useRef(!1),R=C.useRef(!1),$=C.useRef(null),F=C.useRef(null),B=function(me){$.current&&RS($.current,me)},z=Cn(e.defaultValue,{value:e.value}),L=ae(z,2),H=L[0],W=L[1],k=H==null?"":String(H),G=C.useState(null),Y=ae(G,2),te=Y[0],se=Y[1],ce=FS(b,v),ue=ce.max||p,de=ce.strategy(k),J=!!ue&&de>ue;C.useImperativeHandle(t,function(){var Ie;return{focus:B,blur:function(){var Me;(Me=$.current)===null||Me===void 0||Me.blur()},setSelectionRange:function(Me,Q,le){var pe;(pe=$.current)===null||pe===void 0||pe.setSelectionRange(Me,Q,le)},select:function(){var Me;(Me=$.current)===null||Me===void 0||Me.select()},input:$.current,nativeElement:((Ie=F.current)===null||Ie===void 0?void 0:Ie.nativeElement)||$.current}}),C.useEffect(function(){R.current&&(R.current=!1),M(function(Ie){return Ie&&d?!1:Ie})},[d]);var Z=function(me,Me,Q){var le=Me;if(!D.current&&ce.exceedFormatter&&ce.max&&ce.strategy(Me)>ce.max){if(le=ce.exceedFormatter(Me,{max:ce.max}),Me!==le){var pe,ye;se([((pe=$.current)===null||pe===void 0?void 0:pe.selectionStart)||0,((ye=$.current)===null||ye===void 0?void 0:ye.selectionEnd)||0])}}else if(Q.source==="compositionEnd")return;W(le),$.current&&bc($.current,me,r,le)};C.useEffect(function(){if(te){var Ie;(Ie=$.current)===null||Ie===void 0||Ie.setSelectionRange.apply(Ie,Ke(te))}},[te]);var oe=function(me){Z(me,me.target.value,{source:"change"})},X=function(me){D.current=!1,Z(me,me.currentTarget.value,{source:"compositionEnd"}),I==null||I(me)},ee=function(me){a&&me.key==="Enter"&&!R.current&&(R.current=!0,a(me)),s==null||s(me)},ne=function(me){me.key==="Enter"&&(R.current=!1),l==null||l(me)},be=function(me){M(!0),i==null||i(me)},Ce=function(me){R.current&&(R.current=!1),M(!1),o==null||o(me)},Se=function(me){W(""),B(),$.current&&bc($.current,me,r)},ve=J&&"".concat(c,"-out-of-range"),he=function(){var me=_r(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return C.createElement("input",Re({autoComplete:n},me,{onChange:oe,onFocus:be,onBlur:Ce,onKeyDown:ee,onKeyUp:ne,className:ie(c,V({},"".concat(c,"-disabled"),d),O==null?void 0:O.input),style:S==null?void 0:S.input,ref:$,size:f,type:E,onCompositionStart:function(Q){D.current=!0,T==null||T(Q)},onCompositionEnd:X}))},Ae=function(){var me=Number(ue)>0;if(g||ce.show){var Me=ce.showFormatter?ce.showFormatter({value:k,count:de,maxLength:ue}):"".concat(de).concat(me?" / ".concat(ue):"");return C.createElement(C.Fragment,null,ce.show&&C.createElement("span",{className:ie("".concat(c,"-show-count-suffix"),V({},"".concat(c,"-show-count-has-suffix"),!!g),O==null?void 0:O.count),style:U({},S==null?void 0:S.count)},Me),g)}return null};return C.createElement($S,Re({},N,{prefixCls:c,className:ie(h,ve),handleReset:Se,value:k,focused:A,triggerFocus:B,suffix:Ae(),disabled:d,classes:x,classNames:O,styles:S,ref:F}),he())});const BS=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:C.createElement(Is,null)}),t};function s5(e,t){const n=C.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=e.current)===null||i===void 0)&&i.input&&((o=e.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return C.useEffect(()=>(r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function l5(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var u5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const c5=C.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:u,allowClear:c,addonAfter:d,addonBefore:f,className:h,style:p,styles:g,rootClassName:v,onChange:b,classNames:y,variant:E}=e,x=u5(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Se}=on("Input");Se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:O,direction:S,allowClear:T,autoComplete:I,className:N,style:_,classNames:P,styles:A}=Gn("input"),M=O("input",n),D=C.useRef(null),R=Wi(M),[$,F,B]=uS(M,v),[z]=Z$(M,R),{compactSize:L,compactItemClassnames:H}=Ru(M,S),W=ai(Se=>{var ve;return(ve=o??L)!==null&&ve!==void 0?ve:Se}),k=C.useContext(Si),G=a??k,{status:Y,hasFeedback:te,feedbackIcon:se}=C.useContext(ko),ce=Uh(Y,i),ue=l5(e)||!!te,de=C.useRef(ue);if(process.env.NODE_ENV!=="production"){const Se=on("Input");C.useEffect(()=>{var ve;ue&&!de.current&&process.env.NODE_ENV!=="production"&&Se(document.activeElement===((ve=D.current)===null||ve===void 0?void 0:ve.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),de.current=ue},[ue])}const J=s5(D),Z=Se=>{J(),s==null||s(Se)},oe=Se=>{J(),l==null||l(Se)},X=Se=>{J(),b==null||b(Se)},ee=(te||u)&&C.createElement(C.Fragment,null,u,te&&se),ne=BS(c??T),[be,Ce]=Wh("input",E,r);return $(z(C.createElement(a5,Object.assign({ref:dr(t,D),prefixCls:M,autoComplete:I},x,{disabled:G,onBlur:Z,onFocus:oe,style:Object.assign(Object.assign({},_),p),styles:Object.assign(Object.assign({},A),g),suffix:ee,allowClear:ne,className:ie(h,v,B,R,H,N),onChange:X,addonBefore:f&&C.createElement(zs,{form:!0,space:!0},f),addonAfter:d&&C.createElement(zs,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},y),P),{input:ie({[`${M}-sm`]:W==="small",[`${M}-lg`]:W==="large",[`${M}-rtl`]:S==="rtl"},y==null?void 0:y.input,P.input,F),variant:ie({[`${M}-${be}`]:Ce},nc(M,ce)),affixWrapper:ie({[`${M}-affix-wrapper-sm`]:W==="small",[`${M}-affix-wrapper-lg`]:W==="large",[`${M}-affix-wrapper-rtl`]:S==="rtl"},F),wrapper:ie({[`${M}-group-rtl`]:S==="rtl"},F),groupWrapper:ie({[`${M}-group-wrapper-sm`]:W==="small",[`${M}-group-wrapper-lg`]:W==="large",[`${M}-group-wrapper-rtl`]:S==="rtl",[`${M}-group-wrapper-${be}`]:Ce},nc(`${M}-group-wrapper`,ce,te),F)})}))))});process.env.NODE_ENV!=="production"&&(c5.displayName="Input");function gm(e,t,n){return(e-t)/(n-t)}function vm(e,t,n,r){var i=gm(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Fo(e,t){return Array.isArray(e)?e[t]:e}var Bo=m.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),d5=m.createContext({}),f5=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],bm=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,i=e.valueIndex,o=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,u=e.dragging,c=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,h=e.onFocus,p=e.onMouseEnter,g=yt(e,f5),v=m.useContext(Bo),b=v.min,y=v.max,E=v.direction,x=v.disabled,O=v.keyboard,S=v.range,T=v.tabIndex,I=v.ariaLabelForHandle,N=v.ariaLabelledByForHandle,_=v.ariaRequired,P=v.ariaValueTextFormatterForHandle,A=v.styles,M=v.classNames,D="".concat(n,"-handle"),R=function(Y){x||o(Y,i)},$=function(Y){h==null||h(Y,i)},F=function(Y){p(Y,i)},B=function(Y){if(!x&&O){var te=null;switch(Y.which||Y.keyCode){case Xe.LEFT:te=E==="ltr"||E==="btt"?-1:1;break;case Xe.RIGHT:te=E==="ltr"||E==="btt"?1:-1;break;case Xe.UP:te=E!=="ttb"?1:-1;break;case Xe.DOWN:te=E!=="ttb"?-1:1;break;case Xe.HOME:te="min";break;case Xe.END:te="max";break;case Xe.PAGE_UP:te=2;break;case Xe.PAGE_DOWN:te=-2;break;case Xe.BACKSPACE:case Xe.DELETE:a(i);break}te!==null&&(Y.preventDefault(),d(te,i))}},z=function(Y){switch(Y.which||Y.keyCode){case Xe.LEFT:case Xe.RIGHT:case Xe.UP:case Xe.DOWN:case Xe.HOME:case Xe.END:case Xe.PAGE_UP:case Xe.PAGE_DOWN:f==null||f();break}},L=vm(E,r,b,y),H={};if(i!==null){var W;H={tabIndex:x?null:Fo(T,i),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":x,"aria-label":Fo(I,i),"aria-labelledby":Fo(N,i),"aria-required":Fo(_,i),"aria-valuetext":(W=Fo(P,i))===null||W===void 0?void 0:W(r),"aria-orientation":E==="ltr"||E==="rtl"?"horizontal":"vertical",onMouseDown:R,onTouchStart:R,onFocus:$,onMouseEnter:F,onKeyDown:B,onKeyUp:z}}var k=m.createElement("div",Re({ref:t,className:ie(D,V(V(V({},"".concat(D,"-").concat(i+1),i!==null&&S),"".concat(D,"-dragging"),u),"".concat(D,"-dragging-delete"),c),M.handle),style:U(U(U({},L),s),A.handle)},H,g));return l&&(k=l(k,{index:i,prefixCls:n,value:r,dragging:u,draggingDelete:c})),k});process.env.NODE_ENV!=="production"&&(bm.displayName="Handle");var h5=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],zS=m.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,u=e.draggingIndex,c=e.draggingDelete,d=e.onFocus,f=yt(e,h5),h=m.useRef({}),p=m.useState(!1),g=ae(p,2),v=g[0],b=g[1],y=m.useState(-1),E=ae(y,2),x=E[0],O=E[1],S=function(P){O(P),b(!0)},T=function(P,A){S(A),d==null||d(P)},I=function(P,A){S(A)};m.useImperativeHandle(t,function(){return{focus:function(P){var A;(A=h.current[P])===null||A===void 0||A.focus()},hideHelp:function(){zr.flushSync(function(){b(!1)})}}});var N=U({prefixCls:n,onStartMove:i,onOffsetChange:o,render:s,onFocus:T,onMouseEnter:I},f);return m.createElement(m.Fragment,null,a.map(function(_,P){var A=u===P;return m.createElement(bm,Re({ref:function(D){D?h.current[P]=D:delete h.current[P]},dragging:A,draggingDelete:A&&c,style:Fo(r,P),key:P,value:_,valueIndex:P},N))}),l&&v&&m.createElement(bm,Re({key:"a11y"},N,{value:a[x],valueIndex:null,dragging:u!==-1,draggingDelete:c,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(zS.displayName="Handles");var m5=function(t){var n=t.prefixCls,r=t.style,i=t.children,o=t.value,a=t.onClick,s=m.useContext(Bo),l=s.min,u=s.max,c=s.direction,d=s.includedStart,f=s.includedEnd,h=s.included,p="".concat(n,"-text"),g=vm(c,o,l,u);return m.createElement("span",{className:ie(p,V({},"".concat(p,"-active"),h&&d<=o&&o<=f)),style:U(U({},g),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){a(o)}},i)},p5=function(t){var n=t.prefixCls,r=t.marks,i=t.onClick,o="".concat(n,"-mark");return r.length?m.createElement("div",{className:o},r.map(function(a){var s=a.value,l=a.style,u=a.label;return m.createElement(m5,{key:s,prefixCls:o,style:l,value:s,onClick:i},u)})):null},g5=function(t){var n=t.prefixCls,r=t.value,i=t.style,o=t.activeStyle,a=m.useContext(Bo),s=a.min,l=a.max,u=a.direction,c=a.included,d=a.includedStart,f=a.includedEnd,h="".concat(n,"-dot"),p=c&&d<=r&&r<=f,g=U(U({},vm(u,r,s,l)),typeof i=="function"?i(r):i);return p&&(g=U(U({},g),typeof o=="function"?o(r):o)),m.createElement("span",{className:ie(h,V({},"".concat(h,"-active"),p)),style:g})},v5=function(t){var n=t.prefixCls,r=t.marks,i=t.dots,o=t.style,a=t.activeStyle,s=m.useContext(Bo),l=s.min,u=s.max,c=s.step,d=m.useMemo(function(){var f=new Set;if(r.forEach(function(p){f.add(p.value)}),i&&c!==null)for(var h=l;h<=u;)f.add(h),h+=c;return Array.from(f)},[l,u,c,i,r]);return m.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return m.createElement(g5,{prefixCls:n,key:f,value:f,style:o,activeStyle:a})}))},HS=function(t){var n=t.prefixCls,r=t.style,i=t.start,o=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,u=m.useContext(Bo),c=u.direction,d=u.min,f=u.max,h=u.disabled,p=u.range,g=u.classNames,v="".concat(n,"-track"),b=gm(i,d,f),y=gm(o,d,f),E=function(T){!h&&s&&s(T,-1)},x={};switch(c){case"rtl":x.right="".concat(b*100,"%"),x.width="".concat(y*100-b*100,"%");break;case"btt":x.bottom="".concat(b*100,"%"),x.height="".concat(y*100-b*100,"%");break;case"ttb":x.top="".concat(b*100,"%"),x.height="".concat(y*100-b*100,"%");break;default:x.left="".concat(b*100,"%"),x.width="".concat(y*100-b*100,"%")}var O=l||ie(v,V(V({},"".concat(v,"-").concat(a+1),a!==null&&p),"".concat(n,"-track-draggable"),s),g.track);return m.createElement("div",{className:O,style:U(U({},x),r),onMouseDown:E,onTouchStart:E})},b5=function(t){var n=t.prefixCls,r=t.style,i=t.values,o=t.startPoint,a=t.onStartMove,s=m.useContext(Bo),l=s.included,u=s.range,c=s.min,d=s.styles,f=s.classNames,h=m.useMemo(function(){if(!u){if(i.length===0)return[];var g=o??c,v=i[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],y=0;y<i.length-1;y+=1)b.push({start:i[y],end:i[y+1]});return b},[i,u,o,c]);if(!l)return null;var p=h!=null&&h.length&&(f.tracks||d.tracks)?m.createElement(HS,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:ie(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return m.createElement(m.Fragment,null,p,h.map(function(g,v){var b=g.start,y=g.end;return m.createElement(HS,{index:v,prefixCls:n,style:U(U({},Fo(r,v)),d.track),start:b,end:y,key:v,onStartMove:a})}))},y5=130;function jS(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function E5(e,t,n,r,i,o,a,s,l,u,c){var d=m.useState(null),f=ae(d,2),h=f[0],p=f[1],g=m.useState(-1),v=ae(g,2),b=v[0],y=v[1],E=m.useState(!1),x=ae(E,2),O=x[0],S=x[1],T=m.useState(n),I=ae(T,2),N=I[0],_=I[1],P=m.useState(n),A=ae(P,2),M=A[0],D=A[1],R=m.useRef(null),$=m.useRef(null),F=m.useRef(null),B=m.useContext(d5),z=B.onDragStart,L=B.onDragChange;Kt(function(){b===-1&&_(n)},[n,b]),m.useEffect(function(){return function(){document.removeEventListener("mousemove",R.current),document.removeEventListener("mouseup",$.current),F.current&&(F.current.removeEventListener("touchmove",R.current),F.current.removeEventListener("touchend",$.current))}},[]);var H=function(te,se,ce){se!==void 0&&p(se),_(te);var ue=te;ce&&(ue=te.filter(function(de,J){return J!==b})),a(ue),L&&L({rawValues:te,deleteIndex:ce?b:-1,draggingIndex:b,draggingValue:se})},W=an(function(Y,te,se){if(Y===-1){var ce=M[0],ue=M[M.length-1],de=r-ce,J=i-ue,Z=te*(i-r);Z=Math.max(Z,de),Z=Math.min(Z,J);var oe=o(ce+Z);Z=oe-ce;var X=M.map(function(Ce){return Ce+Z});H(X)}else{var ee=(i-r)*te,ne=Ke(N);ne[Y]=M[Y];var be=l(ne,ee,Y,"dist");H(be.values,be.value,se)}}),k=function(te,se,ce){te.stopPropagation();var ue=ce||n,de=ue[se];y(se),p(de),D(ue),_(ue),S(!1);var J=jS(te),Z=J.pageX,oe=J.pageY,X=!1;z&&z({rawValues:ue,draggingIndex:se,draggingValue:de});var ee=function(Ce){Ce.preventDefault();var Se=jS(Ce),ve=Se.pageX,he=Se.pageY,Ae=ve-Z,Ie=he-oe,me=e.current.getBoundingClientRect(),Me=me.width,Q=me.height,le,pe;switch(t){case"btt":le=-Ie/Q,pe=Ae;break;case"ttb":le=Ie/Q,pe=Ae;break;case"rtl":le=-Ae/Me,pe=Ie;break;default:le=Ae/Me,pe=Ie}X=u?Math.abs(pe)>y5&&c<N.length:!1,S(X),W(se,le,X)},ne=function be(Ce){Ce.preventDefault(),document.removeEventListener("mouseup",be),document.removeEventListener("mousemove",ee),F.current&&(F.current.removeEventListener("touchmove",R.current),F.current.removeEventListener("touchend",$.current)),R.current=null,$.current=null,F.current=null,s(X),y(-1),S(!1)};document.addEventListener("mouseup",ne),document.addEventListener("mousemove",ee),te.currentTarget.addEventListener("touchend",ne),te.currentTarget.addEventListener("touchmove",ee),R.current=ee,$.current=ne,F.current=te.currentTarget},G=m.useMemo(function(){var Y=Ke(n).sort(function(de,J){return de-J}),te=Ke(N).sort(function(de,J){return de-J}),se={};te.forEach(function(de){se[de]=(se[de]||0)+1}),Y.forEach(function(de){se[de]=(se[de]||0)-1});var ce=u?1:0,ue=Object.values(se).reduce(function(de,J){return de+Math.abs(J)},0);return ue<=ce?N:n},[n,N,u]);return[b,h,O,G,k]}function S5(e,t,n,r,i,o){var a=m.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),s=m.useCallback(function(h){if(n!==null){var p=e+Math.round((a(h)-e)/n)*n,g=function(E){return(String(E).split(".")[1]||"").length},v=Math.max(g(n),g(t),g(e)),b=Number(p.toFixed(v));return e<=b&&b<=t?b:null}return null},[n,e,t,a]),l=m.useCallback(function(h){var p=a(h),g=r.map(function(y){return y.value});n!==null&&g.push(s(h)),g.push(e,t);var v=g[0],b=t-e;return g.forEach(function(y){var E=Math.abs(p-y);E<=b&&(v=y,b=E)}),v},[e,t,r,n,a,s]),u=function h(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof g=="number"){var y,E=p[v],x=E+g,O=[];r.forEach(function(_){O.push(_.value)}),O.push(e,t),O.push(s(E));var S=g>0?1:-1;b==="unit"?O.push(s(E+S*n)):O.push(s(x)),O=O.filter(function(_){return _!==null}).filter(function(_){return g<0?_<=E:_>=E}),b==="unit"&&(O=O.filter(function(_){return _!==E}));var T=b==="unit"?E:x;y=O[0];var I=Math.abs(y-T);if(O.forEach(function(_){var P=Math.abs(_-T);P<I&&(y=_,I=P)}),y===void 0)return g<0?e:t;if(b==="dist")return y;if(Math.abs(g)>1){var N=Ke(p);return N[v]=y,h(N,g-S,v,b)}return y}else{if(g==="min")return e;if(g==="max")return t}},c=function(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=p[v],E=u(p,g,v,b);return{value:E,changed:E!==y}},d=function(p){return o===null&&p===0||typeof o=="number"&&p<o},f=function(p,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=p.map(l),E=y[v],x=u(y,g,v,b);if(y[v]=x,i===!1){var O=o||0;v>0&&y[v-1]!==E&&(y[v]=Math.max(y[v],y[v-1]+O)),v<y.length-1&&y[v+1]!==E&&(y[v]=Math.min(y[v],y[v+1]-O))}else if(typeof o=="number"||o===null){for(var S=v+1;S<y.length;S+=1)for(var T=!0;d(y[S]-y[S-1])&&T;){var I=c(y,1,S);y[S]=I.value,T=I.changed}for(var N=v;N>0;N-=1)for(var _=!0;d(y[N]-y[N-1])&&_;){var P=c(y,-1,N-1);y[N-1]=P.value,_=P.changed}for(var A=y.length-1;A>0;A-=1)for(var M=!0;d(y[A]-y[A-1])&&M;){var D=c(y,-1,A-1);y[A-1]=D.value,M=D.changed}for(var R=0;R<y.length-1;R+=1)for(var $=!0;d(y[R+1]-y[R])&&$;){var F=c(y,1,R+1);y[R+1]=F.value,$=F.changed}}return{value:y[v],values:y}};return[l,f]}function C5(e){return C.useMemo(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,i=e.maxCount;return process.env.NODE_ENV!=="production"&&gi(!t||!n,"`editable` can not work with `draggableTrack`."),[!0,t,!t&&n,r||0,i]},[e])}var VS=m.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,i=e.className,o=e.style,a=e.classNames,s=e.styles,l=e.id,u=e.disabled,c=u===void 0?!1:u,d=e.keyboard,f=d===void 0?!0:d,h=e.autoFocus,p=e.onFocus,g=e.onBlur,v=e.min,b=v===void 0?0:v,y=e.max,E=y===void 0?100:y,x=e.step,O=x===void 0?1:x,S=e.value,T=e.defaultValue,I=e.range,N=e.count,_=e.onChange,P=e.onBeforeChange,A=e.onAfterChange,M=e.onChangeComplete,D=e.allowCross,R=D===void 0?!0:D,$=e.pushable,F=$===void 0?!1:$,B=e.reverse,z=e.vertical,L=e.included,H=L===void 0?!0:L,W=e.startPoint,k=e.trackStyle,G=e.handleStyle,Y=e.railStyle,te=e.dotStyle,se=e.activeDotStyle,ce=e.marks,ue=e.dots,de=e.handleRender,J=e.activeHandleRender,Z=e.track,oe=e.tabIndex,X=oe===void 0?0:oe,ee=e.ariaLabelForHandle,ne=e.ariaLabelledByForHandle,be=e.ariaRequired,Ce=e.ariaValueTextFormatterForHandle,Se=m.useRef(null),ve=m.useRef(null),he=m.useMemo(function(){return z?B?"ttb":"btt":B?"rtl":"ltr"},[B,z]),Ae=C5(I),Ie=ae(Ae,5),me=Ie[0],Me=Ie[1],Q=Ie[2],le=Ie[3],pe=Ie[4],ye=m.useMemo(function(){return isFinite(b)?b:0},[b]),Fe=m.useMemo(function(){return isFinite(E)?E:100},[E]),je=m.useMemo(function(){return O!==null&&O<=0?1:O},[O]),De=m.useMemo(function(){return typeof F=="boolean"?F?je:!1:F>=0?F:!1},[F,je]),we=m.useMemo(function(){return Object.keys(ce||{}).map(function(ke){var Oe=ce[ke],Qe={value:Number(ke)};return Oe&&lt(Oe)==="object"&&!m.isValidElement(Oe)&&("label"in Oe||"style"in Oe)?(Qe.style=Oe.style,Qe.label=Oe.label):Qe.label=Oe,Qe}).filter(function(ke){var Oe=ke.label;return Oe||typeof Oe=="number"}).sort(function(ke,Oe){return ke.value-Oe.value})},[ce]),Le=S5(ye,Fe,je,we,R,De),Ue=ae(Le,2),Te=Ue[0],Be=Ue[1],it=Cn(T,{value:S}),Ct=ae(it,2),Dt=Ct[0],Pt=Ct[1],wt=m.useMemo(function(){var ke=Dt==null?[]:Array.isArray(Dt)?Dt:[Dt],Oe=ae(ke,1),Qe=Oe[0],ut=Qe===void 0?ye:Qe,pt=Dt===null?[]:[ut];if(me){if(pt=Ke(ke),N||Dt===void 0){var $t=N>=0?N+1:2;for(pt=pt.slice(0,$t);pt.length<$t;){var sn;pt.push((sn=pt[pt.length-1])!==null&&sn!==void 0?sn:ye)}}pt.sort(function(jt,rt){return jt-rt})}return pt.forEach(function(jt,rt){pt[rt]=Te(jt)}),pt},[Dt,me,ye,N,Te]),Ht=function(Oe){return me?Oe:Oe[0]},kt=an(function(ke){var Oe=Ke(ke).sort(function(Qe,ut){return Qe-ut});_&&!ca(Oe,wt,!0)&&_(Ht(Oe)),Pt(Oe)}),at=an(function(ke){ke&&Se.current.hideHelp();var Oe=Ht(wt);A==null||A(Oe),bt(!A,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),M==null||M(Oe)}),dt=function(Oe){if(!(c||!Me||wt.length<=le)){var Qe=Ke(wt);Qe.splice(Oe,1),P==null||P(Ht(Qe)),kt(Qe);var ut=Math.max(0,Oe-1);Se.current.hideHelp(),Se.current.focus(ut)}},$e=E5(ve,he,wt,ye,Fe,Te,kt,at,Be,Me,le),Ve=ae($e,5),Ye=Ve[0],ot=Ve[1],Pe=Ve[2],_e=Ve[3],xe=Ve[4],ze=function(Oe,Qe){if(!c){var ut=Ke(wt),pt=0,$t=0,sn=Fe-ye;wt.forEach(function(hn,_n){var Un=Math.abs(Oe-hn);Un<=sn&&(sn=Un,pt=_n),hn<Oe&&($t=_n)});var jt=pt;Me&&sn!==0&&(!pe||wt.length<pe)?(ut.splice($t+1,0,Oe),jt=$t+1):ut[pt]=Oe,me&&!wt.length&&N===void 0&&ut.push(Oe);var rt=Ht(ut);if(P==null||P(rt),kt(ut),Qe){var gt,_t;(gt=document.activeElement)===null||gt===void 0||(_t=gt.blur)===null||_t===void 0||_t.call(gt),Se.current.focus(jt),xe(Qe,jt,ut)}else A==null||A(rt),bt(!A,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),M==null||M(rt)}},qe=function(Oe){Oe.preventDefault();var Qe=ve.current.getBoundingClientRect(),ut=Qe.width,pt=Qe.height,$t=Qe.left,sn=Qe.top,jt=Qe.bottom,rt=Qe.right,gt=Oe.clientX,_t=Oe.clientY,hn;switch(he){case"btt":hn=(jt-_t)/pt;break;case"ttb":hn=(_t-sn)/pt;break;case"rtl":hn=(rt-gt)/ut;break;default:hn=(gt-$t)/ut}var _n=ye+hn*(Fe-ye);ze(Te(_n),Oe)},et=m.useState(null),nt=ae(et,2),mt=nt[0],vt=nt[1],ht=function(Oe,Qe){if(!c){var ut=Be(wt,Oe,Qe);P==null||P(Ht(wt)),kt(ut.values),vt(ut.value)}};m.useEffect(function(){if(mt!==null){var ke=wt.indexOf(mt);ke>=0&&Se.current.focus(ke)}vt(null)},[mt]);var St=m.useMemo(function(){return Q&&je===null?(process.env.NODE_ENV!=="production"&&bt(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Q},[Q,je]),At=an(function(ke,Oe){xe(ke,Oe),P==null||P(Ht(wt))}),Bt=Ye!==-1;m.useEffect(function(){if(!Bt){var ke=wt.lastIndexOf(ot);Se.current.focus(ke)}},[Bt]);var en=m.useMemo(function(){return Ke(_e).sort(function(ke,Oe){return ke-Oe})},[_e]),fn=m.useMemo(function(){return me?[en[0],en[en.length-1]]:[ye,en[0]]},[en,me,ye]),Ut=ae(fn,2),Rt=Ut[0],tt=Ut[1];m.useImperativeHandle(t,function(){return{focus:function(){Se.current.focus(0)},blur:function(){var Oe,Qe=document,ut=Qe.activeElement;(Oe=ve.current)!==null&&Oe!==void 0&&Oe.contains(ut)&&(ut==null||ut.blur())}}}),m.useEffect(function(){h&&Se.current.focus(0)},[]);var He=m.useMemo(function(){return{min:ye,max:Fe,direction:he,disabled:c,keyboard:f,step:je,included:H,includedStart:Rt,includedEnd:tt,range:me,tabIndex:X,ariaLabelForHandle:ee,ariaLabelledByForHandle:ne,ariaRequired:be,ariaValueTextFormatterForHandle:Ce,styles:s||{},classNames:a||{}}},[ye,Fe,he,c,f,je,H,Rt,tt,me,X,ee,ne,be,Ce,s,a]);return m.createElement(Bo.Provider,{value:He},m.createElement("div",{ref:ve,className:ie(r,i,V(V(V(V({},"".concat(r,"-disabled"),c),"".concat(r,"-vertical"),z),"".concat(r,"-horizontal"),!z),"".concat(r,"-with-marks"),we.length)),style:o,onMouseDown:qe,id:l},m.createElement("div",{className:ie("".concat(r,"-rail"),a==null?void 0:a.rail),style:U(U({},Y),s==null?void 0:s.rail)}),Z!==!1&&m.createElement(b5,{prefixCls:r,style:k,values:wt,startPoint:W,onStartMove:St?At:void 0}),m.createElement(v5,{prefixCls:r,marks:we,dots:ue,style:te,activeStyle:se}),m.createElement(zS,{ref:Se,prefixCls:r,style:G,values:_e,draggingIndex:Ye,draggingDelete:Pe,onStartMove:At,onOffsetChange:ht,onFocus:p,onBlur:g,handleRender:de,activeHandleRender:J,onChangeComplete:at,onDelete:Me?dt:void 0}),m.createElement(p5,{prefixCls:r,marks:we,onClick:ze})))});process.env.NODE_ENV!=="production"&&(VS.displayName="Slider");const w5=C.createContext({}),ym=m.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:i}=e,o=C.useRef(null),a=n&&!r,s=C.useRef(null);function l(){Xt.cancel(s.current),s.current=null}function u(){s.current=Xt(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),s.current=null})}return m.useEffect(()=>(a?u():l(),l),[a,e.title,i]),m.createElement(Ki,Object.assign({ref:dr(o,t)},e,{open:a}))});process.env.NODE_ENV!=="production"&&(ym.displayName="SliderTooltip");const x5=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:o,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:u,handleSize:c,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:h,handleLineWidth:p,handleLineWidthHover:g,motionDurationMid:v}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",height:r,margin:`${fe(a)} ${fe(o)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${fe(o)} ${fe(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${v}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${fe(p)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:c,height:c,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:u(p).mul(-1).equal(),insetBlockStart:u(p).mul(-1).equal(),width:u(c).add(u(p).mul(2)).equal(),height:u(c).add(u(p).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:c,height:c,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${fe(p)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
223
223
  inset-inline-start ${v},
224
224
  inset-block-start ${v},
225
225
  width ${v},
@@ -245,7 +245,7 @@ html body {
245
245
  `,K5=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],xm={},Mr;function G5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&xm[n])return xm[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=K5.map(function(u){return"".concat(u,":").concat(r.getPropertyValue(u))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(xm[n]=l),l}function Q5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Mr||(Mr=document.createElement("textarea"),Mr.setAttribute("tab-index","-1"),Mr.setAttribute("aria-hidden","true"),Mr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Mr)),e.getAttribute("wrap")?Mr.setAttribute("wrap",e.getAttribute("wrap")):Mr.removeAttribute("wrap");var i=G5(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Mr.setAttribute("style","".concat(l,";").concat(X5)),Mr.value=e.value||e.placeholder||"";var u=void 0,c=void 0,d,f=Mr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Mr.value=" ";var h=Mr.scrollHeight-o;n!==null&&(u=h*n,s==="border-box"&&(u=u+o+a),f=Math.max(u,f)),r!==null&&(c=h*r,s==="border-box"&&(c=c+o+a),d=f>c?"":"hidden",f=Math.min(c,f))}var p={height:f,overflowY:d,resize:"none"};return u&&(p.minHeight=u),c&&(p.maxHeight=c),p}var Z5=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Tm=0,Om=1,Nm=2,J5=m.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,u=n.style,c=n.disabled,d=n.onChange,f=n.onInternalAutoSize,h=yt(n,Z5),p=Cn(i,{value:o,postState:function(Y){return Y??""}}),g=ae(p,2),v=g[0],b=g[1],y=function(Y){b(Y.target.value),d==null||d(Y)},E=m.useRef();m.useImperativeHandle(t,function(){return{textArea:E.current}});var x=m.useMemo(function(){return a&&lt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),O=ae(x,2),S=O[0],T=O[1],I=!!a,N=function(){try{if(document.activeElement===E.current){var Y=E.current,te=Y.selectionStart,se=Y.selectionEnd,ce=Y.scrollTop;E.current.setSelectionRange(te,se),E.current.scrollTop=ce}}catch{}},_=m.useState(Nm),P=ae(_,2),A=P[0],M=P[1],D=m.useState(),R=ae(D,2),$=R[0],F=R[1],B=function(){M(Tm),process.env.NODE_ENV==="test"&&(f==null||f())};Kt(function(){I&&B()},[o,S,T,I]),Kt(function(){if(A===Tm)M(Om);else if(A===Om){var G=Q5(E.current,!1,S,T);M(Nm),F(G)}else N()},[A]);var z=m.useRef(),L=function(){Xt.cancel(z.current)},H=function(Y){A===Nm&&(s==null||s(Y),a&&(L(),z.current=Xt(function(){B()})))};m.useEffect(function(){return L},[]);var W=I?$:null,k=U(U({},u),W);return(A===Tm||A===Om)&&(k.overflowY="hidden",k.overflowX="hidden"),m.createElement(pr,{onResize:H,disabled:!(a||s)},m.createElement("textarea",Re({},h,{ref:E,style:k,className:ie(r,l,V({},"".concat(r,"-disabled"),c)),disabled:c,value:v,onChange:y})))}),eF=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],tF=C.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,u=e.maxLength,c=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,p=h===void 0?"rc-textarea":h,g=e.showCount,v=e.count,b=e.className,y=e.style,E=e.disabled,x=e.hidden,O=e.classNames,S=e.styles,T=e.onResize,I=e.onClear,N=e.onPressEnter,_=e.readOnly,P=e.autoSize,A=e.onKeyDown,M=yt(e,eF),D=Cn(r,{value:i,defaultValue:r}),R=ae(D,2),$=R[0],F=R[1],B=$==null?"":String($),z=C.useState(!1),L=ae(z,2),H=L[0],W=L[1],k=C.useRef(!1),G=C.useState(null),Y=ae(G,2),te=Y[0],se=Y[1],ce=C.useRef(null),ue=C.useRef(null),de=function(){var Le;return(Le=ue.current)===null||Le===void 0?void 0:Le.textArea},J=function(){de().focus()};C.useImperativeHandle(t,function(){var we;return{resizableTextArea:ue.current,focus:J,blur:function(){de().blur()},nativeElement:((we=ce.current)===null||we===void 0?void 0:we.nativeElement)||de()}}),C.useEffect(function(){W(function(we){return!E&&we})},[E]);var Z=C.useState(null),oe=ae(Z,2),X=oe[0],ee=oe[1];C.useEffect(function(){if(X){var we;(we=de()).setSelectionRange.apply(we,Ke(X))}},[X]);var ne=FS(v,g),be=(n=ne.max)!==null&&n!==void 0?n:u,Ce=Number(be)>0,Se=ne.strategy(B),ve=!!be&&Se>be,he=function(Le,Ue){var Te=Ue;!k.current&&ne.exceedFormatter&&ne.max&&ne.strategy(Ue)>ne.max&&(Te=ne.exceedFormatter(Ue,{max:ne.max}),Ue!==Te&&ee([de().selectionStart||0,de().selectionEnd||0])),F(Te),bc(Le.currentTarget,Le,s,Te)},Ae=function(Le){k.current=!0,c==null||c(Le)},Ie=function(Le){k.current=!1,he(Le,Le.currentTarget.value),d==null||d(Le)},me=function(Le){he(Le,Le.target.value)},Me=function(Le){Le.key==="Enter"&&N&&N(Le),A==null||A(Le)},Q=function(Le){W(!0),o==null||o(Le)},le=function(Le){W(!1),a==null||a(Le)},pe=function(Le){F(""),J(),bc(de(),Le,s)},ye=f,Fe;ne.show&&(ne.showFormatter?Fe=ne.showFormatter({value:B,count:Se,maxLength:be}):Fe="".concat(Se).concat(Ce?" / ".concat(be):""),ye=C.createElement(C.Fragment,null,ye,C.createElement("span",{className:ie("".concat(p,"-data-count"),O==null?void 0:O.count),style:S==null?void 0:S.count},Fe)));var je=function(Le){var Ue;T==null||T(Le),(Ue=de())!==null&&Ue!==void 0&&Ue.style.height&&se(!0)},De=!P&&!g&&!l;return C.createElement($S,{ref:ce,value:B,allowClear:l,handleReset:pe,suffix:ye,prefixCls:p,classNames:U(U({},O),{},{affixWrapper:ie(O==null?void 0:O.affixWrapper,V(V({},"".concat(p,"-show-count"),g),"".concat(p,"-textarea-allow-clear"),l))}),disabled:E,focused:H,className:ie(b,ve&&"".concat(p,"-out-of-range")),style:U(U({},y),te&&!De?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fe=="string"?Fe:void 0}},hidden:x,readOnly:_,onClear:I},C.createElement(J5,Re({},M,{autoSize:P,maxLength:u,onKeyDown:Me,onChange:me,onFocus:Q,onBlur:le,onCompositionStart:Ae,onCompositionEnd:Ie,className:ie(O==null?void 0:O.textarea),style:U(U({},S==null?void 0:S.textarea),{},{resize:y==null?void 0:y.resize}),disabled:E,prefixCls:p,onResize:je,ref:ue,readOnly:_})))});const nF=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
246
246
  &-allow-clear > ${t},
247
247
  &-affix-wrapper${r}-has-feedback ${t}
248
- `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},rF=wn(["Input","TextArea"],e=>{const t=rn(e,fc(e));return[nF(t)]},hc,{resetFont:!1});var iF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const oF=C.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:u,rootClassName:c,className:d,style:f,styles:h,variant:p,showCount:g,onMouseDown:v,onResize:b}=e,y=iF(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:ne}=on("TextArea");ne(!("bordered"in e),"bordered","variant")}const{getPrefixCls:E,direction:x,allowClear:O,autoComplete:S,className:T,style:I,classNames:N,styles:_}=Gn("textArea"),P=m.useContext(Si),A=a??P,{status:M,hasFeedback:D,feedbackIcon:R}=m.useContext(ko),$=Uh(M,s),F=m.useRef(null);m.useImperativeHandle(t,()=>{var ne;return{resizableTextArea:(ne=F.current)===null||ne===void 0?void 0:ne.resizableTextArea,focus:be=>{var Ce,Se;RS((Se=(Ce=F.current)===null||Ce===void 0?void 0:Ce.resizableTextArea)===null||Se===void 0?void 0:Se.textArea,be)},blur:()=>{var be;return(be=F.current)===null||be===void 0?void 0:be.blur()}}});const B=E("input",r),z=Wi(B),[L,H,W]=uS(B,c),[k]=rF(B,z),{compactSize:G,compactItemClassnames:Y}=Ru(B,x),te=ai(ne=>{var be;return(be=o??G)!==null&&be!==void 0?be:ne}),[se,ce]=Wh("textArea",p,i),ue=BS(l??O),[de,J]=m.useState(!1),[Z,oe]=m.useState(!1),X=ne=>{J(!0),v==null||v(ne);const be=()=>{J(!1),document.removeEventListener("mouseup",be)};document.addEventListener("mouseup",be)},ee=ne=>{var be,Ce;if(b==null||b(ne),de&&typeof getComputedStyle=="function"){const Se=(Ce=(be=F.current)===null||be===void 0?void 0:be.nativeElement)===null||Ce===void 0?void 0:Ce.querySelector("textarea");Se&&getComputedStyle(Se).resize==="both"&&oe(!0)}};return L(k(m.createElement(tF,Object.assign({autoComplete:S},y,{style:Object.assign(Object.assign({},I),f),styles:Object.assign(Object.assign({},_),h),disabled:A,allowClear:ue,className:ie(W,z,d,c,Y,T,Z&&`${B}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},u),N),{textarea:ie({[`${B}-sm`]:te==="small",[`${B}-lg`]:te==="large"},H,u==null?void 0:u.textarea,N.textarea,de&&`${B}-mouse-active`),variant:ie({[`${B}-${se}`]:ce},nc(B,$)),affixWrapper:ie(`${B}-textarea-affix-wrapper`,{[`${B}-affix-wrapper-rtl`]:x==="rtl",[`${B}-affix-wrapper-sm`]:te==="small",[`${B}-affix-wrapper-lg`]:te==="large",[`${B}-textarea-show-count`]:g||((n=e.count)===null||n===void 0?void 0:n.show)},H)}),prefixCls:B,suffix:D&&m.createElement("span",{className:`${B}-textarea-suffix`},R),showCount:g,ref:F,onResize:ee,onMouseDown:X}))))});var aF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},sF=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:aF}))},_m=m.forwardRef(sF);process.env.NODE_ENV!=="production"&&(_m.displayName="DoubleLeftOutlined");var lF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},uF=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:lF}))},Im=m.forwardRef(uF);process.env.NODE_ENV!=="production"&&(Im.displayName="DoubleRightOutlined");var cF={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},dF=[10,20,50,100],lC=function(t){var n=t.pageSizeOptions,r=n===void 0?dF:n,i=t.locale,o=t.changeSize,a=t.pageSize,s=t.goButton,l=t.quickGo,u=t.rootPrefixCls,c=t.disabled,d=t.buildOptionText,f=t.showSizeChanger,h=t.sizeChangerRender,p=C.useState(""),g=ae(p,2),v=g[0],b=g[1],y=function(){return!v||Number.isNaN(v)?void 0:Number(v)},E=typeof d=="function"?d:function(A){return"".concat(A," ").concat(i.items_per_page)},x=function(M){b(M.target.value)},O=function(M){s||v===""||(b(""),!(M.relatedTarget&&(M.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||M.relatedTarget.className.indexOf("".concat(u,"-item"))>=0))&&(l==null||l(y())))},S=function(M){v!==""&&(M.keyCode===Xe.ENTER||M.type==="click")&&(b(""),l==null||l(y()))},T=function(){return r.some(function(M){return M.toString()===a.toString()})?r:r.concat([a]).sort(function(M,D){var R=Number.isNaN(Number(M))?0:Number(M),$=Number.isNaN(Number(D))?0:Number(D);return R-$})},I="".concat(u,"-options");if(!f&&!l)return null;var N=null,_=null,P=null;return f&&h&&(N=h({disabled:c,size:a,onSizeChange:function(M){o==null||o(Number(M))},"aria-label":i.page_size,className:"".concat(I,"-size-changer"),options:T().map(function(A){return{label:E(A),value:A}})})),l&&(s&&(P=typeof s=="boolean"?C.createElement("button",{type:"button",onClick:S,onKeyUp:S,disabled:c,className:"".concat(I,"-quick-jumper-button")},i.jump_to_confirm):C.createElement("span",{onClick:S,onKeyUp:S},s)),_=C.createElement("div",{className:"".concat(I,"-quick-jumper")},i.jump_to,C.createElement("input",{disabled:c,type:"text",value:v,onChange:x,onKeyUp:S,onBlur:O,"aria-label":i.page}),i.page,P)),C.createElement("li",{className:I},N,_)};process.env.NODE_ENV!=="production"&&(lC.displayName="Options");var Fa=function(t){var n=t.rootPrefixCls,r=t.page,i=t.active,o=t.className,a=t.showTitle,s=t.onClick,l=t.onKeyPress,u=t.itemRender,c="".concat(n,"-item"),d=ie(c,"".concat(c,"-").concat(r),V(V({},"".concat(c,"-active"),i),"".concat(c,"-disabled"),!r),o),f=function(){s(r)},h=function(v){l(v,s,r)},p=u(r,"page",C.createElement("a",{rel:"nofollow"},r));return p?C.createElement("li",{title:a?String(r):null,className:d,onClick:f,onKeyDown:h,tabIndex:0},p):null};process.env.NODE_ENV!=="production"&&(Fa.displayName="Pager");var fF=function(t,n,r){return r};function Am(){}function uC(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function zo(e,t,n){var r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}var cC=function(t){var n=t.prefixCls,r=n===void 0?"rc-pagination":n,i=t.selectPrefixCls,o=i===void 0?"rc-select":i,a=t.className,s=t.current,l=t.defaultCurrent,u=l===void 0?1:l,c=t.total,d=c===void 0?0:c,f=t.pageSize,h=t.defaultPageSize,p=h===void 0?10:h,g=t.onChange,v=g===void 0?Am:g,b=t.hideOnSinglePage,y=t.align,E=t.showPrevNextJumpers,x=E===void 0?!0:E,O=t.showQuickJumper,S=t.showLessItems,T=t.showTitle,I=T===void 0?!0:T,N=t.onShowSizeChange,_=N===void 0?Am:N,P=t.locale,A=P===void 0?cF:P,M=t.style,D=t.totalBoundaryShowSizeChanger,R=D===void 0?50:D,$=t.disabled,F=t.simple,B=t.showTotal,z=t.showSizeChanger,L=z===void 0?d>R:z,H=t.sizeChangerRender,W=t.pageSizeOptions,k=t.itemRender,G=k===void 0?fF:k,Y=t.jumpPrevIcon,te=t.jumpNextIcon,se=t.prevIcon,ce=t.nextIcon,ue=C.useRef(null),de=Cn(10,{value:f,defaultValue:p}),J=ae(de,2),Z=J[0],oe=J[1],X=Cn(1,{value:s,defaultValue:u,postState:function(gt){return Math.max(1,Math.min(gt,zo(void 0,Z,d)))}}),ee=ae(X,2),ne=ee[0],be=ee[1],Ce=C.useState(ne),Se=ae(Ce,2),ve=Se[0],he=Se[1];C.useEffect(function(){he(ne)},[ne]);var Ae=v!==Am,Ie="current"in t;process.env.NODE_ENV!=="production"&&bt(Ie?Ae:!0,"You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var me=Math.max(1,ne-(S?3:5)),Me=Math.min(zo(void 0,Z,d),ne+(S?3:5));function Q(rt,gt){var It=rt||C.createElement("button",{type:"button","aria-label":gt,className:"".concat(r,"-item-link")});return typeof rt=="function"&&(It=C.createElement(rt,U({},t))),It}function le(rt){var gt=rt.target.value,It=zo(void 0,Z,d),hn;return gt===""?hn=gt:Number.isNaN(Number(gt))?hn=ve:gt>=It?hn=It:hn=Number(gt),hn}function pe(rt){return uC(rt)&&rt!==ne&&uC(d)&&d>0}var ye=d>Z?O:!1;function Fe(rt){(rt.keyCode===Xe.UP||rt.keyCode===Xe.DOWN)&&rt.preventDefault()}function je(rt){var gt=le(rt);switch(gt!==ve&&he(gt),rt.keyCode){case Xe.ENTER:Le(gt);break;case Xe.UP:Le(gt-1);break;case Xe.DOWN:Le(gt+1);break}}function De(rt){Le(le(rt))}function we(rt){var gt=zo(rt,Z,d),It=ne>gt&&gt!==0?gt:ne;oe(rt),he(It),_==null||_(ne,rt),be(It),v==null||v(It,rt)}function Le(rt){if(pe(rt)&&!$){var gt=zo(void 0,Z,d),It=rt;return rt>gt?It=gt:rt<1&&(It=1),It!==ve&&he(It),be(It),v==null||v(It,Z),It}return ne}var Ue=ne>1,Te=ne<zo(void 0,Z,d);function Be(){Ue&&Le(ne-1)}function it(){Te&&Le(ne+1)}function wt(){Le(me)}function Dt(){Le(Me)}function Pt(rt,gt){if(rt.key==="Enter"||rt.charCode===Xe.ENTER||rt.keyCode===Xe.ENTER){for(var It=arguments.length,hn=new Array(It>2?It-2:0),_n=2;_n<It;_n++)hn[_n-2]=arguments[_n];gt.apply(void 0,hn)}}function xt(rt){Pt(rt,Be)}function Ht(rt){Pt(rt,it)}function kt(rt){Pt(rt,wt)}function at(rt){Pt(rt,Dt)}function dt(rt){var gt=G(rt,"prev",Q(se,"prev page"));return C.isValidElement(gt)?C.cloneElement(gt,{disabled:!Ue}):gt}function $e(rt){var gt=G(rt,"next",Q(ce,"next page"));return C.isValidElement(gt)?C.cloneElement(gt,{disabled:!Te}):gt}function Ve(rt){(rt.type==="click"||rt.keyCode===Xe.ENTER)&&Le(ve)}var Ye=null,ot=Nr(t,{aria:!0,data:!0}),Pe=B&&C.createElement("li",{className:"".concat(r,"-total-text")},B(d,[d===0?0:(ne-1)*Z+1,ne*Z>d?d:ne*Z])),_e=null,xe=zo(void 0,Z,d);if(b&&d<=Z)return null;var ze=[],qe={rootPrefixCls:r,onClick:Le,onKeyPress:Pt,showTitle:I,itemRender:G,page:-1},et=ne-1>0?ne-1:0,nt=ne+1<xe?ne+1:xe,mt=O&&O.goButton,vt=lt(F)==="object"?F.readOnly:!F,ht=mt,St=null;F&&(mt&&(typeof mt=="boolean"?ht=C.createElement("button",{type:"button",onClick:Ve,onKeyUp:Ve},A.jump_to_confirm):ht=C.createElement("span",{onClick:Ve,onKeyUp:Ve},mt),ht=C.createElement("li",{title:I?"".concat(A.jump_to).concat(ne,"/").concat(xe):null,className:"".concat(r,"-simple-pager")},ht)),St=C.createElement("li",{title:I?"".concat(ne,"/").concat(xe):null,className:"".concat(r,"-simple-pager")},vt?ve:C.createElement("input",{type:"text","aria-label":A.jump_to,value:ve,disabled:$,onKeyDown:Fe,onKeyUp:je,onChange:je,onBlur:De,size:3}),C.createElement("span",{className:"".concat(r,"-slash")},"/"),xe));var At=S?1:2;if(xe<=3+At*2){xe||ze.push(C.createElement(Fa,Re({},qe,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var Bt=1;Bt<=xe;Bt+=1)ze.push(C.createElement(Fa,Re({},qe,{key:Bt,page:Bt,active:ne===Bt})))}else{var en=S?A.prev_3:A.prev_5,fn=S?A.next_3:A.next_5,Ut=G(me,"jump-prev",Q(Y,"prev page")),Rt=G(Me,"jump-next",Q(te,"next page"));x&&(Ye=Ut?C.createElement("li",{title:I?en:null,key:"prev",onClick:wt,tabIndex:0,onKeyDown:kt,className:ie("".concat(r,"-jump-prev"),V({},"".concat(r,"-jump-prev-custom-icon"),!!Y))},Ut):null,_e=Rt?C.createElement("li",{title:I?fn:null,key:"next",onClick:Dt,tabIndex:0,onKeyDown:at,className:ie("".concat(r,"-jump-next"),V({},"".concat(r,"-jump-next-custom-icon"),!!te))},Rt):null);var tt=Math.max(1,ne-At),He=Math.min(ne+At,xe);ne-1<=At&&(He=1+At*2),xe-ne<=At&&(tt=xe-At*2);for(var ke=tt;ke<=He;ke+=1)ze.push(C.createElement(Fa,Re({},qe,{key:ke,page:ke,active:ne===ke})));if(ne-1>=At*2&&ne!==3&&(ze[0]=C.cloneElement(ze[0],{className:ie("".concat(r,"-item-after-jump-prev"),ze[0].props.className)}),ze.unshift(Ye)),xe-ne>=At*2&&ne!==xe-2){var Oe=ze[ze.length-1];ze[ze.length-1]=C.cloneElement(Oe,{className:ie("".concat(r,"-item-before-jump-next"),Oe.props.className)}),ze.push(_e)}tt!==1&&ze.unshift(C.createElement(Fa,Re({},qe,{key:1,page:1}))),He!==xe&&ze.push(C.createElement(Fa,Re({},qe,{key:xe,page:xe})))}var Qe=dt(et);if(Qe){var ut=!Ue||!xe;Qe=C.createElement("li",{title:I?A.prev_page:null,onClick:Be,tabIndex:ut?null:0,onKeyDown:xt,className:ie("".concat(r,"-prev"),V({},"".concat(r,"-disabled"),ut)),"aria-disabled":ut},Qe)}var pt=$e(nt);if(pt){var $t,sn;F?($t=!Te,sn=Ue?0:null):($t=!Te||!xe,sn=$t?null:0),pt=C.createElement("li",{title:I?A.next_page:null,onClick:it,tabIndex:sn,onKeyDown:Ht,className:ie("".concat(r,"-next"),V({},"".concat(r,"-disabled"),$t)),"aria-disabled":$t},pt)}var jt=ie(r,a,V(V(V(V(V({},"".concat(r,"-start"),y==="start"),"".concat(r,"-center"),y==="center"),"".concat(r,"-end"),y==="end"),"".concat(r,"-simple"),F),"".concat(r,"-disabled"),$));return C.createElement("ul",Re({className:jt,style:M,ref:ue},ot),Pe,Qe,F?St:ze,pt,C.createElement(lC,{locale:A,rootPrefixCls:r,disabled:$,selectPrefixCls:o,changeSize:we,pageSize:Z,pageSizeOptions:W,quickGo:ye?Le:null,goButton:ht,showSizeChanger:L,sizeChangerRender:H}))};process.env.NODE_ENV!=="production"&&(cC.displayName="Pagination");const hF=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},mF=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:fe(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:fe(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:fe(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
248
+ `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},rF=wn(["Input","TextArea"],e=>{const t=rn(e,fc(e));return[nF(t)]},hc,{resetFont:!1});var iF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const oF=C.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:u,rootClassName:c,className:d,style:f,styles:h,variant:p,showCount:g,onMouseDown:v,onResize:b}=e,y=iF(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:ne}=on("TextArea");ne(!("bordered"in e),"bordered","variant")}const{getPrefixCls:E,direction:x,allowClear:O,autoComplete:S,className:T,style:I,classNames:N,styles:_}=Gn("textArea"),P=m.useContext(Si),A=a??P,{status:M,hasFeedback:D,feedbackIcon:R}=m.useContext(ko),$=Uh(M,s),F=m.useRef(null);m.useImperativeHandle(t,()=>{var ne;return{resizableTextArea:(ne=F.current)===null||ne===void 0?void 0:ne.resizableTextArea,focus:be=>{var Ce,Se;RS((Se=(Ce=F.current)===null||Ce===void 0?void 0:Ce.resizableTextArea)===null||Se===void 0?void 0:Se.textArea,be)},blur:()=>{var be;return(be=F.current)===null||be===void 0?void 0:be.blur()}}});const B=E("input",r),z=Wi(B),[L,H,W]=uS(B,c),[k]=rF(B,z),{compactSize:G,compactItemClassnames:Y}=Ru(B,x),te=ai(ne=>{var be;return(be=o??G)!==null&&be!==void 0?be:ne}),[se,ce]=Wh("textArea",p,i),ue=BS(l??O),[de,J]=m.useState(!1),[Z,oe]=m.useState(!1),X=ne=>{J(!0),v==null||v(ne);const be=()=>{J(!1),document.removeEventListener("mouseup",be)};document.addEventListener("mouseup",be)},ee=ne=>{var be,Ce;if(b==null||b(ne),de&&typeof getComputedStyle=="function"){const Se=(Ce=(be=F.current)===null||be===void 0?void 0:be.nativeElement)===null||Ce===void 0?void 0:Ce.querySelector("textarea");Se&&getComputedStyle(Se).resize==="both"&&oe(!0)}};return L(k(m.createElement(tF,Object.assign({autoComplete:S},y,{style:Object.assign(Object.assign({},I),f),styles:Object.assign(Object.assign({},_),h),disabled:A,allowClear:ue,className:ie(W,z,d,c,Y,T,Z&&`${B}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},u),N),{textarea:ie({[`${B}-sm`]:te==="small",[`${B}-lg`]:te==="large"},H,u==null?void 0:u.textarea,N.textarea,de&&`${B}-mouse-active`),variant:ie({[`${B}-${se}`]:ce},nc(B,$)),affixWrapper:ie(`${B}-textarea-affix-wrapper`,{[`${B}-affix-wrapper-rtl`]:x==="rtl",[`${B}-affix-wrapper-sm`]:te==="small",[`${B}-affix-wrapper-lg`]:te==="large",[`${B}-textarea-show-count`]:g||((n=e.count)===null||n===void 0?void 0:n.show)},H)}),prefixCls:B,suffix:D&&m.createElement("span",{className:`${B}-textarea-suffix`},R),showCount:g,ref:F,onResize:ee,onMouseDown:X}))))});var aF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},sF=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:aF}))},_m=m.forwardRef(sF);process.env.NODE_ENV!=="production"&&(_m.displayName="DoubleLeftOutlined");var lF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},uF=function(t,n){return m.createElement(nn,Re({},t,{ref:n,icon:lF}))},Im=m.forwardRef(uF);process.env.NODE_ENV!=="production"&&(Im.displayName="DoubleRightOutlined");var cF={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},dF=[10,20,50,100],lC=function(t){var n=t.pageSizeOptions,r=n===void 0?dF:n,i=t.locale,o=t.changeSize,a=t.pageSize,s=t.goButton,l=t.quickGo,u=t.rootPrefixCls,c=t.disabled,d=t.buildOptionText,f=t.showSizeChanger,h=t.sizeChangerRender,p=C.useState(""),g=ae(p,2),v=g[0],b=g[1],y=function(){return!v||Number.isNaN(v)?void 0:Number(v)},E=typeof d=="function"?d:function(A){return"".concat(A," ").concat(i.items_per_page)},x=function(M){b(M.target.value)},O=function(M){s||v===""||(b(""),!(M.relatedTarget&&(M.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||M.relatedTarget.className.indexOf("".concat(u,"-item"))>=0))&&(l==null||l(y())))},S=function(M){v!==""&&(M.keyCode===Xe.ENTER||M.type==="click")&&(b(""),l==null||l(y()))},T=function(){return r.some(function(M){return M.toString()===a.toString()})?r:r.concat([a]).sort(function(M,D){var R=Number.isNaN(Number(M))?0:Number(M),$=Number.isNaN(Number(D))?0:Number(D);return R-$})},I="".concat(u,"-options");if(!f&&!l)return null;var N=null,_=null,P=null;return f&&h&&(N=h({disabled:c,size:a,onSizeChange:function(M){o==null||o(Number(M))},"aria-label":i.page_size,className:"".concat(I,"-size-changer"),options:T().map(function(A){return{label:E(A),value:A}})})),l&&(s&&(P=typeof s=="boolean"?C.createElement("button",{type:"button",onClick:S,onKeyUp:S,disabled:c,className:"".concat(I,"-quick-jumper-button")},i.jump_to_confirm):C.createElement("span",{onClick:S,onKeyUp:S},s)),_=C.createElement("div",{className:"".concat(I,"-quick-jumper")},i.jump_to,C.createElement("input",{disabled:c,type:"text",value:v,onChange:x,onKeyUp:S,onBlur:O,"aria-label":i.page}),i.page,P)),C.createElement("li",{className:I},N,_)};process.env.NODE_ENV!=="production"&&(lC.displayName="Options");var Fa=function(t){var n=t.rootPrefixCls,r=t.page,i=t.active,o=t.className,a=t.showTitle,s=t.onClick,l=t.onKeyPress,u=t.itemRender,c="".concat(n,"-item"),d=ie(c,"".concat(c,"-").concat(r),V(V({},"".concat(c,"-active"),i),"".concat(c,"-disabled"),!r),o),f=function(){s(r)},h=function(v){l(v,s,r)},p=u(r,"page",C.createElement("a",{rel:"nofollow"},r));return p?C.createElement("li",{title:a?String(r):null,className:d,onClick:f,onKeyDown:h,tabIndex:0},p):null};process.env.NODE_ENV!=="production"&&(Fa.displayName="Pager");var fF=function(t,n,r){return r};function Am(){}function uC(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function zo(e,t,n){var r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}var cC=function(t){var n=t.prefixCls,r=n===void 0?"rc-pagination":n,i=t.selectPrefixCls,o=i===void 0?"rc-select":i,a=t.className,s=t.current,l=t.defaultCurrent,u=l===void 0?1:l,c=t.total,d=c===void 0?0:c,f=t.pageSize,h=t.defaultPageSize,p=h===void 0?10:h,g=t.onChange,v=g===void 0?Am:g,b=t.hideOnSinglePage,y=t.align,E=t.showPrevNextJumpers,x=E===void 0?!0:E,O=t.showQuickJumper,S=t.showLessItems,T=t.showTitle,I=T===void 0?!0:T,N=t.onShowSizeChange,_=N===void 0?Am:N,P=t.locale,A=P===void 0?cF:P,M=t.style,D=t.totalBoundaryShowSizeChanger,R=D===void 0?50:D,$=t.disabled,F=t.simple,B=t.showTotal,z=t.showSizeChanger,L=z===void 0?d>R:z,H=t.sizeChangerRender,W=t.pageSizeOptions,k=t.itemRender,G=k===void 0?fF:k,Y=t.jumpPrevIcon,te=t.jumpNextIcon,se=t.prevIcon,ce=t.nextIcon,ue=C.useRef(null),de=Cn(10,{value:f,defaultValue:p}),J=ae(de,2),Z=J[0],oe=J[1],X=Cn(1,{value:s,defaultValue:u,postState:function(gt){return Math.max(1,Math.min(gt,zo(void 0,Z,d)))}}),ee=ae(X,2),ne=ee[0],be=ee[1],Ce=C.useState(ne),Se=ae(Ce,2),ve=Se[0],he=Se[1];C.useEffect(function(){he(ne)},[ne]);var Ae=v!==Am,Ie="current"in t;process.env.NODE_ENV!=="production"&&bt(Ie?Ae:!0,"You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var me=Math.max(1,ne-(S?3:5)),Me=Math.min(zo(void 0,Z,d),ne+(S?3:5));function Q(rt,gt){var _t=rt||C.createElement("button",{type:"button","aria-label":gt,className:"".concat(r,"-item-link")});return typeof rt=="function"&&(_t=C.createElement(rt,U({},t))),_t}function le(rt){var gt=rt.target.value,_t=zo(void 0,Z,d),hn;return gt===""?hn=gt:Number.isNaN(Number(gt))?hn=ve:gt>=_t?hn=_t:hn=Number(gt),hn}function pe(rt){return uC(rt)&&rt!==ne&&uC(d)&&d>0}var ye=d>Z?O:!1;function Fe(rt){(rt.keyCode===Xe.UP||rt.keyCode===Xe.DOWN)&&rt.preventDefault()}function je(rt){var gt=le(rt);switch(gt!==ve&&he(gt),rt.keyCode){case Xe.ENTER:Le(gt);break;case Xe.UP:Le(gt-1);break;case Xe.DOWN:Le(gt+1);break}}function De(rt){Le(le(rt))}function we(rt){var gt=zo(rt,Z,d),_t=ne>gt&&gt!==0?gt:ne;oe(rt),he(_t),_==null||_(ne,rt),be(_t),v==null||v(_t,rt)}function Le(rt){if(pe(rt)&&!$){var gt=zo(void 0,Z,d),_t=rt;return rt>gt?_t=gt:rt<1&&(_t=1),_t!==ve&&he(_t),be(_t),v==null||v(_t,Z),_t}return ne}var Ue=ne>1,Te=ne<zo(void 0,Z,d);function Be(){Ue&&Le(ne-1)}function it(){Te&&Le(ne+1)}function Ct(){Le(me)}function Dt(){Le(Me)}function Pt(rt,gt){if(rt.key==="Enter"||rt.charCode===Xe.ENTER||rt.keyCode===Xe.ENTER){for(var _t=arguments.length,hn=new Array(_t>2?_t-2:0),_n=2;_n<_t;_n++)hn[_n-2]=arguments[_n];gt.apply(void 0,hn)}}function wt(rt){Pt(rt,Be)}function Ht(rt){Pt(rt,it)}function kt(rt){Pt(rt,Ct)}function at(rt){Pt(rt,Dt)}function dt(rt){var gt=G(rt,"prev",Q(se,"prev page"));return C.isValidElement(gt)?C.cloneElement(gt,{disabled:!Ue}):gt}function $e(rt){var gt=G(rt,"next",Q(ce,"next page"));return C.isValidElement(gt)?C.cloneElement(gt,{disabled:!Te}):gt}function Ve(rt){(rt.type==="click"||rt.keyCode===Xe.ENTER)&&Le(ve)}var Ye=null,ot=Nr(t,{aria:!0,data:!0}),Pe=B&&C.createElement("li",{className:"".concat(r,"-total-text")},B(d,[d===0?0:(ne-1)*Z+1,ne*Z>d?d:ne*Z])),_e=null,xe=zo(void 0,Z,d);if(b&&d<=Z)return null;var ze=[],qe={rootPrefixCls:r,onClick:Le,onKeyPress:Pt,showTitle:I,itemRender:G,page:-1},et=ne-1>0?ne-1:0,nt=ne+1<xe?ne+1:xe,mt=O&&O.goButton,vt=lt(F)==="object"?F.readOnly:!F,ht=mt,St=null;F&&(mt&&(typeof mt=="boolean"?ht=C.createElement("button",{type:"button",onClick:Ve,onKeyUp:Ve},A.jump_to_confirm):ht=C.createElement("span",{onClick:Ve,onKeyUp:Ve},mt),ht=C.createElement("li",{title:I?"".concat(A.jump_to).concat(ne,"/").concat(xe):null,className:"".concat(r,"-simple-pager")},ht)),St=C.createElement("li",{title:I?"".concat(ne,"/").concat(xe):null,className:"".concat(r,"-simple-pager")},vt?ve:C.createElement("input",{type:"text","aria-label":A.jump_to,value:ve,disabled:$,onKeyDown:Fe,onKeyUp:je,onChange:je,onBlur:De,size:3}),C.createElement("span",{className:"".concat(r,"-slash")},"/"),xe));var At=S?1:2;if(xe<=3+At*2){xe||ze.push(C.createElement(Fa,Re({},qe,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var Bt=1;Bt<=xe;Bt+=1)ze.push(C.createElement(Fa,Re({},qe,{key:Bt,page:Bt,active:ne===Bt})))}else{var en=S?A.prev_3:A.prev_5,fn=S?A.next_3:A.next_5,Ut=G(me,"jump-prev",Q(Y,"prev page")),Rt=G(Me,"jump-next",Q(te,"next page"));x&&(Ye=Ut?C.createElement("li",{title:I?en:null,key:"prev",onClick:Ct,tabIndex:0,onKeyDown:kt,className:ie("".concat(r,"-jump-prev"),V({},"".concat(r,"-jump-prev-custom-icon"),!!Y))},Ut):null,_e=Rt?C.createElement("li",{title:I?fn:null,key:"next",onClick:Dt,tabIndex:0,onKeyDown:at,className:ie("".concat(r,"-jump-next"),V({},"".concat(r,"-jump-next-custom-icon"),!!te))},Rt):null);var tt=Math.max(1,ne-At),He=Math.min(ne+At,xe);ne-1<=At&&(He=1+At*2),xe-ne<=At&&(tt=xe-At*2);for(var ke=tt;ke<=He;ke+=1)ze.push(C.createElement(Fa,Re({},qe,{key:ke,page:ke,active:ne===ke})));if(ne-1>=At*2&&ne!==3&&(ze[0]=C.cloneElement(ze[0],{className:ie("".concat(r,"-item-after-jump-prev"),ze[0].props.className)}),ze.unshift(Ye)),xe-ne>=At*2&&ne!==xe-2){var Oe=ze[ze.length-1];ze[ze.length-1]=C.cloneElement(Oe,{className:ie("".concat(r,"-item-before-jump-next"),Oe.props.className)}),ze.push(_e)}tt!==1&&ze.unshift(C.createElement(Fa,Re({},qe,{key:1,page:1}))),He!==xe&&ze.push(C.createElement(Fa,Re({},qe,{key:xe,page:xe})))}var Qe=dt(et);if(Qe){var ut=!Ue||!xe;Qe=C.createElement("li",{title:I?A.prev_page:null,onClick:Be,tabIndex:ut?null:0,onKeyDown:wt,className:ie("".concat(r,"-prev"),V({},"".concat(r,"-disabled"),ut)),"aria-disabled":ut},Qe)}var pt=$e(nt);if(pt){var $t,sn;F?($t=!Te,sn=Ue?0:null):($t=!Te||!xe,sn=$t?null:0),pt=C.createElement("li",{title:I?A.next_page:null,onClick:it,tabIndex:sn,onKeyDown:Ht,className:ie("".concat(r,"-next"),V({},"".concat(r,"-disabled"),$t)),"aria-disabled":$t},pt)}var jt=ie(r,a,V(V(V(V(V({},"".concat(r,"-start"),y==="start"),"".concat(r,"-center"),y==="center"),"".concat(r,"-end"),y==="end"),"".concat(r,"-simple"),F),"".concat(r,"-disabled"),$));return C.createElement("ul",Re({className:jt,style:M,ref:ue},ot),Pe,Qe,F?St:ze,pt,C.createElement(lC,{locale:A,rootPrefixCls:r,disabled:$,selectPrefixCls:o,changeSize:we,pageSize:Z,pageSizeOptions:W,quickGo:ye?Le:null,goButton:ht,showSizeChanger:L,sizeChangerRender:H}))};process.env.NODE_ENV!=="production"&&(cC.displayName="Pagination");const hF=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},mF=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:fe(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:fe(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:fe(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
249
249
  &${t}-mini ${t}-prev ${t}-item-link,
250
250
  &${t}-mini ${t}-next ${t}-item-link
251
251
  `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:fe(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:fe(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:fe(e.itemSizeSM),input:Object.assign(Object.assign({},um(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},pF=e=>{const{componentCls:t}=e;return{[`
@@ -276,23 +276,23 @@ html body {
276
276
  ${t}-collapse,
277
277
  ${t}-edit,
278
278
  ${t}-copy
279
- `]:Object.assign(Object.assign({},db(e)),{marginInlineStart:e.marginXXS})}),EB(e)),SB(e)),CB()),{"&-rtl":{direction:"rtl"}})}},LC=wn("Typography",e=>[wB(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),xB=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:u,onCancel:c,onEnd:d,component:f,enterIcon:h=m.createElement(TC,null)}=e,p=m.useRef(null),g=m.useRef(!1),v=m.useRef(null),[b,y]=m.useState(l);m.useEffect(()=>{y(l)},[l]),m.useEffect(()=>{var D;if(!((D=p.current)===null||D===void 0)&&D.resizableTextArea){const{textArea:R}=p.current.resizableTextArea;R.focus();const{length:$}=R.value;R.setSelectionRange($,$)}},[]);const E=({target:D})=>{y(D.value.replace(/[\n\r]/g,""))},x=()=>{g.current=!0},O=()=>{g.current=!1},S=({keyCode:D})=>{g.current||(v.current=D)},T=()=>{u(b.trim())},I=({keyCode:D,ctrlKey:R,altKey:$,metaKey:F,shiftKey:B})=>{v.current!==D||g.current||R||$||F||B||(D===Xe.ENTER?(T(),d==null||d()):D===Xe.ESC&&c())},N=()=>{T()},[_,P,A]=LC(t),M=ie(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${f}`]:!!f},r,P,A);return _(m.createElement("div",{className:M,style:i},m.createElement(oF,{ref:p,maxLength:a,value:b,onChange:E,onKeyDown:S,onKeyUp:I,onCompositionStart:x,onCompositionEnd:O,onBlur:N,"aria-label":n,rows:1,autoSize:s}),h!==null?As(h,{className:`${t}-edit-content-confirm`}):null))};var TB=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},OB=TB,DC={"text/plain":"Text","text/html":"Url",default:"Text"},NB="Copy to clipboard: #{key}, Enter";function _B(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function IB(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{i=OB(),o=document.createRange(),a=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(c){if(c.stopPropagation(),t.format)if(c.preventDefault(),typeof c.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=DC[t.format]||DC.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=_B("message"in t?t.message:NB),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var AB=IB;const PB=Ul(AB);var MB=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})};const LB=({copyConfig:e,children:t})=>{const[n,r]=m.useState(!1),[i,o]=m.useState(!1),a=m.useRef(null),s=()=>{a.current&&clearTimeout(a.current)},l={};e.format&&(l.format=e.format),m.useEffect(()=>s,[]);const u=an(c=>MB(void 0,void 0,void 0,function*(){var d;c==null||c.preventDefault(),c==null||c.stopPropagation(),o(!0);try{const f=typeof e.text=="function"?yield e.text():e.text;PB(f||kF(t,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=e.onCopy)===null||d===void 0||d.call(e,c)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:u}};function Dm(e,t){return m.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const DB=e=>{const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e}),t.current},kB=(e,t,n)=>C.useMemo(()=>e===!0?{title:t??n}:C.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var RB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const km=m.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:u}=e,c=RB(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:p}=Gn("typography"),g=l??f,v=a?dr(t,a):t,b=d("typography",n);process.env.NODE_ENV!=="production"&&on("Typography").deprecated(!a,"setContentRef","ref");const[y,E,x]=LC(b),O=ie(b,h,{[`${b}-rtl`]:g==="rtl"},i,o,E,x),S=Object.assign(Object.assign({},p),u);return y(m.createElement(r,Object.assign({className:O,style:S,ref:v},c),s))});process.env.NODE_ENV!=="production"&&(km.displayName="Typography");function kC(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Rm(e,t,n){return e===!0||e===void 0?t:e||n&&t}function $B(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const $m=e=>["string","number"].includes(typeof e),FB=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const u=kC(i),c=kC(o),{copied:d,copy:f}=n??{},h=t?d:f,p=Rm(u[t?1:0],h),g=typeof p=="string"?p:h;return m.createElement(Ki,{title:p},m.createElement("button",{type:"button",className:ie(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:s,"aria-label":g,tabIndex:a},t?Rm(c[1],m.createElement(Xh,null),!0):Rm(c[0],l?m.createElement(wa,null):m.createElement(CC,null),!0)))},Ec=m.forwardRef(({style:e,children:t},n)=>{const r=m.useRef(null);return m.useImperativeHandle(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),m.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),BB=e=>e.reduce((t,n)=>t+($m(n)?String(n).length:1),0);function RC(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],s=$m(o)?String(o).length:1,l=n+s;if(l>t){const u=t-n;return r.push(String(o).slice(0,u)),r}r.push(o),n=l}return e}const Fm=0,Bm=1,zm=2,Hm=3,$C=4,Sc={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function zB(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=e,u=m.useMemo(()=>mr(r),[r]),c=m.useMemo(()=>BB(u),[r]),d=m.useMemo(()=>i(u,!1),[r]),[f,h]=m.useState(null),p=m.useRef(null),g=m.useRef(null),v=m.useRef(null),b=m.useRef(null),y=m.useRef(null),[E,x]=m.useState(!1),[O,S]=m.useState(Fm),[T,I]=m.useState(0),[N,_]=m.useState(null);Kt(()=>{S(t&&n&&c?Bm:Fm)},[n,r,o,t,u]),Kt(()=>{var D,R,$,F;if(O===Bm){S(zm);const B=g.current&&getComputedStyle(g.current).whiteSpace;_(B)}else if(O===zm){const B=!!(!((D=v.current)===null||D===void 0)&&D.isExceed());S(B?Hm:$C),h(B?[0,c]:null),x(B);const z=((R=v.current)===null||R===void 0?void 0:R.getHeight())||0,L=o===1?0:(($=b.current)===null||$===void 0?void 0:$.getHeight())||0,H=((F=y.current)===null||F===void 0?void 0:F.getHeight())||0,W=Math.max(z,L+H);I(W+1),l(B)}},[O]);const P=f?Math.ceil((f[0]+f[1])/2):0;Kt(()=>{var D;const[R,$]=f||[0,0];if(R!==$){const B=(((D=p.current)===null||D===void 0?void 0:D.getHeight())||0)>T;let z=P;$-R===1&&(z=B?R:$),h(B?[R,z]:[z,$])}},[f,P]);const A=m.useMemo(()=>{if(!t)return i(u,!1);if(O!==Hm||!f||f[0]!==f[1]){const D=i(u,!1);return[$C,Fm].includes(O)?D:m.createElement("span",{style:Object.assign(Object.assign({},Sc),{WebkitLineClamp:o})},D)}return i(a?u:RC(u,f[0]),E)},[a,O,f,u].concat(Ke(s))),M={width:n,margin:0,padding:0,whiteSpace:N==="nowrap"?"normal":"inherit"};return m.createElement(m.Fragment,null,A,O===zm&&m.createElement(m.Fragment,null,m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:o}),ref:v},d),m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:o-1}),ref:b},d),m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:1}),ref:y},i([],!0))),O===Hm&&f&&f[0]!==f[1]&&m.createElement(Ec,{style:Object.assign(Object.assign({},M),{top:400}),ref:p},i(RC(u,P),!0)),O===Bm&&m.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const FC=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:m.createElement(Ki,Object.assign({open:t?void 0:!1},r),n);process.env.NODE_ENV!=="production"&&(FC.displayName="EllipsisTooltip");var HB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function jB({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:o,italic:a},s){let l=s;function u(c,d){d&&(l=m.createElement(c,{},l))}return u("strong",i),u("u",n),u("del",r),u("code",t),u("mark",e),u("kbd",o),u("i",a),l}const VB="...",BC=["delete","mark","code","underline","strong","keyboard","italic"],Cc=m.forwardRef((e,t)=>{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:u,editable:c,copyable:d,component:f,title:h}=e,p=HB(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:g,direction:v}=m.useContext(Qt),[b]=Vi("Text"),y=m.useRef(null),E=m.useRef(null),x=g("typography",r),O=_r(p,BC),[S,T]=Dm(c),[I,N]=Cn(!1,{value:T.editing}),{triggerType:_=["icon"]}=T,P=Te=>{var Be;Te&&((Be=T.onStart)===null||Be===void 0||Be.call(T)),N(Te)},A=DB(I);Kt(()=>{var Te;!I&&A&&((Te=E.current)===null||Te===void 0||Te.focus())},[I]);const M=Te=>{Te==null||Te.preventDefault(),P(!0)},D=Te=>{var Be;(Be=T.onChange)===null||Be===void 0||Be.call(T,Te),P(!1)},R=()=>{var Te;(Te=T.onCancel)===null||Te===void 0||Te.call(T),P(!1)},[$,F]=Dm(d),{copied:B,copyLoading:z,onClick:L}=LB({copyConfig:F,children:l}),[H,W]=m.useState(!1),[k,G]=m.useState(!1),[Y,te]=m.useState(!1),[se,ce]=m.useState(!1),[ue,de]=m.useState(!0),[J,Z]=Dm(u,{expandable:!1,symbol:Te=>Te?b==null?void 0:b.collapse:b==null?void 0:b.expand}),[oe,X]=Cn(Z.defaultExpanded||!1,{value:Z.expanded}),ee=J&&(!oe||Z.expandable==="collapsible"),{rows:ne=1}=Z,be=m.useMemo(()=>ee&&(Z.suffix!==void 0||Z.onEllipsis||Z.expandable||S||$),[ee,Z,S,$]);Kt(()=>{J&&!be&&(W(i1("webkitLineClamp")),G(i1("textOverflow")))},[be,J]);const[Ce,Se]=m.useState(ee),ve=m.useMemo(()=>be?!1:ne===1?k:H,[be,k,H]);Kt(()=>{Se(ve&&ee)},[ve,ee]);const he=ee&&(Ce?se:Y),Ae=ee&&ne===1&&Ce,Ie=ee&&ne>1&&Ce,me=(Te,Be)=>{var it;X(Be.expanded),(it=Z.onExpand)===null||it===void 0||it.call(Z,Te,Be)},[Me,Q]=m.useState(0),le=({offsetWidth:Te})=>{Q(Te)},pe=Te=>{var Be;te(Te),Y!==Te&&((Be=Z.onEllipsis)===null||Be===void 0||Be.call(Z,Te))};m.useEffect(()=>{const Te=y.current;if(J&&Ce&&Te){const Be=$B(Te);se!==Be&&ce(Be)}},[J,Ce,l,Ie,ue,Me]),m.useEffect(()=>{const Te=y.current;if(typeof IntersectionObserver>"u"||!Te||!Ce||!ee)return;const Be=new IntersectionObserver(()=>{de(!!Te.offsetParent)});return Be.observe(Te),()=>{Be.disconnect()}},[Ce,ee]);const ye=kB(Z.tooltip,T.text,l),Fe=m.useMemo(()=>{if(!(!J||Ce))return[T.text,l,h,ye.title].find($m)},[J,Ce,h,ye.title,he]);if(I)return m.createElement(xB,{value:(n=T.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:D,onCancel:R,onEnd:T.onEnd,prefixCls:x,className:i,style:o,direction:v,component:f,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});const je=()=>{const{expandable:Te,symbol:Be}=Z;return Te?m.createElement("button",{type:"button",key:"expand",className:`${x}-${oe?"collapse":"expand"}`,onClick:it=>me(it,{expanded:!oe}),"aria-label":oe?b.collapse:b==null?void 0:b.expand},typeof Be=="function"?Be(oe):Be):null},De=()=>{if(!S)return;const{icon:Te,tooltip:Be,tabIndex:it}=T,wt=mr(Be)[0]||(b==null?void 0:b.edit),Dt=typeof wt=="string"?wt:"";return _.includes("icon")?m.createElement(Ki,{key:"edit",title:Be===!1?"":wt},m.createElement("button",{type:"button",ref:E,className:`${x}-edit`,onClick:M,"aria-label":Dt,tabIndex:it},Te||m.createElement(xC,{role:"button"}))):null},we=()=>$?m.createElement(FB,Object.assign({key:"copy"},F,{prefixCls:x,copied:B,locale:b,onCopy:L,loading:z,iconOnly:l==null})):null,Le=Te=>[Te&&je(),De(),we()],Ue=Te=>[Te&&!oe&&m.createElement("span",{"aria-hidden":!0,key:"ellipsis"},VB),Z.suffix,Le(Te)];return m.createElement(pr,{onResize:le,disabled:!ee},Te=>m.createElement(FC,{tooltipProps:ye,enableEllipsis:ee,isEllipsis:he},m.createElement(km,Object.assign({className:ie({[`${x}-${a}`]:a,[`${x}-disabled`]:s,[`${x}-ellipsis`]:J,[`${x}-ellipsis-single-line`]:Ae,[`${x}-ellipsis-multiple-line`]:Ie},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:Ie?ne:void 0}),component:f,ref:dr(Te,y,t),direction:v,onClick:_.includes("text")?M:void 0,"aria-label":Fe==null?void 0:Fe.toString(),title:h},O),m.createElement(zB,{enableMeasure:ee&&!Ce,text:l,rows:ne,width:Me,onEllipsis:pe,expanded:oe,miscDeps:[B,oe,z,S,$,b].concat(Ke(BC.map(Be=>e[Be])))},(Be,it)=>jB(e,m.createElement(m.Fragment,null,Be.length>0&&it&&!oe&&Fe?m.createElement("span",{key:"show-content","aria-hidden":!0},Be):Be,Ue(it)))))))});var UB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const WB=m.forwardRef((e,t)=>{var{ellipsis:n,rel:r}=e,i=UB(e,["ellipsis","rel"]);if(process.env.NODE_ENV!=="production"){const a=on("Typography.Link");process.env.NODE_ENV!=="production"&&a(typeof n!="object","usage","`ellipsis` only supports boolean value.")}const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,m.createElement(Cc,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),YB=m.forwardRef((e,t)=>m.createElement(Cc,Object.assign({ref:t},e,{component:"div"})));var qB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const XB=(e,t)=>{var{ellipsis:n}=e,r=qB(e,["ellipsis"]);const i=m.useMemo(()=>n&&typeof n=="object"?_r(n,["expandable","rows"]):n,[n]);if(process.env.NODE_ENV!=="production"){const o=on("Typography.Text");process.env.NODE_ENV!=="production"&&o(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props.")}return m.createElement(Cc,Object.assign({ref:t},r,{ellipsis:i,component:"span"}))},KB=m.forwardRef(XB);var GB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const zC=[1,2,3,4,5],QB=m.forwardRef((e,t)=>{const{level:n=1}=e,r=GB(e,["level"]);if(process.env.NODE_ENV!=="production"){const o=on("Typography.Title");process.env.NODE_ENV!=="production"&&o(zC.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.")}const i=zC.includes(n)?`h${n}`:"h1";return m.createElement(Cc,Object.assign({ref:t},r,{component:i}))}),dn=km;dn.Text=KB,dn.Link=WB,dn.Title=QB,dn.Paragraph=YB;const HC=C.forwardRef((e,t)=>{const{prefixCls:n,className:r,children:i,size:o,style:a={}}=e,s=ie(`${n}-panel`,{[`${n}-panel-hidden`]:o===0},r),l=o!==void 0;return C.createElement("div",{ref:t,className:s,style:Object.assign(Object.assign({},a),{flexBasis:l?o:"auto",flexGrow:l?0:1})},i)});process.env.NODE_ENV!=="production"&&(HC.displayName="Panel");const ZB=()=>null;var JB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function e9(e){if(e&&typeof e=="object")return e;const t=!!e;return{start:t,end:t}}function t9(e){return m.useMemo(()=>mr(e).filter(n=>m.isValidElement(n)).map(n=>{const{props:r}=n,{collapsible:i}=r,o=JB(r,["collapsible"]);return Object.assign(Object.assign({},o),{collapsible:e9(i)})}),[e])}function n9(e,t,n){return m.useMemo(()=>{const r=[];for(let i=0;i<e.length-1;i+=1){const o=e[i],a=e[i+1],s=t[i],l=t[i+1],{resizable:u=!0,min:c,collapsible:d}=o,{resizable:f=!0,min:h,collapsible:p}=a,g=u&&f&&(s!==0||!c)&&(l!==0||!h),v=d.end&&s>0||p.start&&l===0&&s>0,b=p.start&&l>0||d.end&&s===0&&l>0;r[i]={resizable:g,startCollapsible:!!(n?b:v),endCollapsible:!!(n?v:b)}}return r},[t,e])}function wc(e){return Number(e.slice(0,-1))/100}function jm(e){return typeof e=="string"&&e.endsWith("%")}function r9(e,t){const n=e.map(p=>p.size),r=e.length,i=t||0,o=p=>p*i,[a,s]=C.useState(()=>e.map(p=>p.defaultSize)),l=C.useMemo(()=>{var p;const g=[];for(let v=0;v<r;v+=1)g[v]=(p=n[v])!==null&&p!==void 0?p:a[v];return g},[r,a,n]),u=C.useMemo(()=>{let p=[],g=0;for(let b=0;b<r;b+=1){const y=l[b];if(jm(y))p[b]=wc(y);else if(y||y===0){const E=Number(y);Number.isNaN(E)||(p[b]=E/i)}else g+=1,p[b]=void 0}const v=p.reduce((b,y)=>b+(y||0),0);if(v>1||!g){const b=1/v;p=p.map(y=>y===void 0?0:y*b)}else{const b=(1-v)/g;p=p.map(y=>y===void 0?b:y)}return p},[l,i]),c=C.useMemo(()=>u.map(o),[u,i]),d=C.useMemo(()=>e.map(p=>jm(p.min)?wc(p.min):(p.min||0)/i),[e,i]),f=C.useMemo(()=>e.map(p=>jm(p.max)?wc(p.max):(p.max||i)/i),[e,i]);return[C.useMemo(()=>t?c:l,[c,t]),c,u,d,f,s]}function i9(e,t,n,r,i,o){const a=e.map(x=>[x.min,x.max]),s=r||0,l=x=>x*s;function u(x,O){return typeof x=="string"?l(wc(x)):x??O}const[c,d]=m.useState([]),f=m.useRef([]),[h,p]=m.useState(null),g=()=>n.map(l);return[x=>{d(g()),p({index:x,confirmed:!1})},(x,O)=>{var S;let T=null;if((!h||!h.confirmed)&&O!==0){if(O>0)T=x,p({index:x,confirmed:!0});else for(let $=x;$>=0;$-=1)if(c[$]>0&&t[$].resizable){T=$,p({index:$,confirmed:!0});break}}const I=(S=T??(h==null?void 0:h.index))!==null&&S!==void 0?S:x,N=Ke(c),_=I+1,P=u(a[I][0],0),A=u(a[_][0],0),M=u(a[I][1],s),D=u(a[_][1],s);let R=O;return N[I]+R<P&&(R=P-N[I]),N[_]-R<A&&(R=N[_]-A),N[I]+R>M&&(R=M-N[I]),N[_]-R>D&&(R=N[_]-D),N[I]+=R,N[_]-=R,i(N),N},()=>{p(null)},(x,O)=>{const S=g(),T=o?O==="start"?"end":"start":O,I=T==="start"?x:x+1,N=T==="start"?x+1:x,_=S[I],P=S[N];if(_!==0&&P!==0)S[I]=0,S[N]+=_,f.current[x]=_;else{const A=_+P,M=u(a[I][0],0),D=u(a[I][1],s),R=u(a[N][0],0),$=u(a[N][1],s),F=Math.max(M,A-$),B=Math.min(D,A-R),z=R||(B-F)/2,L=f.current[x],H=A-L;L&&L<=$&&L>=R&&H<=D&&H>=M?(S[N]=L,S[I]=H):(S[I]-=z,S[N]+=z)}return i(S),S},h==null?void 0:h.index]}function Vm(e){return typeof e=="number"&&!Number.isNaN(e)?Math.round(e):0}const o9=e=>{const{prefixCls:t,vertical:n,index:r,active:i,ariaNow:o,ariaMin:a,ariaMax:s,resizable:l,startCollapsible:u,endCollapsible:c,onOffsetStart:d,onOffsetUpdate:f,onOffsetEnd:h,onCollapse:p,lazy:g,containerSize:v}=e,b=`${t}-bar`,[y,E]=C.useState(null),[x,O]=C.useState(0),S=n?0:x,T=n?x:0,I=$=>{l&&$.currentTarget&&(E([$.pageX,$.pageY]),d(r))},N=$=>{if(l&&$.touches.length===1){const F=$.touches[0];E([F.pageX,F.pageY]),d(r)}},_=$=>{const F=v*o/100,B=F+$,z=Math.max(0,v*a/100),L=Math.min(v,v*s/100);return Math.max(z,Math.min(L,B))-F},P=an(($,F)=>{const B=_(n?F:$);O(B)}),A=an(()=>{f(r,S,T,!0),O(0),h(!0)});C.useEffect(()=>{if(y){const $=L=>{const{pageX:H,pageY:W}=L,k=H-y[0],G=W-y[1];g?P(k,G):f(r,k,G)},F=()=>{g?A():h(),E(null)},B=L=>{if(L.touches.length===1){const H=L.touches[0],W=H.pageX-y[0],k=H.pageY-y[1];g?P(W,k):f(r,W,k)}},z=()=>{g?A():h(),E(null)};return window.addEventListener("touchmove",B),window.addEventListener("touchend",z),window.addEventListener("mousemove",$),window.addEventListener("mouseup",F),()=>{window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",F),window.removeEventListener("touchmove",B),window.removeEventListener("touchend",z)}}},[y,g,n,r,v,o,a,s]);const M={[`--${b}-preview-offset`]:`${x}px`},D=n?DS:ic,R=n?Kh:Fu;return C.createElement("div",{className:b,role:"separator","aria-valuenow":Vm(o),"aria-valuemin":Vm(a),"aria-valuemax":Vm(s)},g&&C.createElement("div",{className:ie(`${b}-preview`,{[`${b}-preview-active`]:!!x}),style:M}),C.createElement("div",{className:ie(`${b}-dragger`,{[`${b}-dragger-disabled`]:!l,[`${b}-dragger-active`]:i}),onMouseDown:I,onTouchStart:N}),u&&C.createElement("div",{className:ie(`${b}-collapse-bar`,`${b}-collapse-bar-start`),onClick:()=>p(r,"start")},C.createElement(D,{className:ie(`${b}-collapse-icon`,`${b}-collapse-start`)})),c&&C.createElement("div",{className:ie(`${b}-collapse-bar`,`${b}-collapse-bar-end`),onClick:()=>p(r,"end")},C.createElement(R,{className:ie(`${b}-collapse-icon`,`${b}-collapse-end`)})))},a9=e=>{const{componentCls:t}=e;return{[`&-rtl${t}-horizontal`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:0,insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"unset",insetInlineStart:0}}},[`&-rtl${t}-vertical`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:"50%",insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"50%",insetInlineStart:"unset"}}}}},xc={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},s9=e=>{const{componentCls:t,colorFill:n,splitBarDraggableSize:r,splitBarSize:i,splitTriggerSize:o,controlItemBgHover:a,controlItemBgActive:s,controlItemBgActiveHover:l,prefixCls:u}=e,c=`${t}-bar`,d=`${t}-mask`,f=`${t}-panel`,h=e.calc(o).div(2).equal(),p=`${u}-bar-preview-offset`,g={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${c}`]:{flex:"none",position:"relative",userSelect:"none",[`${c}-dragger`]:Object.assign(Object.assign({},xc),{zIndex:1,"&::before":Object.assign({content:'""',background:a},xc),"&::after":Object.assign({content:'""',background:n},xc),[`&:hover:not(${c}-dragger-active)`]:{"&::before":{background:s}},"&-active":{zIndex:2,"&::before":{background:l}},[`&-disabled${c}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:a}},"&::after":{display:"none"}}}),[`${c}-collapse-bar`]:Object.assign(Object.assign({},xc),{zIndex:e.zIndexPopupBase,background:a,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","@media(hover:none)":{opacity:1},"&:hover":{background:s},"&:active":{background:l}}),"&:hover, &:active":{[`${c}-collapse-bar`]:{opacity:1}}},[d]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${c}`]:{width:0,[`${c}-preview`]:Object.assign(Object.assign({height:"100%",width:i},g),{[`&${c}-preview-active`]:{display:"block",transform:`translateX(var(--${p}))`}}),[`${c}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:i},"&::after":{height:r,width:i}},[`${c}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:h},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:h},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${c}`]:{height:0,[`${c}-preview`]:Object.assign(Object.assign({height:i,width:"100%"},g),{[`&${c}-preview-active`]:{display:"block",transform:`translateY(var(--${p}))`}}),[`${c}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:i},"&::after":{width:r,height:i}},[`${c}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:h,transform:"translateX(-50%)"},"&-end":{top:h,bottom:"auto",transform:"translateX(-50%)"}}}},[f]:{overflow:"auto",padding:"0 1px",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{padding:0,overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"}}}),a9(e))}},l9=wn("Splitter",e=>[s9(e)],e=>{var t;const n=e.splitBarSize||2,r=e.splitTriggerSize||6,i=e.resizeSpinnerSize||20,o=(t=e.splitBarDraggableSize)!==null&&t!==void 0?t:i;return{splitBarSize:n,splitTriggerSize:r,splitBarDraggableSize:o,resizeSpinnerSize:i}}),jC=e=>{const{prefixCls:t,className:n,style:r,layout:i="horizontal",children:o,rootClassName:a,onResizeStart:s,onResize:l,onResizeEnd:u,lazy:c}=e,{getPrefixCls:d,direction:f,className:h,style:p}=Gn("splitter"),g=d("splitter",t),v=Wi(g),[b,y,E]=l9(g,v),x=i==="vertical",O=f==="rtl",S=!x&&O,T=t9(o);if(process.env.NODE_ENV!=="production"){const J=on("Splitter");let Z=!1,oe=!1;T.forEach(X=>{X.size!==void 0?Z=!0:oe=!0}),Z&&oe&&!l&&process.env.NODE_ENV!=="production"&&J(!1,"usage","When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.")}const[I,N]=C.useState(),_=J=>{const{offsetWidth:Z,offsetHeight:oe}=J,X=x?oe:Z;X!==0&&N(X)},[P,A,M,D,R,$]=r9(T,I),F=n9(T,A,O),[B,z,L,H,W]=i9(T,F,M,I,$,O),k=an(J=>{B(J),s==null||s(A)}),G=an((J,Z,oe)=>{const X=z(J,Z);oe?u==null||u(X):l==null||l(X)}),Y=an(J=>{L(),J||u==null||u(A)}),te=an((J,Z)=>{const oe=H(J,Z);l==null||l(oe),u==null||u(oe)}),se=ie(g,n,`${g}-${i}`,{[`${g}-rtl`]:O},a,h,E,v,y),ce=`${g}-mask`,ue=C.useMemo(()=>{const J=[];let Z=0;for(let oe=0;oe<T.length;oe+=1)Z+=M[oe],J.push(Z);return J},[M]),de=Object.assign(Object.assign({},p),r);return b(C.createElement(pr,{onResize:_},C.createElement("div",{style:de,className:se},T.map((J,Z)=>{const oe=C.createElement(HC,Object.assign({},J,{prefixCls:g,size:P[Z]}));let X=null;const ee=F[Z];if(ee){const ne=(ue[Z-1]||0)+D[Z],be=(ue[Z+1]||100)-R[Z+1],Ce=(ue[Z-1]||0)+R[Z],Se=(ue[Z+1]||100)-D[Z+1];X=C.createElement(o9,{lazy:c,index:Z,active:W===Z,prefixCls:g,vertical:x,resizable:ee.resizable,ariaNow:ue[Z]*100,ariaMin:Math.max(ne,be)*100,ariaMax:Math.min(Ce,Se)*100,startCollapsible:ee.startCollapsible,endCollapsible:ee.endCollapsible,onOffsetStart:k,onOffsetUpdate:(ve,he,Ae,Ie)=>{let me=x?Ae:he;S&&(me=-me),G(ve,me,Ie)},onOffsetEnd:Y,onCollapse:te,containerSize:I||0})}return C.createElement(C.Fragment,{key:`split-panel-${Z}`},oe,X)}),typeof W=="number"&&C.createElement("div",{"aria-hidden":!0,className:ie(ce,`${ce}-${i}`)}))))};process.env.NODE_ENV!=="production"&&(jC.displayName="Splitter");const Tc=jC;Tc.Panel=ZB;var ct={},Um={exports:{}};(function(e,t){(function(n,r){var i="1.0.40",o="",a="?",s="function",l="undefined",u="object",c="string",d="major",f="model",h="name",p="type",g="vendor",v="version",b="architecture",y="console",E="mobile",x="tablet",O="smarttv",S="wearable",T="embedded",I=500,N="Amazon",_="Apple",P="ASUS",A="BlackBerry",M="Browser",D="Chrome",R="Edge",$="Firefox",F="Google",B="Huawei",z="LG",L="Microsoft",H="Motorola",W="Opera",k="Samsung",G="Sharp",Y="Sony",te="Xiaomi",se="Zebra",ce="Facebook",ue="Chromium OS",de="Mac OS",J=" Browser",Z=function(Q,le){var pe={};for(var ye in Q)le[ye]&&le[ye].length%2===0?pe[ye]=le[ye].concat(Q[ye]):pe[ye]=Q[ye];return pe},oe=function(Q){for(var le={},pe=0;pe<Q.length;pe++)le[Q[pe].toUpperCase()]=Q[pe];return le},X=function(Q,le){return typeof Q===c?ee(le).indexOf(ee(Q))!==-1:!1},ee=function(Q){return Q.toLowerCase()},ne=function(Q){return typeof Q===c?Q.replace(/[^\d\.]/g,o).split(".")[0]:r},be=function(Q,le){if(typeof Q===c)return Q=Q.replace(/^\s\s*/,o),typeof le===l?Q:Q.substring(0,I)},Ce=function(Q,le){for(var pe=0,ye,Fe,je,De,we,Le;pe<le.length&&!we;){var Ue=le[pe],Te=le[pe+1];for(ye=Fe=0;ye<Ue.length&&!we&&Ue[ye];)if(we=Ue[ye++].exec(Q),we)for(je=0;je<Te.length;je++)Le=we[++Fe],De=Te[je],typeof De===u&&De.length>0?De.length===2?typeof De[1]==s?this[De[0]]=De[1].call(this,Le):this[De[0]]=De[1]:De.length===3?typeof De[1]===s&&!(De[1].exec&&De[1].test)?this[De[0]]=Le?De[1].call(this,Le,De[2]):r:this[De[0]]=Le?Le.replace(De[1],De[2]):r:De.length===4&&(this[De[0]]=Le?De[3].call(this,Le.replace(De[1],De[2])):r):this[De]=Le||r;pe+=2}},Se=function(Q,le){for(var pe in le)if(typeof le[pe]===u&&le[pe].length>0){for(var ye=0;ye<le[pe].length;ye++)if(X(le[pe][ye],Q))return pe===a?r:pe}else if(X(le[pe],Q))return pe===a?r:pe;return le.hasOwnProperty("*")?le["*"]:Q},ve={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},he={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ae={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,v],[/opios[\/ ]+([\w\.]+)/i],[v,[h,W+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[h,W+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[h,W]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[h,"UC"+M]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[h,"Smart Lenovo "+M]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+M],v],[/\bfocus\/([\w\.]+)/i],[v,[h,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[h,W+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[h,W+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[h,"MIUI"+J]],[/fxios\/([\w\.-]+)/i],[v,[h,$]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+J],v],[/samsungbrowser\/([\w\.]+)/i],[v,[h,k+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ce],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[h,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,D+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[h,"Android "+M]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[v,Se,ve]],[/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[h,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,ee]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b,/ower/,o,ee]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,ee]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,k],[p,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,k],[p,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,_],[p,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,_],[p,x]],[/(macintosh);/i],[f,[g,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,G],[p,E]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[g,"Honor"],[p,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[g,B],[p,x]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,B],[p,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[g,te],[p,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[g,te],[p,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,"OPPO"],[p,E]],[/\b(opd2\d{3}a?) bui/i],[f,[g,"OPPO"],[p,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[p,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[p,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,H],[p,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,H],[p,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,z],[p,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,z],[p,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[g,"Lenovo"],[p,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[g,"Nokia"],[p,E]],[/(pixel c)\b/i],[f,[g,F],[p,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,F],[p,E]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,Y],[p,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,Y],[p,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,"OnePlus"],[p,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,N],[p,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,N],[p,E]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[p,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,A],[p,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,P],[p,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,P],[p,E]],[/(nexus 9)/i],[f,[g,"HTC"],[p,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[p,E]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[g,"TCL"],[p,x]],[/(itel) ((\w+))/i],[[g,ee],f,[p,Se,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[p,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[p,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[g,"Ulefone"],[p,E]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[g,"Energizer"],[p,E]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[g,"Cat"],[p,E]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[g,"Smartfren"],[p,E]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[g,"Nothing"],[p,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[p,E]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[p,x]],[/(surface duo)/i],[f,[g,L],[p,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[p,E]],[/(u304aa)/i],[f,[g,"AT&T"],[p,E]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[p,E]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[p,x]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[p,x]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[p,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[p,x]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[p,x]],[/\b(k88) b/i],[f,[g,"ZTE"],[p,x]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[p,E]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[p,E]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[p,x]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[p,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[p,x]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[p,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[p,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[p,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[p,E]],[/\b(ph-1) /i],[f,[g,"Essential"],[p,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[p,x]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[p,x]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[p,x]],[/(shield[\w ]+) b/i],[f,[g,"Nvidia"],[p,x]],[/(sprint) (\w+)/i],[g,f,[p,E]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,L],[p,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,se],[p,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,se],[p,E]],[/smart-tv.+(samsung)/i],[g,[p,O]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,k],[p,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,z],[p,O]],[/(apple) ?tv/i],[g,[f,_+" TV"],[p,O]],[/crkey/i],[[f,D+"cast"],[g,F],[p,O]],[/droid.+aft(\w+)( bui|\))/i],[f,[g,N],[p,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,G],[p,O]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,Y],[p,O]],[/(mitv-\w{5}) bui/i],[f,[g,te],[p,O]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[p,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,be],[f,be],[p,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[p,y]],[/droid.+; (shield) bui/i],[f,[g,"Nvidia"],[p,y]],[/(playstation [345portablevi]+)/i],[f,[g,Y],[p,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,L],[p,y]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[g,k],[p,S]],[/((pebble))app/i],[g,f,[p,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,_],[p,S]],[/droid.+; (glass) \d/i],[f,[g,F],[p,S]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,se],[p,S]],[/droid.+; (glass) \d/i],[f,[g,F],[p,S]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,f,[p,S]],[/; (quest( \d| pro)?)/i],[f,[g,ce],[p,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,T]],[/(aeobc)\b/i],[f,[g,N],[p,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[p,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[p,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,E]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[h,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[v,Se,he]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,Se,he],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,de],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,v],[/\(bb(10);/i],[v,[h,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[h,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[h,D+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,ue],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,v],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,v]]},Ie=function(Q,le){if(typeof Q===u&&(le=Q,Q=r),!(this instanceof Ie))return new Ie(Q,le).getResult();var pe=typeof n!==l&&n.navigator?n.navigator:r,ye=Q||(pe&&pe.userAgent?pe.userAgent:o),Fe=pe&&pe.userAgentData?pe.userAgentData:r,je=le?Z(Ae,le):Ae,De=pe&&pe.userAgent==ye;return this.getBrowser=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.browser),we[d]=ne(we[v]),De&&pe&&pe.brave&&typeof pe.brave.isBrave==s&&(we[h]="Brave"),we},this.getCPU=function(){var we={};return we[b]=r,Ce.call(we,ye,je.cpu),we},this.getDevice=function(){var we={};return we[g]=r,we[f]=r,we[p]=r,Ce.call(we,ye,je.device),De&&!we[p]&&Fe&&Fe.mobile&&(we[p]=E),De&&we[f]=="Macintosh"&&pe&&typeof pe.standalone!==l&&pe.maxTouchPoints&&pe.maxTouchPoints>2&&(we[f]="iPad",we[p]=x),we},this.getEngine=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.engine),we},this.getOS=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.os),De&&!we[h]&&Fe&&Fe.platform&&Fe.platform!="Unknown"&&(we[h]=Fe.platform.replace(/chrome os/i,ue).replace(/macos/i,de)),we},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ye},this.setUA=function(we){return ye=typeof we===c&&we.length>I?be(we,I):we,this},this.setUA(ye),this};Ie.VERSION=i,Ie.BROWSER=oe([h,v,d]),Ie.CPU=oe([b]),Ie.DEVICE=oe([f,g,p,y,E,O,x,S,T]),Ie.ENGINE=Ie.OS=oe([h,v]),e.exports&&(t=e.exports=Ie),t.UAParser=Ie;var me=typeof n!==l&&(n.jQuery||n.Zepto);if(me&&!me.ua){var Me=new Ie;me.ua=Me.getResult(),me.ua.get=function(){return Me.getUA()},me.ua.set=function(Q){Me.setUA(Q);var le=Me.getResult();for(var pe in le)me.ua[pe]=le[pe]}}})(typeof window=="object"?window:Nn)})(Um,Um.exports);var u9=Um.exports;Object.defineProperty(ct,"__esModule",{value:!0});function c9(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var ir=C,bn=c9(ir),VC=u9,ho=new VC,or=ho.getBrowser(),d9=ho.getCPU(),Lr=ho.getDevice(),Wm=ho.getEngine(),mo=ho.getOS(),nl=ho.getUA(),UC=function(t){return ho.setUA(t)},rl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new VC(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},WC=Object.freeze({ClientUAInstance:ho,browser:or,cpu:d9,device:Lr,engine:Wm,os:mo,ua:nl,setUa:UC,parseUserAgent:rl});function YC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YC(Object(n),!0).forEach(function(r){g9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function il(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?il=function(t){return typeof t}:il=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},il(e)}function h9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p9(e,t,n){return t&&m9(e.prototype,t),e}function g9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ym(){return Ym=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ym.apply(this,arguments)}function v9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xm(e,t)}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function Xm(e,t){return Xm=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Xm(e,t)}function b9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Yr(e,t){if(e==null)return{};var n=b9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y9(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oc(e)}function E9(e,t){return S9(e)||C9(e,t)||w9(e,t)||x9()}function S9(e){if(Array.isArray(e))return e}function C9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function w9(e,t){if(e){if(typeof e=="string")return qC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qC(e,t)}}function qC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ar={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},br={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},Ba={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},T9={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},O9=function(t){switch(t){case ar.Mobile:return{isMobile:!0};case ar.Tablet:return{isTablet:!0};case ar.SmartTv:return{isSmartTV:!0};case ar.Console:return{isConsole:!0};case ar.Wearable:return{isWearable:!0};case ar.Browser:return{isBrowser:!0};case ar.Embedded:return{isEmbedded:!0};default:return T9}},N9=function(t){return UC(t)},_t=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},Km=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Gm=function(t){var n=Km();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},_9=function(t,n,r,i,o){return{isBrowser:t,browserMajorVersion:_t(n.major),browserFullVersion:_t(n.version),browserName:_t(n.name),engineName:_t(r.name),engineVersion:_t(r.version),osName:_t(i.name),osVersion:_t(i.version),userAgent:_t(o)}},XC=function(t,n,r,i){return f9({},t,{vendor:_t(n.vendor),model:_t(n.model),os:_t(r.name),osVersion:_t(r.version),ua:_t(i)})},I9=function(t,n,r,i){return{isSmartTV:t,engineName:_t(n.name),engineVersion:_t(n.version),osName:_t(r.name),osVersion:_t(r.version),userAgent:_t(i)}},A9=function(t,n,r,i){return{isConsole:t,engineName:_t(n.name),engineVersion:_t(n.version),osName:_t(r.name),osVersion:_t(r.version),userAgent:_t(i)}},P9=function(t,n,r,i){return{isWearable:t,engineName:_t(n.name),engineVersion:_t(n.version),osName:_t(r.name),osVersion:_t(r.version),userAgent:_t(i)}},M9=function(t,n,r,i,o){return{isEmbedded:t,vendor:_t(n.vendor),model:_t(n.model),engineName:_t(r.name),engineVersion:_t(r.version),osName:_t(i.name),osVersion:_t(i.version),userAgent:_t(o)}};function L9(e){var t=e?rl(e):WC,n=t.device,r=t.browser,i=t.engine,o=t.os,a=t.ua,s=O9(n.type),l=s.isBrowser,u=s.isMobile,c=s.isTablet,d=s.isSmartTV,f=s.isConsole,h=s.isWearable,p=s.isEmbedded;if(l)return _9(l,r,i,o,a);if(d)return I9(d,i,o,a);if(f)return A9(f,i,o,a);if(u||c)return XC(s,n,o,a);if(h)return P9(h,i,o,a);if(p)return M9(p,n,i,o,a)}var KC=function(t){var n=t.type;return n===ar.Mobile},GC=function(t){var n=t.type;return n===ar.Tablet},QC=function(t){var n=t.type;return n===ar.Mobile||n===ar.Tablet},ZC=function(t){var n=t.type;return n===ar.SmartTv},Nc=function(t){var n=t.type;return n===ar.Browser},JC=function(t){var n=t.type;return n===ar.Wearable},ew=function(t){var n=t.type;return n===ar.Console},tw=function(t){var n=t.type;return n===ar.Embedded},nw=function(t){var n=t.vendor;return _t(n)},rw=function(t){var n=t.model;return _t(n)},iw=function(t){var n=t.type;return _t(n,"browser")},ow=function(t){var n=t.name;return n===Ba.Android},aw=function(t){var n=t.name;return n===Ba.Windows},sw=function(t){var n=t.name;return n===Ba.MAC_OS},lw=function(t){var n=t.name;return n===Ba.WindowsPhone},uw=function(t){var n=t.name;return n===Ba.IOS},cw=function(t){var n=t.version;return _t(n)},dw=function(t){var n=t.name;return _t(n)},fw=function(t){var n=t.name;return n===br.Chrome},hw=function(t){var n=t.name;return n===br.Firefox},mw=function(t){var n=t.name;return n===br.Chromium},_c=function(t){var n=t.name;return n===br.Edge},pw=function(t){var n=t.name;return n===br.Yandex},gw=function(t){var n=t.name;return n===br.Safari||n===br.MobileSafari},vw=function(t){var n=t.name;return n===br.MobileSafari},bw=function(t){var n=t.name;return n===br.Opera},yw=function(t){var n=t.name;return n===br.InternetExplorer||n===br.Ie},Ew=function(t){var n=t.name;return n===br.MIUI},Sw=function(t){var n=t.name;return n===br.SamsungBrowser},Cw=function(t){var n=t.version;return _t(n)},ww=function(t){var n=t.major;return _t(n)},xw=function(t){var n=t.name;return _t(n)},Tw=function(t){var n=t.name;return _t(n)},Ow=function(t){var n=t.version;return _t(n)},Nw=function(){var t=Km(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},za=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},_w=function(){var t=Km();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Ni=function(){return Gm("iPad")},Iw=function(){return Gm("iPhone")},Aw=function(){return Gm("iPod")},Pw=function(t){return _t(t)};function Mw(e){var t=e||WC,n=t.device,r=t.browser,i=t.os,o=t.engine,a=t.ua;return{isSmartTV:ZC(n),isConsole:ew(n),isWearable:JC(n),isEmbedded:tw(n),isMobileSafari:vw(r)||Ni(),isChromium:mw(r),isMobile:QC(n)||Ni(),isMobileOnly:KC(n),isTablet:GC(n)||Ni(),isBrowser:Nc(n),isDesktop:Nc(n),isAndroid:ow(i),isWinPhone:lw(i),isIOS:uw(i)||Ni(),isChrome:fw(r),isFirefox:hw(r),isSafari:gw(r),isOpera:bw(r),isIE:yw(r),osVersion:cw(i),osName:dw(i),fullBrowserVersion:Cw(r),browserVersion:ww(r),browserName:xw(r),mobileVendor:nw(n),mobileModel:rw(n),engineName:Tw(o),engineVersion:Ow(o),getUA:Pw(a),isEdge:_c(r)||za(a),isYandex:pw(r),deviceType:iw(n),isIOS13:_w(),isIPad13:Ni(),isIPhone13:Iw(),isIPod13:Aw(),isElectron:Nw(),isEdgeChromium:za(a),isLegacyEdge:_c(r)&&!za(a),isWindows:aw(i),isMacOs:sw(i),isMIUI:Ew(r),isSamsungBrowser:Sw(r)}}var Lw=ZC(Lr),Dw=ew(Lr),kw=JC(Lr),D9=tw(Lr),k9=vw(or)||Ni(),R9=mw(or),Ic=QC(Lr)||Ni(),Rw=KC(Lr),$w=GC(Lr)||Ni(),Fw=Nc(Lr),$9=Nc(Lr),Bw=ow(mo),zw=lw(mo),Hw=uw(mo)||Ni(),F9=fw(or),B9=hw(or),z9=gw(or),H9=bw(or),jw=yw(or),j9=cw(mo),V9=dw(mo),U9=Cw(or),W9=ww(or),Y9=xw(or),q9=nw(Lr),X9=rw(Lr),K9=Tw(Wm),G9=Ow(Wm),Q9=Pw(nl),Z9=_c(or)||za(nl),J9=pw(or),ez=iw(Lr),tz=_w(),nz=Ni(),rz=Iw(),iz=Aw(),oz=Nw(),az=za(nl),sz=_c(or)&&!za(nl),lz=aw(mo),uz=sw(mo),cz=Ew(or),dz=Sw(or),fz=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=rl(t),r=n.device,i=n.browser,o=n.os,a=n.engine,s=n.ua;return Mw({device:r,browser:i,os:o,engine:a,ua:s})},hz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Bw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},mz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Fw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},pz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return jw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},gz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Hw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},vz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Ic?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},bz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return $w?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},yz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return zw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Ez=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=Yr(t,["renderWithFragment","children","viewClassName","style"]);return Rw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Sz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Lw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Cz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Dw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},wz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return kw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},xz=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,o=Yr(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",o,r):null};function Tz(e){return function(t){v9(n,t);function n(r){var i;return h9(this,n),i=y9(this,qm(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Oc(i)),i.onOrientationChange=i.onOrientationChange.bind(Oc(i)),i.onPageLoad=i.onPageLoad.bind(Oc(i)),i.state={isLandscape:!1,isPortrait:!1},i}return p9(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":il(window))!==void 0&&Ic&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return bn.createElement(e,Ym({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(bn.Component)}function Oz(){var e=ir.useState(function(){var o=window.innerWidth>window.innerHeight?90:0;return{isPortrait:o===0,isLandscape:o===90,orientation:o===0?"portrait":"landscape"}}),t=E9(e,2),n=t[0],r=t[1],i=ir.useCallback(function(){var o=window.innerWidth>window.innerHeight?90:0,a={isPortrait:o===0,isLandscape:o===90,orientation:o===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return ir.useEffect(function(){return(typeof window>"u"?"undefined":il(window))!==void 0&&Ic&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function Vw(e){var t=e||window.navigator.userAgent;return rl(t)}function Nz(e){var t=e||window.navigator.userAgent,n=Vw(t),r=Mw(n);return[r,n]}ct.AndroidView=hz,ct.BrowserTypes=br,ct.BrowserView=mz,ct.ConsoleView=Cz,ct.CustomView=xz,ct.IEView=pz,ct.IOSView=gz,ct.MobileOnlyView=Ez,ct.MobileView=vz,ct.OsTypes=Ba,ct.SmartTVView=Sz,ct.TabletView=bz,ct.WearableView=wz,ct.WinPhoneView=yz,ct.browserName=Y9,ct.browserVersion=W9,ct.deviceDetect=L9,ct.deviceType=ez,ct.engineName=K9,ct.engineVersion=G9,ct.fullBrowserVersion=U9,ct.getSelectorsByUserAgent=fz,ct.getUA=Q9,ct.isAndroid=Bw,ct.isBrowser=Fw,ct.isChrome=F9,ct.isChromium=R9,ct.isConsole=Dw,ct.isDesktop=$9,ct.isEdge=Z9,ct.isEdgeChromium=az,ct.isElectron=oz,ct.isEmbedded=D9,ct.isFirefox=B9,ct.isIE=jw,ct.isIOS=Hw,ct.isIOS13=tz,ct.isIPad13=nz,ct.isIPhone13=rz,ct.isIPod13=iz,ct.isLegacyEdge=sz,ct.isMIUI=cz,ct.isMacOs=uz;var jo=ct.isMobile=Ic;ct.isMobileOnly=Rw,ct.isMobileSafari=k9,ct.isOpera=H9,ct.isSafari=z9,ct.isSamsungBrowser=dz,ct.isSmartTV=Lw,ct.isTablet=$w,ct.isWearable=kw,ct.isWinPhone=zw,ct.isWindows=lz,ct.isYandex=J9,ct.mobileModel=X9,ct.mobileVendor=q9,ct.osName=V9,ct.osVersion=j9,ct.parseUserAgent=rl,ct.setUserAgent=N9,ct.useDeviceData=Vw,ct.useDeviceSelectors=Nz;var Uw=ct.useMobileOrientation=Oz;ct.withOrientationChange=Tz;class _z extends C.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Error caught by boundary:",t),console.error("Component stack:",n.componentStack)}render(){var t;return this.state.hasError?this.props.fallback||q.jsxs("div",{style:{padding:"20px",border:"1px solid #f5c6cb",borderRadius:"4px",backgroundColor:"#f8d7da",color:"#721c24",margin:"10px 0"},children:[q.jsx("h3",{children:In.t("error.scoreViewerError")}),q.jsx("p",{children:(t=this.state.error)==null?void 0:t.message}),q.jsx("button",{onClick:()=>this.setState({hasError:!1}),style:{backgroundColor:"#721c24",color:"white",border:"none",padding:"8px 12px",borderRadius:"4px",cursor:"pointer"},children:In.t("error.tryAgain")})]}):this.props.children}}const Iz="Left",Az="Right",Pz="Up",Mz="Down",Ha={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Qm={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Ww="mousemove",Yw="mouseup",Lz="touchend",Dz="touchmove",kz="touchstart";function Rz(e,t,n,r){return e>t?n>0?Az:Iz:r>0?Mz:Pz}function qw(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function $z(e,t){const n=c=>{const d="touches"in c;d&&c.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(Ww,r),document.addEventListener(Yw,a));const{clientX:p,clientY:g}=d?c.touches[0]:c,v=qw([p,g],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:c}),Object.assign(Object.assign(Object.assign({},f),Qm),{initial:v.slice(),xy:v,start:c.timeStamp||0})})},r=c=>{e((d,f)=>{const h="touches"in c;if(h&&c.touches.length>1)return d;if(c.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:p,clientY:g}=h?c.touches[0]:c,[v,b]=qw([p,g],f.rotationAngle),y=v-d.xy[0],E=b-d.xy[1],x=Math.abs(y),O=Math.abs(E),S=(c.timeStamp||0)-d.start,T=Math.sqrt(x*x+O*O)/(S||1),I=[y/(S||1),E/(S||1)],N=Rz(x,O,y,E),_=typeof f.delta=="number"?f.delta:f.delta[N.toLowerCase()]||Ha.delta;if(x<_&&O<_&&!d.swiping)return d;const P={absX:x,absY:O,deltaX:y,deltaY:E,dir:N,event:c,first:d.first,initial:d.initial,velocity:T,vxvy:I};P.first&&f.onSwipeStart&&f.onSwipeStart(P),f.onSwiping&&f.onSwiping(P);let A=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${N}`])&&(A=!0),A&&f.preventScrollOnSwipe&&f.trackTouch&&c.cancelable&&c.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:P,swiping:!0})})},i=c=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(c.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:c}),f.onSwiped&&f.onSwiped(h);const p=f[`onSwiped${h.dir}`];p&&p(h)}}else f.onTap&&f.onTap({event:c});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:c}),Object.assign(Object.assign(Object.assign({},d),Qm),{eventData:h})})},o=()=>{document.removeEventListener(Ww,r),document.removeEventListener(Yw,a)},a=c=>{o(),i(c)},s=(c,d)=>{let f=()=>{};if(c&&c.addEventListener){const h=Object.assign(Object.assign({},Ha.touchEventOptions),d.touchEventOptions),p=[[kz,n,h],[Dz,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[Lz,i,h]];p.forEach(([g,v,b])=>c.addEventListener(g,v,b)),f=()=>p.forEach(([g,v])=>c.removeEventListener(g,v))}return f},u={ref:c=>{c!==null&&e((d,f)=>{if(d.el===c)return d;const h={};return d.el&&d.el!==c&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&c&&(h.cleanUpTouch=s(c,f)),Object.assign(Object.assign(Object.assign({},d),{el:c}),h)})}};return t.trackMouse&&(u.onMouseDown=n),[u,s]}function Fz(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function Bz(e){const{trackMouse:t}=e,n=m.useRef(Object.assign({},Qm)),r=m.useRef(Object.assign({},Ha)),i=m.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ha),e);let o;for(o in Ha)r.current[o]===void 0&&(r.current[o]=Ha[o]);const[a,s]=m.useMemo(()=>$z(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=Fz(n.current,r.current,i.current,s),a}const _i=(e,t,n)=>q.jsxs("filter",{id:`highlighting-${e}`,x:"-100%",y:"-100%",width:"300%",height:"300%",children:[q.jsx("feMorphology",{id:`radius-${e}`,in:"SourceAlpha",operator:"dilate",radius:n,result:"expanded"}),q.jsx("feFlood",{floodColor:t,floodOpacity:"0.6",result:"color"}),q.jsx("feComposite",{in:"color",in2:"expanded",operator:"in",result:"colored-background"}),q.jsx("feComposite",{in:"SourceGraphic",in2:"colored-background",operator:"over"})]});function zz(){const e=document.querySelector(".svg-container"),t=document.querySelector(".svg-container svg");!t||!e||["app","choice","corr","sic","unclear","supplied","reg"].forEach(n=>{t.querySelectorAll(`g .${n}.bounding-box`).forEach(i=>{var a,s,l;if(i.childElementCount==0&&i.nextSibling){var o=(a=i.nextElementSibling)==null?void 0:a.getBBox();if(o){o.width==0&&o.height==0&&n=="app"&&((s=i.nextElementSibling)!=null&&s.nextElementSibling)&&(console.log("expanding app bounding box for the unselected"),o=(l=i.nextElementSibling.nextElementSibling)==null?void 0:l.getBBox());const u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",o.x.toString()),u.setAttribute("y",o.y.toString()),u.setAttribute("width",o.width.toString()),u.setAttribute("height",o.height.toString()),u.setAttribute("fill","#8fe3ff"),u.setAttribute("fill-opacity","0"),i.appendChild(u)}}})})}function Hz(e){const t=document.querySelector(".svg-container"),n=document.querySelector(".svg-container svg");!n||!t||e.forEach(r=>{const i=CSS.escape(r);n.querySelectorAll(`g.staff:has(g.rdg.bounding-box[data-label="${i}"])`).forEach(a=>{const s=a.getBBox(),l=a.querySelector(`g.rdg.bounding-box[data-label="${i}"`);if(!s||!l)return;const u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",s.x.toString()),u.setAttribute("y",s.y.toString()),u.setAttribute("width",s.width.toString()),u.setAttribute("height",s.height.toString()),u.classList.add("rdg-recontruction-highlight"),l.appendChild(u)})})}const Gi=["#8e0000","#227710","#5500aa","#e9227a","#0026f3","#11ddff","#8e0000","#227710"],jz=`
279
+ `]:Object.assign(Object.assign({},db(e)),{marginInlineStart:e.marginXXS})}),EB(e)),SB(e)),CB()),{"&-rtl":{direction:"rtl"}})}},LC=wn("Typography",e=>[wB(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),xB=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:u,onCancel:c,onEnd:d,component:f,enterIcon:h=m.createElement(TC,null)}=e,p=m.useRef(null),g=m.useRef(!1),v=m.useRef(null),[b,y]=m.useState(l);m.useEffect(()=>{y(l)},[l]),m.useEffect(()=>{var D;if(!((D=p.current)===null||D===void 0)&&D.resizableTextArea){const{textArea:R}=p.current.resizableTextArea;R.focus();const{length:$}=R.value;R.setSelectionRange($,$)}},[]);const E=({target:D})=>{y(D.value.replace(/[\n\r]/g,""))},x=()=>{g.current=!0},O=()=>{g.current=!1},S=({keyCode:D})=>{g.current||(v.current=D)},T=()=>{u(b.trim())},I=({keyCode:D,ctrlKey:R,altKey:$,metaKey:F,shiftKey:B})=>{v.current!==D||g.current||R||$||F||B||(D===Xe.ENTER?(T(),d==null||d()):D===Xe.ESC&&c())},N=()=>{T()},[_,P,A]=LC(t),M=ie(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${f}`]:!!f},r,P,A);return _(m.createElement("div",{className:M,style:i},m.createElement(oF,{ref:p,maxLength:a,value:b,onChange:E,onKeyDown:S,onKeyUp:I,onCompositionStart:x,onCompositionEnd:O,onBlur:N,"aria-label":n,rows:1,autoSize:s}),h!==null?As(h,{className:`${t}-edit-content-confirm`}):null))};var TB=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},OB=TB,DC={"text/plain":"Text","text/html":"Url",default:"Text"},NB="Copy to clipboard: #{key}, Enter";function _B(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function IB(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{i=OB(),o=document.createRange(),a=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(c){if(c.stopPropagation(),t.format)if(c.preventDefault(),typeof c.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=DC[t.format]||DC.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=_B("message"in t?t.message:NB),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var AB=IB;const PB=Ul(AB);var MB=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})};const LB=({copyConfig:e,children:t})=>{const[n,r]=m.useState(!1),[i,o]=m.useState(!1),a=m.useRef(null),s=()=>{a.current&&clearTimeout(a.current)},l={};e.format&&(l.format=e.format),m.useEffect(()=>s,[]);const u=an(c=>MB(void 0,void 0,void 0,function*(){var d;c==null||c.preventDefault(),c==null||c.stopPropagation(),o(!0);try{const f=typeof e.text=="function"?yield e.text():e.text;PB(f||kF(t,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=e.onCopy)===null||d===void 0||d.call(e,c)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:u}};function Dm(e,t){return m.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const DB=e=>{const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e}),t.current},kB=(e,t,n)=>C.useMemo(()=>e===!0?{title:t??n}:C.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var RB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const km=m.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:u}=e,c=RB(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:p}=Gn("typography"),g=l??f,v=a?dr(t,a):t,b=d("typography",n);process.env.NODE_ENV!=="production"&&on("Typography").deprecated(!a,"setContentRef","ref");const[y,E,x]=LC(b),O=ie(b,h,{[`${b}-rtl`]:g==="rtl"},i,o,E,x),S=Object.assign(Object.assign({},p),u);return y(m.createElement(r,Object.assign({className:O,style:S,ref:v},c),s))});process.env.NODE_ENV!=="production"&&(km.displayName="Typography");function kC(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Rm(e,t,n){return e===!0||e===void 0?t:e||n&&t}function $B(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const $m=e=>["string","number"].includes(typeof e),FB=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const u=kC(i),c=kC(o),{copied:d,copy:f}=n??{},h=t?d:f,p=Rm(u[t?1:0],h),g=typeof p=="string"?p:h;return m.createElement(Ki,{title:p},m.createElement("button",{type:"button",className:ie(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:s,"aria-label":g,tabIndex:a},t?Rm(c[1],m.createElement(Xh,null),!0):Rm(c[0],l?m.createElement(wa,null):m.createElement(CC,null),!0)))},Ec=m.forwardRef(({style:e,children:t},n)=>{const r=m.useRef(null);return m.useImperativeHandle(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),m.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),BB=e=>e.reduce((t,n)=>t+($m(n)?String(n).length:1),0);function RC(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],s=$m(o)?String(o).length:1,l=n+s;if(l>t){const u=t-n;return r.push(String(o).slice(0,u)),r}r.push(o),n=l}return e}const Fm=0,Bm=1,zm=2,Hm=3,$C=4,Sc={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function zB(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=e,u=m.useMemo(()=>mr(r),[r]),c=m.useMemo(()=>BB(u),[r]),d=m.useMemo(()=>i(u,!1),[r]),[f,h]=m.useState(null),p=m.useRef(null),g=m.useRef(null),v=m.useRef(null),b=m.useRef(null),y=m.useRef(null),[E,x]=m.useState(!1),[O,S]=m.useState(Fm),[T,I]=m.useState(0),[N,_]=m.useState(null);Kt(()=>{S(t&&n&&c?Bm:Fm)},[n,r,o,t,u]),Kt(()=>{var D,R,$,F;if(O===Bm){S(zm);const B=g.current&&getComputedStyle(g.current).whiteSpace;_(B)}else if(O===zm){const B=!!(!((D=v.current)===null||D===void 0)&&D.isExceed());S(B?Hm:$C),h(B?[0,c]:null),x(B);const z=((R=v.current)===null||R===void 0?void 0:R.getHeight())||0,L=o===1?0:(($=b.current)===null||$===void 0?void 0:$.getHeight())||0,H=((F=y.current)===null||F===void 0?void 0:F.getHeight())||0,W=Math.max(z,L+H);I(W+1),l(B)}},[O]);const P=f?Math.ceil((f[0]+f[1])/2):0;Kt(()=>{var D;const[R,$]=f||[0,0];if(R!==$){const B=(((D=p.current)===null||D===void 0?void 0:D.getHeight())||0)>T;let z=P;$-R===1&&(z=B?R:$),h(B?[R,z]:[z,$])}},[f,P]);const A=m.useMemo(()=>{if(!t)return i(u,!1);if(O!==Hm||!f||f[0]!==f[1]){const D=i(u,!1);return[$C,Fm].includes(O)?D:m.createElement("span",{style:Object.assign(Object.assign({},Sc),{WebkitLineClamp:o})},D)}return i(a?u:RC(u,f[0]),E)},[a,O,f,u].concat(Ke(s))),M={width:n,margin:0,padding:0,whiteSpace:N==="nowrap"?"normal":"inherit"};return m.createElement(m.Fragment,null,A,O===zm&&m.createElement(m.Fragment,null,m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:o}),ref:v},d),m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:o-1}),ref:b},d),m.createElement(Ec,{style:Object.assign(Object.assign(Object.assign({},M),Sc),{WebkitLineClamp:1}),ref:y},i([],!0))),O===Hm&&f&&f[0]!==f[1]&&m.createElement(Ec,{style:Object.assign(Object.assign({},M),{top:400}),ref:p},i(RC(u,P),!0)),O===Bm&&m.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const FC=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:m.createElement(Ki,Object.assign({open:t?void 0:!1},r),n);process.env.NODE_ENV!=="production"&&(FC.displayName="EllipsisTooltip");var HB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function jB({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:o,italic:a},s){let l=s;function u(c,d){d&&(l=m.createElement(c,{},l))}return u("strong",i),u("u",n),u("del",r),u("code",t),u("mark",e),u("kbd",o),u("i",a),l}const VB="...",BC=["delete","mark","code","underline","strong","keyboard","italic"],Cc=m.forwardRef((e,t)=>{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:u,editable:c,copyable:d,component:f,title:h}=e,p=HB(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:g,direction:v}=m.useContext(Qt),[b]=Vi("Text"),y=m.useRef(null),E=m.useRef(null),x=g("typography",r),O=_r(p,BC),[S,T]=Dm(c),[I,N]=Cn(!1,{value:T.editing}),{triggerType:_=["icon"]}=T,P=Te=>{var Be;Te&&((Be=T.onStart)===null||Be===void 0||Be.call(T)),N(Te)},A=DB(I);Kt(()=>{var Te;!I&&A&&((Te=E.current)===null||Te===void 0||Te.focus())},[I]);const M=Te=>{Te==null||Te.preventDefault(),P(!0)},D=Te=>{var Be;(Be=T.onChange)===null||Be===void 0||Be.call(T,Te),P(!1)},R=()=>{var Te;(Te=T.onCancel)===null||Te===void 0||Te.call(T),P(!1)},[$,F]=Dm(d),{copied:B,copyLoading:z,onClick:L}=LB({copyConfig:F,children:l}),[H,W]=m.useState(!1),[k,G]=m.useState(!1),[Y,te]=m.useState(!1),[se,ce]=m.useState(!1),[ue,de]=m.useState(!0),[J,Z]=Dm(u,{expandable:!1,symbol:Te=>Te?b==null?void 0:b.collapse:b==null?void 0:b.expand}),[oe,X]=Cn(Z.defaultExpanded||!1,{value:Z.expanded}),ee=J&&(!oe||Z.expandable==="collapsible"),{rows:ne=1}=Z,be=m.useMemo(()=>ee&&(Z.suffix!==void 0||Z.onEllipsis||Z.expandable||S||$),[ee,Z,S,$]);Kt(()=>{J&&!be&&(W(i1("webkitLineClamp")),G(i1("textOverflow")))},[be,J]);const[Ce,Se]=m.useState(ee),ve=m.useMemo(()=>be?!1:ne===1?k:H,[be,k,H]);Kt(()=>{Se(ve&&ee)},[ve,ee]);const he=ee&&(Ce?se:Y),Ae=ee&&ne===1&&Ce,Ie=ee&&ne>1&&Ce,me=(Te,Be)=>{var it;X(Be.expanded),(it=Z.onExpand)===null||it===void 0||it.call(Z,Te,Be)},[Me,Q]=m.useState(0),le=({offsetWidth:Te})=>{Q(Te)},pe=Te=>{var Be;te(Te),Y!==Te&&((Be=Z.onEllipsis)===null||Be===void 0||Be.call(Z,Te))};m.useEffect(()=>{const Te=y.current;if(J&&Ce&&Te){const Be=$B(Te);se!==Be&&ce(Be)}},[J,Ce,l,Ie,ue,Me]),m.useEffect(()=>{const Te=y.current;if(typeof IntersectionObserver>"u"||!Te||!Ce||!ee)return;const Be=new IntersectionObserver(()=>{de(!!Te.offsetParent)});return Be.observe(Te),()=>{Be.disconnect()}},[Ce,ee]);const ye=kB(Z.tooltip,T.text,l),Fe=m.useMemo(()=>{if(!(!J||Ce))return[T.text,l,h,ye.title].find($m)},[J,Ce,h,ye.title,he]);if(I)return m.createElement(xB,{value:(n=T.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:D,onCancel:R,onEnd:T.onEnd,prefixCls:x,className:i,style:o,direction:v,component:f,maxLength:T.maxLength,autoSize:T.autoSize,enterIcon:T.enterIcon});const je=()=>{const{expandable:Te,symbol:Be}=Z;return Te?m.createElement("button",{type:"button",key:"expand",className:`${x}-${oe?"collapse":"expand"}`,onClick:it=>me(it,{expanded:!oe}),"aria-label":oe?b.collapse:b==null?void 0:b.expand},typeof Be=="function"?Be(oe):Be):null},De=()=>{if(!S)return;const{icon:Te,tooltip:Be,tabIndex:it}=T,Ct=mr(Be)[0]||(b==null?void 0:b.edit),Dt=typeof Ct=="string"?Ct:"";return _.includes("icon")?m.createElement(Ki,{key:"edit",title:Be===!1?"":Ct},m.createElement("button",{type:"button",ref:E,className:`${x}-edit`,onClick:M,"aria-label":Dt,tabIndex:it},Te||m.createElement(xC,{role:"button"}))):null},we=()=>$?m.createElement(FB,Object.assign({key:"copy"},F,{prefixCls:x,copied:B,locale:b,onCopy:L,loading:z,iconOnly:l==null})):null,Le=Te=>[Te&&je(),De(),we()],Ue=Te=>[Te&&!oe&&m.createElement("span",{"aria-hidden":!0,key:"ellipsis"},VB),Z.suffix,Le(Te)];return m.createElement(pr,{onResize:le,disabled:!ee},Te=>m.createElement(FC,{tooltipProps:ye,enableEllipsis:ee,isEllipsis:he},m.createElement(km,Object.assign({className:ie({[`${x}-${a}`]:a,[`${x}-disabled`]:s,[`${x}-ellipsis`]:J,[`${x}-ellipsis-single-line`]:Ae,[`${x}-ellipsis-multiple-line`]:Ie},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:Ie?ne:void 0}),component:f,ref:dr(Te,y,t),direction:v,onClick:_.includes("text")?M:void 0,"aria-label":Fe==null?void 0:Fe.toString(),title:h},O),m.createElement(zB,{enableMeasure:ee&&!Ce,text:l,rows:ne,width:Me,onEllipsis:pe,expanded:oe,miscDeps:[B,oe,z,S,$,b].concat(Ke(BC.map(Be=>e[Be])))},(Be,it)=>jB(e,m.createElement(m.Fragment,null,Be.length>0&&it&&!oe&&Fe?m.createElement("span",{key:"show-content","aria-hidden":!0},Be):Be,Ue(it)))))))});var UB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const WB=m.forwardRef((e,t)=>{var{ellipsis:n,rel:r}=e,i=UB(e,["ellipsis","rel"]);if(process.env.NODE_ENV!=="production"){const a=on("Typography.Link");process.env.NODE_ENV!=="production"&&a(typeof n!="object","usage","`ellipsis` only supports boolean value.")}const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,m.createElement(Cc,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),YB=m.forwardRef((e,t)=>m.createElement(Cc,Object.assign({ref:t},e,{component:"div"})));var qB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const XB=(e,t)=>{var{ellipsis:n}=e,r=qB(e,["ellipsis"]);const i=m.useMemo(()=>n&&typeof n=="object"?_r(n,["expandable","rows"]):n,[n]);if(process.env.NODE_ENV!=="production"){const o=on("Typography.Text");process.env.NODE_ENV!=="production"&&o(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props.")}return m.createElement(Cc,Object.assign({ref:t},r,{ellipsis:i,component:"span"}))},KB=m.forwardRef(XB);var GB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const zC=[1,2,3,4,5],QB=m.forwardRef((e,t)=>{const{level:n=1}=e,r=GB(e,["level"]);if(process.env.NODE_ENV!=="production"){const o=on("Typography.Title");process.env.NODE_ENV!=="production"&&o(zC.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.")}const i=zC.includes(n)?`h${n}`:"h1";return m.createElement(Cc,Object.assign({ref:t},r,{component:i}))}),dn=km;dn.Text=KB,dn.Link=WB,dn.Title=QB,dn.Paragraph=YB;const HC=C.forwardRef((e,t)=>{const{prefixCls:n,className:r,children:i,size:o,style:a={}}=e,s=ie(`${n}-panel`,{[`${n}-panel-hidden`]:o===0},r),l=o!==void 0;return C.createElement("div",{ref:t,className:s,style:Object.assign(Object.assign({},a),{flexBasis:l?o:"auto",flexGrow:l?0:1})},i)});process.env.NODE_ENV!=="production"&&(HC.displayName="Panel");const ZB=()=>null;var JB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function e9(e){if(e&&typeof e=="object")return e;const t=!!e;return{start:t,end:t}}function t9(e){return m.useMemo(()=>mr(e).filter(n=>m.isValidElement(n)).map(n=>{const{props:r}=n,{collapsible:i}=r,o=JB(r,["collapsible"]);return Object.assign(Object.assign({},o),{collapsible:e9(i)})}),[e])}function n9(e,t,n){return m.useMemo(()=>{const r=[];for(let i=0;i<e.length-1;i+=1){const o=e[i],a=e[i+1],s=t[i],l=t[i+1],{resizable:u=!0,min:c,collapsible:d}=o,{resizable:f=!0,min:h,collapsible:p}=a,g=u&&f&&(s!==0||!c)&&(l!==0||!h),v=d.end&&s>0||p.start&&l===0&&s>0,b=p.start&&l>0||d.end&&s===0&&l>0;r[i]={resizable:g,startCollapsible:!!(n?b:v),endCollapsible:!!(n?v:b)}}return r},[t,e])}function wc(e){return Number(e.slice(0,-1))/100}function jm(e){return typeof e=="string"&&e.endsWith("%")}function r9(e,t){const n=e.map(p=>p.size),r=e.length,i=t||0,o=p=>p*i,[a,s]=C.useState(()=>e.map(p=>p.defaultSize)),l=C.useMemo(()=>{var p;const g=[];for(let v=0;v<r;v+=1)g[v]=(p=n[v])!==null&&p!==void 0?p:a[v];return g},[r,a,n]),u=C.useMemo(()=>{let p=[],g=0;for(let b=0;b<r;b+=1){const y=l[b];if(jm(y))p[b]=wc(y);else if(y||y===0){const E=Number(y);Number.isNaN(E)||(p[b]=E/i)}else g+=1,p[b]=void 0}const v=p.reduce((b,y)=>b+(y||0),0);if(v>1||!g){const b=1/v;p=p.map(y=>y===void 0?0:y*b)}else{const b=(1-v)/g;p=p.map(y=>y===void 0?b:y)}return p},[l,i]),c=C.useMemo(()=>u.map(o),[u,i]),d=C.useMemo(()=>e.map(p=>jm(p.min)?wc(p.min):(p.min||0)/i),[e,i]),f=C.useMemo(()=>e.map(p=>jm(p.max)?wc(p.max):(p.max||i)/i),[e,i]);return[C.useMemo(()=>t?c:l,[c,t]),c,u,d,f,s]}function i9(e,t,n,r,i,o){const a=e.map(x=>[x.min,x.max]),s=r||0,l=x=>x*s;function u(x,O){return typeof x=="string"?l(wc(x)):x??O}const[c,d]=m.useState([]),f=m.useRef([]),[h,p]=m.useState(null),g=()=>n.map(l);return[x=>{d(g()),p({index:x,confirmed:!1})},(x,O)=>{var S;let T=null;if((!h||!h.confirmed)&&O!==0){if(O>0)T=x,p({index:x,confirmed:!0});else for(let $=x;$>=0;$-=1)if(c[$]>0&&t[$].resizable){T=$,p({index:$,confirmed:!0});break}}const I=(S=T??(h==null?void 0:h.index))!==null&&S!==void 0?S:x,N=Ke(c),_=I+1,P=u(a[I][0],0),A=u(a[_][0],0),M=u(a[I][1],s),D=u(a[_][1],s);let R=O;return N[I]+R<P&&(R=P-N[I]),N[_]-R<A&&(R=N[_]-A),N[I]+R>M&&(R=M-N[I]),N[_]-R>D&&(R=N[_]-D),N[I]+=R,N[_]-=R,i(N),N},()=>{p(null)},(x,O)=>{const S=g(),T=o?O==="start"?"end":"start":O,I=T==="start"?x:x+1,N=T==="start"?x+1:x,_=S[I],P=S[N];if(_!==0&&P!==0)S[I]=0,S[N]+=_,f.current[x]=_;else{const A=_+P,M=u(a[I][0],0),D=u(a[I][1],s),R=u(a[N][0],0),$=u(a[N][1],s),F=Math.max(M,A-$),B=Math.min(D,A-R),z=R||(B-F)/2,L=f.current[x],H=A-L;L&&L<=$&&L>=R&&H<=D&&H>=M?(S[N]=L,S[I]=H):(S[I]-=z,S[N]+=z)}return i(S),S},h==null?void 0:h.index]}function Vm(e){return typeof e=="number"&&!Number.isNaN(e)?Math.round(e):0}const o9=e=>{const{prefixCls:t,vertical:n,index:r,active:i,ariaNow:o,ariaMin:a,ariaMax:s,resizable:l,startCollapsible:u,endCollapsible:c,onOffsetStart:d,onOffsetUpdate:f,onOffsetEnd:h,onCollapse:p,lazy:g,containerSize:v}=e,b=`${t}-bar`,[y,E]=C.useState(null),[x,O]=C.useState(0),S=n?0:x,T=n?x:0,I=$=>{l&&$.currentTarget&&(E([$.pageX,$.pageY]),d(r))},N=$=>{if(l&&$.touches.length===1){const F=$.touches[0];E([F.pageX,F.pageY]),d(r)}},_=$=>{const F=v*o/100,B=F+$,z=Math.max(0,v*a/100),L=Math.min(v,v*s/100);return Math.max(z,Math.min(L,B))-F},P=an(($,F)=>{const B=_(n?F:$);O(B)}),A=an(()=>{f(r,S,T,!0),O(0),h(!0)});C.useEffect(()=>{if(y){const $=L=>{const{pageX:H,pageY:W}=L,k=H-y[0],G=W-y[1];g?P(k,G):f(r,k,G)},F=()=>{g?A():h(),E(null)},B=L=>{if(L.touches.length===1){const H=L.touches[0],W=H.pageX-y[0],k=H.pageY-y[1];g?P(W,k):f(r,W,k)}},z=()=>{g?A():h(),E(null)};return window.addEventListener("touchmove",B),window.addEventListener("touchend",z),window.addEventListener("mousemove",$),window.addEventListener("mouseup",F),()=>{window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",F),window.removeEventListener("touchmove",B),window.removeEventListener("touchend",z)}}},[y,g,n,r,v,o,a,s]);const M={[`--${b}-preview-offset`]:`${x}px`},D=n?DS:ic,R=n?Kh:Fu;return C.createElement("div",{className:b,role:"separator","aria-valuenow":Vm(o),"aria-valuemin":Vm(a),"aria-valuemax":Vm(s)},g&&C.createElement("div",{className:ie(`${b}-preview`,{[`${b}-preview-active`]:!!x}),style:M}),C.createElement("div",{className:ie(`${b}-dragger`,{[`${b}-dragger-disabled`]:!l,[`${b}-dragger-active`]:i}),onMouseDown:I,onTouchStart:N}),u&&C.createElement("div",{className:ie(`${b}-collapse-bar`,`${b}-collapse-bar-start`),onClick:()=>p(r,"start")},C.createElement(D,{className:ie(`${b}-collapse-icon`,`${b}-collapse-start`)})),c&&C.createElement("div",{className:ie(`${b}-collapse-bar`,`${b}-collapse-bar-end`),onClick:()=>p(r,"end")},C.createElement(R,{className:ie(`${b}-collapse-icon`,`${b}-collapse-end`)})))},a9=e=>{const{componentCls:t}=e;return{[`&-rtl${t}-horizontal`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:0,insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"unset",insetInlineStart:0}}},[`&-rtl${t}-vertical`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:"50%",insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"50%",insetInlineStart:"unset"}}}}},xc={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},s9=e=>{const{componentCls:t,colorFill:n,splitBarDraggableSize:r,splitBarSize:i,splitTriggerSize:o,controlItemBgHover:a,controlItemBgActive:s,controlItemBgActiveHover:l,prefixCls:u}=e,c=`${t}-bar`,d=`${t}-mask`,f=`${t}-panel`,h=e.calc(o).div(2).equal(),p=`${u}-bar-preview-offset`,g={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${c}`]:{flex:"none",position:"relative",userSelect:"none",[`${c}-dragger`]:Object.assign(Object.assign({},xc),{zIndex:1,"&::before":Object.assign({content:'""',background:a},xc),"&::after":Object.assign({content:'""',background:n},xc),[`&:hover:not(${c}-dragger-active)`]:{"&::before":{background:s}},"&-active":{zIndex:2,"&::before":{background:l}},[`&-disabled${c}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:a}},"&::after":{display:"none"}}}),[`${c}-collapse-bar`]:Object.assign(Object.assign({},xc),{zIndex:e.zIndexPopupBase,background:a,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","@media(hover:none)":{opacity:1},"&:hover":{background:s},"&:active":{background:l}}),"&:hover, &:active":{[`${c}-collapse-bar`]:{opacity:1}}},[d]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${c}`]:{width:0,[`${c}-preview`]:Object.assign(Object.assign({height:"100%",width:i},g),{[`&${c}-preview-active`]:{display:"block",transform:`translateX(var(--${p}))`}}),[`${c}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:i},"&::after":{height:r,width:i}},[`${c}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:h},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:h},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${c}`]:{height:0,[`${c}-preview`]:Object.assign(Object.assign({height:i,width:"100%"},g),{[`&${c}-preview-active`]:{display:"block",transform:`translateY(var(--${p}))`}}),[`${c}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:i},"&::after":{width:r,height:i}},[`${c}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:h,transform:"translateX(-50%)"},"&-end":{top:h,bottom:"auto",transform:"translateX(-50%)"}}}},[f]:{overflow:"auto",padding:"0 1px",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{padding:0,overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"}}}),a9(e))}},l9=wn("Splitter",e=>[s9(e)],e=>{var t;const n=e.splitBarSize||2,r=e.splitTriggerSize||6,i=e.resizeSpinnerSize||20,o=(t=e.splitBarDraggableSize)!==null&&t!==void 0?t:i;return{splitBarSize:n,splitTriggerSize:r,splitBarDraggableSize:o,resizeSpinnerSize:i}}),jC=e=>{const{prefixCls:t,className:n,style:r,layout:i="horizontal",children:o,rootClassName:a,onResizeStart:s,onResize:l,onResizeEnd:u,lazy:c}=e,{getPrefixCls:d,direction:f,className:h,style:p}=Gn("splitter"),g=d("splitter",t),v=Wi(g),[b,y,E]=l9(g,v),x=i==="vertical",O=f==="rtl",S=!x&&O,T=t9(o);if(process.env.NODE_ENV!=="production"){const J=on("Splitter");let Z=!1,oe=!1;T.forEach(X=>{X.size!==void 0?Z=!0:oe=!0}),Z&&oe&&!l&&process.env.NODE_ENV!=="production"&&J(!1,"usage","When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.")}const[I,N]=C.useState(),_=J=>{const{offsetWidth:Z,offsetHeight:oe}=J,X=x?oe:Z;X!==0&&N(X)},[P,A,M,D,R,$]=r9(T,I),F=n9(T,A,O),[B,z,L,H,W]=i9(T,F,M,I,$,O),k=an(J=>{B(J),s==null||s(A)}),G=an((J,Z,oe)=>{const X=z(J,Z);oe?u==null||u(X):l==null||l(X)}),Y=an(J=>{L(),J||u==null||u(A)}),te=an((J,Z)=>{const oe=H(J,Z);l==null||l(oe),u==null||u(oe)}),se=ie(g,n,`${g}-${i}`,{[`${g}-rtl`]:O},a,h,E,v,y),ce=`${g}-mask`,ue=C.useMemo(()=>{const J=[];let Z=0;for(let oe=0;oe<T.length;oe+=1)Z+=M[oe],J.push(Z);return J},[M]),de=Object.assign(Object.assign({},p),r);return b(C.createElement(pr,{onResize:_},C.createElement("div",{style:de,className:se},T.map((J,Z)=>{const oe=C.createElement(HC,Object.assign({},J,{prefixCls:g,size:P[Z]}));let X=null;const ee=F[Z];if(ee){const ne=(ue[Z-1]||0)+D[Z],be=(ue[Z+1]||100)-R[Z+1],Ce=(ue[Z-1]||0)+R[Z],Se=(ue[Z+1]||100)-D[Z+1];X=C.createElement(o9,{lazy:c,index:Z,active:W===Z,prefixCls:g,vertical:x,resizable:ee.resizable,ariaNow:ue[Z]*100,ariaMin:Math.max(ne,be)*100,ariaMax:Math.min(Ce,Se)*100,startCollapsible:ee.startCollapsible,endCollapsible:ee.endCollapsible,onOffsetStart:k,onOffsetUpdate:(ve,he,Ae,Ie)=>{let me=x?Ae:he;S&&(me=-me),G(ve,me,Ie)},onOffsetEnd:Y,onCollapse:te,containerSize:I||0})}return C.createElement(C.Fragment,{key:`split-panel-${Z}`},oe,X)}),typeof W=="number"&&C.createElement("div",{"aria-hidden":!0,className:ie(ce,`${ce}-${i}`)}))))};process.env.NODE_ENV!=="production"&&(jC.displayName="Splitter");const Tc=jC;Tc.Panel=ZB;var ct={},Um={exports:{}};(function(e,t){(function(n,r){var i="1.0.40",o="",a="?",s="function",l="undefined",u="object",c="string",d="major",f="model",h="name",p="type",g="vendor",v="version",b="architecture",y="console",E="mobile",x="tablet",O="smarttv",S="wearable",T="embedded",I=500,N="Amazon",_="Apple",P="ASUS",A="BlackBerry",M="Browser",D="Chrome",R="Edge",$="Firefox",F="Google",B="Huawei",z="LG",L="Microsoft",H="Motorola",W="Opera",k="Samsung",G="Sharp",Y="Sony",te="Xiaomi",se="Zebra",ce="Facebook",ue="Chromium OS",de="Mac OS",J=" Browser",Z=function(Q,le){var pe={};for(var ye in Q)le[ye]&&le[ye].length%2===0?pe[ye]=le[ye].concat(Q[ye]):pe[ye]=Q[ye];return pe},oe=function(Q){for(var le={},pe=0;pe<Q.length;pe++)le[Q[pe].toUpperCase()]=Q[pe];return le},X=function(Q,le){return typeof Q===c?ee(le).indexOf(ee(Q))!==-1:!1},ee=function(Q){return Q.toLowerCase()},ne=function(Q){return typeof Q===c?Q.replace(/[^\d\.]/g,o).split(".")[0]:r},be=function(Q,le){if(typeof Q===c)return Q=Q.replace(/^\s\s*/,o),typeof le===l?Q:Q.substring(0,I)},Ce=function(Q,le){for(var pe=0,ye,Fe,je,De,we,Le;pe<le.length&&!we;){var Ue=le[pe],Te=le[pe+1];for(ye=Fe=0;ye<Ue.length&&!we&&Ue[ye];)if(we=Ue[ye++].exec(Q),we)for(je=0;je<Te.length;je++)Le=we[++Fe],De=Te[je],typeof De===u&&De.length>0?De.length===2?typeof De[1]==s?this[De[0]]=De[1].call(this,Le):this[De[0]]=De[1]:De.length===3?typeof De[1]===s&&!(De[1].exec&&De[1].test)?this[De[0]]=Le?De[1].call(this,Le,De[2]):r:this[De[0]]=Le?Le.replace(De[1],De[2]):r:De.length===4&&(this[De[0]]=Le?De[3].call(this,Le.replace(De[1],De[2])):r):this[De]=Le||r;pe+=2}},Se=function(Q,le){for(var pe in le)if(typeof le[pe]===u&&le[pe].length>0){for(var ye=0;ye<le[pe].length;ye++)if(X(le[pe][ye],Q))return pe===a?r:pe}else if(X(le[pe],Q))return pe===a?r:pe;return le.hasOwnProperty("*")?le["*"]:Q},ve={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},he={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ae={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,v],[/opios[\/ ]+([\w\.]+)/i],[v,[h,W+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[h,W+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[h,W]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[h,"UC"+M]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[h,"Smart Lenovo "+M]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+M],v],[/\bfocus\/([\w\.]+)/i],[v,[h,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[h,W+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[h,W+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[h,"MIUI"+J]],[/fxios\/([\w\.-]+)/i],[v,[h,$]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+J],v],[/samsungbrowser\/([\w\.]+)/i],[v,[h,k+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ce],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[h,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,D+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[h,"Android "+M]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[v,Se,ve]],[/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[h,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,ee]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b,/ower/,o,ee]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,ee]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,k],[p,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,k],[p,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,_],[p,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,_],[p,x]],[/(macintosh);/i],[f,[g,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,G],[p,E]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[g,"Honor"],[p,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[g,B],[p,x]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,B],[p,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[g,te],[p,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[g,te],[p,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,"OPPO"],[p,E]],[/\b(opd2\d{3}a?) bui/i],[f,[g,"OPPO"],[p,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[p,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[p,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,H],[p,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,H],[p,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,z],[p,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,z],[p,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[g,"Lenovo"],[p,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[g,"Nokia"],[p,E]],[/(pixel c)\b/i],[f,[g,F],[p,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,F],[p,E]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,Y],[p,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,Y],[p,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,"OnePlus"],[p,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,N],[p,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,N],[p,E]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[p,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,A],[p,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,P],[p,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,P],[p,E]],[/(nexus 9)/i],[f,[g,"HTC"],[p,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[p,E]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[g,"TCL"],[p,x]],[/(itel) ((\w+))/i],[[g,ee],f,[p,Se,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[p,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[p,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[g,"Ulefone"],[p,E]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[g,"Energizer"],[p,E]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[g,"Cat"],[p,E]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[g,"Smartfren"],[p,E]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[g,"Nothing"],[p,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[p,E]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[p,x]],[/(surface duo)/i],[f,[g,L],[p,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[p,E]],[/(u304aa)/i],[f,[g,"AT&T"],[p,E]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[p,E]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[p,x]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[p,x]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[p,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[p,x]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[p,x]],[/\b(k88) b/i],[f,[g,"ZTE"],[p,x]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[p,E]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[p,E]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[p,x]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[p,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[p,x]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[p,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[p,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[p,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[p,E]],[/\b(ph-1) /i],[f,[g,"Essential"],[p,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[p,x]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[p,x]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[p,x]],[/(shield[\w ]+) b/i],[f,[g,"Nvidia"],[p,x]],[/(sprint) (\w+)/i],[g,f,[p,E]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,L],[p,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,se],[p,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,se],[p,E]],[/smart-tv.+(samsung)/i],[g,[p,O]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,k],[p,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,z],[p,O]],[/(apple) ?tv/i],[g,[f,_+" TV"],[p,O]],[/crkey/i],[[f,D+"cast"],[g,F],[p,O]],[/droid.+aft(\w+)( bui|\))/i],[f,[g,N],[p,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,G],[p,O]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,Y],[p,O]],[/(mitv-\w{5}) bui/i],[f,[g,te],[p,O]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[p,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,be],[f,be],[p,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[p,y]],[/droid.+; (shield) bui/i],[f,[g,"Nvidia"],[p,y]],[/(playstation [345portablevi]+)/i],[f,[g,Y],[p,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,L],[p,y]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[g,k],[p,S]],[/((pebble))app/i],[g,f,[p,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,_],[p,S]],[/droid.+; (glass) \d/i],[f,[g,F],[p,S]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,se],[p,S]],[/droid.+; (glass) \d/i],[f,[g,F],[p,S]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,f,[p,S]],[/; (quest( \d| pro)?)/i],[f,[g,ce],[p,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,T]],[/(aeobc)\b/i],[f,[g,N],[p,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[p,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[p,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,E]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[h,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[v,Se,he]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,Se,he],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,de],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,v],[/\(bb(10);/i],[v,[h,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[h,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[h,D+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,ue],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,v],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,v]]},Ie=function(Q,le){if(typeof Q===u&&(le=Q,Q=r),!(this instanceof Ie))return new Ie(Q,le).getResult();var pe=typeof n!==l&&n.navigator?n.navigator:r,ye=Q||(pe&&pe.userAgent?pe.userAgent:o),Fe=pe&&pe.userAgentData?pe.userAgentData:r,je=le?Z(Ae,le):Ae,De=pe&&pe.userAgent==ye;return this.getBrowser=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.browser),we[d]=ne(we[v]),De&&pe&&pe.brave&&typeof pe.brave.isBrave==s&&(we[h]="Brave"),we},this.getCPU=function(){var we={};return we[b]=r,Ce.call(we,ye,je.cpu),we},this.getDevice=function(){var we={};return we[g]=r,we[f]=r,we[p]=r,Ce.call(we,ye,je.device),De&&!we[p]&&Fe&&Fe.mobile&&(we[p]=E),De&&we[f]=="Macintosh"&&pe&&typeof pe.standalone!==l&&pe.maxTouchPoints&&pe.maxTouchPoints>2&&(we[f]="iPad",we[p]=x),we},this.getEngine=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.engine),we},this.getOS=function(){var we={};return we[h]=r,we[v]=r,Ce.call(we,ye,je.os),De&&!we[h]&&Fe&&Fe.platform&&Fe.platform!="Unknown"&&(we[h]=Fe.platform.replace(/chrome os/i,ue).replace(/macos/i,de)),we},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ye},this.setUA=function(we){return ye=typeof we===c&&we.length>I?be(we,I):we,this},this.setUA(ye),this};Ie.VERSION=i,Ie.BROWSER=oe([h,v,d]),Ie.CPU=oe([b]),Ie.DEVICE=oe([f,g,p,y,E,O,x,S,T]),Ie.ENGINE=Ie.OS=oe([h,v]),e.exports&&(t=e.exports=Ie),t.UAParser=Ie;var me=typeof n!==l&&(n.jQuery||n.Zepto);if(me&&!me.ua){var Me=new Ie;me.ua=Me.getResult(),me.ua.get=function(){return Me.getUA()},me.ua.set=function(Q){Me.setUA(Q);var le=Me.getResult();for(var pe in le)me.ua[pe]=le[pe]}}})(typeof window=="object"?window:Nn)})(Um,Um.exports);var u9=Um.exports;Object.defineProperty(ct,"__esModule",{value:!0});function c9(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var ir=C,bn=c9(ir),VC=u9,ho=new VC,or=ho.getBrowser(),d9=ho.getCPU(),Lr=ho.getDevice(),Wm=ho.getEngine(),mo=ho.getOS(),nl=ho.getUA(),UC=function(t){return ho.setUA(t)},rl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new VC(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},WC=Object.freeze({ClientUAInstance:ho,browser:or,cpu:d9,device:Lr,engine:Wm,os:mo,ua:nl,setUa:UC,parseUserAgent:rl});function YC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YC(Object(n),!0).forEach(function(r){g9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function il(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?il=function(t){return typeof t}:il=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},il(e)}function h9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p9(e,t,n){return t&&m9(e.prototype,t),e}function g9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ym(){return Ym=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ym.apply(this,arguments)}function v9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xm(e,t)}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function Xm(e,t){return Xm=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Xm(e,t)}function b9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Yr(e,t){if(e==null)return{};var n=b9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y9(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oc(e)}function E9(e,t){return S9(e)||C9(e,t)||w9(e,t)||x9()}function S9(e){if(Array.isArray(e))return e}function C9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function w9(e,t){if(e){if(typeof e=="string")return qC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qC(e,t)}}function qC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ar={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},br={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},Ba={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},T9={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},O9=function(t){switch(t){case ar.Mobile:return{isMobile:!0};case ar.Tablet:return{isTablet:!0};case ar.SmartTv:return{isSmartTV:!0};case ar.Console:return{isConsole:!0};case ar.Wearable:return{isWearable:!0};case ar.Browser:return{isBrowser:!0};case ar.Embedded:return{isEmbedded:!0};default:return T9}},N9=function(t){return UC(t)},Nt=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},Km=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Gm=function(t){var n=Km();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},_9=function(t,n,r,i,o){return{isBrowser:t,browserMajorVersion:Nt(n.major),browserFullVersion:Nt(n.version),browserName:Nt(n.name),engineName:Nt(r.name),engineVersion:Nt(r.version),osName:Nt(i.name),osVersion:Nt(i.version),userAgent:Nt(o)}},XC=function(t,n,r,i){return f9({},t,{vendor:Nt(n.vendor),model:Nt(n.model),os:Nt(r.name),osVersion:Nt(r.version),ua:Nt(i)})},I9=function(t,n,r,i){return{isSmartTV:t,engineName:Nt(n.name),engineVersion:Nt(n.version),osName:Nt(r.name),osVersion:Nt(r.version),userAgent:Nt(i)}},A9=function(t,n,r,i){return{isConsole:t,engineName:Nt(n.name),engineVersion:Nt(n.version),osName:Nt(r.name),osVersion:Nt(r.version),userAgent:Nt(i)}},P9=function(t,n,r,i){return{isWearable:t,engineName:Nt(n.name),engineVersion:Nt(n.version),osName:Nt(r.name),osVersion:Nt(r.version),userAgent:Nt(i)}},M9=function(t,n,r,i,o){return{isEmbedded:t,vendor:Nt(n.vendor),model:Nt(n.model),engineName:Nt(r.name),engineVersion:Nt(r.version),osName:Nt(i.name),osVersion:Nt(i.version),userAgent:Nt(o)}};function L9(e){var t=e?rl(e):WC,n=t.device,r=t.browser,i=t.engine,o=t.os,a=t.ua,s=O9(n.type),l=s.isBrowser,u=s.isMobile,c=s.isTablet,d=s.isSmartTV,f=s.isConsole,h=s.isWearable,p=s.isEmbedded;if(l)return _9(l,r,i,o,a);if(d)return I9(d,i,o,a);if(f)return A9(f,i,o,a);if(u||c)return XC(s,n,o,a);if(h)return P9(h,i,o,a);if(p)return M9(p,n,i,o,a)}var KC=function(t){var n=t.type;return n===ar.Mobile},GC=function(t){var n=t.type;return n===ar.Tablet},QC=function(t){var n=t.type;return n===ar.Mobile||n===ar.Tablet},ZC=function(t){var n=t.type;return n===ar.SmartTv},Nc=function(t){var n=t.type;return n===ar.Browser},JC=function(t){var n=t.type;return n===ar.Wearable},ew=function(t){var n=t.type;return n===ar.Console},tw=function(t){var n=t.type;return n===ar.Embedded},nw=function(t){var n=t.vendor;return Nt(n)},rw=function(t){var n=t.model;return Nt(n)},iw=function(t){var n=t.type;return Nt(n,"browser")},ow=function(t){var n=t.name;return n===Ba.Android},aw=function(t){var n=t.name;return n===Ba.Windows},sw=function(t){var n=t.name;return n===Ba.MAC_OS},lw=function(t){var n=t.name;return n===Ba.WindowsPhone},uw=function(t){var n=t.name;return n===Ba.IOS},cw=function(t){var n=t.version;return Nt(n)},dw=function(t){var n=t.name;return Nt(n)},fw=function(t){var n=t.name;return n===br.Chrome},hw=function(t){var n=t.name;return n===br.Firefox},mw=function(t){var n=t.name;return n===br.Chromium},_c=function(t){var n=t.name;return n===br.Edge},pw=function(t){var n=t.name;return n===br.Yandex},gw=function(t){var n=t.name;return n===br.Safari||n===br.MobileSafari},vw=function(t){var n=t.name;return n===br.MobileSafari},bw=function(t){var n=t.name;return n===br.Opera},yw=function(t){var n=t.name;return n===br.InternetExplorer||n===br.Ie},Ew=function(t){var n=t.name;return n===br.MIUI},Sw=function(t){var n=t.name;return n===br.SamsungBrowser},Cw=function(t){var n=t.version;return Nt(n)},ww=function(t){var n=t.major;return Nt(n)},xw=function(t){var n=t.name;return Nt(n)},Tw=function(t){var n=t.name;return Nt(n)},Ow=function(t){var n=t.version;return Nt(n)},Nw=function(){var t=Km(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},za=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},_w=function(){var t=Km();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Ni=function(){return Gm("iPad")},Iw=function(){return Gm("iPhone")},Aw=function(){return Gm("iPod")},Pw=function(t){return Nt(t)};function Mw(e){var t=e||WC,n=t.device,r=t.browser,i=t.os,o=t.engine,a=t.ua;return{isSmartTV:ZC(n),isConsole:ew(n),isWearable:JC(n),isEmbedded:tw(n),isMobileSafari:vw(r)||Ni(),isChromium:mw(r),isMobile:QC(n)||Ni(),isMobileOnly:KC(n),isTablet:GC(n)||Ni(),isBrowser:Nc(n),isDesktop:Nc(n),isAndroid:ow(i),isWinPhone:lw(i),isIOS:uw(i)||Ni(),isChrome:fw(r),isFirefox:hw(r),isSafari:gw(r),isOpera:bw(r),isIE:yw(r),osVersion:cw(i),osName:dw(i),fullBrowserVersion:Cw(r),browserVersion:ww(r),browserName:xw(r),mobileVendor:nw(n),mobileModel:rw(n),engineName:Tw(o),engineVersion:Ow(o),getUA:Pw(a),isEdge:_c(r)||za(a),isYandex:pw(r),deviceType:iw(n),isIOS13:_w(),isIPad13:Ni(),isIPhone13:Iw(),isIPod13:Aw(),isElectron:Nw(),isEdgeChromium:za(a),isLegacyEdge:_c(r)&&!za(a),isWindows:aw(i),isMacOs:sw(i),isMIUI:Ew(r),isSamsungBrowser:Sw(r)}}var Lw=ZC(Lr),Dw=ew(Lr),kw=JC(Lr),D9=tw(Lr),k9=vw(or)||Ni(),R9=mw(or),Ic=QC(Lr)||Ni(),Rw=KC(Lr),$w=GC(Lr)||Ni(),Fw=Nc(Lr),$9=Nc(Lr),Bw=ow(mo),zw=lw(mo),Hw=uw(mo)||Ni(),F9=fw(or),B9=hw(or),z9=gw(or),H9=bw(or),jw=yw(or),j9=cw(mo),V9=dw(mo),U9=Cw(or),W9=ww(or),Y9=xw(or),q9=nw(Lr),X9=rw(Lr),K9=Tw(Wm),G9=Ow(Wm),Q9=Pw(nl),Z9=_c(or)||za(nl),J9=pw(or),ez=iw(Lr),tz=_w(),nz=Ni(),rz=Iw(),iz=Aw(),oz=Nw(),az=za(nl),sz=_c(or)&&!za(nl),lz=aw(mo),uz=sw(mo),cz=Ew(or),dz=Sw(or),fz=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=rl(t),r=n.device,i=n.browser,o=n.os,a=n.engine,s=n.ua;return Mw({device:r,browser:i,os:o,engine:a,ua:s})},hz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Bw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},mz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Fw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},pz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return jw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},gz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Hw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},vz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Ic?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},bz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return $w?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},yz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return zw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Ez=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=Yr(t,["renderWithFragment","children","viewClassName","style"]);return Rw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Sz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Lw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},Cz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return Dw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},wz=function(t){var n=t.renderWithFragment,r=t.children,i=Yr(t,["renderWithFragment","children"]);return kw?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",i,r):null},xz=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,o=Yr(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?bn.createElement(ir.Fragment,null,r):bn.createElement("div",o,r):null};function Tz(e){return function(t){v9(n,t);function n(r){var i;return h9(this,n),i=y9(this,qm(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Oc(i)),i.onOrientationChange=i.onOrientationChange.bind(Oc(i)),i.onPageLoad=i.onPageLoad.bind(Oc(i)),i.state={isLandscape:!1,isPortrait:!1},i}return p9(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":il(window))!==void 0&&Ic&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return bn.createElement(e,Ym({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(bn.Component)}function Oz(){var e=ir.useState(function(){var o=window.innerWidth>window.innerHeight?90:0;return{isPortrait:o===0,isLandscape:o===90,orientation:o===0?"portrait":"landscape"}}),t=E9(e,2),n=t[0],r=t[1],i=ir.useCallback(function(){var o=window.innerWidth>window.innerHeight?90:0,a={isPortrait:o===0,isLandscape:o===90,orientation:o===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return ir.useEffect(function(){return(typeof window>"u"?"undefined":il(window))!==void 0&&Ic&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function Vw(e){var t=e||window.navigator.userAgent;return rl(t)}function Nz(e){var t=e||window.navigator.userAgent,n=Vw(t),r=Mw(n);return[r,n]}ct.AndroidView=hz,ct.BrowserTypes=br,ct.BrowserView=mz,ct.ConsoleView=Cz,ct.CustomView=xz,ct.IEView=pz,ct.IOSView=gz,ct.MobileOnlyView=Ez,ct.MobileView=vz,ct.OsTypes=Ba,ct.SmartTVView=Sz,ct.TabletView=bz,ct.WearableView=wz,ct.WinPhoneView=yz,ct.browserName=Y9,ct.browserVersion=W9,ct.deviceDetect=L9,ct.deviceType=ez,ct.engineName=K9,ct.engineVersion=G9,ct.fullBrowserVersion=U9,ct.getSelectorsByUserAgent=fz,ct.getUA=Q9,ct.isAndroid=Bw,ct.isBrowser=Fw,ct.isChrome=F9,ct.isChromium=R9,ct.isConsole=Dw,ct.isDesktop=$9,ct.isEdge=Z9,ct.isEdgeChromium=az,ct.isElectron=oz,ct.isEmbedded=D9,ct.isFirefox=B9,ct.isIE=jw,ct.isIOS=Hw,ct.isIOS13=tz,ct.isIPad13=nz,ct.isIPhone13=rz,ct.isIPod13=iz,ct.isLegacyEdge=sz,ct.isMIUI=cz,ct.isMacOs=uz;var jo=ct.isMobile=Ic;ct.isMobileOnly=Rw,ct.isMobileSafari=k9,ct.isOpera=H9,ct.isSafari=z9,ct.isSamsungBrowser=dz,ct.isSmartTV=Lw,ct.isTablet=$w,ct.isWearable=kw,ct.isWinPhone=zw,ct.isWindows=lz,ct.isYandex=J9,ct.mobileModel=X9,ct.mobileVendor=q9,ct.osName=V9,ct.osVersion=j9,ct.parseUserAgent=rl,ct.setUserAgent=N9,ct.useDeviceData=Vw,ct.useDeviceSelectors=Nz;var Uw=ct.useMobileOrientation=Oz;ct.withOrientationChange=Tz;class _z extends C.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Error caught by boundary:",t),console.error("Component stack:",n.componentStack)}render(){var t;return this.state.hasError?this.props.fallback||q.jsxs("div",{style:{padding:"20px",border:"1px solid #f5c6cb",borderRadius:"4px",backgroundColor:"#f8d7da",color:"#721c24",margin:"10px 0"},children:[q.jsx("h3",{children:In.t("error.scoreViewerError")}),q.jsx("p",{children:(t=this.state.error)==null?void 0:t.message}),q.jsx("button",{onClick:()=>this.setState({hasError:!1}),style:{backgroundColor:"#721c24",color:"white",border:"none",padding:"8px 12px",borderRadius:"4px",cursor:"pointer"},children:In.t("error.tryAgain")})]}):this.props.children}}const Iz="Left",Az="Right",Pz="Up",Mz="Down",Ha={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Qm={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Ww="mousemove",Yw="mouseup",Lz="touchend",Dz="touchmove",kz="touchstart";function Rz(e,t,n,r){return e>t?n>0?Az:Iz:r>0?Mz:Pz}function qw(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function $z(e,t){const n=c=>{const d="touches"in c;d&&c.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(Ww,r),document.addEventListener(Yw,a));const{clientX:p,clientY:g}=d?c.touches[0]:c,v=qw([p,g],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:c}),Object.assign(Object.assign(Object.assign({},f),Qm),{initial:v.slice(),xy:v,start:c.timeStamp||0})})},r=c=>{e((d,f)=>{const h="touches"in c;if(h&&c.touches.length>1)return d;if(c.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:p,clientY:g}=h?c.touches[0]:c,[v,b]=qw([p,g],f.rotationAngle),y=v-d.xy[0],E=b-d.xy[1],x=Math.abs(y),O=Math.abs(E),S=(c.timeStamp||0)-d.start,T=Math.sqrt(x*x+O*O)/(S||1),I=[y/(S||1),E/(S||1)],N=Rz(x,O,y,E),_=typeof f.delta=="number"?f.delta:f.delta[N.toLowerCase()]||Ha.delta;if(x<_&&O<_&&!d.swiping)return d;const P={absX:x,absY:O,deltaX:y,deltaY:E,dir:N,event:c,first:d.first,initial:d.initial,velocity:T,vxvy:I};P.first&&f.onSwipeStart&&f.onSwipeStart(P),f.onSwiping&&f.onSwiping(P);let A=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${N}`])&&(A=!0),A&&f.preventScrollOnSwipe&&f.trackTouch&&c.cancelable&&c.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:P,swiping:!0})})},i=c=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(c.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:c}),f.onSwiped&&f.onSwiped(h);const p=f[`onSwiped${h.dir}`];p&&p(h)}}else f.onTap&&f.onTap({event:c});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:c}),Object.assign(Object.assign(Object.assign({},d),Qm),{eventData:h})})},o=()=>{document.removeEventListener(Ww,r),document.removeEventListener(Yw,a)},a=c=>{o(),i(c)},s=(c,d)=>{let f=()=>{};if(c&&c.addEventListener){const h=Object.assign(Object.assign({},Ha.touchEventOptions),d.touchEventOptions),p=[[kz,n,h],[Dz,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[Lz,i,h]];p.forEach(([g,v,b])=>c.addEventListener(g,v,b)),f=()=>p.forEach(([g,v])=>c.removeEventListener(g,v))}return f},u={ref:c=>{c!==null&&e((d,f)=>{if(d.el===c)return d;const h={};return d.el&&d.el!==c&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&c&&(h.cleanUpTouch=s(c,f)),Object.assign(Object.assign(Object.assign({},d),{el:c}),h)})}};return t.trackMouse&&(u.onMouseDown=n),[u,s]}function Fz(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function Bz(e){const{trackMouse:t}=e,n=m.useRef(Object.assign({},Qm)),r=m.useRef(Object.assign({},Ha)),i=m.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ha),e);let o;for(o in Ha)r.current[o]===void 0&&(r.current[o]=Ha[o]);const[a,s]=m.useMemo(()=>$z(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=Fz(n.current,r.current,i.current,s),a}const _i=(e,t,n)=>q.jsxs("filter",{id:`highlighting-${e}`,x:"-100%",y:"-100%",width:"300%",height:"300%",children:[q.jsx("feMorphology",{id:`radius-${e}`,in:"SourceAlpha",operator:"dilate",radius:n,result:"expanded"}),q.jsx("feFlood",{floodColor:t,floodOpacity:"0.6",result:"color"}),q.jsx("feComposite",{in:"color",in2:"expanded",operator:"in",result:"colored-background"}),q.jsx("feComposite",{in:"SourceGraphic",in2:"colored-background",operator:"over"})]});function zz(){const e=document.querySelector(".svg-container"),t=document.querySelector(".svg-container svg");!t||!e||["app","choice","corr","sic","unclear","supplied","reg"].forEach(n=>{t.querySelectorAll(`g .${n}.bounding-box`).forEach(i=>{var a,s,l;if(i.childElementCount==0&&i.nextSibling){var o=(a=i.nextElementSibling)==null?void 0:a.getBBox();if(o){o.width==0&&o.height==0&&n=="app"&&((s=i.nextElementSibling)!=null&&s.nextElementSibling)&&(console.log("expanding app bounding box for the unselected"),o=(l=i.nextElementSibling.nextElementSibling)==null?void 0:l.getBBox());const u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",o.x.toString()),u.setAttribute("y",o.y.toString()),u.setAttribute("width",o.width.toString()),u.setAttribute("height",o.height.toString()),u.setAttribute("fill","#8fe3ff"),u.setAttribute("fill-opacity","0"),i.appendChild(u)}}})})}function Hz(e){const t=document.querySelector(".svg-container"),n=document.querySelector(".svg-container svg");!n||!t||e.forEach(r=>{const i=CSS.escape(r);n.querySelectorAll(`g.staff:has(g.rdg.bounding-box[data-label="${i}"])`).forEach(a=>{const s=a.getBBox(),l=a.querySelector(`g.rdg.bounding-box[data-label="${i}"`);if(!s||!l)return;const u=document.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",s.x.toString()),u.setAttribute("y",s.y.toString()),u.setAttribute("width",s.width.toString()),u.setAttribute("height",s.height.toString()),u.classList.add("rdg-recontruction-highlight"),l.appendChild(u)})})}const Gi=["#8e0000","#227710","#5500aa","#e9227a","#0026f3","#11ddff","#8e0000","#227710"],jz=`
281
281
  .notehead.note-highlight { filter: var(--high); fill: var(--hgcolor); }
282
282
  g.stem path.note-highlight { color: var(--hgcolor); stroke-width: 36; }
283
283
  .verse[data-n="1"].note-highlight { font-weight: var(--verseFontWeight); fill: var(--hgcolor); }
284
284
  `,Vz=q.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"0px",width:"0px"},children:[q.jsxs("defs",{children:[_i("1",Gi[0],100),_i("2",Gi[1],100),_i("3",Gi[2],100),_i("4",Gi[3],100),_i("5",Gi[4],100),_i("6",Gi[5],100),_i("7",Gi[6],100),_i("8",Gi[7],100),_i("hover","#fe3b20",0)]}),q.jsx("animate",{id:"radius-1-animation",xlinkHref:"#radius-1",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-2-animation",xlinkHref:"#radius-2",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-3-animation",xlinkHref:"#radius-3",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-4-animation",xlinkHref:"#radius-4",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-5-animation",xlinkHref:"#radius-5",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-6-animation",xlinkHref:"#radius-6",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-7-animation",xlinkHref:"#radius-7",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"}),q.jsx("animate",{id:"radius-8-animation",xlinkHref:"#radius-8",attributeName:"radius",from:"10",to:"600",dur:"6s",begin:"0s",fill:"freeze",repeatCount:"indefinite",restart:"always"})]}),Uz=e=>[1,2,3,4,5,6,7,8].filter(t=>!e.has(`${t}`)).map(t=>`.staff[data-n="${t}"] { --high: url(#highlighting-${t}); --verseFontWeight: bold; --hgcolor: ${Gi[t-1]} }`).join(`
285
- `);function Wz({timemap:e}){const t=ge.use.isLoading(),n=ge.use.playingState(),r=ge.use.playingPosition(),i=ge.use.seekPosition(),o=ge.use.showReconstructions(),a=ge.use.score(),s=ge.use.renderedSvgData(),l=C.useRef([]),u=C.useRef(-1),c=C.useRef(null),d=()=>{const y={};return[1,2,3,4,5,6,7,8].forEach(E=>{const x=`#radius-${E}-animation`,O=document.querySelector(x);O&&(y[x]=O)}),y};C.useEffect(()=>{if(c.current==null){const y=d();y!=null&&(c.current=y)}},[]);const f=()=>{c.current&&Object.values(c.current).forEach(y=>{y==null||y.endElement()})},h=y=>{var E;if(c.current!=null)for(let x of y)(E=c.current[x])==null||E.beginElement()};C.useEffect(()=>{if(e.length<=0&&t){l.current=[];return}l.current=[...e],u.current=-1},[e]),C.useEffect(()=>{e.length<=0&&t||n!=Ct.PLAYING&&(f(),r==0&&g())},[n]);const p=y=>{var E,x;(x=(E=e.slice().reverse().find(O=>O.on&&O.tstamp<=y))==null?void 0:E.on)==null||x.forEach(O=>{var S;(S=document==null?void 0:document.querySelectorAll(`#${O} > *`))==null||S.forEach(T=>{T.classList.add("note-highlight")})})};C.useEffect(()=>{n==Ct.PAUSED&&p(r)},[s]);const g=()=>{l.current=[...e],u.current=-1;const y=document==null?void 0:document.querySelectorAll(".note-highlight");y==null||y.forEach(E=>{E.classList.remove("note-highlight")})},v=C.useMemo(()=>{const y=new Set,E=a==null?void 0:a.audioOverlayTracks.map(x=>x.label);for(let[x,O]of Object.entries(o))E!=null&&E.includes(O)||y.add(x);return y},[a,o]),b=C.useMemo(()=>Uz(v),[v]);return C.useEffect(()=>{if(e.length<=0&&t)return;if(n==Ct.STOPPED){g();return}const y=Math.round(r),E=[];for(var x=l.current.shift();x!=null&&x.tstamp<=u.current;)x=l.current.shift();for(;x!=null&&x.tstamp<=y;)E.push(x),x=l.current.shift();if(x!=null&&l.current.unshift(x),u.current=y,E.length<=0)return;const O=new Set(E.flatMap(T=>T.off)),S=new Set(E.flatMap(T=>T.on).filter(T=>!O.has(T)));if(O.forEach(T=>{if(T){const I=CSS.escape(T),N=[...document==null?void 0:document.querySelectorAll(`#${I} .note-highlight`)];N==null||N.forEach(_=>{_.classList.remove("note-highlight")})}}),n==Ct.PLAYING){const T=new Set(E.flatMap(I=>I.stavesOn).filter(I=>I!=null));h([...T])}S.forEach(T=>{var I;if(T){const N=CSS.escape(T);(I=document==null?void 0:document.querySelectorAll(`#${N} > *`))==null||I.forEach(_=>{_.classList.add("note-highlight")})}})},[r]),C.useEffect(()=>{i!=-1&&(f(),g(),i>0&&n==Ct.PAUSED&&p(i))},[i]),q.jsxs("div",{className:"player-highlighter",style:{width:"0px",height:"0px"},children:[Vz,q.jsx("style",{children:`
285
+ `);function Wz({timemap:e}){const t=ge.use.isLoading(),n=ge.use.playingState(),r=ge.use.playingPosition(),i=ge.use.seekPosition(),o=ge.use.showReconstructions(),a=ge.use.score(),s=ge.use.renderedSvgData(),l=C.useRef([]),u=C.useRef(-1),c=C.useRef(null),d=()=>{const y={};return[1,2,3,4,5,6,7,8].forEach(E=>{const x=`#radius-${E}-animation`,O=document.querySelector(x);O&&(y[x]=O)}),y};C.useEffect(()=>{if(c.current==null){const y=d();y!=null&&(c.current=y)}},[]);const f=()=>{c.current&&Object.values(c.current).forEach(y=>{y==null||y.endElement()})},h=y=>{var E;if(c.current!=null)for(let x of y)(E=c.current[x])==null||E.beginElement()};C.useEffect(()=>{if(e.length<=0&&t){l.current=[];return}l.current=[...e],u.current=-1},[e]),C.useEffect(()=>{e.length<=0&&t||n!=It.PLAYING&&(f(),r==0&&g())},[n]);const p=y=>{var E,x;(x=(E=e.slice().reverse().find(O=>O.on&&O.tstamp<=y))==null?void 0:E.on)==null||x.forEach(O=>{var S;(S=document==null?void 0:document.querySelectorAll(`#${O} > *`))==null||S.forEach(T=>{T.classList.add("note-highlight")})})};C.useEffect(()=>{n==It.PAUSED&&p(r)},[s]);const g=()=>{l.current=[...e],u.current=-1;const y=document==null?void 0:document.querySelectorAll(".note-highlight");y==null||y.forEach(E=>{E.classList.remove("note-highlight")})},v=C.useMemo(()=>{const y=new Set,E=a==null?void 0:a.audioOverlayTracks.map(x=>x.label);for(let[x,O]of Object.entries(o))E!=null&&E.includes(O)||y.add(x);return y},[a,o]),b=C.useMemo(()=>Uz(v),[v]);return C.useEffect(()=>{if(e.length<=0&&t)return;if(n==It.STOPPED){g();return}const y=Math.round(r),E=[];for(var x=l.current.shift();x!=null&&x.tstamp<=u.current;)x=l.current.shift();for(;x!=null&&x.tstamp<=y;)E.push(x),x=l.current.shift();if(x!=null&&l.current.unshift(x),u.current=y,E.length<=0)return;const O=new Set(E.flatMap(T=>T.off)),S=new Set(E.flatMap(T=>T.on).filter(T=>!O.has(T)));if(O.forEach(T=>{if(T){const I=CSS.escape(T),N=[...document==null?void 0:document.querySelectorAll(`#${I} .note-highlight`)];N==null||N.forEach(_=>{_.classList.remove("note-highlight")})}}),n==It.PLAYING){const T=new Set(E.flatMap(I=>I.stavesOn).filter(I=>I!=null));h([...T])}S.forEach(T=>{var I;if(T){const N=CSS.escape(T);(I=document==null?void 0:document.querySelectorAll(`#${N} > *`))==null||I.forEach(_=>{_.classList.add("note-highlight")})}})},[r]),C.useEffect(()=>{i!=-1&&(f(),g(),i>0&&n==It.PAUSED&&p(i))},[i]),q.jsxs("div",{className:"player-highlighter",style:{width:"0px",height:"0px"},children:[Vz,q.jsx("style",{children:`
286
286
  ${b}
287
287
  ${jz}
288
- `})]})}let ol=null;const Yz=1e3;function qz(e,t,n){const r=ge.use.playingState(),i=ge.use.seekPosition(),o=ge.use.setSeekPosition(),a=ge.use.setPlayingState(),s=ge.use.setPlayingPosition(),l=ge.use.currentPage(),u=ge.use.goToPage(),c=ge.use.autoScroll(),d=ge.use.setAutoScroll(),f=ge.use.renderedSvgData(),h=E0(),p=C.useRef(null),g=C.useRef(0),v=C.useRef(0),b=C.useRef(null),y=C.useRef(new Map),E=C.useRef(new Map),[x,O]=C.useState(!1),[S,T]=C.useState([]),I=C.useRef(!0),N=C.useCallback(()=>{if(p.current&&p.current.state!=="closed")return p.current;if(ol&&ol.state!=="closed")return p.current=ol,ol;try{const G=window.AudioContext||window.webkitAudioContext;return p.current=new G,ol=p.current,p.current.state==="suspended"&&(I.current=!0),p.current}catch(G){return console.error("Failed to create AudioContext:",G),null}},[]),_=C.useCallback(async()=>{const G=N();if(!G)return!1;if(G.state==="suspended")try{return await G.resume(),I.current=!1,!0}catch(Y){return console.error("Failed to resume AudioContext:",Y),!1}return G.state==="running"?(I.current=!1,!0):!1},[N]);C.useEffect(()=>{if(N())return()=>{b.current&&(cancelAnimationFrame(b.current),b.current=null)}},[N]),C.useEffect(()=>{const G=async Y=>{console.log(`Loading audio from URL: ${Y}`);const te=N();if(te){E.current.clear(),T([]);try{const se=await P(Y,te);E.current.set("main",se),T(["main"]),O(!0)}catch(se){console.error("Failed to load main audio:",se)}}};r!==Ct.STOPPED&&(B(),a(Ct.STOPPED)),O(!1),e&&G(e)},[e,n]),C.useEffect(()=>{const G=async Y=>{const te=N();te&&await Promise.all(Y.map(async se=>{if(se.url)try{console.log(`Loading audio overlay from URL: ${se.url}`);const ce=await P(se.url,te);E.current.set(se.id,ce),T(ue=>[...ue,se.id])}catch(ce){console.error(`Failed to load track ${se.id} from ${se.url}`,ce)}}))};t.length>0&&G(t)},[t]),C.useEffect(()=>()=>{var G;B(),((G=p.current)==null?void 0:G.state)==="running"&&p.current.suspend().then(()=>{console.log("Audio context suspended"),p.current=null})},[]);const P=C.useCallback(async(G,Y)=>{const te=await fetch(G);if(!te.ok)throw new Error(`HTTP error! status: ${te.status}`);const se=await te.arrayBuffer();return await Y.decodeAudioData(se)},[]),A=async G=>{if(!c&&r!==Ct.STOPPED){const Y=await(h==null?void 0:h.getElementsAtTime(G)),te=Y==null?void 0:Y.page;te&&te!==l&&u(te)}};C.useEffect(()=>{i<=0||(console.log(`Seeking to position: ${i} ms. Playing state: ${r}`),r===Ct.PLAYING?(B(),A(i),z(i),o(-1)):(v.current=i,A(i),o(-1)))},[i]),C.useEffect(()=>{switch(r){case Ct.PLAYING:I.current?_().then(G=>{G&&z(v.current)}):z(v.current);break;case Ct.PAUSED:F();break;case Ct.STOPPED:B(),v.current=0;break}},[r,_]);const M=C.useCallback(()=>{r===Ct.PLAYING?a(Ct.PAUSED):r===Ct.PAUSED&&a(Ct.PLAYING)},[r,a]),D=C.useCallback(()=>{a(Ct.PLAYING)},[a]),R=C.useCallback(()=>{a(Ct.STOPPED),o(0)},[a,o]),$=C.useCallback(()=>{const G=N();if(!G||g.current===0)return v.current;const Y=G.currentTime-g.current;return Math.max(0,Y*1e3)},[N]),F=C.useCallback(()=>{b.current&&(cancelAnimationFrame(b.current),b.current=null),N()&&(v.current=$(),y.current.forEach(Y=>{try{Y.stop()}catch{}}),y.current.clear())},[N,$]),B=C.useCallback(()=>{F(),v.current=0,s(0)},[F]),z=C.useCallback(G=>{B();const Y=N();!Y||E.current.size===0||_().then(te=>{if(!te)return;v.current=G;const se=G/1e3;g.current=Y.currentTime-se,E.current.forEach((ce,ue)=>{const de=Y.createBufferSource();de.buffer=ce,de.connect(Y.destination),de.start(0,se),y.current.set(ue,de)}),H()})},[B,N,_,r]),L=C.useMemo(()=>f!=null&&f.timemap?f.timemap:[],[f]),H=C.useCallback(()=>{if(r!==Ct.PLAYING)return;const G=$();if(s(G),L&&L.length>0&&G>L[L.length-1].tstamp+Yz){B(),R();return}A(G),b.current=requestAnimationFrame(H)},[$,s,L,B,R,A,r]),W=C.useCallback(()=>r===Ct.PLAYING?"Pause":"Play",[r]),k=C.useCallback(()=>{B(),R()},[r,a,c,d,B]);return{canPlay:x,loadedTracks:S,playPauseTooltip:W,handlePlay:D,handlePlayPause:M,handleStop:k}}function Xz(){const e=ge.use.score(),t=ge.use.playingState(),n=ge.use.renderedSvgData(),r=ge.use.showReconstructions(),i=C.useMemo(()=>(e==null?void 0:e.audioOverlayTracks.filter(p=>Object.values(r).includes(p.label)))||[],[e,r]),{canPlay:o,playPauseTooltip:a,handlePlay:s,handlePlayPause:l,handleStop:u}=qz((e==null?void 0:e.audioUrl)||null,i,e==null?void 0:e.originalMei),c=C.useMemo(()=>q.jsx(Ki,{title:"Play",children:q.jsx(Hn,{icon:q.jsx(AC,{style:{fontSize:"36px"}}),onClick:s,disabled:!o})}),[o,s]),d=C.useMemo(()=>q.jsx(Ki,{title:"Stop",children:q.jsx(Hn,{icon:q.jsx(SC,{style:{fontSize:"36px"}}),onClick:u})}),[u]),f=C.useMemo(()=>q.jsx(Ki,{title:a(),children:q.jsx(Hn,{icon:q.jsx(IC,{style:{fontSize:"36px"}}),onClick:l})}),[a,l]),h=C.useMemo(()=>e!=null&&e.audioUrl?q.jsx("div",{style:{position:"absolute",bottom:0,right:0,padding:"8px"},children:q.jsxs(vn,{direction:"horizontal",size:"small",children:[t!==Ct.STOPPED?d:null,t===Ct.PLAYING?f:c]})}):null,[e,t,c,d,f]);return q.jsxs("div",{style:{width:"0px",height:"0px"},children:[(n==null?void 0:n.timemap)&&q.jsx(Wz,{timemap:n.timemap}),h]})}const Xw=["note","rest","clef","accid","app","choice","corr","sic","unclear","supplied","reg","measure"];function Kw(){var l;const{t:e}=cr("common"),t=ge.use.showEditorial(),n=ge.use.setShowingEditorial(),r=(l=ge.use.score())==null?void 0:l.editorialItems,i=C.useCallback(u=>{const c=u.getAttribute("data-corresp"),d=c==null?void 0:c.replace("#","");return r==null?void 0:r.find(f=>{var h;return u.id===f.id||d!=null&&((h=f.correspIds)==null?void 0:h.includes(d))})},[r]),o=C.useCallback(u=>{for(let c of Xw){const d=u.closest(`.${c}`),f=d?i(d):null;if(f)return f}return null},[i,n]),a=C.useCallback(u=>{if(!t)return;const c=u.target,d=o(c);if(d)n(d.id);else{const f=c.closest(".bounding-box"),h=f==null?void 0:f.parentElement;if(h&&[...h.classList.values()].some(p=>Xw.includes(p))){const p=i(h);p&&n(p.id)}}},[t,i,n]),s=C.useCallback(u=>{switch(u){case"corr":return e("editorial.formatType.corr");case"unclear":return e("editorial.formatType.unclear");case"choice":return e("editorial.formatType.choice");case"app":return e("editorial.formatType.app");case"lem":return e("editorial.formatType.lem");case"rdg":return e("editorial.formatType.rdg");case"sic":return e("editorial.formatType.sic");case"supplied":return e("editorial.formatType.supplied");case"reg":return e("editorial.formatType.reg");case"clef[data-corresp]":return e("editorial.formatType.clefChange");default:return e("editorial.formatType.default",{type:u})}},[e]);return{showEditorial:t,editorials:r,handleElementClick:a,formatType:s,getEditorialAttached:i}}function Kz(e,t="#fe3b20",n=0){return{hoverFilterElement:q.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"0px",width:"0px"},children:[q.jsx("defs",{children:_i("hover",t,n)}),q.jsx("animate",{id:"radius-hover-animation",xlinkHref:"#radius-hover",attributeName:"radius",begin:`${e}.mouseover`,from:"0",to:"50",dur:"0.1s",fill:"freeze",repeatCount:"1",restart:"whenNotActive"})]})}}function Gz({svgId:e}){const{hoverFilterElement:t}=Kz(e);return q.jsx("div",{style:{height:"0px",width:"0px"},children:t})}const ja=Math.min,Vo=Math.max,Ac=Math.round,Pc=Math.floor,Ii=e=>({x:e,y:e}),Qz={left:"right",right:"left",bottom:"top",top:"bottom"},Zz={start:"end",end:"start"};function Zm(e,t,n){return Vo(e,ja(t,n))}function al(e,t){return typeof e=="function"?e(t):e}function Uo(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function Gw(e){return e==="x"?"y":"x"}function Jm(e){return e==="y"?"height":"width"}const Jz=new Set(["top","bottom"]);function po(e){return Jz.has(Uo(e))?"y":"x"}function ep(e){return Gw(po(e))}function eH(e,t,n){n===void 0&&(n=!1);const r=sl(e),i=ep(e),o=Jm(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Mc(a)),[a,Mc(a)]}function tH(e){const t=Mc(e);return[tp(e),t,tp(t)]}function tp(e){return e.replace(/start|end/g,t=>Zz[t])}const Qw=["left","right"],Zw=["right","left"],nH=["top","bottom"],rH=["bottom","top"];function iH(e,t,n){switch(e){case"top":case"bottom":return n?t?Zw:Qw:t?Qw:Zw;case"left":case"right":return t?nH:rH;default:return[]}}function oH(e,t,n,r){const i=sl(e);let o=iH(Uo(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tp)))),o}function Mc(e){return e.replace(/left|right|bottom|top/g,t=>Qz[t])}function aH(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jw(e){return typeof e!="number"?aH(e):{top:e,right:e,bottom:e,left:e}}function Lc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ex(e,t,n){let{reference:r,floating:i}=e;const o=po(t),a=ep(t),s=Jm(a),l=Uo(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(sl(t)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const sH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=ex(u,r,l),f=r,h={},p=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x:y,y:E,data:x,reset:O}=await b({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=y??c,d=E??d,h={...h,[v]:{...h[v],...x}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(u=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=ex(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function tx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=al(t,e),p=Jw(h),v=s[f?d==="floating"?"reference":"floating":d],b=Lc(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},O=Lc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:E,strategy:l}):y);return{top:(b.top-O.top+p.top)/x.y,bottom:(O.bottom-b.bottom+p.bottom)/x.y,left:(b.left-O.left+p.left)/x.x,right:(O.right-b.right+p.right)/x.x}}const lH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=al(e,t)||{};if(u==null)return{};const d=Jw(c),f={x:n,y:r},h=ep(i),p=Jm(h),g=await a.getDimensions(u),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",E=v?"clientHeight":"clientWidth",x=o.reference[p]+o.reference[h]-f[h]-o.floating[p],O=f[h]-o.reference[h],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let T=S?S[E]:0;(!T||!await(a.isElement==null?void 0:a.isElement(S)))&&(T=s.floating[E]||o.floating[p]);const I=x/2-O/2,N=T/2-g[p]/2-1,_=ja(d[b],N),P=ja(d[y],N),A=_,M=T-g[p]-P,D=T/2-g[p]/2+I,R=Zm(A,D,M),$=!l.arrow&&sl(i)!=null&&D!==R&&o.reference[p]/2-(D<A?_:P)-g[p]/2<0,F=$?D<A?D-A:D-M:0;return{[h]:f[h]+F,data:{[h]:R,centerOffset:D-R-F,...$&&{alignmentOffset:F}},reset:$}}}),uH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=al(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Uo(i),y=po(s),E=Uo(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=f||(E||!g?[Mc(s)]:tH(s)),S=p!=="none";!f&&S&&O.push(...oH(s,g,p,x));const T=[s,...O],I=await tx(t,v),N=[];let _=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&N.push(I[b]),d){const D=eH(i,a,x);N.push(I[D[0]],I[D[1]])}if(_=[..._,{placement:i,overflows:N}],!N.every(D=>D<=0)){var P,A;const D=(((P=o.flip)==null?void 0:P.index)||0)+1,R=T[D];if(R&&(!(d==="alignment"?y!==po(R):!1)||_.every(B=>B.overflows[0]>0&&po(B.placement)===y)))return{data:{index:D,overflows:_},reset:{placement:R}};let $=(A=_.filter(F=>F.overflows[0]<=0).sort((F,B)=>F.overflows[1]-B.overflows[1])[0])==null?void 0:A.placement;if(!$)switch(h){case"bestFit":{var M;const F=(M=_.filter(B=>{if(S){const z=po(B.placement);return z===y||z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,L)=>z+L,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:M[0];F&&($=F);break}case"initialPlacement":$=s;break}if(i!==$)return{reset:{placement:$}}}return{}}}},cH=new Set(["left","top"]);async function dH(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Uo(n),s=sl(n),l=po(n)==="y",u=cH.has(a)?-1:1,c=o&&l?-1:1,d=al(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const fH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await dH(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},hH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...l}=al(e,t),u={x:n,y:r},c=await tx(t,l),d=po(Uo(i)),f=Gw(d);let h=u[f],p=u[d];if(o){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+c[v],E=h-c[b];h=Zm(y,h,E)}if(a){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+c[v],E=p-c[b];p=Zm(y,p,E)}const g=s.fn({...t,[f]:h,[d]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:o,[d]:a}}}}}};function Dc(){return typeof window<"u"}function Va(e){return nx(e)?(e.nodeName||"").toLowerCase():"#document"}function Dr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ai(e){var t;return(t=(nx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nx(e){return Dc()?e instanceof Node||e instanceof Dr(e).Node:!1}function li(e){return Dc()?e instanceof Element||e instanceof Dr(e).Element:!1}function Pi(e){return Dc()?e instanceof HTMLElement||e instanceof Dr(e).HTMLElement:!1}function rx(e){return!Dc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dr(e).ShadowRoot}const mH=new Set(["inline","contents"]);function ll(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!mH.has(i)}const pH=new Set(["table","td","th"]);function gH(e){return pH.has(Va(e))}const vH=[":popover-open",":modal"];function kc(e){return vH.some(t=>{try{return e.matches(t)}catch{return!1}})}const bH=["transform","translate","scale","rotate","perspective"],yH=["transform","translate","scale","rotate","perspective","filter"],EH=["paint","layout","strict","content"];function np(e){const t=rp(),n=li(e)?ui(e):e;return bH.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||yH.some(r=>(n.willChange||"").includes(r))||EH.some(r=>(n.contain||"").includes(r))}function SH(e){let t=go(e);for(;Pi(t)&&!Ua(t);){if(np(t))return t;if(kc(t))return null;t=go(t)}return null}function rp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CH=new Set(["html","body","#document"]);function Ua(e){return CH.has(Va(e))}function ui(e){return Dr(e).getComputedStyle(e)}function Rc(e){return li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(Va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rx(e)&&e.host||Ai(e);return rx(t)?t.host:t}function ix(e){const t=go(e);return Ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pi(t)&&ll(t)?t:ix(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ix(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Dr(i);if(o){const s=ip(a);return t.concat(a,a.visualViewport||[],ll(i)?i:[],s&&n?ul(s):[])}return t.concat(i,ul(i,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ox(e){const t=ui(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Pi(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Ac(n)!==o||Ac(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function op(e){return li(e)?e:e.contextElement}function Wa(e){const t=op(e);if(!Pi(t))return Ii(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ox(t);let a=(o?Ac(n.width):n.width)/r,s=(o?Ac(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wH=Ii(0);function ax(e){const t=Dr(e);return!rp()||!t.visualViewport?wH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dr(e)?!1:t}function Wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=op(e);let a=Ii(1);t&&(r?li(r)&&(a=Wa(r)):a=Wa(e));const s=xH(o,n,r)?ax(o):Ii(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Dr(o),h=r&&li(r)?Dr(r):r;let p=f,g=ip(p);for(;g&&r&&h!==p;){const v=Wa(g),b=g.getBoundingClientRect(),y=ui(g),E=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,x=b.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=E,u+=x,p=Dr(g),g=ip(p)}}return Lc({width:c,height:d,x:l,y:u})}function ap(e,t){const n=Rc(e).scrollLeft;return t?t.left+n:Wo(Ai(e)).left+n}function sx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ap(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function TH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Ai(r),s=t?kc(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Ii(1);const c=Ii(0),d=Pi(r);if((d||!d&&!o)&&((Va(r)!=="body"||ll(a))&&(l=Rc(r)),Pi(r))){const h=Wo(r);u=Wa(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=a&&!d&&!o?sx(a,l,!0):Ii(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function OH(e){return Array.from(e.getClientRects())}function NH(e){const t=Ai(e),n=Rc(e),r=e.ownerDocument.body,i=Vo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Vo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ap(e);const s=-n.scrollTop;return ui(r).direction==="rtl"&&(a+=Vo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function _H(e,t){const n=Dr(e),r=Ai(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=rp();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}const IH=new Set(["absolute","fixed"]);function AH(e,t){const n=Wo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pi(e)?Wa(e):Ii(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function lx(e,t,n){let r;if(t==="viewport")r=_H(e,n);else if(t==="document")r=NH(Ai(e));else if(li(t))r=AH(t,n);else{const i=ax(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Lc(r)}function ux(e,t){const n=go(e);return n===t||!li(n)||Ua(n)?!1:ui(n).position==="fixed"||ux(n,t)}function PH(e,t){const n=t.get(e);if(n)return n;let r=ul(e,[],!1).filter(s=>li(s)&&Va(s)!=="body"),i=null;const o=ui(e).position==="fixed";let a=o?go(e):e;for(;li(a)&&!Ua(a);){const s=ui(a),l=np(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&IH.has(i.position)||ll(a)&&!l&&ux(e,a))?r=r.filter(c=>c!==a):i=s,a=go(a)}return t.set(e,r),r}function MH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?kc(t)?[]:PH(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=lx(t,c,i);return u.top=Vo(d.top,u.top),u.right=ja(d.right,u.right),u.bottom=ja(d.bottom,u.bottom),u.left=Vo(d.left,u.left),u},lx(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LH(e){const{width:t,height:n}=ox(e);return{width:t,height:n}}function DH(e,t,n){const r=Pi(t),i=Ai(t),o=n==="fixed",a=Wo(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ii(0);function u(){l.x=ap(i)}if(r||!r&&!o)if((Va(t)!=="body"||ll(i))&&(s=Rc(t)),r){const h=Wo(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?sx(i,s):Ii(0),d=a.left+s.scrollLeft-l.x-c.x,f=a.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:a.width,height:a.height}}function sp(e){return ui(e).position==="static"}function cx(e,t){if(!Pi(e)||ui(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ai(e)===n&&(n=n.ownerDocument.body),n}function dx(e,t){const n=Dr(e);if(kc(e))return n;if(!Pi(e)){let i=go(e);for(;i&&!Ua(i);){if(li(i)&&!sp(i))return i;i=go(i)}return n}let r=cx(e,t);for(;r&&gH(r)&&sp(r);)r=cx(r,t);return r&&Ua(r)&&sp(r)&&!np(r)?n:r||SH(e)||n}const kH=async function(e){const t=this.getOffsetParent||dx,n=this.getDimensions,r=await n(e.floating);return{reference:DH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RH(e){return ui(e).direction==="rtl"}const $H={convertOffsetParentRelativeRectToViewportRelativeRect:TH,getDocumentElement:Ai,getClippingRect:MH,getOffsetParent:dx,getElementRects:kH,getClientRects:OH,getDimensions:LH,getScale:Wa,isElement:li,isRTL:RH};function fx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FH(e,t){let n=null,r;const i=Ai(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(s||t(),!f||!h)return;const p=Pc(d),g=Pc(i.clientWidth-(c+f)),v=Pc(i.clientHeight-(d+h)),b=Pc(c),E={rootMargin:-p+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Vo(0,ja(1,l))||1};let x=!0;function O(S){const T=S[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!fx(u,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(O,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,E)}n.observe(e)}return a(!0),o}function BH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=op(e),c=i||o?[...u?ul(u):[],...ul(t)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&s?FH(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,g=l?Wo(e):null;l&&v();function v(){const b=Wo(e);g&&!fx(g,b)&&n(),g=b,p=requestAnimationFrame(v)}return n(),()=>{var b;c.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const zH=fH,HH=hH,jH=uH,VH=lH,hx=(e,t,n)=>{const r=new Map,i={platform:$H,...n},o={...i.platform,_c:r};return sH(e,t,{...i,platform:o})};/*
288
+ `})]})}let ol=null;const Yz=1e3;function qz(e,t,n){const r=ge.use.playingState(),i=ge.use.seekPosition(),o=ge.use.setSeekPosition(),a=ge.use.setPlayingState(),s=ge.use.setPlayingPosition(),l=ge.use.currentPage(),u=ge.use.goToPage(),c=ge.use.autoScroll(),d=ge.use.setAutoScroll(),f=ge.use.renderedSvgData(),h=E0(),p=C.useRef(null),g=C.useRef(0),v=C.useRef(0),b=C.useRef(null),y=C.useRef(new Map),E=C.useRef(new Map),[x,O]=C.useState(!1),[S,T]=C.useState([]),I=C.useRef(!0),N=C.useCallback(()=>{if(p.current&&p.current.state!=="closed")return p.current;if(ol&&ol.state!=="closed")return p.current=ol,ol;try{const G=window.AudioContext||window.webkitAudioContext;return p.current=new G,ol=p.current,p.current.state==="suspended"&&(I.current=!0),p.current}catch(G){return console.error("Failed to create AudioContext:",G),null}},[]),_=C.useCallback(async()=>{const G=N();if(!G)return!1;if(G.state==="suspended")try{return await G.resume(),I.current=!1,!0}catch(Y){return console.error("Failed to resume AudioContext:",Y),!1}return G.state==="running"?(I.current=!1,!0):!1},[N]);C.useEffect(()=>{if(N())return()=>{b.current&&(cancelAnimationFrame(b.current),b.current=null)}},[N]),C.useEffect(()=>{const G=async Y=>{console.log(`Loading audio from URL: ${Y}`);const te=N();if(te){E.current.clear(),T([]);try{const se=await P(Y,te);E.current.set("main",se),T(["main"]),O(!0)}catch(se){console.error("Failed to load main audio:",se)}}};r!==It.STOPPED&&(B(),a(It.STOPPED)),O(!1),e&&G(e)},[e,n]),C.useEffect(()=>{const G=async Y=>{const te=N();te&&await Promise.all(Y.map(async se=>{if(se.url)try{console.log(`Loading audio overlay from URL: ${se.url}`);const ce=await P(se.url,te);E.current.set(se.id,ce),T(ue=>[...ue,se.id])}catch(ce){console.error(`Failed to load track ${se.id} from ${se.url}`,ce)}}))};t.length>0&&G(t)},[t]),C.useEffect(()=>()=>{var G;B(),((G=p.current)==null?void 0:G.state)==="running"&&p.current.suspend().then(()=>{console.log("Audio context suspended"),p.current=null})},[]);const P=C.useCallback(async(G,Y)=>{const te=await fetch(G);if(!te.ok)throw new Error(`HTTP error! status: ${te.status}`);const se=await te.arrayBuffer();return await Y.decodeAudioData(se)},[]),A=async G=>{if(!c&&r!==It.STOPPED){const Y=await(h==null?void 0:h.getElementsAtTime(G)),te=Y==null?void 0:Y.page;te&&te!==l&&u(te)}};C.useEffect(()=>{i<=0||(console.log(`Seeking to position: ${i} ms. Playing state: ${r}`),r===It.PLAYING?(B(),A(i),z(i),o(-1)):(v.current=i,A(i),o(-1)))},[i]),C.useEffect(()=>{switch(r){case It.PLAYING:I.current?_().then(G=>{G&&z(v.current)}):z(v.current);break;case It.PAUSED:F();break;case It.STOPPED:B(),v.current=0;break}},[r,_]);const M=C.useCallback(()=>{r===It.PLAYING?a(It.PAUSED):r===It.PAUSED&&a(It.PLAYING)},[r,a]),D=C.useCallback(()=>{a(It.PLAYING)},[a]),R=C.useCallback(()=>{a(It.STOPPED),o(0)},[a,o]),$=C.useCallback(()=>{const G=N();if(!G||g.current===0)return v.current;const Y=G.currentTime-g.current;return Math.max(0,Y*1e3)},[N]),F=C.useCallback(()=>{b.current&&(cancelAnimationFrame(b.current),b.current=null),N()&&(v.current=$(),y.current.forEach(Y=>{try{Y.stop()}catch{}}),y.current.clear())},[N,$]),B=C.useCallback(()=>{F(),v.current=0,s(0)},[F]),z=C.useCallback(G=>{B();const Y=N();!Y||E.current.size===0||_().then(te=>{if(!te)return;v.current=G;const se=G/1e3;g.current=Y.currentTime-se,E.current.forEach((ce,ue)=>{const de=Y.createBufferSource();de.buffer=ce,de.connect(Y.destination),de.start(0,se),y.current.set(ue,de)}),H()})},[B,N,_,r]),L=C.useMemo(()=>f!=null&&f.timemap?f.timemap:[],[f]),H=C.useCallback(()=>{if(r!==It.PLAYING)return;const G=$();if(s(G),L&&L.length>0&&G>L[L.length-1].tstamp+Yz){B(),R();return}A(G),b.current=requestAnimationFrame(H)},[$,s,L,B,R,A,r]),W=C.useCallback(()=>r===It.PLAYING?"Pause":"Play",[r]),k=C.useCallback(()=>{B(),R()},[r,a,c,d,B]);return{canPlay:x,loadedTracks:S,playPauseTooltip:W,handlePlay:D,handlePlayPause:M,handleStop:k}}function Xz(){const e=ge.use.score(),t=ge.use.playingState(),n=ge.use.renderedSvgData(),r=ge.use.showReconstructions(),i=C.useMemo(()=>(e==null?void 0:e.audioOverlayTracks.filter(p=>Object.values(r).includes(p.label)))||[],[e,r]),{canPlay:o,playPauseTooltip:a,handlePlay:s,handlePlayPause:l,handleStop:u}=qz((e==null?void 0:e.audioUrl)||null,i,e==null?void 0:e.originalMei),c=C.useMemo(()=>q.jsx(Ki,{title:"Play",children:q.jsx(Hn,{icon:q.jsx(AC,{style:{fontSize:"36px"}}),onClick:s,disabled:!o})}),[o,s]),d=C.useMemo(()=>q.jsx(Ki,{title:"Stop",children:q.jsx(Hn,{icon:q.jsx(SC,{style:{fontSize:"36px"}}),onClick:u})}),[u]),f=C.useMemo(()=>q.jsx(Ki,{title:a(),children:q.jsx(Hn,{icon:q.jsx(IC,{style:{fontSize:"36px"}}),onClick:l})}),[a,l]),h=C.useMemo(()=>e!=null&&e.audioUrl?q.jsx("div",{style:{position:"absolute",bottom:0,right:0,padding:"8px"},children:q.jsxs(vn,{direction:"horizontal",size:"small",children:[t!==It.STOPPED?d:null,t===It.PLAYING?f:c]})}):null,[e,t,c,d,f]);return q.jsxs("div",{style:{width:"0px",height:"0px"},children:[(n==null?void 0:n.timemap)&&q.jsx(Wz,{timemap:n.timemap}),h]})}const Xw=["note","rest","clef","accid","app","choice","corr","sic","unclear","supplied","reg","measure"];function Kw(){var l;const{t:e}=cr("common"),t=ge.use.showEditorial(),n=ge.use.setShowingEditorial(),r=(l=ge.use.score())==null?void 0:l.editorialItems,i=C.useCallback(u=>{const c=u.getAttribute("data-corresp"),d=c==null?void 0:c.replace("#","");return r==null?void 0:r.find(f=>{var h;return u.id===f.id||d!=null&&((h=f.correspIds)==null?void 0:h.includes(d))})},[r]),o=C.useCallback(u=>{for(let c of Xw){const d=u.closest(`.${c}`),f=d?i(d):null;if(f)return f}return null},[i,n]),a=C.useCallback(u=>{if(!t)return;const c=u.target,d=o(c);if(d)n(d.id);else{const f=c.closest(".bounding-box"),h=f==null?void 0:f.parentElement;if(h&&[...h.classList.values()].some(p=>Xw.includes(p))){const p=i(h);p&&n(p.id)}}},[t,i,n]),s=C.useCallback(u=>{switch(u){case"corr":return e("editorial.formatType.corr");case"unclear":return e("editorial.formatType.unclear");case"choice":return e("editorial.formatType.choice");case"app":return e("editorial.formatType.app");case"lem":return e("editorial.formatType.lem");case"rdg":return e("editorial.formatType.rdg");case"sic":return e("editorial.formatType.sic");case"supplied":return e("editorial.formatType.supplied");case"reg":return e("editorial.formatType.reg");case"clef[data-corresp]":return e("editorial.formatType.clefChange");default:return e("editorial.formatType.default",{type:u})}},[e]);return{showEditorial:t,editorials:r,handleElementClick:a,formatType:s,getEditorialAttached:i}}function Kz(e,t="#fe3b20",n=0){return{hoverFilterElement:q.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"0px",width:"0px"},children:[q.jsx("defs",{children:_i("hover",t,n)}),q.jsx("animate",{id:"radius-hover-animation",xlinkHref:"#radius-hover",attributeName:"radius",begin:`${e}.mouseover`,from:"0",to:"50",dur:"0.1s",fill:"freeze",repeatCount:"1",restart:"whenNotActive"})]})}}function Gz({svgId:e}){const{hoverFilterElement:t}=Kz(e);return q.jsx("div",{style:{height:"0px",width:"0px"},children:t})}const ja=Math.min,Vo=Math.max,Ac=Math.round,Pc=Math.floor,Ii=e=>({x:e,y:e}),Qz={left:"right",right:"left",bottom:"top",top:"bottom"},Zz={start:"end",end:"start"};function Zm(e,t,n){return Vo(e,ja(t,n))}function al(e,t){return typeof e=="function"?e(t):e}function Uo(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function Gw(e){return e==="x"?"y":"x"}function Jm(e){return e==="y"?"height":"width"}const Jz=new Set(["top","bottom"]);function po(e){return Jz.has(Uo(e))?"y":"x"}function ep(e){return Gw(po(e))}function eH(e,t,n){n===void 0&&(n=!1);const r=sl(e),i=ep(e),o=Jm(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Mc(a)),[a,Mc(a)]}function tH(e){const t=Mc(e);return[tp(e),t,tp(t)]}function tp(e){return e.replace(/start|end/g,t=>Zz[t])}const Qw=["left","right"],Zw=["right","left"],nH=["top","bottom"],rH=["bottom","top"];function iH(e,t,n){switch(e){case"top":case"bottom":return n?t?Zw:Qw:t?Qw:Zw;case"left":case"right":return t?nH:rH;default:return[]}}function oH(e,t,n,r){const i=sl(e);let o=iH(Uo(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tp)))),o}function Mc(e){return e.replace(/left|right|bottom|top/g,t=>Qz[t])}function aH(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jw(e){return typeof e!="number"?aH(e):{top:e,right:e,bottom:e,left:e}}function Lc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ex(e,t,n){let{reference:r,floating:i}=e;const o=po(t),a=ep(t),s=Jm(a),l=Uo(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(sl(t)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const sH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=ex(u,r,l),f=r,h={},p=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x:y,y:E,data:x,reset:O}=await b({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=y??c,d=E??d,h={...h,[v]:{...h[v],...x}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(u=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=ex(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function tx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=al(t,e),p=Jw(h),v=s[f?d==="floating"?"reference":"floating":d],b=Lc(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},O=Lc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:E,strategy:l}):y);return{top:(b.top-O.top+p.top)/x.y,bottom:(O.bottom-b.bottom+p.bottom)/x.y,left:(b.left-O.left+p.left)/x.x,right:(O.right-b.right+p.right)/x.x}}const lH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=al(e,t)||{};if(u==null)return{};const d=Jw(c),f={x:n,y:r},h=ep(i),p=Jm(h),g=await a.getDimensions(u),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",E=v?"clientHeight":"clientWidth",x=o.reference[p]+o.reference[h]-f[h]-o.floating[p],O=f[h]-o.reference[h],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let T=S?S[E]:0;(!T||!await(a.isElement==null?void 0:a.isElement(S)))&&(T=s.floating[E]||o.floating[p]);const I=x/2-O/2,N=T/2-g[p]/2-1,_=ja(d[b],N),P=ja(d[y],N),A=_,M=T-g[p]-P,D=T/2-g[p]/2+I,R=Zm(A,D,M),$=!l.arrow&&sl(i)!=null&&D!==R&&o.reference[p]/2-(D<A?_:P)-g[p]/2<0,F=$?D<A?D-A:D-M:0;return{[h]:f[h]+F,data:{[h]:R,centerOffset:D-R-F,...$&&{alignmentOffset:F}},reset:$}}}),uH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=al(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Uo(i),y=po(s),E=Uo(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=f||(E||!g?[Mc(s)]:tH(s)),S=p!=="none";!f&&S&&O.push(...oH(s,g,p,x));const T=[s,...O],I=await tx(t,v),N=[];let _=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&N.push(I[b]),d){const D=eH(i,a,x);N.push(I[D[0]],I[D[1]])}if(_=[..._,{placement:i,overflows:N}],!N.every(D=>D<=0)){var P,A;const D=(((P=o.flip)==null?void 0:P.index)||0)+1,R=T[D];if(R&&(!(d==="alignment"?y!==po(R):!1)||_.every(B=>B.overflows[0]>0&&po(B.placement)===y)))return{data:{index:D,overflows:_},reset:{placement:R}};let $=(A=_.filter(F=>F.overflows[0]<=0).sort((F,B)=>F.overflows[1]-B.overflows[1])[0])==null?void 0:A.placement;if(!$)switch(h){case"bestFit":{var M;const F=(M=_.filter(B=>{if(S){const z=po(B.placement);return z===y||z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,L)=>z+L,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:M[0];F&&($=F);break}case"initialPlacement":$=s;break}if(i!==$)return{reset:{placement:$}}}return{}}}},cH=new Set(["left","top"]);async function dH(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Uo(n),s=sl(n),l=po(n)==="y",u=cH.has(a)?-1:1,c=o&&l?-1:1,d=al(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const fH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await dH(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},hH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...l}=al(e,t),u={x:n,y:r},c=await tx(t,l),d=po(Uo(i)),f=Gw(d);let h=u[f],p=u[d];if(o){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+c[v],E=h-c[b];h=Zm(y,h,E)}if(a){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+c[v],E=p-c[b];p=Zm(y,p,E)}const g=s.fn({...t,[f]:h,[d]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:o,[d]:a}}}}}};function Dc(){return typeof window<"u"}function Va(e){return nx(e)?(e.nodeName||"").toLowerCase():"#document"}function Dr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ai(e){var t;return(t=(nx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nx(e){return Dc()?e instanceof Node||e instanceof Dr(e).Node:!1}function li(e){return Dc()?e instanceof Element||e instanceof Dr(e).Element:!1}function Pi(e){return Dc()?e instanceof HTMLElement||e instanceof Dr(e).HTMLElement:!1}function rx(e){return!Dc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dr(e).ShadowRoot}const mH=new Set(["inline","contents"]);function ll(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!mH.has(i)}const pH=new Set(["table","td","th"]);function gH(e){return pH.has(Va(e))}const vH=[":popover-open",":modal"];function kc(e){return vH.some(t=>{try{return e.matches(t)}catch{return!1}})}const bH=["transform","translate","scale","rotate","perspective"],yH=["transform","translate","scale","rotate","perspective","filter"],EH=["paint","layout","strict","content"];function np(e){const t=rp(),n=li(e)?ui(e):e;return bH.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||yH.some(r=>(n.willChange||"").includes(r))||EH.some(r=>(n.contain||"").includes(r))}function SH(e){let t=go(e);for(;Pi(t)&&!Ua(t);){if(np(t))return t;if(kc(t))return null;t=go(t)}return null}function rp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CH=new Set(["html","body","#document"]);function Ua(e){return CH.has(Va(e))}function ui(e){return Dr(e).getComputedStyle(e)}function Rc(e){return li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(Va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rx(e)&&e.host||Ai(e);return rx(t)?t.host:t}function ix(e){const t=go(e);return Ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pi(t)&&ll(t)?t:ix(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ix(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Dr(i);if(o){const s=ip(a);return t.concat(a,a.visualViewport||[],ll(i)?i:[],s&&n?ul(s):[])}return t.concat(i,ul(i,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ox(e){const t=ui(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Pi(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Ac(n)!==o||Ac(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function op(e){return li(e)?e:e.contextElement}function Wa(e){const t=op(e);if(!Pi(t))return Ii(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ox(t);let a=(o?Ac(n.width):n.width)/r,s=(o?Ac(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wH=Ii(0);function ax(e){const t=Dr(e);return!rp()||!t.visualViewport?wH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dr(e)?!1:t}function Wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=op(e);let a=Ii(1);t&&(r?li(r)&&(a=Wa(r)):a=Wa(e));const s=xH(o,n,r)?ax(o):Ii(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Dr(o),h=r&&li(r)?Dr(r):r;let p=f,g=ip(p);for(;g&&r&&h!==p;){const v=Wa(g),b=g.getBoundingClientRect(),y=ui(g),E=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,x=b.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=E,u+=x,p=Dr(g),g=ip(p)}}return Lc({width:c,height:d,x:l,y:u})}function ap(e,t){const n=Rc(e).scrollLeft;return t?t.left+n:Wo(Ai(e)).left+n}function sx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ap(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function TH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Ai(r),s=t?kc(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Ii(1);const c=Ii(0),d=Pi(r);if((d||!d&&!o)&&((Va(r)!=="body"||ll(a))&&(l=Rc(r)),Pi(r))){const h=Wo(r);u=Wa(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=a&&!d&&!o?sx(a,l,!0):Ii(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function OH(e){return Array.from(e.getClientRects())}function NH(e){const t=Ai(e),n=Rc(e),r=e.ownerDocument.body,i=Vo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Vo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ap(e);const s=-n.scrollTop;return ui(r).direction==="rtl"&&(a+=Vo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function _H(e,t){const n=Dr(e),r=Ai(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=rp();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}const IH=new Set(["absolute","fixed"]);function AH(e,t){const n=Wo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pi(e)?Wa(e):Ii(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function lx(e,t,n){let r;if(t==="viewport")r=_H(e,n);else if(t==="document")r=NH(Ai(e));else if(li(t))r=AH(t,n);else{const i=ax(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Lc(r)}function ux(e,t){const n=go(e);return n===t||!li(n)||Ua(n)?!1:ui(n).position==="fixed"||ux(n,t)}function PH(e,t){const n=t.get(e);if(n)return n;let r=ul(e,[],!1).filter(s=>li(s)&&Va(s)!=="body"),i=null;const o=ui(e).position==="fixed";let a=o?go(e):e;for(;li(a)&&!Ua(a);){const s=ui(a),l=np(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&IH.has(i.position)||ll(a)&&!l&&ux(e,a))?r=r.filter(c=>c!==a):i=s,a=go(a)}return t.set(e,r),r}function MH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?kc(t)?[]:PH(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=lx(t,c,i);return u.top=Vo(d.top,u.top),u.right=ja(d.right,u.right),u.bottom=ja(d.bottom,u.bottom),u.left=Vo(d.left,u.left),u},lx(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LH(e){const{width:t,height:n}=ox(e);return{width:t,height:n}}function DH(e,t,n){const r=Pi(t),i=Ai(t),o=n==="fixed",a=Wo(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ii(0);function u(){l.x=ap(i)}if(r||!r&&!o)if((Va(t)!=="body"||ll(i))&&(s=Rc(t)),r){const h=Wo(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?sx(i,s):Ii(0),d=a.left+s.scrollLeft-l.x-c.x,f=a.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:a.width,height:a.height}}function sp(e){return ui(e).position==="static"}function cx(e,t){if(!Pi(e)||ui(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ai(e)===n&&(n=n.ownerDocument.body),n}function dx(e,t){const n=Dr(e);if(kc(e))return n;if(!Pi(e)){let i=go(e);for(;i&&!Ua(i);){if(li(i)&&!sp(i))return i;i=go(i)}return n}let r=cx(e,t);for(;r&&gH(r)&&sp(r);)r=cx(r,t);return r&&Ua(r)&&sp(r)&&!np(r)?n:r||SH(e)||n}const kH=async function(e){const t=this.getOffsetParent||dx,n=this.getDimensions,r=await n(e.floating);return{reference:DH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RH(e){return ui(e).direction==="rtl"}const $H={convertOffsetParentRelativeRectToViewportRelativeRect:TH,getDocumentElement:Ai,getClippingRect:MH,getOffsetParent:dx,getElementRects:kH,getClientRects:OH,getDimensions:LH,getScale:Wa,isElement:li,isRTL:RH};function fx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FH(e,t){let n=null,r;const i=Ai(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(s||t(),!f||!h)return;const p=Pc(d),g=Pc(i.clientWidth-(c+f)),v=Pc(i.clientHeight-(d+h)),b=Pc(c),E={rootMargin:-p+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Vo(0,ja(1,l))||1};let x=!0;function O(S){const T=S[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!fx(u,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(O,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,E)}n.observe(e)}return a(!0),o}function BH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=op(e),c=i||o?[...u?ul(u):[],...ul(t)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&s?FH(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,g=l?Wo(e):null;l&&v();function v(){const b=Wo(e);g&&!fx(g,b)&&n(),g=b,p=requestAnimationFrame(v)}return n(),()=>{var b;c.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const zH=fH,HH=hH,jH=uH,VH=lH,hx=(e,t,n)=>{const r=new Map,i={platform:$H,...n},o={...i.platform,_c:r};return sH(e,t,{...i,platform:o})};/*
289
289
  * React Tooltip
290
290
  * {@link https://github.com/ReactTooltip/react-tooltip}
291
291
  * @copyright ReactTooltip Team
292
292
  * @license MIT
293
- */const UH="react-tooltip-core-styles",WH="react-tooltip-base-styles",mx={core:!1,base:!1};function px({css:e,id:t=WH,type:n="base",ref:r}){var i,o;if(!e||typeof document>"u"||mx[n]||n==="core"&&typeof process<"u"&&(!((i=process==null?void 0:process.env)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process<"u"&&(!((o=process==null?void 0:process.env)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(t=UH),r||(r={});const{insertAt:a}=r;if(document.getElementById(t))return;const s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",a==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),mx[n]=!0}const gx=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:i=10,strategy:o="absolute",middlewares:a=[zH(Number(i)),jH({fallbackAxisSideDirection:"start"}),HH({padding:5})],border:s,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const u=a;return n?(u.push(VH({element:n,padding:5})),hx(e,t,{placement:r,strategy:o,middleware:u}).then(({x:c,y:d,placement:f,middlewareData:h})=>{var p,g;const v={left:`${c}px`,top:`${d}px`,border:s},{x:b,y}=(p=h.arrow)!==null&&p!==void 0?p:{x:0,y:0},E=(g={top:"bottom",right:"left",bottom:"top",left:"right"}[f.split("-")[0]])!==null&&g!==void 0?g:"bottom",x=s&&{borderBottom:s,borderRight:s};let O=0;if(s){const S=`${s}`.match(/(\d+)px/);O=S!=null&&S[1]?Number(S[1]):1}return{tooltipStyles:v,tooltipArrowStyles:{left:b!=null?`${b}px`:"",top:y!=null?`${y}px`:"",right:"",bottom:"",...x,[E]:`-${l/2+O}px`},place:f}})):hx(e,t,{placement:"bottom",strategy:o,middleware:u}).then(({x:c,y:d,placement:f})=>({tooltipStyles:{left:`${c}px`,top:`${d}px`},tooltipArrowStyles:{},place:f}))},vx=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),bx=(e,t,n)=>{let r=null;const i=function(...o){const a=()=>{r=null};!r&&(e.apply(this,o),r=setTimeout(a,t))};return i.cancel=()=>{r&&(clearTimeout(r),r=null)},i},yx=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",lp=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,o)=>lp(i,t[o]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!yx(e)||!yx(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(i=>lp(e[i],t[i]))},YH=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"})},Ex=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(YH(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},qH=typeof window<"u"?C.useLayoutEffect:C.useEffect,qr=e=>{e.current&&(clearTimeout(e.current),e.current=null)},XH="DEFAULT_TOOLTIP_ID",KH={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},GH=C.createContext({getTooltipData:()=>KH});function Sx(e=XH){return C.useContext(GH).getTooltipData(e)}var Ya={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},up={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const QH=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:i="dark",anchorId:o,anchorSelect:a,place:s="top",offset:l=10,events:u=["hover"],openOnClick:c=!1,positionStrategy:d="absolute",middlewares:f,wrapper:h,delayShow:p=0,delayHide:g=0,float:v=!1,hidden:b=!1,noArrow:y=!1,clickable:E=!1,closeOnEsc:x=!1,closeOnScroll:O=!1,closeOnResize:S=!1,openEvents:T,closeEvents:I,globalCloseEvents:N,imperativeModeOnly:_,style:P,position:A,afterShow:M,afterHide:D,disableTooltip:R,content:$,contentWrapperRef:F,isOpen:B,defaultIsOpen:z=!1,setIsOpen:L,activeAnchor:H,setActiveAnchor:W,border:k,opacity:G,arrowColor:Y,arrowSize:te=8,role:se="tooltip"})=>{var ce;const ue=C.useRef(null),de=C.useRef(null),J=C.useRef(null),Z=C.useRef(null),oe=C.useRef(null),[X,ee]=C.useState({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[ne,be]=C.useState(!1),[Ce,Se]=C.useState(!1),[ve,he]=C.useState(null),Ae=C.useRef(!1),Ie=C.useRef(null),{anchorRefs:me,setActiveAnchor:Me}=Sx(t),Q=C.useRef(!1),[le,pe]=C.useState([]),ye=C.useRef(!1),Fe=c||u.includes("click"),je=Fe||(T==null?void 0:T.click)||(T==null?void 0:T.dblclick)||(T==null?void 0:T.mousedown),De=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Fe&&Object.assign(De,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const we=I?{...I}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!I&&Fe&&Object.assign(we,{mouseleave:!1,blur:!1,mouseout:!1});const Le=N?{...N}:{escape:x||!1,scroll:O||!1,resize:S||!1,clickOutsideAnchor:je||!1};_&&(Object.assign(De,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(we,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),qH(()=>(ye.current=!0,()=>{ye.current=!1}),[]);const Ue=Pe=>{ye.current&&(Pe&&Se(!0),setTimeout(()=>{ye.current&&(L==null||L(Pe),B===void 0&&be(Pe))},10))};C.useEffect(()=>{if(B===void 0)return()=>null;B&&Se(!0);const Pe=setTimeout(()=>{be(B)},10);return()=>{clearTimeout(Pe)}},[B]),C.useEffect(()=>{if(ne!==Ae.current)if(qr(oe),Ae.current=ne,ne)M==null||M();else{const Pe=(_e=>{const xe=_e.match(/^([\d.]+)(ms|s)$/);if(!xe)return 0;const[,ze,qe]=xe;return Number(ze)*(qe==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));oe.current=setTimeout(()=>{Se(!1),he(null),D==null||D()},Pe+25)}},[ne]);const Te=Pe=>{ee(_e=>lp(_e,Pe)?_e:Pe)},Be=(Pe=p)=>{qr(J),Ce?Ue(!0):J.current=setTimeout(()=>{Ue(!0)},Pe)},it=(Pe=g)=>{qr(Z),Z.current=setTimeout(()=>{Q.current||Ue(!1)},Pe)},wt=Pe=>{var _e;if(!Pe)return;const xe=(_e=Pe.currentTarget)!==null&&_e!==void 0?_e:Pe.target;if(!(xe!=null&&xe.isConnected))return W(null),void Me({current:null});p?Be():Ue(!0),W(xe),Me({current:xe}),qr(Z)},Dt=()=>{E?it(g||100):g?it():Ue(!1),qr(J)},Pt=({x:Pe,y:_e})=>{var xe;const ze={getBoundingClientRect:()=>({x:Pe,y:_e,width:0,height:0,top:_e,left:Pe,right:Pe,bottom:_e})};gx({place:(xe=ve==null?void 0:ve.place)!==null&&xe!==void 0?xe:s,offset:l,elementReference:ze,tooltipReference:ue.current,tooltipArrowReference:de.current,strategy:d,middlewares:f,border:k,arrowSize:te}).then(qe=>{Te(qe)})},xt=Pe=>{if(!Pe)return;const _e=Pe,xe={x:_e.clientX,y:_e.clientY};Pt(xe),Ie.current=xe},Ht=Pe=>{var _e;if(!ne)return;const xe=Pe.target;xe.isConnected&&(!((_e=ue.current)===null||_e===void 0)&&_e.contains(xe)||[document.querySelector(`[id='${o}']`),...le].some(ze=>ze==null?void 0:ze.contains(xe))||(Ue(!1),qr(J)))},kt=bx(wt,50),at=bx(Dt,50),dt=Pe=>{at.cancel(),kt(Pe)},$e=()=>{kt.cancel(),at()},Ve=C.useCallback(()=>{var Pe,_e;const xe=(Pe=ve==null?void 0:ve.position)!==null&&Pe!==void 0?Pe:A;xe?Pt(xe):v?Ie.current&&Pt(Ie.current):H!=null&&H.isConnected&&gx({place:(_e=ve==null?void 0:ve.place)!==null&&_e!==void 0?_e:s,offset:l,elementReference:H,tooltipReference:ue.current,tooltipArrowReference:de.current,strategy:d,middlewares:f,border:k,arrowSize:te}).then(ze=>{ye.current&&Te(ze)})},[ne,H,$,P,s,ve==null?void 0:ve.place,l,d,A,ve==null?void 0:ve.position,v,te]);C.useEffect(()=>{var Pe,_e;const xe=new Set(me);le.forEach(He=>{R!=null&&R(He)||xe.add({current:He})});const ze=document.querySelector(`[id='${o}']`);ze&&!(R!=null&&R(ze))&&xe.add({current:ze});const qe=()=>{Ue(!1)},et=Ex(H),nt=Ex(ue.current);Le.scroll&&(window.addEventListener("scroll",qe),et==null||et.addEventListener("scroll",qe),nt==null||nt.addEventListener("scroll",qe));let mt=null;Le.resize?window.addEventListener("resize",qe):H&&ue.current&&(mt=BH(H,ue.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const vt=He=>{He.key==="Escape"&&Ue(!1)};Le.escape&&window.addEventListener("keydown",vt),Le.clickOutsideAnchor&&window.addEventListener("click",Ht);const ht=[],St=He=>!!(He!=null&&He.target&&(H!=null&&H.contains(He.target))),At=He=>{ne&&St(He)||wt(He)},Bt=He=>{ne&&St(He)&&Dt()},en=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],fn=["click","dblclick","mousedown","mouseup"];Object.entries(De).forEach(([He,ke])=>{ke&&(en.includes(He)?ht.push({event:He,listener:dt}):fn.includes(He)&&ht.push({event:He,listener:At}))}),Object.entries(we).forEach(([He,ke])=>{ke&&(en.includes(He)?ht.push({event:He,listener:$e}):fn.includes(He)&&ht.push({event:He,listener:Bt}))}),v&&ht.push({event:"pointermove",listener:xt});const Ut=()=>{Q.current=!0},Rt=()=>{Q.current=!1,Dt()},tt=E&&(we.mouseout||we.mouseleave);return tt&&((Pe=ue.current)===null||Pe===void 0||Pe.addEventListener("mouseover",Ut),(_e=ue.current)===null||_e===void 0||_e.addEventListener("mouseout",Rt)),ht.forEach(({event:He,listener:ke})=>{xe.forEach(Oe=>{var Qe;(Qe=Oe.current)===null||Qe===void 0||Qe.addEventListener(He,ke)})}),()=>{var He,ke;Le.scroll&&(window.removeEventListener("scroll",qe),et==null||et.removeEventListener("scroll",qe),nt==null||nt.removeEventListener("scroll",qe)),Le.resize?window.removeEventListener("resize",qe):mt==null||mt(),Le.clickOutsideAnchor&&window.removeEventListener("click",Ht),Le.escape&&window.removeEventListener("keydown",vt),tt&&((He=ue.current)===null||He===void 0||He.removeEventListener("mouseover",Ut),(ke=ue.current)===null||ke===void 0||ke.removeEventListener("mouseout",Rt)),ht.forEach(({event:Oe,listener:Qe})=>{xe.forEach(ut=>{var pt;(pt=ut.current)===null||pt===void 0||pt.removeEventListener(Oe,Qe)})})}},[H,Ve,Ce,me,le,T,I,N,Fe,p,g]),C.useEffect(()=>{var Pe,_e;let xe=(_e=(Pe=ve==null?void 0:ve.anchorSelect)!==null&&Pe!==void 0?Pe:a)!==null&&_e!==void 0?_e:"";!xe&&t&&(xe=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const ze=new MutationObserver(qe=>{const et=[],nt=[];qe.forEach(mt=>{if(mt.type==="attributes"&&mt.attributeName==="data-tooltip-id"&&(mt.target.getAttribute("data-tooltip-id")===t?et.push(mt.target):mt.oldValue===t&&nt.push(mt.target)),mt.type==="childList"){if(H){const vt=[...mt.removedNodes].filter(ht=>ht.nodeType===1);if(xe)try{nt.push(...vt.filter(ht=>ht.matches(xe))),nt.push(...vt.flatMap(ht=>[...ht.querySelectorAll(xe)]))}catch{}vt.some(ht=>{var St;return!!(!((St=ht==null?void 0:ht.contains)===null||St===void 0)&&St.call(ht,H))&&(Se(!1),Ue(!1),W(null),qr(J),qr(Z),!0)})}if(xe)try{const vt=[...mt.addedNodes].filter(ht=>ht.nodeType===1);et.push(...vt.filter(ht=>ht.matches(xe))),et.push(...vt.flatMap(ht=>[...ht.querySelectorAll(xe)]))}catch{}}}),(et.length||nt.length)&&pe(mt=>[...mt.filter(vt=>!nt.includes(vt)),...et])});return ze.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{ze.disconnect()}},[t,a,ve==null?void 0:ve.anchorSelect,H]),C.useEffect(()=>{Ve()},[Ve]),C.useEffect(()=>{if(!(F!=null&&F.current))return()=>null;const Pe=new ResizeObserver(()=>{setTimeout(()=>Ve())});return Pe.observe(F.current),()=>{Pe.disconnect()}},[$,F==null?void 0:F.current]),C.useEffect(()=>{var Pe;const _e=document.querySelector(`[id='${o}']`),xe=[...le,_e];H&&xe.includes(H)||W((Pe=le[0])!==null&&Pe!==void 0?Pe:_e)},[o,le,H]),C.useEffect(()=>(z&&Ue(!0),()=>{qr(J),qr(Z)}),[]),C.useEffect(()=>{var Pe;let _e=(Pe=ve==null?void 0:ve.anchorSelect)!==null&&Pe!==void 0?Pe:a;if(!_e&&t&&(_e=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),_e)try{const xe=Array.from(document.querySelectorAll(_e));pe(xe)}catch{pe([])}},[t,a,ve==null?void 0:ve.anchorSelect]),C.useEffect(()=>{J.current&&(qr(J),Be(p))},[p]);const Ye=(ce=ve==null?void 0:ve.content)!==null&&ce!==void 0?ce:$,ot=ne&&Object.keys(X.tooltipStyles).length>0;return C.useImperativeHandle(e,()=>({open:Pe=>{if(Pe!=null&&Pe.anchorSelect)try{document.querySelector(Pe.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Pe.anchorSelect}" is not a valid CSS selector`)}he(Pe??null),Pe!=null&&Pe.delay?Be(Pe.delay):Ue(!0)},close:Pe=>{Pe!=null&&Pe.delay?it(Pe.delay):Ue(!1)},activeAnchor:H,place:X.place,isOpen:!!(Ce&&!b&&Ye&&ot)})),Ce&&!b&&Ye?C.createElement(h,{id:t,role:se,className:ie("react-tooltip",Ya.tooltip,up.tooltip,up[i],n,`react-tooltip__place-${X.place}`,Ya[ot?"show":"closing"],ot?"react-tooltip__show":"react-tooltip__closing",d==="fixed"&&Ya.fixed,E&&Ya.clickable),onTransitionEnd:Pe=>{qr(oe),ne||Pe.propertyName!=="opacity"||(Se(!1),he(null),D==null||D())},style:{...P,...X.tooltipStyles,opacity:G!==void 0&&ot?G:void 0},ref:ue},Ye,C.createElement(h,{className:ie("react-tooltip-arrow",Ya.arrow,up.arrow,r,y&&Ya.noArrow),style:{...X.tooltipArrowStyles,background:Y?`linear-gradient(to right bottom, transparent 50%, ${Y} 50%)`:void 0,"--rt-arrow-size":`${te}px`},ref:de})):null},ZH=({content:e})=>C.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),JH=C.forwardRef(({id:e,anchorId:t,anchorSelect:n,content:r,html:i,render:o,className:a,classNameArrow:s,variant:l="dark",place:u="top",offset:c=10,wrapper:d="div",children:f=null,events:h=["hover"],openOnClick:p=!1,positionStrategy:g="absolute",middlewares:v,delayShow:b=0,delayHide:y=0,float:E=!1,hidden:x=!1,noArrow:O=!1,clickable:S=!1,closeOnEsc:T=!1,closeOnScroll:I=!1,closeOnResize:N=!1,openEvents:_,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:M=!1,style:D,position:R,isOpen:$,defaultIsOpen:F=!1,disableStyleInjection:B=!1,border:z,opacity:L,arrowColor:H,arrowSize:W,setIsOpen:k,afterShow:G,afterHide:Y,disableTooltip:te,role:se="tooltip"},ce)=>{const[ue,de]=C.useState(r),[J,Z]=C.useState(i),[oe,X]=C.useState(u),[ee,ne]=C.useState(l),[be,Ce]=C.useState(c),[Se,ve]=C.useState(b),[he,Ae]=C.useState(y),[Ie,me]=C.useState(E),[Me,Q]=C.useState(x),[le,pe]=C.useState(d),[ye,Fe]=C.useState(h),[je,De]=C.useState(g),[we,Le]=C.useState(null),[Ue,Te]=C.useState(null),Be=C.useRef(B),{anchorRefs:it,activeAnchor:wt}=Sx(e),Dt=at=>at==null?void 0:at.getAttributeNames().reduce((dt,$e)=>{var Ve;return $e.startsWith("data-tooltip-")&&(dt[$e.replace(/^data-tooltip-/,"")]=(Ve=at==null?void 0:at.getAttribute($e))!==null&&Ve!==void 0?Ve:null),dt},{}),Pt=at=>{const dt={place:$e=>{var Ve;X((Ve=$e)!==null&&Ve!==void 0?Ve:u)},content:$e=>{de($e??r)},html:$e=>{Z($e??i)},variant:$e=>{var Ve;ne((Ve=$e)!==null&&Ve!==void 0?Ve:l)},offset:$e=>{Ce($e===null?c:Number($e))},wrapper:$e=>{var Ve;pe((Ve=$e)!==null&&Ve!==void 0?Ve:d)},events:$e=>{const Ve=$e==null?void 0:$e.split(" ");Fe(Ve??h)},"position-strategy":$e=>{var Ve;De((Ve=$e)!==null&&Ve!==void 0?Ve:g)},"delay-show":$e=>{ve($e===null?b:Number($e))},"delay-hide":$e=>{Ae($e===null?y:Number($e))},float:$e=>{me($e===null?E:$e==="true")},hidden:$e=>{Q($e===null?x:$e==="true")},"class-name":$e=>{Le($e)}};Object.values(dt).forEach($e=>$e(null)),Object.entries(at).forEach(([$e,Ve])=>{var Ye;(Ye=dt[$e])===null||Ye===void 0||Ye.call(dt,Ve)})};C.useEffect(()=>{de(r)},[r]),C.useEffect(()=>{Z(i)},[i]),C.useEffect(()=>{X(u)},[u]),C.useEffect(()=>{ne(l)},[l]),C.useEffect(()=>{Ce(c)},[c]),C.useEffect(()=>{ve(b)},[b]),C.useEffect(()=>{Ae(y)},[y]),C.useEffect(()=>{me(E)},[E]),C.useEffect(()=>{Q(x)},[x]),C.useEffect(()=>{De(g)},[g]),C.useEffect(()=>{Be.current!==B&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[B]),C.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:B==="core",disableBase:B}}))},[]),C.useEffect(()=>{var at;const dt=new Set(it);let $e=n;if(!$e&&e&&($e=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),$e)try{document.querySelectorAll($e).forEach(_e=>{dt.add({current:_e})})}catch{console.warn(`[react-tooltip] "${$e}" is not a valid CSS selector`)}const Ve=document.querySelector(`[id='${t}']`);if(Ve&&dt.add({current:Ve}),!dt.size)return()=>null;const Ye=(at=Ue??Ve)!==null&&at!==void 0?at:wt.current,ot=new MutationObserver(_e=>{_e.forEach(xe=>{var ze;if(!Ye||xe.type!=="attributes"||!(!((ze=xe.attributeName)===null||ze===void 0)&&ze.startsWith("data-tooltip-")))return;const qe=Dt(Ye);Pt(qe)})}),Pe={attributes:!0,childList:!1,subtree:!1};if(Ye){const _e=Dt(Ye);Pt(_e),ot.observe(Ye,Pe)}return()=>{ot.disconnect()}},[it,wt,Ue,t,n]),C.useEffect(()=>{D!=null&&D.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),z&&!vx("border",`${z}`)&&console.warn(`[react-tooltip] "${z}" is not a valid \`border\`.`),D!=null&&D.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),L&&!vx("opacity",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`opacity\`.`)},[]);let xt=f;const Ht=C.useRef(null);if(o){const at=o({content:(Ue==null?void 0:Ue.getAttribute("data-tooltip-content"))||ue||null,activeAnchor:Ue});xt=at?C.createElement("div",{ref:Ht,className:"react-tooltip-content-wrapper"},at):null}else ue&&(xt=ue);J&&(xt=C.createElement(ZH,{content:J}));const kt={forwardRef:ce,id:e,anchorId:t,anchorSelect:n,className:ie(a,we),classNameArrow:s,content:xt,contentWrapperRef:Ht,place:oe,variant:ee,offset:be,wrapper:le,events:ye,openOnClick:p,positionStrategy:je,middlewares:v,delayShow:Se,delayHide:he,float:Ie,hidden:Me,noArrow:O,clickable:S,closeOnEsc:T,closeOnScroll:I,closeOnResize:N,openEvents:_,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:M,style:D,position:R,isOpen:$,defaultIsOpen:F,border:z,opacity:L,arrowColor:H,arrowSize:W,setIsOpen:k,afterShow:G,afterHide:Y,disableTooltip:te,activeAnchor:Ue,setActiveAnchor:at=>Te(at),role:se};return C.createElement(QH,{...kt})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||px({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||px({css:`
294
- .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});function e7(){const{t:e}=cr("common"),t=ge.use.score(),n=ge.use.showingEditorial(),r=ge.use.setShowingEditorial(),i=ge.use.appOptions(),o=ge.use.setAppOptions(),a=ge.use.choiceOptions(),s=ge.use.setChoiceOptions(),l=ge.use.renderedSvgData(),u=t==null?void 0:t.editorialItems,{formatType:c}=Kw(),d=C.useMemo(()=>["corr","unclear","sic","app","choice","lem","reg","orig","supplied"].map(S=>`svg .${S}:not(.bounding-box)`).join(", "),[]),f=n?u==null?void 0:u.find(S=>S.id==n):null,h=S=>{if(S.annotations.size<=0)return null;const T=S.annotations.values().next().value;return T!=null?q.jsx("p",{children:T.text}):null},p=(S,T)=>`${S||""}${T?": "+T:""}`,g=(S,T,I)=>{var D;const N=I.source,_=N&&((D=t==null?void 0:t.properties.sources[N])==null?void 0:D.title),P=I.contentDescription,A=p(_,P);if(S=="lem")return`${e("editorial.preferredReading")} ${A}`;const M=T.filter(R=>R.type=="rdg");return M.length==1?`${e("editorial.alternativeReading")} ${A}`:`${e("editorial.alternativeReadingNumber")}${1+M.findIndex(R=>R==I)} ${A}`},v=(S,T,I,N)=>S=="app"?g(T,I,I[N]):S=="choice"?T=="reg"?e("editorial.regReading"):T=="orig"?e("editorial.origReading"):e("editorial.optionNumber",{number:1+N}):"",b=(S,T,I)=>{const N=T.options.filter((_,P)=>P!=I).map(_=>_.selector);if(S=="app"){const _=i.filter(P=>!N.includes(P));_.push(T.options[I].selector),o(_,!0)}else if(S=="choice"){const _=a.filter(P=>!N.includes(P));_.push(T.options[I].selector),s(_,!0)}},y=(S,T)=>{const I=S.type,N=S.choice,_=N.options.map((P,A)=>({option:P,index:A}));return q.jsx(dc.Group,{style:{display:"flex",flexDirection:"column",gap:8},onChange:P=>b(I,N,P.target.value),value:T,options:_.map(P=>({value:P.index,label:v(I,P.option.type,N.options,P.index)}))})},E=(S,T)=>{if(S=="app"){const I=T.options.findIndex(N=>Object.values(i).includes(N.selector));if(I!=-1)return I;{const N=T.options.findIndex(_=>_.type=="lem");return N!=-1?N:0}}else if(S=="choice"){const I=T.options.findIndex(N=>Object.values(a).includes(N.selector));return I!=-1?I:0}return 0},x=S=>{const T=S.type,I=S.choice;if(I===void 0)return null;const N=E(T,I),_=S.choice.options[N].type,P=y(S,N);return q.jsxs("div",{children:[q.jsx("br",{}),q.jsxs("p",{children:[e("editorial.currentlyShowing",{what:v(T,_,I.options,N)})," "]}),q.jsxs("p",{children:[e("editorial.availableOptions"),":"]}),P]})},O=S=>{var I,N;const T=(N=(I=S.activeAnchor)==null?void 0:I.className)==null?void 0:N.baseVal;return T?q.jsx("span",{children:c(T)}):null};return q.jsxs("div",{children:[q.jsx(JH,{id:"verovio-tooltip",variant:"info",style:{zIndex:3},offset:20,delayShow:500,anchorSelect:d,render:O}),(l==null?void 0:l.id)&&q.jsx(Gz,{svgId:l.id}),f?q.jsxs(Wr,{title:c(f.type),open:f!=null&&f!=null,onCancel:()=>r(null),footer:q.jsx(Hn,{type:"primary",onClick:()=>r(null),children:e("ok")}),children:[f.reason!=""?q.jsx("p",{children:`${e("editorial.reason")}: ${f.reason}`}):"",f.resp!=""?q.jsx("p",{children:`${e("editorial.resp")}: ${f.resp}`}):"",h(f),x(f)]}):null]})}const t7=e=>m.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",...e},m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,2.8617613,27.399396)",id:"g1"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,19.335653,27.145589)",id:"g2"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-6"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-2"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,34.65545,26.769954)",id:"g2-9"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-2"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-0"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,3.7925057,4.4400049)",id:"g2-92"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-28"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-9"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,19.78743,4.4349287)",id:"g2-2"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-9"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-3"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,33.4321,4.0491419)",id:"g2-8"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-4"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-5"}))),n7=e=>m.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("line",{x1:24,y1:8,x2:24,y2:40,stroke:"#4285F4",strokeWidth:2.5}),m.createElement("g",{transform:"translate(6, 12)"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20, 8, 20)"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2}),m.createElement("path",{d:"M18,24 L22,24 L20,21 Z",fill:"#666666"})),m.createElement("g",{transform:"translate(28, 12)"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#999999",transform:"rotate(-20, 8, 20)"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#999999",strokeWidth:2}),m.createElement("path",{d:"M4,24 L0,24 L2,21 Z",fill:"#666666"}))),Cx=e=>Math.floor(e).toString().padStart(2,"0"),wx=e=>{const t=Cx(e/1e3/60),n=Cx(e/1e3%60);return`${t}:${n}`},r7=e=>null;function i7({audioDuration:e=0}){const{t}=cr("common"),n=ge.use.playingPosition(),r=ge.use.setSeekPosition(),i=ge.use.setAutoScroll(),[o,a]=C.useState("00:00"),[s,l]=C.useState("00:00"),[u,c]=C.useState("static"),[d,f]=C.useState(e||0),h=C.useRef(0),p=C.useRef(!1);C.useEffect(()=>{if(e>0){f(e);const O=wx(e);l(O)}},[e]);const g=O=>{h.current=O;const S=wx(O);S!=o&&a(S)},v=C.useCallback(O=>{p.current=!0,h.current=Math.round(O)},[]),b=C.useCallback(O=>{p.current=!1,r(h.current),g(Math.round(h.current))},[r]);C.useEffect(()=>{if(p.current)return;const O=Math.round(n);O!=h.current&&g(O)},[n]);const y=O=>{c(O),O=="scrolling"?i(!0):O=="static"&&i(!1)},E=q.jsx(LS,{size:"small",shape:"default",onChange:y,value:u,options:[{value:"scrolling",label:t("playerMode.autoscroll"),icon:q.jsx(tl,{component:n7})},{value:"static",label:t("playerMode.normal"),icon:q.jsx(tl,{component:t7})}]});return C.useMemo(()=>q.jsxs(Pr,{align:"top",style:{justifyContent:"left",backgroundColor:"white"},gutter:{xs:8,sm:16,md:24,lg:32},children:[q.jsx(pn,{span:4,style:{textAlign:"right"},children:o}),q.jsx(pn,{span:10,style:{width:"300px",height:"30px"},children:q.jsx(WS,{style:{width:"100%",margin:"6px"},min:0,max:d,step:1,tooltip:{formatter:r7,open:!1},value:h.current,onChange:v,onChangeComplete:b})}),q.jsx(pn,{span:4,style:{textAlign:"left"},children:s}),q.jsx(pn,{span:6,style:{textAlign:"right"},children:E})]}),[s,o,u,d,h.current,v,b])}function o7(e){const t=ge.use.score(),n=ge.use.playingState(),r=ge.use.resetPlayerPosition(),i=ge.use.scale(),o=ge.use.increaseScale(),a=ge.use.decreaseScale(),s=ge.use.reachedEffectiveMaxScale(),l=ge.use.setReachedEffectiveMaxScale(),u=ge.use.pageCount(),c=ge.use.currentPage(),d=ge.use.goToPage(),f=()=>e!=null&&e.ownerDocument.fullscreenElement==e,h=()=>{e&&!f()?e.requestFullscreen():document.exitFullscreen()},p=()=>{o()},g=()=>{a(),l(!1)},v=S=>{r(),d(S)},b=n===Ct.PLAYING,y=!b&&i>Pd,E=!b&&i<Md&&!s,x=u>1;return{scoreUrl:t==null?void 0:t.url,currentPageNumber:c,pageCount:u,scale:i,playingState:n,isPlaying:b,canZoomIn:E,canZoomOut:y,shouldShowPagination:x,isFullScreen:f(),handlePageClick:v,zoomIn:p,zoomOut:g,handleFullScreenToggle:h}}const a7=({style:e,fullScreenElement:t,showDownloadButton:n,audioDuration:r})=>{const{t:i}=cr("common"),o=ge.use.isSplitView(),{currentPageNumber:a,scoreUrl:s,pageCount:l,playingState:u,shouldShowPagination:c,isFullScreen:d,canZoomIn:f,canZoomOut:h,handlePageClick:p,zoomIn:g,zoomOut:v,handleFullScreenToggle:b}=o7(t),y=C.useMemo(()=>q.jsxs(vn,{direction:"horizontal",children:[q.jsx(Hn,{shape:"circle",icon:q.jsx(wm,{}),onClick:v,disabled:!h}),q.jsx(Hn,{shape:"circle",icon:q.jsx(Cm,{}),onClick:g,disabled:!f}),q.jsx(Hn,{icon:d?q.jsx(NC,{}):q.jsx(_C,{}),onClick:b,disabled:u===Ct.PLAYING}),n?q.jsx(Hn,{type:"default",icon:q.jsx(wC,{}),download:!0,href:s||"",children:"MEI"}):null]}),[f,h,u,d,s,i]),E=C.useMemo(()=>c?q.jsx(Pm,{disabled:u===Ct.PLAYING,align:"center",current:a,defaultPageSize:1,total:l,simple:!1,onChange:p}):null,[c,u,a,l]),x=C.useMemo(()=>q.jsxs(Pr,{style:{justifyContent:"left",backgroundColor:"white"},gutter:{xs:8,sm:16,md:24,lg:32},children:[q.jsx(pn,{xxl:8,xl:14,lg:8,md:10,sm:12,xs:14,children:y}),q.jsx(pn,{xxl:12,xl:10,lg:14,md:14,sm:20,xs:24,children:E})]}),[y,E,o]);return q.jsx("div",{className:"score-controls",style:e,children:u===Ct.STOPPED?x:q.jsx(i7,{audioDuration:r})})};var cp={},$c={},Fc={},s7=Nn&&Nn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),l7=Nn&&Nn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u7=Nn&&Nn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&s7(n,t,r[i]);return l7(n,t),n}}();Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.useWindowSize=c7;var xx=u7(C);function Tx(){return{height:window.innerHeight,width:window.innerWidth}}function c7(){var e=xx.useState(Tx()),t=e[0],n=e[1];return xx.useLayoutEffect(function(){function r(){n(Tx())}return window.addEventListener("resize",r),function(){return window.removeEventListener("resize",r)}},[]),t}Object.defineProperty($c,"__esModule",{value:!0}),$c.useBreakpoint=d7,$c.useBreakpoints=f7;var Ox=Fc;function d7(e){var t=(0,Ox.useWindowSize)().width;return t<e}function f7(e){var t=(0,Ox.useWindowSize)().width;return e.map(function(n){return t<n})}var dp={},fp=Nn&&Nn.__assign||function(){return fp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fp.apply(this,arguments)},h7=Nn&&Nn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),m7=Nn&&Nn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),p7=Nn&&Nn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&h7(n,t,r[i]);return m7(n,t),n}}();Object.defineProperty(dp,"__esModule",{value:!0}),dp.useComponentSize=g7;var Bc=p7(C);function g7(){var e=Bc.useState({height:0,width:0}),t=e[0],n=e[1],r=Bc.useRef(void 0),i=Bc.useCallback(function(){if(r.current){var o=r.current.offsetHeight,a=r.current.offsetWidth;(o!==t.height||a!==t.width)&&n({height:o,width:a})}},[t.height,t.width]);return Bc.useLayoutEffect(function(){if(!(!r||!r.current)){var o=new ResizeObserver(i);return o.observe(r.current),function(){return o.disconnect()}}},[r,i]),fp({ref:r},t)}(function(e){var t=Nn&&Nn.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,a,s)}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=Nn&&Nn.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n($c,e),n(dp,e),n(Fc,e)})(cp);const v7='(//mei:measure[1])//mei:app[@type="voice_reconstruction"]/mei:rdg/@label',b7="//mei:measure[1]",y7='//mei:accid[@func="edit"]',Yo=e=>({mei:"http://www.music-encoding.org/ns/mei",xml:"http://www.w3.org/XML/1998/namespace"})[e||""]||null,E7=(e,t)=>{let n=e==null?void 0:e.evaluate("//mei:section[@label]/@label",e,Yo,XPathResult.ANY_TYPE,null),r;const i=[];for(;r=n==null?void 0:n.iterateNext();)r.nodeValue!=null&&r.nodeValue.indexOf("_heading")<0&&i.push(r.nodeValue);i.length<=1||i.forEach(o=>{var d;let a=(d=e==null?void 0:e.evaluate(`//mei:section[@label="${o}"]/mei:measure[1]`,e,Yo,XPathResult.ANY_TYPE,null))==null?void 0:d.iterateNext();if(a==null)return;const s=(o.charAt(0).toUpperCase()+o.slice(1)).replace(/_/g," "),l=e.createElement("dir");l.setAttribute("place","above"),l.setAttribute("staff","1"),l.setAttribute("tstamp","0"),a==null||a.insertBefore(l,a.firstChild);const u=e.createElement("rend");u.setAttribute("fontstyle","normal"),u.setAttribute("fontweight","bold"),l.appendChild(u);const c=e.createTextNode(s);u.appendChild(c)})},S7=(e,t)=>{var l;let n=(l=e==null?void 0:e.evaluate(b7,e,Yo,XPathResult.ANY_TYPE,null))==null?void 0:l.iterateNext();if(n==null)return;let r=e==null?void 0:e.evaluate(v7,e,Yo,XPathResult.ANY_TYPE,null);const i=[];let o;for(;o=r==null?void 0:r.iterateNext();)o.nodeValue!=null&&i.push(o.nodeValue);const a=e.createElement("app");a.setAttribute("type","voice_reconstruction"),n==null||n.insertBefore(a,n.firstChild);const s=e.createElement("lem");s.setAttribute("label","none"),a.appendChild(s),i.forEach(u=>{const c=u.split(":");if(c.length<4||c[0]!="reconstruction")return;const d=u.split(":")[1],f=u.split(":")[2],h=u.split(":")[3],p=f=="IA"?In.t("scoreProcessor.reconstructionByIA",{name:h}):In.t("scoreProcessor.reconstructionByHuman",{name:h}),g=e.createElement("rdg");g.setAttribute("label",u),a.appendChild(g);const v=e.createElement("dir");v.setAttribute("place","above"),v.setAttribute("staff",d),v.setAttribute("tstamp","0"),v.setAttribute("type","reconstruction-name"),g.appendChild(v);const b=e.createElement("rend");b.setAttribute("fontstyle","normal"),b.setAttribute("fontweight","bold"),v.appendChild(b);const y=e.createTextNode(p);b.appendChild(y)})},C7=(e,t)=>{const n=t.n;let r=e==null?void 0:e.evaluate(`//mei:verse[@n > "${n}"]`,e,Yo,XPathResult.ANY_TYPE,null);if(r==null)return;const i=[];for(var o=r.iterateNext();o!=null;)i.push(o),o=r.iterateNext();i.forEach(a=>{var s;return(s=a.parentElement)==null?void 0:s.removeChild(a)})},w7=(e,t)=>{const n=e==null?void 0:e.evaluate(y7,e,Yo,XPathResult.ANY_TYPE,null);if(n==null)return;const r=[];for(var i=n.iterateNext();i!=null;)r.push(i),i=n.iterateNext();r.forEach(o=>{o.removeAttribute("func"),o.removeAttribute("enclose")})},Nx=(e,t,n)=>{let r=e==null?void 0:e.evaluate(`//mei:${t}[not(@xml:id)]`,e,Yo,XPathResult.ANY_TYPE,null);if(r==null)return;const i=[];let o;for(;(o=r==null?void 0:r.iterateNext())!=null;)i.push(o);i.forEach(a=>{a.setAttribute("xml:id",`${n}-${Math.random().toString(36).substring(2,15)}`)})},x7=(e,t)=>{Nx(e,"measure","m")},T7=(e,t)=>{Nx(e,"section","s")};class hp{constructor(t){no(this,"score");no(this,"filters");this.score=t,this.filters=[]}addTitlesFilter(){this.filters.push([E7,{}])}addReonstructionNamesFilter(){this.filters.push([S7,{}])}addNVersesFilter(t){this.filters.push([C7,{n:t}])}addNormalizeFictaFilter(){this.filters.push([w7,{}])}addEnsureMeasuresIdFilter(){this.filters.push([x7,{}])}addEnsureSectionsIdFilter(){this.filters.push([T7,{}])}filterScore(){const n=new DOMParser().parseFromString(this.score,"application/xml");return this.filters.forEach(([i,o])=>{i(n,o)}),new XMLSerializer().serializeToString(n)}}const Pn=e=>({mei:"http://www.music-encoding.org/ns/mei",xml:"http://www.w3.org/XML/1998/namespace"})[e||""]||null,O7=["app_clefs","voice_reconstruction"],N7={a:{key:"music.pitch.a",fallback:"A"},b:{key:"music.pitch.b",fallback:"B"},c:{key:"music.pitch.c",fallback:"C"},d:{key:"music.pitch.d",fallback:"D"},e:{key:"music.pitch.e",fallback:"E"},f:{key:"music.pitch.f",fallback:"F"},g:{key:"music.pitch.g",fallback:"G"}},_7={f:{key:"music.accidental.flat",fallback:"flat",symbol:"♭"},s:{key:"music.accidental.sharp",fallback:"sharp",symbol:"♯"},n:{key:"music.accidental.natural",fallback:"natural",symbol:"♮"},ff:{key:"music.accidental.doubleFlat",fallback:"double flat",symbol:"𝄫"},ss:{key:"music.accidental.doubleSharp",fallback:"double sharp",symbol:"𝄪"}},I7={1:{key:"music.mensural.semibrevis",fallback:"semibrevis"},2:{key:"music.mensural.minima",fallback:"minima"},4:{key:"music.mensural.semiminima",fallback:"semiminima"},8:{key:"music.mensural.corchea",fallback:"corchea"}};class zc{constructor(t,n,r){no(this,"document");no(this,"tonoNumber");no(this,"t");no(this,"getEditorialNodesOfType",t=>{var o,a;const n=[];let r=this.document.evaluate(`//mei:${t}`,this.document,Pn,XPathResult.ANY_TYPE,null),i=r.iterateNext();for(;i!=null;){if(((o=i.parentElement)==null?void 0:o.tagName)!="choice"&&((a=i.parentElement)==null?void 0:a.tagName)!="app"){const s=i,l=s.getAttribute("xml:id"),u=s.getAttribute("reason"),c=s.getAttribute("resp");n.push({id:l,reason:u||"",resp:c||"",type:t,annotations:new Set})}i=r.iterateNext()}return n});const i=new DOMParser;this.document=i.parseFromString(r,"application/xml"),this.tonoNumber=n,this.t=t}describeMensuralDuration(t){if(!t)return this.t("music.mensural.unknown",{duration:"",defaultValue:"unknown duration"});const n=I7[t];return n?this.t(n.key,{defaultValue:n.fallback}):this.t("music.mensural.unknown",{duration:t,defaultValue:`unknown duration (${t})`})}describeNoteElement(t){var c;const n=((c=t.getAttribute("pname"))==null?void 0:c.toLowerCase())||"",r=N7[n],i=r?this.t(r.key,{defaultValue:r.fallback}):this.t("music.pitch.unknown",{pitch:n,defaultValue:n.toUpperCase()||"Unknown pitch"}),o=t.getAttribute("accid")||"",a=o?_7[o]:void 0,s=a?this.t(a.key,{defaultValue:a.fallback}):"",l=a?this.t("music.pitch.withAccidental",{pitch:i,accidental:s,symbol:a.symbol,defaultValue:`${i} ${s}`}):i,u=this.describeMensuralDuration(t.getAttribute("dur"));return this.t("music.note.description",{pitch:l,duration:u,defaultValue:`${l}, ${u}`})}describeRestElement(t){const n=this.describeMensuralDuration(t.getAttribute("dur"));return this.t("music.rest.description",{duration:n,defaultValue:`${n} rest`})}maxVerseNum(){let t=this.document.evaluate("//mei:verse/@n",this.document,Pn,XPathResult.ANY_TYPE,null);var n=0;let r;for(;r=t==null?void 0:t.iterateNext();){let i=parseInt(r.nodeValue||"0");i>n&&(n=i)}return n}hasFictaElements(){return this.document.evaluate('//mei:accid[@func="edit"]',this.document,Pn,XPathResult.ANY_TYPE,null).iterateNext()!=null}hasOriginalClefs(){return this.document.evaluate('//mei:rdg[@label="app_clefs"]',this.document,Pn,XPathResult.ANY_TYPE,null).iterateNext()!=null}hasEditorialElements(){var r,i;const t=(r=this.document.evaluate("count(//mei:annot)",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:r.numberValue,n=(i=this.document.evaluate('count(//mei:app[@type="variant"])',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:i.numberValue;return t!=null&&t>0||n!=null&&n>0}getNumMeasures(){var n,r;let t=(r=(n=this.document.evaluate("(//mei:measure)[last()]/@n",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.nodeValue;return t?parseInt(t):0}getEditor(){var n,r;let t=(r=(n=this.document.evaluate('//mei:respStmt/mei:persName[@role="transcriber"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent;return t||"<missing>"}getComposer(){var n,r;return((r=(n=this.document.evaluate('//mei:composer/mei:persName[@role="composer"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent)||In.t("anonymous")}getLyricist(){var n,r;return((r=(n=this.document.evaluate('//mei:lyricist/mei:persName[@role="lyricist"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent)||In.t("anonymous")}getReconstructionBy(){var n,r;let t=(r=(n=this.document.evaluate('//mei:respStmt/mei:persName[@role="reconstruction"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent;return t||null}getMeiNotes(){let t=this.document.evaluate("//mei:meiHead//mei:extMeta//mei:pendingIssues",this.document,Pn,XPathResult.ANY_TYPE,null);const n=[];let r;for(;r=t==null?void 0:t.iterateNext();)r.textContent!=null&&n.push(r.textContent);return n}getSections(){const t=[];let n=this.document.evaluate("//mei:section[@label]",this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const i=r;t.push({label:i.getAttribute("label")||"",id:i.getAttribute("xml:id")||""}),r=n.iterateNext()}return t}getSources(){const t={};let n=this.document.evaluate("//mei:sourceDesc/mei:source",this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const i=r,o=i.getAttribute("xml:id");if(o){let a=null;for(const s of i.childNodes)if(s instanceof Element&&s.tagName==="bibl")for(const l of s.childNodes)l instanceof Element&&l.tagName==="title"&&(a=l.textContent||"");t[o]={title:a||""}}r=n.iterateNext()}return t}getVoiceName(t){var r,i;let n=(i=(r=this.document.evaluate(`//mei:staffDef[@n="${t}"]/mei:label`,this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:r.iterateNext())==null?void 0:i.textContent;return n||null}getReconstructions(){var o,a,s;const t=[];let n=this.document.evaluate('//mei:app[@type="voice_reconstruction"]/mei:rdg',this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const l=r,u=l.getAttribute("label"),c=((a=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:a.tagName)=="staff"?l.parentElement.parentElement.getAttribute("n"):null;if(!u||!c){r=n.iterateNext();continue}const d=this.getVoiceName(c);if(!d){r=n.iterateNext();continue}var i=(s=t.find(h=>h.voiceName==d))==null?void 0:s.reconstructionsForVoice;if(i||(i=[],t.push({staff:c,voiceName:d,reconstructionsForVoice:i})),i.find(h=>h.label==u)){r=n.iterateNext();continue}const f={label:u,voice:d,reconstructionBy:""};i.push(f),r=n.iterateNext()}return t.length>0?t.map(l=>({staff:l.staff,voiceName:l.voiceName,reconstructionsForVoice:[...l.reconstructionsForVoice,{label:"none",voice:l.voiceName,reconstructionBy:""}]})):[]}getScoreProperties(){return{hasFicta:this.hasFictaElements(),numVerses:this.maxVerseNum(),numMeasures:this.getNumMeasures(),composer:this.getComposer(),lyricist:this.getLyricist(),editor:this.getEditor(),reconstructionBy:this.getReconstructionBy(),reconstructions:this.getReconstructions(),notes:this.getMeiNotes(),sections:this.getSections(),sources:this.getSources(),hasEditorial:this.hasEditorialElements(),hasOriginalClefs:this.hasOriginalClefs(),tiedNotes:this.getTiedNotes()}}getIdForMeasureN(t){var r,i;const n=(r=this.document)==null?void 0:r.evaluate(`//mei:measure[@n="${t}"]/@xml:id`,this.document,Pn,XPathResult.ANY_TYPE,null);return(i=n==null?void 0:n.iterateNext())==null?void 0:i.nodeValue}getFirstMeasureId(){var t,n;return((n=(t=this.document.evaluate("(//mei:measure)[1]/@xml:id",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:t.iterateNext())==null?void 0:n.nodeValue)||null}choiceNodeToEditorialItem(t,n){var a;const r=t.getAttribute("xml:id"),o={id:r,options:[]};for(let s of[...(a=t.childNodes)==null?void 0:a.values()].filter(l=>l.nodeType==Node.ELEMENT_NODE)){const l=s,u=l.getAttribute("label"),c=l.getAttribute("source"),d=l.tagName;let f="";for(const h of l.childNodes)h instanceof Element&&h.tagName==="note"?f+=" "+this.describeNoteElement(h):h instanceof Element&&h.tagName==="rest"&&(f+=" "+this.describeRestElement(h));o.options.push({type:d,selector:`./${d}[@label='${u}']`,source:c?c.slice(1):null,contentDescription:f!==""?f:void 0})}return{id:r,type:n,resp:"",reason:"",choice:o,annotations:new Set}}getChoiceNodes(){const t=[];let n=this.document.evaluate("//mei:choice",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=this.choiceNodeToEditorialItem(i,"choice");t.push(o),r=n.iterateNext()}return t}getAppChoiceNodes(){const t=[];let n=this.document.evaluate("//mei:app",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=i.getAttribute("type");if(o!=null&&!O7.includes(o)){const a=this.choiceNodeToEditorialItem(i,"app");t.push(a)}r=n.iterateNext()}return t}getAnnotations(){var i,o;const t=[];let n=this.document.evaluate("//mei:annot",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const a=r,s=a.getAttribute("xml:id"),l=[...(i=a.childNodes)==null?void 0:i.values()].filter(c=>c.nodeType==Node.TEXT_NODE).map(c=>c.textContent).join(`
295
- `),u=(o=a.getAttribute("plist"))==null?void 0:o.split(" ").map(c=>c.replace("#",""));t.push({id:s,text:l,targetIds:u}),r=n.iterateNext()}return t}getTiedNotes(){const t=[];let n=this.document.evaluate("//mei:tie",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=i.getAttribute("startid"),a=i.getAttribute("endid"),s=o!=null&&o.startsWith("#")?o==null?void 0:o.slice(1):null,l=a!=null&&a.startsWith("#")?a==null?void 0:a.slice(1):null;s&&l&&t.push({first:s,second:l}),r=n.iterateNext()}return t}getEditorial(){const t=this.getEditorialNodesOfType("unclear").concat(this.getEditorialNodesOfType("sic")).concat(this.getEditorialNodesOfType("corr")).concat(this.getEditorialNodesOfType("supplied")).concat(this.getEditorialNodesOfType("reg")).concat(this.getChoiceNodes()).concat(this.getAppChoiceNodes()),n=this.getAnnotations(),r=new Set;return t.forEach(i=>{const o=n.find(a=>a.targetIds.includes(i.id));o&&(i.annotations.add(o),r.add(i.id))}),n.forEach(i=>{var a;const o=(a=i.targetIds)==null?void 0:a.filter(s=>!r.has(s));if(o&&o.length>0){const s=t.filter(l=>l.annotations.has(i));s.length==1?s[0].correspIds=[...o]:console.log(`Cannot add the targetIds ${o}`)}}),t}}const _x=["measure@n","staff@n","clef@corresp","verse@n","note@dur","rdg@label"],Ix=6e4,Ax={breaks:"auto",footer:"none",header:"none",pageMarginBottom:0,pageMarginTop:0,pageMarginLeft:16,pageMarginRight:16,bottomMarginHarm:0,scaleToPageSize:!0,shrinkToFit:!0,spacingLinear:.25,spacingNonLinear:.6,mdivAll:!0,svgHtml5:!1,svgViewBox:!1,svgRemoveXlink:!1,svgBoundingBoxes:!0,lyricElision:"regular",lyricTopMinMargin:4,lyricVerseCollapse:!0,smuflTextFont:"embedded"},A7=e=>{switch(e){case fs.FADE_OUT:return"full-opacity";case fs.FADE_IN:return"zero-opacity"}},P7=e=>e.map(t=>{var n,r;return{...t,stavesOn:(n=t.on)==null?void 0:n.map(i=>{var s;const o=CSS.escape(i);return`#radius-${(s=document.querySelector(`.staff:has(#${o})`))==null?void 0:s.getAttribute("data-n")}-animation`}),stavesOff:(r=t.off)==null?void 0:r.map(i=>{var s;const o=CSS.escape(i);return`#radius-${(s=document.querySelector(`.staff:has(#${o})`))==null?void 0:s.getAttribute("data-n")}-animation`})}}),Px=(e,t,n,r)=>{const i=Object.values(t).map(o=>`./*[contains(@label, '${o}')]`);return[...e,...i,...n?["./rdg[contains(@label, 'app_clefs')]"]:[],...r?["./rdg[contains(@type, 'dissonant_analysis')]"]:[]]};function Mx({t:e,verovio:t,svgContainerWidth:n,svgContainerHeight:r,appOptions:i,choiceOptions:o,transposition:a,showReconstructions:s,showOriginalClefs:l,showMusicAnalysis:u,showMusicAnalysisByDefault:c,measureNumberInterval:d,setScoreLayout:f}){const h=async S=>{const I=new zc(e,0,S).getSections(),N={};for(const _ of I){const P=_.id,A=await t.getPageWithElement(P);P&&A&&(N[P]=A)}return N},p=C.useCallback(async S=>{if(!t)return null;const{postLoadTransition:T,meiStr:I,page:N,scale:_,restorePositionForAchor:P,scoreUrl:A}=S,M=r,D=n;console.log(`loading score: mode=normal page=${N} pageWidth=${D}, pageHeight=${M}, scale=${_} restorePositionForAchor=${P}, showMusicAnalysis=${u}`);const R={...Ax,adjustPageWidth:!1,adjustPageHeight:!1,landscape:!1,svgAdditionalAttribute:_x,appXPathQuery:Px(i,s,l||!1,u||c),choiceXPathQuery:o,pageHeight:M,pageWidth:D,scale:_,transpose:a??"",mnumInterval:d??0};try{const $=performance.now();console.log("[useScoreActions] performLoadAction started");const F=performance.now();await t.setOptions(R),console.log(`[useScoreActions] setOptions took ${(performance.now()-F).toFixed(2)}ms`);const B=performance.now();await t.loadData(I),console.log(`[useScoreActions] loadData took ${(performance.now()-B).toFixed(2)}ms`);const z=performance.now(),L=await t.getPageCount();console.log(`[useScoreActions] getPageCount took ${(performance.now()-z).toFixed(2)}ms`);const H=await h(I);console.log(`Score loaded in ${(performance.now()-$).toFixed(0)}ms, page count: ${L}`),console.log(`[useScoreActions] performLoadAction completed in ${(performance.now()-$).toFixed(2)}ms`);let W;if(P){let k=await(t==null?void 0:t.getPageWithElement(P));k!=null&&k>0&&(W=k)}return!W&&N&&(W=N<=L?N:L),f({currentPage:W,pageCount:L,sectionPageMap:H}),Dd({scoreUrl:A,transition:T,loadedHeight:M,loadedWidth:D,renderPage:W,scale:_,loadedPagesCount:L})}catch($){return console.error("Error performing load action:",$),null}},[t,n,r,i,o,a,s,l,u,d,f]),g=C.useCallback(async S=>{if(!t)return null;const{height:T,meiStr:I}=S;console.log(`loading score: mode=autoscroll height=${T}`);const N={...Ax,adjustPageWidth:!0,adjustPageHeight:!0,svgViewBox:!0,svgAdditionalAttribute:_x,appXPathQuery:Px(i,s,l||!1,!1),choiceXPathQuery:o,pageHeight:T,pageWidth:Ix,scale:100,transpose:a??""};try{return await t.setOptions(N),await t.loadData(I),A_({height:T})}catch(_){return console.error("Error performing auto-scroll load action:",_),null}},[t,i,o,a,s,l]),v=(S,T)=>{const I=S.map(N=>({...N}));for(const{first:N,second:_}of T){const P=I.findIndex(R=>R.on!=null&&R.on.includes(N)),A=I.findIndex(R=>R.off!=null&&R.off.includes(N)),M=I.findIndex(R=>R.on!=null&&R.on.includes(_)),D=I.findIndex(R=>R.off!=null&&R.off.includes(_));P==-1||A==-1||M==-1||D==-1||(I[P].on.push(_),I[A].off=I[A].off.filter(R=>R!=N),I[M].on=I[M].on.filter(R=>R!=_),I[D].off.push(N))}return I},b=async S=>{const T=await t.getMEI(),I=new zc(e,0,T),N=v(S,I.getTiedNotes());return P7(N)},y=C.useCallback(async(S,T)=>{if(!t||!T)return null;const{transition:I,loadedHeight:N,loadedWidth:_,renderPage:P,scale:A,loadedPagesCount:M,scoreUrl:D}=S;console.log(`Rendering score: mode=normal page=${P} scale=${A} transition=${I}`);const R=performance.now();console.log("[useScoreActions] performRenderAction started");try{const $=performance.now(),F=await t.renderToTimemap({includeMeasures:!0});console.log(`[useScoreActions] renderToTimemap took ${(performance.now()-$).toFixed(2)}ms`);const B=performance.now(),z=(await t.renderToSVG(P)).replace(`width="${_}px"`,'width="100%"').replace(`height="${N}px"`,'height="100%"');console.log(`[useScoreActions] renderToSVG took ${(performance.now()-B).toFixed(2)}ms`);const L=performance.now();T.innerHTML=z;const H=T.querySelector("svg");if(!H)return console.log("Error rendering page: no svg element found"),null;H.style.opacity="0",H.classList.contains("transition-zero-end")&&H.classList.remove("transition-zero-end"),I!=null&&(H.classList.add("with-transition",A7(I)),setTimeout(()=>{H.classList.add("transition-end")},0)),console.log(`[useScoreActions] DOM manipulation took ${(performance.now()-L).toFixed(2)}ms`);const W=performance.now(),k=await t.getMEI({pageNo:P}),Y=new zc(e,0,k).getFirstMeasureId();console.log(`[useScoreActions] getMEI + analysis took ${(performance.now()-W).toFixed(2)}ms`);const te={id:H.id,scoreUrl:D,scale:A,timemap:await b(F),anchorElement:Y,page:P,height:N,width:_},se=performance.now()-R;return console.log(`[useScoreActions] Rendering + post-processing took ${se.toFixed(0)}ms`),console.log(`[useScoreActions] performRenderAction completed in ${se.toFixed(2)}ms`),{newSvg:te,loadedPagesCount:M,scale:A,renderPage:P}}catch($){return console.log(`Error rendering page: ${$}`),null}},[t,e,b]),E=C.useCallback(async(S,T)=>{if(!t||!T)return null;const{height:I}=S;console.log(`Rendering score: mode=autoscroll height=${I}`);try{const N=await t.renderToTimemap({includeMeasures:!0}),_=await t.renderToSVG(1),P=_.match(/svg viewBox="0 0 (\d+) \d+"/),A=P?Math.round(parseInt(P[1])):Ix,M=Math.round(I);return T.innerHTML=_.replace("<svg",`<svg class="auto-scroll" style="will-change: transform; backface-visibility: hidden; overflow: collapse; width: ${A}px; height: ${M}px;" `),T.style.height=`${M}px`,{newSvg:{id:"svg-auto-scrolling",scale:100,scoreUrl:"",timemap:await b(N),width:A,height:M,anchorElement:null,page:1}}}catch(N){return console.log(`Error rendering auto-scroll page: ${N}`),null}},[t]),x=S=>{const T=S.config;return!(T.transition||T.postLoadTransition)};return{executeAction:C.useCallback(async(S,T)=>{if(!t||!T)return console.log("Cannot execute action - verovio or container not ready"),{success:!1,nextAction:null,result:null,showSpinner:!1};const I=x(S);try{if(S.type==="load"){const N=await p(S.config);return{success:N!==null,nextAction:N,result:null,showSpinner:I}}else if(S.type==="loadAutoScroll"){const N=await g(S.config);return{success:N!==null,nextAction:N,result:null,showSpinner:I}}else if(S.type==="render"){const N=await y(S.config,T);return{success:N!==null,nextAction:null,result:N,showSpinner:I}}else if(S.type==="renderAutoScroll"){const N=await E(S.config,T);return{success:N!==null,nextAction:null,result:N,showSpinner:I}}return console.warn(`Unknown action type: ${S.type}`),{success:!1,nextAction:null,result:null,showSpinner:!1}}catch(N){return console.error(`Error executing action ${S.type}:`,N),{success:!1,nextAction:null,result:null,showSpinner:!1}}},[t,p,g,y,E])}}function Lx({autoScroll:e,showEditorial:t,playingState:n,svgContainerRef:r,svgContainerHeight:i}){const a=C.useCallback(()=>{if(!r.current)return 0;const f=r.current.querySelector("svg .page-margin");if(!f)return 0;const h=f.getBoundingClientRect();return Math.floor(h.bottom-h.top)},[r]),s=C.useCallback(()=>{var f;return r.current?((f=r.current.querySelectorAll("svg .system.bounding-box"))==null?void 0:f.length)===1:!1},[r]),l=C.useCallback(f=>{const h=a(),g=s()&&h>i-20;return g!==f?g:f},[a,s,i]),u=C.useMemo(()=>["svg-container",...t?["editorial-active"]:[]],[t]),c=C.useCallback(f=>{if(!r.current)return null;const h=CSS.escape(f);return r.current.querySelector(`#${h}`)},[r]),d=C.useMemo(()=>e&&n===Ct.PLAYING,[e,n]);return{svgPageHeight:a,svgSingleSystem:s,calculateEffectiveMaxScale:l,svgContainerClasses:u,getSvgElement:c,isSpotlightVisible:d}}const Dx=({visible:e})=>e?q.jsx("div",{className:"loading-spinner-overlay",children:q.jsx("div",{className:"loading-spinner-content",children:q.jsx(Lm,{indicator:q.jsx(wa,{style:{fontSize:32},spin:!0})})})}):null;function M7(e,t){C.useEffect(()=>{if(typeof requestIdleCallback>"u"){const r=setTimeout(e,2e3);return()=>clearTimeout(r)}const n=requestIdleCallback(()=>{e()},{timeout:2e3});return()=>cancelIdleCallback(n)},t)}function kx(e){const{backgroundColor:t,showMusicAnalysisByDefault:n}=e,{verovio:r}=C.useContext(ql),{t:i}=cr("common"),o=ge.use.setIsLoading(),a=ge.use.pendingAction(),s=ge.use.setPendingAction(),l=ge.use.score(),u=ge.use.setScoreLayout(),c=ge.use.showingMei(),d=ge.use.setShowingMei(),f=ge.use.playingState(),h=ge.use.scale(),p=ge.use.setScale(),g=ge.use.reachedEffectiveMaxScale(),v=ge.use.setReachedEffectiveMaxScale(),b=ge.use.currentPage(),y=ge.use.pageCount(),E=ge.use.showNVerses(),x=ge.use.normalizeFicta(),O=ge.use.showEditorial(),S=ge.use.appOptions(),T=ge.use.choiceOptions(),I=ge.use.transposition(),N=ge.use.renderedSvgData(),_=ge.use.setRenderedSvgData(),P=ge.use.showReconstructions(),A=ge.use.showOriginalClefs(),M=ge.use.getCachedPage(),D=ge.use.setCachedPage(),R=ge.use.clearPageCache(),$=ge.use.showMusicAnalysis(),F=ge.use.measureNumberInterval(),{handleElementClick:B}=Kw(),{ref:z,width:L,height:H}=cp.useComponentSize(),[W,k]=C.useState(!1),G=C.useRef(null),{svgContainerClasses:Y,calculateEffectiveMaxScale:te}=Lx({autoScroll:!1,showEditorial:O,playingState:f,svgContainerRef:z,svgContainerHeight:H}),{executeAction:se}=Mx({t:i,verovio:r,svgContainerWidth:L,svgContainerHeight:H,appOptions:S,choiceOptions:T,transposition:I,showReconstructions:P,showOriginalClefs:A,showMusicAnalysis:$,showMusicAnalysisByDefault:n,measureNumberInterval:F,setScoreLayout:u}),ce=()=>l&&r&&L>0&&H>0&&!a;C.useEffect(()=>{!a||!r||!c||!z.current||H<=0||(async()=>{var Ce,Se;const{success:X,nextAction:ee,result:ne,showSpinner:be}=await se(a,z.current);if(be&&k(!0),X){if(ee?s(ee):(s(null),k(!1)),a.type==="render"&&ne){const ve=ne,{newSvg:he,scale:Ae}=ve,Ie=((Ce=z.current)==null?void 0:Ce.innerHTML)||"",me={...he,svgHTML:Ie};_(me),D(me.page,me);const Me=(Se=z.current)==null?void 0:Se.querySelector("svg");Me&&f!==Ct.PLAYING&&(Me.style.opacity="0",Me.style.transition="opacity 300ms ease-in",setTimeout(()=>{Me.style.opacity="1"},10)),zz();const Q=Object.values(P).filter(le=>le!="none");Q.length>0&&Hz(Q),o(!1),p(Ae),setTimeout(()=>{const le=te(g);le!==g&&v(le)},400)}}else console.error("Action execution failed"),k(!1)})()},[a]);const ue=C.useCallback(()=>{var ee;if(!l)return null;const X=new hp(l.originalMei);return x&&X.addNormalizeFictaFilter(),E!=null&&E!=((ee=l.properties)==null?void 0:ee.numVerses)&&X.addNVersesFilter(E),X.filterScore()},[l,x,E]),de=C.useCallback((X,ee)=>{const ne=performance.now();console.log(`[ScoreView] updateLoadedScore called at ${Date.now()}`),k(!0);const be=ue(),Ce=performance.now()-ne;if(console.log(`[ScoreView] generateShowingScore took ${Ce.toFixed(2)}ms`),!be){k(!1);return}const Se=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:ee?fs.FADE_IN:void 0,meiStr:be,page:1,scale:h,restorePositionForAchor:X&&(N!=null&&N.anchorElement)?N.anchorElement:void 0});s(Se),d(be)},[l,N==null?void 0:N.anchorElement,h,s,d,ue]),J=C.useCallback(()=>{var ee;const X=(ee=z.current)==null?void 0:ee.querySelector("svg");X?(console.log("[ScoreView] Starting fade out transition"),X.style.transition="opacity 300ms ease-out",X.style.opacity="0",setTimeout(()=>{M(b)||(console.log("[ScoreView] Showing spinner because page is not cached after fade out ended"),k(!0))},300)):M(b)||k(!0)},[k,b,M]);C.useEffect(()=>(l&&setTimeout(()=>{de(!1,G.current!=l.url)}),()=>{G.current=l==null?void 0:l.url}),[l==null?void 0:l.url]),C.useEffect(()=>{E!=null&&de(!0,!1)},[E]),C.useEffect(()=>{x!=null&&de(!0,!1)},[x]),C.useEffect(()=>{l&&(console.log("[ScoreView] Clearing page cache due to option/score change"),R())},[h,I,E,x,P,A,$,F,R,l]),C.useEffect(()=>{if(!ce()||!c)return;let X;if(N&&(N==null?void 0:N.scoreUrl)==(l==null?void 0:l.url)){if(N!=null&&N.height&&(N!=null&&N.width)&&Math.abs(N.height-H)<100&&Math.abs(N.width-L)<100&&(N==null?void 0:N.page)==b&&(N==null?void 0:N.scale)==h)return;N.anchorElement&&(X=N.anchorElement),R(),J()}const ee=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:f==Ct.STOPPED&&!X?fs.FADE_IN:void 0,meiStr:c,page:1,scale:h,restorePositionForAchor:X});s(ee)},[r,z.current,H,L]),C.useEffect(()=>{if(!ce()||!c)return;J();const X=(N==null?void 0:N.anchorElement)||void 0,ee=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:void 0,meiStr:c,page:b,scale:h,restorePositionForAchor:X});s(ee)},[h]);const Z=()=>{if(!ce()||!c)return;const X=b>0?b:1,ee=(N==null?void 0:N.anchorElement)||void 0,ne=Wl({scoreUrl:(l==null?void 0:l.url)||"",meiStr:c,page:X,scale:h,restorePositionForAchor:ee});s(ne)};C.useEffect(()=>{Z()},[S,T,I,$,F]),C.useEffect(()=>{A!=null&&Z()},[A]),C.useEffect(()=>{Object.keys(P).length<=0||Z()},[P]),C.useEffect(()=>{var be;if(!ce()||!c||!N||b<1||b==N.page)return;const X=M(b);if(X&&X.svgHTML){console.log(`[ScoreView] Using cached page ${b}`),J();const Ce=document.createElement("div");Ce.innerHTML=X.svgHTML;const Se=Ce.querySelector("svg");if(Se&&z.current)Se.style.opacity="1",Se.style.position="absolute",Se.style.top="0",Se.style.left="0",z.current.appendChild(Se),Se.style.opacity="0",Se.style.transition="opacity 200ms ease-in",setTimeout(()=>{Se.style.opacity="1"},10),setTimeout(()=>{if(z.current){z.current.innerHTML=X.svgHTML;const ve=z.current.querySelector("svg");ve&&(ve.style.opacity="1",ve.style.transition="")}_(X),o(!1)},220);else{if(z.current){z.current.innerHTML=X.svgHTML;const ve=z.current.querySelector("svg");ve&&(ve.style.opacity="1")}_(X),o(!1)}return}((be=z.current)==null?void 0:be.querySelector("svg"))&&f!=Ct.PLAYING&&J();const ne=Dd({scoreUrl:N.scoreUrl,transition:void 0,renderPage:b,loadedWidth:N.width||L,loadedHeight:N.height||H,scale:h,loadedPagesCount:y});s(ne)},[b,M,_,o,f]),M7(()=>{if(!r||!z.current||!N||!ce())return;const X=N.page,ee=X+1,ne=X-1;ee<=y&&!M(ee)&&(console.log(`[ScoreView] Pre-rendering page ${ee}`),oe(ee)),ne>=1&&!M(ne)&&(console.log(`[ScoreView] Pre-rendering page ${ne}`),oe(ne))},[N,y,r,M]);const oe=async X=>{if(!(!r||!N))try{const ee=performance.now(),ne=document.createElement("div");ne.style.display="none",ne.style.position="absolute",ne.style.top="-9999px",document.body.appendChild(ne);const be=Dd({scoreUrl:N.scoreUrl,transition:void 0,renderPage:X,loadedWidth:N.width||L,loadedHeight:N.height||H,scale:N.scale,loadedPagesCount:y}),Ce=await se(be,ne);if(Ce.success&&Ce.result){const Se=Ce.result,ve=ne.innerHTML,he={...Se.newSvg,svgHTML:ve};D(X,he),console.log(`[ScoreView] Pre-rendered page ${X} in ${(performance.now()-ee).toFixed(0)}ms`)}document.body.removeChild(ne)}catch(ee){console.error(`Error pre-rendering page ${X}:`,ee)}};return q.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[q.jsx("div",{ref:z,className:"static-score "+Y.join(" "),style:{width:"100%",height:"100%",background:t||"white","--score-bg-color":t},onClick:B}),q.jsx(Dx,{visible:W})]})}function L7({playingState:e,seekPosition:t,svgContainerRef:n}){const r=C.useRef(null),i=l=>{var u;return((u=l[l.length-1])==null?void 0:u.tstamp)||0},o=l=>{if(!n.current)return[];const u=n.current.getBoundingClientRect(),c=i(l.timemap),d=Math.round(u.left+2*n.current.clientWidth/3+(u.right-u.width)),f=l.timemap.filter(p=>p.measureOn!==void 0).map(p=>({id:p.measureOn,ts:p.tstamp})),h=[];return f.forEach(p=>{var g;if(p.id){const v=CSS.escape(p.id),b=(g=n.current)==null?void 0:g.querySelector(`#${v}`);if(b){const y=b.getBoundingClientRect(),E=d-Math.floor(y.left),x=p.ts/c;h.push({transform:`translateX(${E}px)`,offset:x})}}}),h.length>0&&(h[h.length-1].offset=1),h},a=(l,u,c)=>{if(!n.current||!l||l.timemap.length===0)return;const d=n.current.querySelector("svg");if(!d)return;const f=o(l),p={duration:i(l.timemap),fill:"forwards",endDelay:3e3};r.current=d.animate(f,p),u>0&&(r.current.currentTime=u),c&&r.current.pause()},s=()=>{var u;if(!n.current)return;const l=document.querySelector(".score-container");if(l){const c=(u=n.current)==null?void 0:u.getBoundingClientRect(),d=c?`${c.left}px`:"0px",f=c?`${c.left+c.right}px`:"100%";l.style.setProperty("--expand-left",d),l.style.setProperty("--host-width",f)}};return C.useEffect(()=>{if(!r.current)return;const l=r.current;e===Ct.PAUSED&&l.playState==="running"?l.pause():e===Ct.PLAYING&&l.playState!=="running"?l.play():e===Ct.STOPPED&&(l.cancel(),l.currentTime=0)},[e]),C.useEffect(()=>{!r.current||t==-1||(r.current.currentTime=t)},[t]),C.useEffect(()=>()=>{r.current&&r.current.cancel()},[]),{animationRef:r,startAnimation:a,setupAutoScrollLayout:s,getAudioDurationMillis:i}}function D7(e){const{backgroundColor:t}=e,{verovio:n}=C.useContext(ql),{t:r}=cr("common"),i=ge.use.setScoreLayout(),o=ge.use.setIsLoading(),a=ge.use.pendingAction(),s=ge.use.setPendingAction(),l=ge.use.score(),u=ge.use.showingMei(),c=ge.use.seekPosition(),d=ge.use.playingPosition(),f=ge.use.playingState(),h=ge.use.setPlayingState(),p=ge.use.showEditorial(),g=ge.use.setShowEditorial(),v=ge.use.appOptions(),b=ge.use.choiceOptions(),y=ge.use.transposition(),E=ge.use.showReconstructions(),x=ge.use.showOriginalClefs(),O=ge.use.measureNumberInterval(),S=ge.use.renderedSvgData(),T=ge.use.setRenderedSvgData(),[I,N]=C.useState(!1),{ref:_,width:P,height:A}=cp.useComponentSize(),{svgContainerClasses:M,isSpotlightVisible:D}=Lx({autoScroll:!0,showEditorial:p,playingState:f,svgContainerRef:_,svgContainerHeight:A}),{startAnimation:R,setupAutoScrollLayout:$}=L7({playingState:f,seekPosition:c,svgContainerRef:_}),{executeAction:F}=Mx({t:r,verovio:n,svgContainerWidth:P,svgContainerHeight:A,appOptions:v,choiceOptions:b,transposition:y,showReconstructions:E,showOriginalClefs:x,setScoreLayout:i,showMusicAnalysis:!1,measureNumberInterval:O,showMusicAnalysisByDefault:!1}),B=z=>{p&&g(!1);const L=I_({height:A,meiStr:z.singleVerseMei});s(L)};return C.useEffect(()=>{!l||!n||A<=0||B(l)},[_.current]),C.useEffect(()=>{!l||!n||A<=0||(!S||S.id!="svg-auto-scrolling")&&B(l)},[A]),C.useEffect(()=>{!a||!n||!u||!_.current||(async()=>{const{success:z,nextAction:L,result:H,showSpinner:W}=await F(a,_.current);if(W&&N(!0),z){if(L)s(L);else if(s(null),N(!1),H&&a.type==="renderAutoScroll"){const k=H,{newSvg:G}=k;T(G),o(!1),$(),f==Ct.PLAYING?R(G,d,!1):f==Ct.PAUSED?R(G,d,!0):(R(G,0,!1),h(Ct.PLAYING))}}else console.error("Action execution failed"),N(!1)})()},[a,n,u]),q.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[q.jsx("div",{ref:_,className:"scrolling-score "+M.join(" "),style:{width:"100%",height:"100%",background:t||"white",transform:"translate3d(0,0,0)",backfaceVisibility:"hidden",perspective:"1000px","--score-bg-color":t}}),q.jsx(Dx,{visible:I}),q.jsx("div",{className:`score-spotlight-overlay ${D?"visible":""}`})]})}function k7(e){const[t,n]=C.useState(!1);return C.useEffect(()=>{if(e.current===null)return;const r=new IntersectionObserver(([i])=>n(i.isIntersecting));return r.observe(e.current),()=>{r.disconnect()}},[e]),t}const R7=1e3,$7=({track:e,getContent:t})=>{const n=C.useRef(null),r=C.useRef(-1),[i,o]=C.useState(void 0);return C.useEffect(()=>{function a(s){if(n.current&&(n.current.style.visibility="hidden",r.current!=-1&&(window.clearTimeout(r.current),r.current=-1),n.current&&(top!=null&&top.innerHeight))){const l=s.clientX-n.current.clientWidth/2,u=s.clientY-top.innerHeight-n.current.clientHeight/2-8;n.current.style.transform=`translate(${l}px, ${u}px)`;const c=t(s);(!c||c!=i)&&o(c),c&&(r.current=window.setTimeout(()=>{n.current&&(n.current.style.visibility="visible")},R7))}}return e.addEventListener("mousemove",a),()=>e.removeEventListener("mousemove",a)},[e,t,i]),zr.createPortal(q.jsx("div",{className:"mouse-tracker",ref:n,children:i}),document.body)},F7=e=>{var t;return((t=e[e.length-1])==null?void 0:t.tstamp)||0};function B7(e,t){const{t:n}=cr("common"),{backgroundColor:r,height:i,showMusicAnalysisByDefault:o}=e,a=ge.use.score(),s=ge.use.autoScroll(),l=ge.use.setAutoScroll(),u=ge.use.playingState(),c=ge.use.setPlayingState(),d=ge.use.currentPage(),f=ge.use.goToNextPage(),h=ge.use.goToPreviousPage(),p=ge.use.pageCount(),g=ge.use.resetPlayerPosition(),v=ge.use.showEditorial(),b=ge.use.renderedSvgData(),[y,E]=C.useState(!1),x=C.useRef(null),O=k7(x);C.useImperativeHandle(t,()=>({scrollIntoView:()=>{var I;(I=x.current)==null||I.scrollIntoView(!0)}}));const S=Bz({onSwipedLeft:I=>{u!=Ct.PLAYING&&d<p&&(g(),f())},onSwipedRight:I=>{u!=Ct.PLAYING&&d>1&&(g(),h())},delta:10,swipeDuration:300,preventScrollOnSwipe:!0}),T=C.useMemo(()=>b!=null&&b.timemap&&b.timemap.length>0?F7(b.timemap):0,[b]);return C.useEffect(()=>{!O&&u==Ct.PLAYING&&c(Ct.PAUSED)},[O]),C.useEffect(()=>{u!=Ct.STOPPED&&c(Ct.STOPPED)},[a]),C.useEffect(()=>{u==Ct.STOPPED&&s&&l(!1)},[u]),q.jsxs("div",{ref:x,className:"score-viewer",onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:{position:"relative",width:"100%",height:i},children:[q.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},children:[x.current?q.jsx(a7,{style:{flex:"0"},fullScreenElement:x.current,showDownloadButton:e.showDownloadButton??!1,audioDuration:T}):null,q.jsx("div",{className:"score-container swipeable-container",...S,style:{flex:"1",backgroundColor:r,width:"100%",overflow:"hidden"},children:s?q.jsx(D7,{backgroundColor:r,showMusicAnalysisByDefault:o}):q.jsx(kx,{backgroundColor:r,showMusicAnalysisByDefault:o})})]}),q.jsx(Xz,{}),v&&(b!=null&&b.id)?q.jsx(e7,{}):null,x.current&&y&&q.jsx($7,{track:x.current,getContent:I=>{var A,M;const N=(A=I.target)==null?void 0:A.closest("g.staff.bounding-box"),_=(M=I.target)==null?void 0:M.closest("g.measure"),P=_==null?void 0:_.getAttribute("data-n");return N&&P?n("score.measureNumber",{number:P}):void 0}})]})}const z7=C.forwardRef(B7);function tte(){}function nte(){}function Rx(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const a=n.slice(i,r).trim();(a||!o)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function $x(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const H7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V7={};function Fx(e,t){return(V7.jsx?j7:H7).test(e)}const U7=/[ \t\n\f\r]/g;function W7(e){return typeof e=="object"?e.type==="text"?Bx(e.value):!1:Bx(e)}function Bx(e){return e.replace(U7,"")===""}let cl=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};cl.prototype.normal={},cl.prototype.property={},cl.prototype.space=void 0;function zx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new cl(n,r,t)}function dl(e){return e.toLowerCase()}let yr=class{constructor(t,n){this.attribute=n,this.property=t}};yr.prototype.attribute="",yr.prototype.booleanish=!1,yr.prototype.boolean=!1,yr.prototype.commaOrSpaceSeparated=!1,yr.prototype.commaSeparated=!1,yr.prototype.defined=!1,yr.prototype.mustUseProperty=!1,yr.prototype.number=!1,yr.prototype.overloadedBoolean=!1,yr.prototype.property="",yr.prototype.spaceSeparated=!1,yr.prototype.space=void 0;let Y7=0;const Ft=qo(),jn=qo(),mp=qo(),Ze=qo(),yn=qo(),qa=qo(),kr=qo();function qo(){return 2**++Y7}const pp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ft,booleanish:jn,commaOrSpaceSeparated:kr,commaSeparated:qa,number:Ze,overloadedBoolean:mp,spaceSeparated:yn},Symbol.toStringTag,{value:"Module"})),gp=Object.keys(pp);let vp=class extends yr{constructor(t,n,r,i){let o=-1;if(super(t,n),Hx(this,"space",i),typeof r=="number")for(;++o<gp.length;){const a=gp[o];Hx(this,gp[o],(r&pp[a])===pp[a])}}};vp.prototype.defined=!0;function Hx(e,t,n){n&&(e[t]=n)}function Xa(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new vp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[dl(r)]=r,n[dl(o.attribute)]=r}return new cl(t,n,e.space)}const jx=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:jn,ariaAutoComplete:null,ariaBusy:jn,ariaChecked:jn,ariaColCount:Ze,ariaColIndex:Ze,ariaColSpan:Ze,ariaControls:yn,ariaCurrent:null,ariaDescribedBy:yn,ariaDetails:null,ariaDisabled:jn,ariaDropEffect:yn,ariaErrorMessage:null,ariaExpanded:jn,ariaFlowTo:yn,ariaGrabbed:jn,ariaHasPopup:null,ariaHidden:jn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yn,ariaLevel:Ze,ariaLive:null,ariaModal:jn,ariaMultiLine:jn,ariaMultiSelectable:jn,ariaOrientation:null,ariaOwns:yn,ariaPlaceholder:null,ariaPosInSet:Ze,ariaPressed:jn,ariaReadOnly:jn,ariaRelevant:null,ariaRequired:jn,ariaRoleDescription:yn,ariaRowCount:Ze,ariaRowIndex:Ze,ariaRowSpan:Ze,ariaSelected:jn,ariaSetSize:Ze,ariaSort:null,ariaValueMax:Ze,ariaValueMin:Ze,ariaValueNow:Ze,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Vx(e,t){return t in e?e[t]:t}function Ux(e,t){return Vx(e,t.toLowerCase())}const q7=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qa,acceptCharset:yn,accessKey:yn,action:null,allow:null,allowFullScreen:Ft,allowPaymentRequest:Ft,allowUserMedia:Ft,alt:null,as:null,async:Ft,autoCapitalize:null,autoComplete:yn,autoFocus:Ft,autoPlay:Ft,blocking:yn,capture:null,charSet:null,checked:Ft,cite:null,className:yn,cols:Ze,colSpan:null,content:null,contentEditable:jn,controls:Ft,controlsList:yn,coords:Ze|qa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ft,defer:Ft,dir:null,dirName:null,disabled:Ft,download:mp,draggable:jn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ft,formTarget:null,headers:yn,height:Ze,hidden:mp,high:Ze,href:null,hrefLang:null,htmlFor:yn,httpEquiv:yn,id:null,imageSizes:null,imageSrcSet:null,inert:Ft,inputMode:null,integrity:null,is:null,isMap:Ft,itemId:null,itemProp:yn,itemRef:yn,itemScope:Ft,itemType:yn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ft,low:Ze,manifest:null,max:null,maxLength:Ze,media:null,method:null,min:null,minLength:Ze,multiple:Ft,muted:Ft,name:null,nonce:null,noModule:Ft,noValidate:Ft,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ft,optimum:Ze,pattern:null,ping:yn,placeholder:null,playsInline:Ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ft,referrerPolicy:null,rel:yn,required:Ft,reversed:Ft,rows:Ze,rowSpan:Ze,sandbox:yn,scope:null,scoped:Ft,seamless:Ft,selected:Ft,shadowRootClonable:Ft,shadowRootDelegatesFocus:Ft,shadowRootMode:null,shape:null,size:Ze,sizes:null,slot:null,span:Ze,spellCheck:jn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ze,step:null,style:null,tabIndex:Ze,target:null,title:null,translate:null,type:null,typeMustMatch:Ft,useMap:null,value:jn,width:Ze,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yn,axis:null,background:null,bgColor:null,border:Ze,borderColor:null,bottomMargin:Ze,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ft,declare:Ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Ze,leftMargin:Ze,link:null,longDesc:null,lowSrc:null,marginHeight:Ze,marginWidth:Ze,noResize:Ft,noHref:Ft,noShade:Ft,noWrap:Ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Ze,rules:null,scheme:null,scrolling:jn,standby:null,summary:null,text:null,topMargin:Ze,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ze,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ft,disableRemotePlayback:Ft,prefix:null,property:null,results:Ze,security:null,unselectable:null},space:"html",transform:Ux}),X7=Xa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:kr,accentHeight:Ze,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ze,amplitude:Ze,arabicForm:null,ascent:Ze,attributeName:null,attributeType:null,azimuth:Ze,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ze,by:null,calcMode:null,capHeight:Ze,className:yn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ze,diffuseConstant:Ze,direction:null,display:null,dur:null,divisor:Ze,dominantBaseline:null,download:Ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ze,enableBackground:null,end:null,event:null,exponent:Ze,externalResourcesRequired:null,fill:null,fillOpacity:Ze,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qa,g2:qa,glyphName:qa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ze,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ze,horizOriginX:Ze,horizOriginY:Ze,id:null,ideographic:Ze,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ze,k:Ze,k1:Ze,k2:Ze,k3:Ze,k4:Ze,kernelMatrix:kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ze,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ze,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ze,overlineThickness:Ze,paintOrder:null,panose1:null,path:null,pathLength:Ze,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ze,pointsAtY:Ze,pointsAtZ:Ze,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kr,rev:kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kr,requiredFeatures:kr,requiredFonts:kr,requiredFormats:kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ze,specularExponent:Ze,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ze,strikethroughThickness:Ze,string:null,stroke:null,strokeDashArray:kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ze,strokeOpacity:Ze,strokeWidth:null,style:null,surfaceScale:Ze,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kr,tabIndex:Ze,tableValues:null,target:null,targetX:Ze,targetY:Ze,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ze,underlineThickness:Ze,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ze,values:null,vAlphabetic:Ze,vMathematical:Ze,vectorEffect:null,vHanging:Ze,vIdeographic:Ze,version:null,vertAdvY:Ze,vertOriginX:Ze,vertOriginY:Ze,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ze,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Vx}),Wx=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Yx=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ux}),qx=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),K7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},G7=/[A-Z]/g,Xx=/-[a-z]/g,Q7=/^data[-\w.:]+$/i;function bp(e,t){const n=dl(t);let r=t,i=yr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Q7.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Xx,J7);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Xx.test(o)){let a=o.replace(G7,Z7);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=vp}return new i(r,t)}function Z7(e){return"-"+e.toLowerCase()}function J7(e){return e.charAt(1).toUpperCase()}const Hc=zx([jx,q7,Wx,Yx,qx],"html"),Ka=zx([jx,X7,Wx,Yx,qx],"svg");function yp(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Kx(e){return e.join(" ").trim()}var Ep={},Gx=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ej=/\n/g,tj=/^\s*/,nj=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rj=/^:\s*/,ij=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,oj=/^[;\s]*/,aj=/^\s+|\s+$/g,sj=`
293
+ */const UH="react-tooltip-core-styles",WH="react-tooltip-base-styles",mx={core:!1,base:!1};function px({css:e,id:t=WH,type:n="base",ref:r}){var i,o;if(!e||typeof document>"u"||mx[n]||n==="core"&&typeof process<"u"&&(!((i=process==null?void 0:process.env)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process<"u"&&(!((o=process==null?void 0:process.env)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(t=UH),r||(r={});const{insertAt:a}=r;if(document.getElementById(t))return;const s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",a==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),mx[n]=!0}const gx=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:i=10,strategy:o="absolute",middlewares:a=[zH(Number(i)),jH({fallbackAxisSideDirection:"start"}),HH({padding:5})],border:s,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const u=a;return n?(u.push(VH({element:n,padding:5})),hx(e,t,{placement:r,strategy:o,middleware:u}).then(({x:c,y:d,placement:f,middlewareData:h})=>{var p,g;const v={left:`${c}px`,top:`${d}px`,border:s},{x:b,y}=(p=h.arrow)!==null&&p!==void 0?p:{x:0,y:0},E=(g={top:"bottom",right:"left",bottom:"top",left:"right"}[f.split("-")[0]])!==null&&g!==void 0?g:"bottom",x=s&&{borderBottom:s,borderRight:s};let O=0;if(s){const S=`${s}`.match(/(\d+)px/);O=S!=null&&S[1]?Number(S[1]):1}return{tooltipStyles:v,tooltipArrowStyles:{left:b!=null?`${b}px`:"",top:y!=null?`${y}px`:"",right:"",bottom:"",...x,[E]:`-${l/2+O}px`},place:f}})):hx(e,t,{placement:"bottom",strategy:o,middleware:u}).then(({x:c,y:d,placement:f})=>({tooltipStyles:{left:`${c}px`,top:`${d}px`},tooltipArrowStyles:{},place:f}))},vx=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),bx=(e,t,n)=>{let r=null;const i=function(...o){const a=()=>{r=null};!r&&(e.apply(this,o),r=setTimeout(a,t))};return i.cancel=()=>{r&&(clearTimeout(r),r=null)},i},yx=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",lp=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,o)=>lp(i,t[o]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!yx(e)||!yx(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(i=>lp(e[i],t[i]))},YH=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"})},Ex=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(YH(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},qH=typeof window<"u"?C.useLayoutEffect:C.useEffect,qr=e=>{e.current&&(clearTimeout(e.current),e.current=null)},XH="DEFAULT_TOOLTIP_ID",KH={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},GH=C.createContext({getTooltipData:()=>KH});function Sx(e=XH){return C.useContext(GH).getTooltipData(e)}var Ya={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},up={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const QH=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:i="dark",anchorId:o,anchorSelect:a,place:s="top",offset:l=10,events:u=["hover"],openOnClick:c=!1,positionStrategy:d="absolute",middlewares:f,wrapper:h,delayShow:p=0,delayHide:g=0,float:v=!1,hidden:b=!1,noArrow:y=!1,clickable:E=!1,closeOnEsc:x=!1,closeOnScroll:O=!1,closeOnResize:S=!1,openEvents:T,closeEvents:I,globalCloseEvents:N,imperativeModeOnly:_,style:P,position:A,afterShow:M,afterHide:D,disableTooltip:R,content:$,contentWrapperRef:F,isOpen:B,defaultIsOpen:z=!1,setIsOpen:L,activeAnchor:H,setActiveAnchor:W,border:k,opacity:G,arrowColor:Y,arrowSize:te=8,role:se="tooltip"})=>{var ce;const ue=C.useRef(null),de=C.useRef(null),J=C.useRef(null),Z=C.useRef(null),oe=C.useRef(null),[X,ee]=C.useState({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[ne,be]=C.useState(!1),[Ce,Se]=C.useState(!1),[ve,he]=C.useState(null),Ae=C.useRef(!1),Ie=C.useRef(null),{anchorRefs:me,setActiveAnchor:Me}=Sx(t),Q=C.useRef(!1),[le,pe]=C.useState([]),ye=C.useRef(!1),Fe=c||u.includes("click"),je=Fe||(T==null?void 0:T.click)||(T==null?void 0:T.dblclick)||(T==null?void 0:T.mousedown),De=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Fe&&Object.assign(De,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const we=I?{...I}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!I&&Fe&&Object.assign(we,{mouseleave:!1,blur:!1,mouseout:!1});const Le=N?{...N}:{escape:x||!1,scroll:O||!1,resize:S||!1,clickOutsideAnchor:je||!1};_&&(Object.assign(De,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(we,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),qH(()=>(ye.current=!0,()=>{ye.current=!1}),[]);const Ue=Pe=>{ye.current&&(Pe&&Se(!0),setTimeout(()=>{ye.current&&(L==null||L(Pe),B===void 0&&be(Pe))},10))};C.useEffect(()=>{if(B===void 0)return()=>null;B&&Se(!0);const Pe=setTimeout(()=>{be(B)},10);return()=>{clearTimeout(Pe)}},[B]),C.useEffect(()=>{if(ne!==Ae.current)if(qr(oe),Ae.current=ne,ne)M==null||M();else{const Pe=(_e=>{const xe=_e.match(/^([\d.]+)(ms|s)$/);if(!xe)return 0;const[,ze,qe]=xe;return Number(ze)*(qe==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));oe.current=setTimeout(()=>{Se(!1),he(null),D==null||D()},Pe+25)}},[ne]);const Te=Pe=>{ee(_e=>lp(_e,Pe)?_e:Pe)},Be=(Pe=p)=>{qr(J),Ce?Ue(!0):J.current=setTimeout(()=>{Ue(!0)},Pe)},it=(Pe=g)=>{qr(Z),Z.current=setTimeout(()=>{Q.current||Ue(!1)},Pe)},Ct=Pe=>{var _e;if(!Pe)return;const xe=(_e=Pe.currentTarget)!==null&&_e!==void 0?_e:Pe.target;if(!(xe!=null&&xe.isConnected))return W(null),void Me({current:null});p?Be():Ue(!0),W(xe),Me({current:xe}),qr(Z)},Dt=()=>{E?it(g||100):g?it():Ue(!1),qr(J)},Pt=({x:Pe,y:_e})=>{var xe;const ze={getBoundingClientRect:()=>({x:Pe,y:_e,width:0,height:0,top:_e,left:Pe,right:Pe,bottom:_e})};gx({place:(xe=ve==null?void 0:ve.place)!==null&&xe!==void 0?xe:s,offset:l,elementReference:ze,tooltipReference:ue.current,tooltipArrowReference:de.current,strategy:d,middlewares:f,border:k,arrowSize:te}).then(qe=>{Te(qe)})},wt=Pe=>{if(!Pe)return;const _e=Pe,xe={x:_e.clientX,y:_e.clientY};Pt(xe),Ie.current=xe},Ht=Pe=>{var _e;if(!ne)return;const xe=Pe.target;xe.isConnected&&(!((_e=ue.current)===null||_e===void 0)&&_e.contains(xe)||[document.querySelector(`[id='${o}']`),...le].some(ze=>ze==null?void 0:ze.contains(xe))||(Ue(!1),qr(J)))},kt=bx(Ct,50),at=bx(Dt,50),dt=Pe=>{at.cancel(),kt(Pe)},$e=()=>{kt.cancel(),at()},Ve=C.useCallback(()=>{var Pe,_e;const xe=(Pe=ve==null?void 0:ve.position)!==null&&Pe!==void 0?Pe:A;xe?Pt(xe):v?Ie.current&&Pt(Ie.current):H!=null&&H.isConnected&&gx({place:(_e=ve==null?void 0:ve.place)!==null&&_e!==void 0?_e:s,offset:l,elementReference:H,tooltipReference:ue.current,tooltipArrowReference:de.current,strategy:d,middlewares:f,border:k,arrowSize:te}).then(ze=>{ye.current&&Te(ze)})},[ne,H,$,P,s,ve==null?void 0:ve.place,l,d,A,ve==null?void 0:ve.position,v,te]);C.useEffect(()=>{var Pe,_e;const xe=new Set(me);le.forEach(He=>{R!=null&&R(He)||xe.add({current:He})});const ze=document.querySelector(`[id='${o}']`);ze&&!(R!=null&&R(ze))&&xe.add({current:ze});const qe=()=>{Ue(!1)},et=Ex(H),nt=Ex(ue.current);Le.scroll&&(window.addEventListener("scroll",qe),et==null||et.addEventListener("scroll",qe),nt==null||nt.addEventListener("scroll",qe));let mt=null;Le.resize?window.addEventListener("resize",qe):H&&ue.current&&(mt=BH(H,ue.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const vt=He=>{He.key==="Escape"&&Ue(!1)};Le.escape&&window.addEventListener("keydown",vt),Le.clickOutsideAnchor&&window.addEventListener("click",Ht);const ht=[],St=He=>!!(He!=null&&He.target&&(H!=null&&H.contains(He.target))),At=He=>{ne&&St(He)||Ct(He)},Bt=He=>{ne&&St(He)&&Dt()},en=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],fn=["click","dblclick","mousedown","mouseup"];Object.entries(De).forEach(([He,ke])=>{ke&&(en.includes(He)?ht.push({event:He,listener:dt}):fn.includes(He)&&ht.push({event:He,listener:At}))}),Object.entries(we).forEach(([He,ke])=>{ke&&(en.includes(He)?ht.push({event:He,listener:$e}):fn.includes(He)&&ht.push({event:He,listener:Bt}))}),v&&ht.push({event:"pointermove",listener:wt});const Ut=()=>{Q.current=!0},Rt=()=>{Q.current=!1,Dt()},tt=E&&(we.mouseout||we.mouseleave);return tt&&((Pe=ue.current)===null||Pe===void 0||Pe.addEventListener("mouseover",Ut),(_e=ue.current)===null||_e===void 0||_e.addEventListener("mouseout",Rt)),ht.forEach(({event:He,listener:ke})=>{xe.forEach(Oe=>{var Qe;(Qe=Oe.current)===null||Qe===void 0||Qe.addEventListener(He,ke)})}),()=>{var He,ke;Le.scroll&&(window.removeEventListener("scroll",qe),et==null||et.removeEventListener("scroll",qe),nt==null||nt.removeEventListener("scroll",qe)),Le.resize?window.removeEventListener("resize",qe):mt==null||mt(),Le.clickOutsideAnchor&&window.removeEventListener("click",Ht),Le.escape&&window.removeEventListener("keydown",vt),tt&&((He=ue.current)===null||He===void 0||He.removeEventListener("mouseover",Ut),(ke=ue.current)===null||ke===void 0||ke.removeEventListener("mouseout",Rt)),ht.forEach(({event:Oe,listener:Qe})=>{xe.forEach(ut=>{var pt;(pt=ut.current)===null||pt===void 0||pt.removeEventListener(Oe,Qe)})})}},[H,Ve,Ce,me,le,T,I,N,Fe,p,g]),C.useEffect(()=>{var Pe,_e;let xe=(_e=(Pe=ve==null?void 0:ve.anchorSelect)!==null&&Pe!==void 0?Pe:a)!==null&&_e!==void 0?_e:"";!xe&&t&&(xe=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const ze=new MutationObserver(qe=>{const et=[],nt=[];qe.forEach(mt=>{if(mt.type==="attributes"&&mt.attributeName==="data-tooltip-id"&&(mt.target.getAttribute("data-tooltip-id")===t?et.push(mt.target):mt.oldValue===t&&nt.push(mt.target)),mt.type==="childList"){if(H){const vt=[...mt.removedNodes].filter(ht=>ht.nodeType===1);if(xe)try{nt.push(...vt.filter(ht=>ht.matches(xe))),nt.push(...vt.flatMap(ht=>[...ht.querySelectorAll(xe)]))}catch{}vt.some(ht=>{var St;return!!(!((St=ht==null?void 0:ht.contains)===null||St===void 0)&&St.call(ht,H))&&(Se(!1),Ue(!1),W(null),qr(J),qr(Z),!0)})}if(xe)try{const vt=[...mt.addedNodes].filter(ht=>ht.nodeType===1);et.push(...vt.filter(ht=>ht.matches(xe))),et.push(...vt.flatMap(ht=>[...ht.querySelectorAll(xe)]))}catch{}}}),(et.length||nt.length)&&pe(mt=>[...mt.filter(vt=>!nt.includes(vt)),...et])});return ze.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{ze.disconnect()}},[t,a,ve==null?void 0:ve.anchorSelect,H]),C.useEffect(()=>{Ve()},[Ve]),C.useEffect(()=>{if(!(F!=null&&F.current))return()=>null;const Pe=new ResizeObserver(()=>{setTimeout(()=>Ve())});return Pe.observe(F.current),()=>{Pe.disconnect()}},[$,F==null?void 0:F.current]),C.useEffect(()=>{var Pe;const _e=document.querySelector(`[id='${o}']`),xe=[...le,_e];H&&xe.includes(H)||W((Pe=le[0])!==null&&Pe!==void 0?Pe:_e)},[o,le,H]),C.useEffect(()=>(z&&Ue(!0),()=>{qr(J),qr(Z)}),[]),C.useEffect(()=>{var Pe;let _e=(Pe=ve==null?void 0:ve.anchorSelect)!==null&&Pe!==void 0?Pe:a;if(!_e&&t&&(_e=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),_e)try{const xe=Array.from(document.querySelectorAll(_e));pe(xe)}catch{pe([])}},[t,a,ve==null?void 0:ve.anchorSelect]),C.useEffect(()=>{J.current&&(qr(J),Be(p))},[p]);const Ye=(ce=ve==null?void 0:ve.content)!==null&&ce!==void 0?ce:$,ot=ne&&Object.keys(X.tooltipStyles).length>0;return C.useImperativeHandle(e,()=>({open:Pe=>{if(Pe!=null&&Pe.anchorSelect)try{document.querySelector(Pe.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Pe.anchorSelect}" is not a valid CSS selector`)}he(Pe??null),Pe!=null&&Pe.delay?Be(Pe.delay):Ue(!0)},close:Pe=>{Pe!=null&&Pe.delay?it(Pe.delay):Ue(!1)},activeAnchor:H,place:X.place,isOpen:!!(Ce&&!b&&Ye&&ot)})),Ce&&!b&&Ye?C.createElement(h,{id:t,role:se,className:ie("react-tooltip",Ya.tooltip,up.tooltip,up[i],n,`react-tooltip__place-${X.place}`,Ya[ot?"show":"closing"],ot?"react-tooltip__show":"react-tooltip__closing",d==="fixed"&&Ya.fixed,E&&Ya.clickable),onTransitionEnd:Pe=>{qr(oe),ne||Pe.propertyName!=="opacity"||(Se(!1),he(null),D==null||D())},style:{...P,...X.tooltipStyles,opacity:G!==void 0&&ot?G:void 0},ref:ue},Ye,C.createElement(h,{className:ie("react-tooltip-arrow",Ya.arrow,up.arrow,r,y&&Ya.noArrow),style:{...X.tooltipArrowStyles,background:Y?`linear-gradient(to right bottom, transparent 50%, ${Y} 50%)`:void 0,"--rt-arrow-size":`${te}px`},ref:de})):null},ZH=({content:e})=>C.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),JH=C.forwardRef(({id:e,anchorId:t,anchorSelect:n,content:r,html:i,render:o,className:a,classNameArrow:s,variant:l="dark",place:u="top",offset:c=10,wrapper:d="div",children:f=null,events:h=["hover"],openOnClick:p=!1,positionStrategy:g="absolute",middlewares:v,delayShow:b=0,delayHide:y=0,float:E=!1,hidden:x=!1,noArrow:O=!1,clickable:S=!1,closeOnEsc:T=!1,closeOnScroll:I=!1,closeOnResize:N=!1,openEvents:_,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:M=!1,style:D,position:R,isOpen:$,defaultIsOpen:F=!1,disableStyleInjection:B=!1,border:z,opacity:L,arrowColor:H,arrowSize:W,setIsOpen:k,afterShow:G,afterHide:Y,disableTooltip:te,role:se="tooltip"},ce)=>{const[ue,de]=C.useState(r),[J,Z]=C.useState(i),[oe,X]=C.useState(u),[ee,ne]=C.useState(l),[be,Ce]=C.useState(c),[Se,ve]=C.useState(b),[he,Ae]=C.useState(y),[Ie,me]=C.useState(E),[Me,Q]=C.useState(x),[le,pe]=C.useState(d),[ye,Fe]=C.useState(h),[je,De]=C.useState(g),[we,Le]=C.useState(null),[Ue,Te]=C.useState(null),Be=C.useRef(B),{anchorRefs:it,activeAnchor:Ct}=Sx(e),Dt=at=>at==null?void 0:at.getAttributeNames().reduce((dt,$e)=>{var Ve;return $e.startsWith("data-tooltip-")&&(dt[$e.replace(/^data-tooltip-/,"")]=(Ve=at==null?void 0:at.getAttribute($e))!==null&&Ve!==void 0?Ve:null),dt},{}),Pt=at=>{const dt={place:$e=>{var Ve;X((Ve=$e)!==null&&Ve!==void 0?Ve:u)},content:$e=>{de($e??r)},html:$e=>{Z($e??i)},variant:$e=>{var Ve;ne((Ve=$e)!==null&&Ve!==void 0?Ve:l)},offset:$e=>{Ce($e===null?c:Number($e))},wrapper:$e=>{var Ve;pe((Ve=$e)!==null&&Ve!==void 0?Ve:d)},events:$e=>{const Ve=$e==null?void 0:$e.split(" ");Fe(Ve??h)},"position-strategy":$e=>{var Ve;De((Ve=$e)!==null&&Ve!==void 0?Ve:g)},"delay-show":$e=>{ve($e===null?b:Number($e))},"delay-hide":$e=>{Ae($e===null?y:Number($e))},float:$e=>{me($e===null?E:$e==="true")},hidden:$e=>{Q($e===null?x:$e==="true")},"class-name":$e=>{Le($e)}};Object.values(dt).forEach($e=>$e(null)),Object.entries(at).forEach(([$e,Ve])=>{var Ye;(Ye=dt[$e])===null||Ye===void 0||Ye.call(dt,Ve)})};C.useEffect(()=>{de(r)},[r]),C.useEffect(()=>{Z(i)},[i]),C.useEffect(()=>{X(u)},[u]),C.useEffect(()=>{ne(l)},[l]),C.useEffect(()=>{Ce(c)},[c]),C.useEffect(()=>{ve(b)},[b]),C.useEffect(()=>{Ae(y)},[y]),C.useEffect(()=>{me(E)},[E]),C.useEffect(()=>{Q(x)},[x]),C.useEffect(()=>{De(g)},[g]),C.useEffect(()=>{Be.current!==B&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[B]),C.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:B==="core",disableBase:B}}))},[]),C.useEffect(()=>{var at;const dt=new Set(it);let $e=n;if(!$e&&e&&($e=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),$e)try{document.querySelectorAll($e).forEach(_e=>{dt.add({current:_e})})}catch{console.warn(`[react-tooltip] "${$e}" is not a valid CSS selector`)}const Ve=document.querySelector(`[id='${t}']`);if(Ve&&dt.add({current:Ve}),!dt.size)return()=>null;const Ye=(at=Ue??Ve)!==null&&at!==void 0?at:Ct.current,ot=new MutationObserver(_e=>{_e.forEach(xe=>{var ze;if(!Ye||xe.type!=="attributes"||!(!((ze=xe.attributeName)===null||ze===void 0)&&ze.startsWith("data-tooltip-")))return;const qe=Dt(Ye);Pt(qe)})}),Pe={attributes:!0,childList:!1,subtree:!1};if(Ye){const _e=Dt(Ye);Pt(_e),ot.observe(Ye,Pe)}return()=>{ot.disconnect()}},[it,Ct,Ue,t,n]),C.useEffect(()=>{D!=null&&D.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),z&&!vx("border",`${z}`)&&console.warn(`[react-tooltip] "${z}" is not a valid \`border\`.`),D!=null&&D.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),L&&!vx("opacity",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`opacity\`.`)},[]);let wt=f;const Ht=C.useRef(null);if(o){const at=o({content:(Ue==null?void 0:Ue.getAttribute("data-tooltip-content"))||ue||null,activeAnchor:Ue});wt=at?C.createElement("div",{ref:Ht,className:"react-tooltip-content-wrapper"},at):null}else ue&&(wt=ue);J&&(wt=C.createElement(ZH,{content:J}));const kt={forwardRef:ce,id:e,anchorId:t,anchorSelect:n,className:ie(a,we),classNameArrow:s,content:wt,contentWrapperRef:Ht,place:oe,variant:ee,offset:be,wrapper:le,events:ye,openOnClick:p,positionStrategy:je,middlewares:v,delayShow:Se,delayHide:he,float:Ie,hidden:Me,noArrow:O,clickable:S,closeOnEsc:T,closeOnScroll:I,closeOnResize:N,openEvents:_,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:M,style:D,position:R,isOpen:$,defaultIsOpen:F,border:z,opacity:L,arrowColor:H,arrowSize:W,setIsOpen:k,afterShow:G,afterHide:Y,disableTooltip:te,activeAnchor:Ue,setActiveAnchor:at=>Te(at),role:se};return C.createElement(QH,{...kt})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||px({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||px({css:`
294
+ .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});function e7(){const{t:e}=cr("common"),t=ge.use.score(),n=ge.use.showingEditorial(),r=ge.use.setShowingEditorial(),i=ge.use.appOptions(),o=ge.use.setAppOptions(),a=ge.use.choiceOptions(),s=ge.use.setChoiceOptions(),l=ge.use.renderedSvgData(),u=t==null?void 0:t.editorialItems,{formatType:c}=Kw(),d=C.useMemo(()=>["corr","unclear","sic","app","choice","lem","reg","orig","supplied"].map(S=>`svg .${S}:not(.bounding-box)`).join(", "),[]),f=n?u==null?void 0:u.find(S=>S.id==n):null,h=S=>{if(S.annotations.size<=0)return null;const T=S.annotations.values().next().value;return T!=null?q.jsx("p",{children:T.text}):null},p=(S,T)=>`${S||""}${T?": "+T:""}`,g=(S,T,I)=>{var D;const N=I.source,_=N&&((D=t==null?void 0:t.properties.sources[N])==null?void 0:D.title),P=I.contentDescription,A=p(_,P);if(S=="lem")return`${e("editorial.preferredReading")} ${A}`;const M=T.filter(R=>R.type=="rdg");return M.length==1?`${e("editorial.alternativeReading")} ${A}`:`${e("editorial.alternativeReadingNumber")}${1+M.findIndex(R=>R==I)} ${A}`},v=(S,T,I,N)=>S=="app"?g(T,I,I[N]):S=="choice"?T=="reg"?e("editorial.regReading"):T=="orig"?e("editorial.origReading"):e("editorial.optionNumber",{number:1+N}):"",b=(S,T,I)=>{const N=T.options.filter((_,P)=>P!=I).map(_=>_.selector);if(S=="app"){const _=i.filter(P=>!N.includes(P));_.push(T.options[I].selector),o(_,!0)}else if(S=="choice"){const _=a.filter(P=>!N.includes(P));_.push(T.options[I].selector),s(_,!0)}},y=(S,T)=>{const I=S.type,N=S.choice,_=N.options.map((P,A)=>({option:P,index:A}));return q.jsx(dc.Group,{style:{display:"flex",flexDirection:"column",gap:8},onChange:P=>b(I,N,P.target.value),value:T,options:_.map(P=>({value:P.index,label:v(I,P.option.type,N.options,P.index)}))})},E=(S,T)=>{if(S=="app"){const I=T.options.findIndex(N=>Object.values(i).includes(N.selector));if(I!=-1)return I;{const N=T.options.findIndex(_=>_.type=="lem");return N!=-1?N:0}}else if(S=="choice"){const I=T.options.findIndex(N=>Object.values(a).includes(N.selector));return I!=-1?I:0}return 0},x=S=>{const T=S.type,I=S.choice;if(I===void 0)return null;const N=E(T,I),_=S.choice.options[N].type,P=y(S,N);return q.jsxs("div",{children:[q.jsx("br",{}),q.jsxs("p",{children:[e("editorial.currentlyShowing",{what:v(T,_,I.options,N)})," "]}),q.jsxs("p",{children:[e("editorial.availableOptions"),":"]}),P]})},O=S=>{var I,N;const T=(N=(I=S.activeAnchor)==null?void 0:I.className)==null?void 0:N.baseVal;return T?q.jsx("span",{children:c(T)}):null};return q.jsxs("div",{children:[q.jsx(JH,{id:"verovio-tooltip",variant:"info",style:{zIndex:3},offset:20,delayShow:500,anchorSelect:d,render:O}),(l==null?void 0:l.id)&&q.jsx(Gz,{svgId:l.id}),f?q.jsxs(Wr,{title:c(f.type),open:f!=null&&f!=null,onCancel:()=>r(null),footer:q.jsx(Hn,{type:"primary",onClick:()=>r(null),children:e("ok")}),children:[f.reason!=""?q.jsx("p",{children:`${e("editorial.reason")}: ${f.reason}`}):"",f.resp!=""?q.jsx("p",{children:`${e("editorial.resp")}: ${f.resp}`}):"",h(f),x(f)]}):null]})}const t7=e=>m.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",...e},m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,2.8617613,27.399396)",id:"g1"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,19.335653,27.145589)",id:"g2"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-6"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-2"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,34.65545,26.769954)",id:"g2-9"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-2"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-0"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,3.7925057,4.4400049)",id:"g2-92"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-28"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-9"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,19.78743,4.4349287)",id:"g2-2"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-9"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-3"})),m.createElement("g",{transform:"matrix(0.67086044,0,0,0.67086044,33.4321,4.0491419)",id:"g2-8"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20,8,20)",id:"ellipse1-4"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2,id:"line1-5"}))),n7=e=>m.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("line",{x1:24,y1:8,x2:24,y2:40,stroke:"#4285F4",strokeWidth:2.5}),m.createElement("g",{transform:"translate(6, 12)"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#333333",transform:"rotate(-20, 8, 20)"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#333333",strokeWidth:2}),m.createElement("path",{d:"M18,24 L22,24 L20,21 Z",fill:"#666666"})),m.createElement("g",{transform:"translate(28, 12)"},m.createElement("ellipse",{cx:8,cy:20,rx:6,ry:4.5,fill:"#999999",transform:"rotate(-20, 8, 20)"}),m.createElement("line",{x1:13,y1:18,x2:13,y2:2,stroke:"#999999",strokeWidth:2}),m.createElement("path",{d:"M4,24 L0,24 L2,21 Z",fill:"#666666"}))),Cx=e=>Math.floor(e).toString().padStart(2,"0"),wx=e=>{const t=Cx(e/1e3/60),n=Cx(e/1e3%60);return`${t}:${n}`},r7=e=>null;function i7({audioDuration:e=0}){const{t}=cr("common"),n=ge.use.playingPosition(),r=ge.use.setSeekPosition(),i=ge.use.setAutoScroll(),[o,a]=C.useState("00:00"),[s,l]=C.useState("00:00"),[u,c]=C.useState("static"),[d,f]=C.useState(e||0),h=C.useRef(0),p=C.useRef(!1);C.useEffect(()=>{if(e>0){f(e);const O=wx(e);l(O)}},[e]);const g=O=>{h.current=O;const S=wx(O);S!=o&&a(S)},v=C.useCallback(O=>{p.current=!0,h.current=Math.round(O)},[]),b=C.useCallback(O=>{p.current=!1,r(h.current),g(Math.round(h.current))},[r]);C.useEffect(()=>{if(p.current)return;const O=Math.round(n);O!=h.current&&g(O)},[n]);const y=O=>{c(O),O=="scrolling"?i(!0):O=="static"&&i(!1)},E=q.jsx(LS,{size:"small",shape:"default",onChange:y,value:u,options:[{value:"scrolling",label:t("playerMode.autoscroll"),icon:q.jsx(tl,{component:n7})},{value:"static",label:t("playerMode.normal"),icon:q.jsx(tl,{component:t7})}]});return C.useMemo(()=>q.jsxs(Pr,{align:"top",style:{justifyContent:"left",backgroundColor:"white"},gutter:{xs:8,sm:16,md:24,lg:32},children:[q.jsx(pn,{span:4,style:{textAlign:"right"},children:o}),q.jsx(pn,{span:10,style:{width:"300px",height:"30px"},children:q.jsx(WS,{style:{width:"100%",margin:"6px"},min:0,max:d,step:1,tooltip:{formatter:r7,open:!1},value:h.current,onChange:v,onChangeComplete:b})}),q.jsx(pn,{span:4,style:{textAlign:"left"},children:s}),q.jsx(pn,{span:6,style:{textAlign:"right"},children:E})]}),[s,o,u,d,h.current,v,b])}function o7(e){const t=ge.use.score(),n=ge.use.playingState(),r=ge.use.resetPlayerPosition(),i=ge.use.scale(),o=ge.use.increaseScale(),a=ge.use.decreaseScale(),s=ge.use.reachedEffectiveMaxScale(),l=ge.use.setReachedEffectiveMaxScale(),u=ge.use.pageCount(),c=ge.use.currentPage(),d=ge.use.goToPage(),f=()=>e!=null&&e.ownerDocument.fullscreenElement==e,h=()=>{e&&!f()?e.requestFullscreen():document.exitFullscreen()},p=()=>{o()},g=()=>{a(),l(!1)},v=S=>{r(),d(S)},b=n===It.PLAYING,y=!b&&i>Pd,E=!b&&i<Md&&!s,x=u>1;return{scoreUrl:t==null?void 0:t.url,currentPageNumber:c,pageCount:u,scale:i,playingState:n,isPlaying:b,canZoomIn:E,canZoomOut:y,shouldShowPagination:x,isFullScreen:f(),handlePageClick:v,zoomIn:p,zoomOut:g,handleFullScreenToggle:h}}const a7=({style:e,fullScreenElement:t,showDownloadButton:n,audioDuration:r})=>{const{t:i}=cr("common"),o=ge.use.isSplitView(),{currentPageNumber:a,scoreUrl:s,pageCount:l,playingState:u,shouldShowPagination:c,isFullScreen:d,canZoomIn:f,canZoomOut:h,handlePageClick:p,zoomIn:g,zoomOut:v,handleFullScreenToggle:b}=o7(t),y=C.useMemo(()=>q.jsxs(vn,{direction:"horizontal",children:[q.jsx(Hn,{shape:"circle",icon:q.jsx(wm,{}),onClick:v,disabled:!h}),q.jsx(Hn,{shape:"circle",icon:q.jsx(Cm,{}),onClick:g,disabled:!f}),q.jsx(Hn,{icon:d?q.jsx(NC,{}):q.jsx(_C,{}),onClick:b,disabled:u===It.PLAYING}),n?q.jsx(Hn,{type:"default",icon:q.jsx(wC,{}),download:!0,href:s||"",children:"MEI"}):null]}),[f,h,u,d,s,i]),E=C.useMemo(()=>c?q.jsx(Pm,{disabled:u===It.PLAYING,align:"center",current:a,defaultPageSize:1,total:l,simple:!1,onChange:p}):null,[c,u,a,l]),x=C.useMemo(()=>q.jsxs(Pr,{style:{justifyContent:"left",backgroundColor:"white"},gutter:{xs:8,sm:16,md:24,lg:32},children:[q.jsx(pn,{xxl:8,xl:14,lg:8,md:10,sm:12,xs:14,children:y}),q.jsx(pn,{xxl:12,xl:10,lg:14,md:14,sm:20,xs:24,children:E})]}),[y,E,o]);return q.jsx("div",{className:"score-controls",style:e,children:u===It.STOPPED?x:q.jsx(i7,{audioDuration:r})})};var cp={},$c={},Fc={},s7=Nn&&Nn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),l7=Nn&&Nn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u7=Nn&&Nn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&s7(n,t,r[i]);return l7(n,t),n}}();Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.useWindowSize=c7;var xx=u7(C);function Tx(){return{height:window.innerHeight,width:window.innerWidth}}function c7(){var e=xx.useState(Tx()),t=e[0],n=e[1];return xx.useLayoutEffect(function(){function r(){n(Tx())}return window.addEventListener("resize",r),function(){return window.removeEventListener("resize",r)}},[]),t}Object.defineProperty($c,"__esModule",{value:!0}),$c.useBreakpoint=d7,$c.useBreakpoints=f7;var Ox=Fc;function d7(e){var t=(0,Ox.useWindowSize)().width;return t<e}function f7(e){var t=(0,Ox.useWindowSize)().width;return e.map(function(n){return t<n})}var dp={},fp=Nn&&Nn.__assign||function(){return fp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fp.apply(this,arguments)},h7=Nn&&Nn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),m7=Nn&&Nn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),p7=Nn&&Nn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&h7(n,t,r[i]);return m7(n,t),n}}();Object.defineProperty(dp,"__esModule",{value:!0}),dp.useComponentSize=g7;var Bc=p7(C);function g7(){var e=Bc.useState({height:0,width:0}),t=e[0],n=e[1],r=Bc.useRef(void 0),i=Bc.useCallback(function(){if(r.current){var o=r.current.offsetHeight,a=r.current.offsetWidth;(o!==t.height||a!==t.width)&&n({height:o,width:a})}},[t.height,t.width]);return Bc.useLayoutEffect(function(){if(!(!r||!r.current)){var o=new ResizeObserver(i);return o.observe(r.current),function(){return o.disconnect()}}},[r,i]),fp({ref:r},t)}(function(e){var t=Nn&&Nn.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,a,s)}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=Nn&&Nn.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n($c,e),n(dp,e),n(Fc,e)})(cp);const v7='(//mei:measure[1])//mei:app[@type="voice_reconstruction"]/mei:rdg/@label',b7="//mei:measure[1]",y7='//mei:accid[@func="edit"]',Yo=e=>({mei:"http://www.music-encoding.org/ns/mei",xml:"http://www.w3.org/XML/1998/namespace"})[e||""]||null,E7=(e,t)=>{let n=e==null?void 0:e.evaluate("//mei:section[@label]/@label",e,Yo,XPathResult.ANY_TYPE,null),r;const i=[];for(;r=n==null?void 0:n.iterateNext();)r.nodeValue!=null&&r.nodeValue.indexOf("_heading")<0&&i.push(r.nodeValue);i.length<=1||i.forEach(o=>{var d;let a=(d=e==null?void 0:e.evaluate(`//mei:section[@label="${o}"]/mei:measure[1]`,e,Yo,XPathResult.ANY_TYPE,null))==null?void 0:d.iterateNext();if(a==null)return;const s=(o.charAt(0).toUpperCase()+o.slice(1)).replace(/_/g," "),l=e.createElement("dir");l.setAttribute("place","above"),l.setAttribute("staff","1"),l.setAttribute("tstamp","0"),a==null||a.insertBefore(l,a.firstChild);const u=e.createElement("rend");u.setAttribute("fontstyle","normal"),u.setAttribute("fontweight","bold"),l.appendChild(u);const c=e.createTextNode(s);u.appendChild(c)})},S7=(e,t)=>{var l;let n=(l=e==null?void 0:e.evaluate(b7,e,Yo,XPathResult.ANY_TYPE,null))==null?void 0:l.iterateNext();if(n==null)return;let r=e==null?void 0:e.evaluate(v7,e,Yo,XPathResult.ANY_TYPE,null);const i=[];let o;for(;o=r==null?void 0:r.iterateNext();)o.nodeValue!=null&&i.push(o.nodeValue);const a=e.createElement("app");a.setAttribute("type","voice_reconstruction"),n==null||n.insertBefore(a,n.firstChild);const s=e.createElement("lem");s.setAttribute("label","none"),a.appendChild(s),i.forEach(u=>{const c=u.split(":");if(c.length<4||c[0]!="reconstruction")return;const d=u.split(":")[1],f=u.split(":")[2],h=u.split(":")[3],p=f=="IA"?In.t("scoreProcessor.reconstructionByIA",{name:h}):In.t("scoreProcessor.reconstructionByHuman",{name:h}),g=e.createElement("rdg");g.setAttribute("label",u),a.appendChild(g);const v=e.createElement("dir");v.setAttribute("place","above"),v.setAttribute("staff",d),v.setAttribute("tstamp","0"),v.setAttribute("type","reconstruction-name"),g.appendChild(v);const b=e.createElement("rend");b.setAttribute("fontstyle","normal"),b.setAttribute("fontweight","bold"),v.appendChild(b);const y=e.createTextNode(p);b.appendChild(y)})},C7=(e,t)=>{const n=t.n;let r=e==null?void 0:e.evaluate(`//mei:verse[@n > "${n}"]`,e,Yo,XPathResult.ANY_TYPE,null);if(r==null)return;const i=[];for(var o=r.iterateNext();o!=null;)i.push(o),o=r.iterateNext();i.forEach(a=>{var s;return(s=a.parentElement)==null?void 0:s.removeChild(a)})},w7=(e,t)=>{const n=e==null?void 0:e.evaluate(y7,e,Yo,XPathResult.ANY_TYPE,null);if(n==null)return;const r=[];for(var i=n.iterateNext();i!=null;)r.push(i),i=n.iterateNext();r.forEach(o=>{o.removeAttribute("func"),o.removeAttribute("enclose")})},Nx=(e,t,n)=>{let r=e==null?void 0:e.evaluate(`//mei:${t}[not(@xml:id)]`,e,Yo,XPathResult.ANY_TYPE,null);if(r==null)return;const i=[];let o;for(;(o=r==null?void 0:r.iterateNext())!=null;)i.push(o);i.forEach(a=>{a.setAttribute("xml:id",`${n}-${Math.random().toString(36).substring(2,15)}`)})},x7=(e,t)=>{Nx(e,"measure","m")},T7=(e,t)=>{Nx(e,"section","s")};class hp{constructor(t){no(this,"score");no(this,"filters");this.score=t,this.filters=[]}addTitlesFilter(){this.filters.push([E7,{}])}addReonstructionNamesFilter(){this.filters.push([S7,{}])}addNVersesFilter(t){this.filters.push([C7,{n:t}])}addNormalizeFictaFilter(){this.filters.push([w7,{}])}addEnsureMeasuresIdFilter(){this.filters.push([x7,{}])}addEnsureSectionsIdFilter(){this.filters.push([T7,{}])}filterScore(){const n=new DOMParser().parseFromString(this.score,"application/xml");return this.filters.forEach(([i,o])=>{i(n,o)}),new XMLSerializer().serializeToString(n)}}const Pn=e=>({mei:"http://www.music-encoding.org/ns/mei",xml:"http://www.w3.org/XML/1998/namespace"})[e||""]||null,O7=["app_clefs","voice_reconstruction"],N7={a:{key:"music.pitch.a",fallback:"A"},b:{key:"music.pitch.b",fallback:"B"},c:{key:"music.pitch.c",fallback:"C"},d:{key:"music.pitch.d",fallback:"D"},e:{key:"music.pitch.e",fallback:"E"},f:{key:"music.pitch.f",fallback:"F"},g:{key:"music.pitch.g",fallback:"G"}},_7={f:{key:"music.accidental.flat",fallback:"flat",symbol:"♭"},s:{key:"music.accidental.sharp",fallback:"sharp",symbol:"♯"},n:{key:"music.accidental.natural",fallback:"natural",symbol:"♮"},ff:{key:"music.accidental.doubleFlat",fallback:"double flat",symbol:"𝄫"},ss:{key:"music.accidental.doubleSharp",fallback:"double sharp",symbol:"𝄪"}},I7={1:{key:"music.mensural.semibrevis",fallback:"semibrevis"},2:{key:"music.mensural.minima",fallback:"minima"},4:{key:"music.mensural.semiminima",fallback:"semiminima"},8:{key:"music.mensural.corchea",fallback:"corchea"}};class zc{constructor(t,n,r){no(this,"document");no(this,"tonoNumber");no(this,"t");no(this,"getEditorialNodesOfType",t=>{var o,a;const n=[];let r=this.document.evaluate(`//mei:${t}`,this.document,Pn,XPathResult.ANY_TYPE,null),i=r.iterateNext();for(;i!=null;){if(((o=i.parentElement)==null?void 0:o.tagName)!="choice"&&((a=i.parentElement)==null?void 0:a.tagName)!="app"){const s=i,l=s.getAttribute("xml:id"),u=s.getAttribute("reason"),c=s.getAttribute("resp");n.push({id:l,reason:u||"",resp:c||"",type:t,annotations:new Set})}i=r.iterateNext()}return n});const i=new DOMParser;this.document=i.parseFromString(r,"application/xml"),this.tonoNumber=n,this.t=t}describeMensuralDuration(t){if(!t)return this.t("music.mensural.unknown",{duration:"",defaultValue:"unknown duration"});const n=I7[t];return n?this.t(n.key,{defaultValue:n.fallback}):this.t("music.mensural.unknown",{duration:t,defaultValue:`unknown duration (${t})`})}describeNoteElement(t){var c;const n=((c=t.getAttribute("pname"))==null?void 0:c.toLowerCase())||"",r=N7[n],i=r?this.t(r.key,{defaultValue:r.fallback}):this.t("music.pitch.unknown",{pitch:n,defaultValue:n.toUpperCase()||"Unknown pitch"}),o=t.getAttribute("accid")||"",a=o?_7[o]:void 0,s=a?this.t(a.key,{defaultValue:a.fallback}):"",l=a?this.t("music.pitch.withAccidental",{pitch:i,accidental:s,symbol:a.symbol,defaultValue:`${i} ${s}`}):i,u=this.describeMensuralDuration(t.getAttribute("dur"));return this.t("music.note.description",{pitch:l,duration:u,defaultValue:`${l}, ${u}`})}describeRestElement(t){const n=this.describeMensuralDuration(t.getAttribute("dur"));return this.t("music.rest.description",{duration:n,defaultValue:`${n} rest`})}maxVerseNum(){let t=this.document.evaluate("//mei:verse/@n",this.document,Pn,XPathResult.ANY_TYPE,null);var n=0;let r;for(;r=t==null?void 0:t.iterateNext();){let i=parseInt(r.nodeValue||"0");i>n&&(n=i)}return n}hasFictaElements(){return this.document.evaluate('//mei:accid[@func="edit"]',this.document,Pn,XPathResult.ANY_TYPE,null).iterateNext()!=null}hasOriginalClefs(){return this.document.evaluate('//mei:rdg[@label="app_clefs"]',this.document,Pn,XPathResult.ANY_TYPE,null).iterateNext()!=null}hasEditorialElements(){var r,i;const t=(r=this.document.evaluate("count(//mei:annot)",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:r.numberValue,n=(i=this.document.evaluate('count(//mei:app[@type="variant"])',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:i.numberValue;return t!=null&&t>0||n!=null&&n>0}getNumMeasures(){var n,r;let t=(r=(n=this.document.evaluate("(//mei:measure)[last()]/@n",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.nodeValue;return t?parseInt(t):0}getEditor(){var n,r;let t=(r=(n=this.document.evaluate('//mei:respStmt/mei:persName[@role="transcriber"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent;return t||"<missing>"}getComposer(){var n,r;return((r=(n=this.document.evaluate('//mei:composer/mei:persName[@role="composer"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent)||In.t("anonymous")}getLyricist(){var n,r;return((r=(n=this.document.evaluate('//mei:lyricist/mei:persName[@role="lyricist"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent)||In.t("anonymous")}getReconstructionBy(){var n,r;let t=(r=(n=this.document.evaluate('//mei:respStmt/mei:persName[@role="reconstruction"][1]',this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:n.iterateNext())==null?void 0:r.textContent;return t||null}getMeiNotes(){let t=this.document.evaluate("//mei:meiHead//mei:extMeta//mei:pendingIssues",this.document,Pn,XPathResult.ANY_TYPE,null);const n=[];let r;for(;r=t==null?void 0:t.iterateNext();)r.textContent!=null&&n.push(r.textContent);return n}getSections(){const t=[];let n=this.document.evaluate("//mei:section[@label]",this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const i=r;t.push({label:i.getAttribute("label")||"",id:i.getAttribute("xml:id")||""}),r=n.iterateNext()}return t}getSources(){const t={};let n=this.document.evaluate("//mei:sourceDesc/mei:source",this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const i=r,o=i.getAttribute("xml:id");if(o){let a=null;for(const s of i.childNodes)if(s instanceof Element&&s.tagName==="bibl")for(const l of s.childNodes)l instanceof Element&&l.tagName==="title"&&(a=l.textContent||"");t[o]={title:a||""}}r=n.iterateNext()}return t}getVoiceName(t){var r,i;let n=(i=(r=this.document.evaluate(`//mei:staffDef[@n="${t}"]/mei:label`,this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:r.iterateNext())==null?void 0:i.textContent;return n||null}getReconstructions(){var o,a,s;const t=[];let n=this.document.evaluate('//mei:app[@type="voice_reconstruction"]/mei:rdg',this.document,Pn,XPathResult.ANY_TYPE,null);for(var r=n.iterateNext();r!=null;){const l=r,u=l.getAttribute("label"),c=((a=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:a.tagName)=="staff"?l.parentElement.parentElement.getAttribute("n"):null;if(!u||!c){r=n.iterateNext();continue}const d=this.getVoiceName(c);if(!d){r=n.iterateNext();continue}var i=(s=t.find(h=>h.voiceName==d))==null?void 0:s.reconstructionsForVoice;if(i||(i=[],t.push({staff:c,voiceName:d,reconstructionsForVoice:i})),i.find(h=>h.label==u)){r=n.iterateNext();continue}const f={label:u,voice:d,reconstructionBy:""};i.push(f),r=n.iterateNext()}return t.length>0?t.map(l=>({staff:l.staff,voiceName:l.voiceName,reconstructionsForVoice:[...l.reconstructionsForVoice,{label:"none",voice:l.voiceName,reconstructionBy:""}]})):[]}getScoreProperties(){return{hasFicta:this.hasFictaElements(),numVerses:this.maxVerseNum(),numMeasures:this.getNumMeasures(),composer:this.getComposer(),lyricist:this.getLyricist(),editor:this.getEditor(),reconstructionBy:this.getReconstructionBy(),reconstructions:this.getReconstructions(),notes:this.getMeiNotes(),sections:this.getSections(),sources:this.getSources(),hasEditorial:this.hasEditorialElements(),hasOriginalClefs:this.hasOriginalClefs(),tiedNotes:this.getTiedNotes()}}getIdForMeasureN(t){var r,i;const n=(r=this.document)==null?void 0:r.evaluate(`//mei:measure[@n="${t}"]/@xml:id`,this.document,Pn,XPathResult.ANY_TYPE,null);return(i=n==null?void 0:n.iterateNext())==null?void 0:i.nodeValue}getFirstMeasureId(){var t,n;return((n=(t=this.document.evaluate("(//mei:measure)[1]/@xml:id",this.document,Pn,XPathResult.ANY_TYPE,null))==null?void 0:t.iterateNext())==null?void 0:n.nodeValue)||null}choiceNodeToEditorialItem(t,n){var a;const r=t.getAttribute("xml:id"),o={id:r,options:[]};for(let s of[...(a=t.childNodes)==null?void 0:a.values()].filter(l=>l.nodeType==Node.ELEMENT_NODE)){const l=s,u=l.getAttribute("label"),c=l.getAttribute("source"),d=l.tagName;let f="";for(const h of l.childNodes)h instanceof Element&&h.tagName==="note"?f+=" "+this.describeNoteElement(h):h instanceof Element&&h.tagName==="rest"&&(f+=" "+this.describeRestElement(h));o.options.push({type:d,selector:`./${d}[@label='${u}']`,source:c?c.slice(1):null,contentDescription:f!==""?f:void 0})}return{id:r,type:n,resp:"",reason:"",choice:o,annotations:new Set}}getChoiceNodes(){const t=[];let n=this.document.evaluate("//mei:choice",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=this.choiceNodeToEditorialItem(i,"choice");t.push(o),r=n.iterateNext()}return t}getAppChoiceNodes(){const t=[];let n=this.document.evaluate("//mei:app",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=i.getAttribute("type");if(o!=null&&!O7.includes(o)){const a=this.choiceNodeToEditorialItem(i,"app");t.push(a)}r=n.iterateNext()}return t}getAnnotations(){var i,o;const t=[];let n=this.document.evaluate("//mei:annot",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const a=r,s=a.getAttribute("xml:id"),l=[...(i=a.childNodes)==null?void 0:i.values()].filter(c=>c.nodeType==Node.TEXT_NODE).map(c=>c.textContent).join(`
295
+ `),u=(o=a.getAttribute("plist"))==null?void 0:o.split(" ").map(c=>c.replace("#",""));t.push({id:s,text:l,targetIds:u}),r=n.iterateNext()}return t}getTiedNotes(){const t=[];let n=this.document.evaluate("//mei:tie",this.document,Pn,XPathResult.ANY_TYPE,null),r=n.iterateNext();for(;r!=null;){const i=r,o=i.getAttribute("startid"),a=i.getAttribute("endid"),s=o!=null&&o.startsWith("#")?o==null?void 0:o.slice(1):null,l=a!=null&&a.startsWith("#")?a==null?void 0:a.slice(1):null;s&&l&&t.push({first:s,second:l}),r=n.iterateNext()}return t}getEditorial(){const t=this.getEditorialNodesOfType("unclear").concat(this.getEditorialNodesOfType("sic")).concat(this.getEditorialNodesOfType("corr")).concat(this.getEditorialNodesOfType("supplied")).concat(this.getEditorialNodesOfType("reg")).concat(this.getChoiceNodes()).concat(this.getAppChoiceNodes()),n=this.getAnnotations(),r=new Set;return t.forEach(i=>{const o=n.find(a=>a.targetIds.includes(i.id));o&&(i.annotations.add(o),r.add(i.id))}),n.forEach(i=>{var a;const o=(a=i.targetIds)==null?void 0:a.filter(s=>!r.has(s));if(o&&o.length>0){const s=t.filter(l=>l.annotations.has(i));s.length==1?s[0].correspIds=[...o]:console.log(`Cannot add the targetIds ${o}`)}}),t}}const _x=["measure@n","staff@n","clef@corresp","verse@n","note@dur","rdg@label"],Ix=6e4,Ax={breaks:"auto",footer:"none",header:"none",pageMarginBottom:0,pageMarginTop:0,pageMarginLeft:16,pageMarginRight:16,bottomMarginHarm:0,scaleToPageSize:!0,shrinkToFit:!0,spacingLinear:.25,spacingNonLinear:.6,mdivAll:!0,svgHtml5:!1,svgViewBox:!1,svgRemoveXlink:!1,svgBoundingBoxes:!0,lyricElision:"regular",lyricTopMinMargin:4,lyricVerseCollapse:!0,smuflTextFont:"embedded"},A7=e=>{switch(e){case fs.FADE_OUT:return"full-opacity";case fs.FADE_IN:return"zero-opacity"}},P7=e=>e.map(t=>{var n,r;return{...t,stavesOn:(n=t.on)==null?void 0:n.map(i=>{var s;const o=CSS.escape(i);return`#radius-${(s=document.querySelector(`.staff:has(#${o})`))==null?void 0:s.getAttribute("data-n")}-animation`}),stavesOff:(r=t.off)==null?void 0:r.map(i=>{var s;const o=CSS.escape(i);return`#radius-${(s=document.querySelector(`.staff:has(#${o})`))==null?void 0:s.getAttribute("data-n")}-animation`})}}),Px=(e,t,n,r)=>{const i=Object.values(t).map(o=>`./*[contains(@label, '${o}')]`);return[...e,...i,...n?["./rdg[contains(@label, 'app_clefs')]"]:[],...r?["./rdg[contains(@type, 'dissonant_analysis')]"]:[]]};function Mx({t:e,verovio:t,svgContainerWidth:n,svgContainerHeight:r,appOptions:i,choiceOptions:o,transposition:a,showReconstructions:s,showOriginalClefs:l,showMusicAnalysis:u,showMusicAnalysisByDefault:c,measureNumberInterval:d,setScoreLayout:f}){const h=async S=>{const I=new zc(e,0,S).getSections(),N={};for(const _ of I){const P=_.id,A=await t.getPageWithElement(P);P&&A&&(N[P]=A)}return N},p=C.useCallback(async S=>{if(!t)return null;const{postLoadTransition:T,meiStr:I,page:N,scale:_,restorePositionForAchor:P,scoreUrl:A}=S,M=r,D=n;console.log(`loading score: mode=normal page=${N} pageWidth=${D}, pageHeight=${M}, scale=${_} restorePositionForAchor=${P}, showMusicAnalysis=${u}`);const R={...Ax,adjustPageWidth:!1,adjustPageHeight:!1,landscape:!1,svgAdditionalAttribute:_x,appXPathQuery:Px(i,s,l||!1,u||c),choiceXPathQuery:o,pageHeight:M,pageWidth:D,scale:_,transpose:a??"",mnumInterval:d??0};try{const $=performance.now();console.log("[useScoreActions] performLoadAction started");const F=performance.now();await t.setOptions(R),console.log(`[useScoreActions] setOptions took ${(performance.now()-F).toFixed(2)}ms`);const B=performance.now();await t.loadData(I),console.log(`[useScoreActions] loadData took ${(performance.now()-B).toFixed(2)}ms`);const z=performance.now(),L=await t.getPageCount();console.log(`[useScoreActions] getPageCount took ${(performance.now()-z).toFixed(2)}ms`);const H=await h(I);console.log(`Score loaded in ${(performance.now()-$).toFixed(0)}ms, page count: ${L}`),console.log(`[useScoreActions] performLoadAction completed in ${(performance.now()-$).toFixed(2)}ms`);let W;if(P){let k=await(t==null?void 0:t.getPageWithElement(P));k!=null&&k>0&&(W=k)}return!W&&N&&(W=N<=L?N:L),f({currentPage:W,pageCount:L,sectionPageMap:H}),Dd({scoreUrl:A,transition:T,loadedHeight:M,loadedWidth:D,renderPage:W,scale:_,loadedPagesCount:L})}catch($){return console.error("Error performing load action:",$),null}},[t,n,r,i,o,a,s,l,u,d,f]),g=C.useCallback(async S=>{if(!t)return null;const{height:T,meiStr:I}=S;console.log(`loading score: mode=autoscroll height=${T}`);const N={...Ax,adjustPageWidth:!0,adjustPageHeight:!0,svgViewBox:!0,svgAdditionalAttribute:_x,appXPathQuery:Px(i,s,l||!1,!1),choiceXPathQuery:o,pageHeight:T,pageWidth:Ix,scale:100,transpose:a??""};try{return await t.setOptions(N),await t.loadData(I),A_({height:T})}catch(_){return console.error("Error performing auto-scroll load action:",_),null}},[t,i,o,a,s,l]),v=(S,T)=>{const I=S.map(N=>({...N}));for(const{first:N,second:_}of T){const P=I.findIndex(R=>R.on!=null&&R.on.includes(N)),A=I.findIndex(R=>R.off!=null&&R.off.includes(N)),M=I.findIndex(R=>R.on!=null&&R.on.includes(_)),D=I.findIndex(R=>R.off!=null&&R.off.includes(_));P==-1||A==-1||M==-1||D==-1||(I[P].on.push(_),I[A].off=I[A].off.filter(R=>R!=N),I[M].on=I[M].on.filter(R=>R!=_),I[D].off.push(N))}return I},b=async S=>{const T=await t.getMEI(),I=new zc(e,0,T),N=v(S,I.getTiedNotes());return P7(N)},y=C.useCallback(async(S,T)=>{if(!t||!T)return null;const{transition:I,loadedHeight:N,loadedWidth:_,renderPage:P,scale:A,loadedPagesCount:M,scoreUrl:D}=S;console.log(`Rendering score: mode=normal page=${P} scale=${A} transition=${I}`);const R=performance.now();console.log("[useScoreActions] performRenderAction started");try{const $=performance.now(),F=await t.renderToTimemap({includeMeasures:!0});console.log(`[useScoreActions] renderToTimemap took ${(performance.now()-$).toFixed(2)}ms`);const B=performance.now(),z=(await t.renderToSVG(P)).replace(`width="${_}px"`,'width="100%"').replace(`height="${N}px"`,'height="100%"');console.log(`[useScoreActions] renderToSVG took ${(performance.now()-B).toFixed(2)}ms`);const L=performance.now();T.innerHTML=z;const H=T.querySelector("svg");if(!H)return console.log("Error rendering page: no svg element found"),null;H.style.opacity="0",H.classList.contains("transition-zero-end")&&H.classList.remove("transition-zero-end"),I!=null&&(H.classList.add("with-transition",A7(I)),setTimeout(()=>{H.classList.add("transition-end")},0)),console.log(`[useScoreActions] DOM manipulation took ${(performance.now()-L).toFixed(2)}ms`);const W=performance.now(),k=await t.getMEI({pageNo:P}),Y=new zc(e,0,k).getFirstMeasureId();console.log(`[useScoreActions] getMEI + analysis took ${(performance.now()-W).toFixed(2)}ms`);const te={id:H.id,scoreUrl:D,scale:A,timemap:await b(F),anchorElement:Y,page:P,height:N,width:_},se=performance.now()-R;return console.log(`[useScoreActions] Rendering + post-processing took ${se.toFixed(0)}ms`),console.log(`[useScoreActions] performRenderAction completed in ${se.toFixed(2)}ms`),{newSvg:te,loadedPagesCount:M,scale:A,renderPage:P}}catch($){return console.log(`Error rendering page: ${$}`),null}},[t,e,b]),E=C.useCallback(async(S,T)=>{if(!t||!T)return null;const{height:I}=S;console.log(`Rendering score: mode=autoscroll height=${I}`);try{const N=await t.renderToTimemap({includeMeasures:!0}),_=await t.renderToSVG(1),P=_.match(/svg viewBox="0 0 (\d+) \d+"/),A=P?Math.round(parseInt(P[1])):Ix,M=Math.round(I);return T.innerHTML=_.replace("<svg",`<svg class="auto-scroll" style="will-change: transform; backface-visibility: hidden; overflow: collapse; width: ${A}px; height: ${M}px;" `),T.style.height=`${M}px`,{newSvg:{id:"svg-auto-scrolling",scale:100,scoreUrl:"",timemap:await b(N),width:A,height:M,anchorElement:null,page:1}}}catch(N){return console.log(`Error rendering auto-scroll page: ${N}`),null}},[t]),x=S=>{const T=S.config;return!(T.transition||T.postLoadTransition)};return{executeAction:C.useCallback(async(S,T)=>{if(!t||!T)return console.log("Cannot execute action - verovio or container not ready"),{success:!1,nextAction:null,result:null,showSpinner:!1};const I=x(S);try{if(S.type==="load"){const N=await p(S.config);return{success:N!==null,nextAction:N,result:null,showSpinner:I}}else if(S.type==="loadAutoScroll"){const N=await g(S.config);return{success:N!==null,nextAction:N,result:null,showSpinner:I}}else if(S.type==="render"){const N=await y(S.config,T);return{success:N!==null,nextAction:null,result:N,showSpinner:I}}else if(S.type==="renderAutoScroll"){const N=await E(S.config,T);return{success:N!==null,nextAction:null,result:N,showSpinner:I}}return console.warn(`Unknown action type: ${S.type}`),{success:!1,nextAction:null,result:null,showSpinner:!1}}catch(N){return console.error(`Error executing action ${S.type}:`,N),{success:!1,nextAction:null,result:null,showSpinner:!1}}},[t,p,g,y,E])}}function Lx({autoScroll:e,showEditorial:t,playingState:n,svgContainerRef:r,svgContainerHeight:i}){const a=C.useCallback(()=>{if(!r.current)return 0;const f=r.current.querySelector("svg .page-margin");if(!f)return 0;const h=f.getBoundingClientRect();return Math.floor(h.bottom-h.top)},[r]),s=C.useCallback(()=>{var f;return r.current?((f=r.current.querySelectorAll("svg .system.bounding-box"))==null?void 0:f.length)===1:!1},[r]),l=C.useCallback(f=>{const h=a(),g=s()&&h>i-20;return g!==f?g:f},[a,s,i]),u=C.useMemo(()=>["svg-container",...t?["editorial-active"]:[]],[t]),c=C.useCallback(f=>{if(!r.current)return null;const h=CSS.escape(f);return r.current.querySelector(`#${h}`)},[r]),d=C.useMemo(()=>e&&n===It.PLAYING,[e,n]);return{svgPageHeight:a,svgSingleSystem:s,calculateEffectiveMaxScale:l,svgContainerClasses:u,getSvgElement:c,isSpotlightVisible:d}}const Dx=({visible:e})=>e?q.jsx("div",{className:"loading-spinner-overlay",children:q.jsx("div",{className:"loading-spinner-content",children:q.jsx(Lm,{indicator:q.jsx(wa,{style:{fontSize:32},spin:!0})})})}):null;function M7(e,t){C.useEffect(()=>{if(typeof requestIdleCallback>"u"){const r=setTimeout(e,2e3);return()=>clearTimeout(r)}const n=requestIdleCallback(()=>{e()},{timeout:2e3});return()=>cancelIdleCallback(n)},t)}function kx(e){const{backgroundColor:t,showMusicAnalysisByDefault:n}=e,{verovio:r}=C.useContext(ql),{t:i}=cr("common"),o=ge.use.setIsLoading(),a=ge.use.pendingAction(),s=ge.use.setPendingAction(),l=ge.use.score(),u=ge.use.setScoreLayout(),c=ge.use.showingMei(),d=ge.use.setShowingMei(),f=ge.use.playingState(),h=ge.use.scale(),p=ge.use.setScale(),g=ge.use.reachedEffectiveMaxScale(),v=ge.use.setReachedEffectiveMaxScale(),b=ge.use.currentPage(),y=ge.use.pageCount(),E=ge.use.showNVerses(),x=ge.use.normalizeFicta(),O=ge.use.showEditorial(),S=ge.use.appOptions(),T=ge.use.choiceOptions(),I=ge.use.transposition(),N=ge.use.renderedSvgData(),_=ge.use.setRenderedSvgData(),P=ge.use.showReconstructions(),A=ge.use.showOriginalClefs(),M=ge.use.getCachedPage(),D=ge.use.setCachedPage(),R=ge.use.clearPageCache(),$=ge.use.showMusicAnalysis(),F=ge.use.measureNumberInterval(),{handleElementClick:B}=Kw(),{ref:z,width:L,height:H}=cp.useComponentSize(),[W,k]=C.useState(!1),G=C.useRef(null),{svgContainerClasses:Y,calculateEffectiveMaxScale:te}=Lx({autoScroll:!1,showEditorial:O,playingState:f,svgContainerRef:z,svgContainerHeight:H}),{executeAction:se}=Mx({t:i,verovio:r,svgContainerWidth:L,svgContainerHeight:H,appOptions:S,choiceOptions:T,transposition:I,showReconstructions:P,showOriginalClefs:A,showMusicAnalysis:$,showMusicAnalysisByDefault:n,measureNumberInterval:F,setScoreLayout:u}),ce=()=>l&&r&&L>0&&H>0&&!a;C.useEffect(()=>{!a||!r||!c||!z.current||H<=0||(async()=>{var Ce,Se;const{success:X,nextAction:ee,result:ne,showSpinner:be}=await se(a,z.current);if(be&&k(!0),X){if(ee?s(ee):(s(null),k(!1)),a.type==="render"&&ne){const ve=ne,{newSvg:he,scale:Ae}=ve,Ie=((Ce=z.current)==null?void 0:Ce.innerHTML)||"",me={...he,svgHTML:Ie};_(me),D(me.page,me);const Me=(Se=z.current)==null?void 0:Se.querySelector("svg");Me&&(Me.style.opacity="0",Me.style.transition="opacity 300ms ease-in",setTimeout(()=>{Me.style.opacity="1"},10)),zz();const Q=Object.values(P).filter(le=>le!="none");Q.length>0&&Hz(Q),o(!1),p(Ae),setTimeout(()=>{const le=te(g);le!==g&&v(le)},400)}}else console.error("Action execution failed"),k(!1)})()},[a]);const ue=C.useCallback(()=>{var ee;if(!l)return null;const X=new hp(l.originalMei);return x&&X.addNormalizeFictaFilter(),E!=null&&E!=((ee=l.properties)==null?void 0:ee.numVerses)&&X.addNVersesFilter(E),X.filterScore()},[l,x,E]),de=C.useCallback((X,ee)=>{const ne=performance.now();console.log(`[ScoreView] updateLoadedScore called at ${Date.now()}`),k(!0);const be=ue(),Ce=performance.now()-ne;if(console.log(`[ScoreView] generateShowingScore took ${Ce.toFixed(2)}ms`),!be){k(!1);return}const Se=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:ee?fs.FADE_IN:void 0,meiStr:be,page:1,scale:h,restorePositionForAchor:X&&(N!=null&&N.anchorElement)?N.anchorElement:void 0});s(Se),d(be)},[l,N==null?void 0:N.anchorElement,h,s,d,ue]),J=C.useCallback(()=>{var ee;const X=(ee=z.current)==null?void 0:ee.querySelector("svg");X?(console.log("[ScoreView] Starting fade out transition"),X.style.transition="opacity 300ms ease-out",X.style.opacity="0",setTimeout(()=>{M(b)||(console.log("[ScoreView] Showing spinner because page is not cached after fade out ended"),k(!0))},300)):M(b)||k(!0)},[k,b,M]);C.useEffect(()=>(l&&setTimeout(()=>{de(!1,G.current!=l.url)}),()=>{G.current=l==null?void 0:l.url}),[l==null?void 0:l.url]),C.useEffect(()=>{E!=null&&de(!0,!1)},[E]),C.useEffect(()=>{x!=null&&de(!0,!1)},[x]),C.useEffect(()=>{l&&(console.log("[ScoreView] Clearing page cache due to option/score change"),R())},[h,I,E,x,P,A,$,F,R,l]),C.useEffect(()=>{if(!ce()||!c)return;let X;if(N&&(N==null?void 0:N.scoreUrl)==(l==null?void 0:l.url)){if(N!=null&&N.height&&(N!=null&&N.width)&&Math.abs(N.height-H)<100&&Math.abs(N.width-L)<100&&(N==null?void 0:N.page)==b&&(N==null?void 0:N.scale)==h)return;N.anchorElement&&(X=N.anchorElement),R(),J()}const ee=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:fs.FADE_IN,meiStr:c,page:1,scale:h,restorePositionForAchor:X});s(ee)},[r,z.current,H,L]),C.useEffect(()=>{if(!ce()||!c)return;J();const X=(N==null?void 0:N.anchorElement)||void 0,ee=Wl({scoreUrl:(l==null?void 0:l.url)||"",postLoadTransition:void 0,meiStr:c,page:b,scale:h,restorePositionForAchor:X});s(ee)},[h]);const Z=()=>{if(!ce()||!c)return;const X=b>0?b:1,ee=(N==null?void 0:N.anchorElement)||void 0,ne=Wl({scoreUrl:(l==null?void 0:l.url)||"",meiStr:c,page:X,scale:h,restorePositionForAchor:ee});s(ne)};C.useEffect(()=>{Z()},[S,T,I,$,F]),C.useEffect(()=>{A!=null&&Z()},[A]),C.useEffect(()=>{Object.keys(P).length<=0||Z()},[P]),C.useEffect(()=>{var be;if(!ce()||!c||!N||b<1||b==N.page)return;const X=M(b);if(X&&X.svgHTML){console.log(`[ScoreView] Using cached page ${b}`),J();const Ce=document.createElement("div");Ce.innerHTML=X.svgHTML;const Se=Ce.querySelector("svg");if(Se&&z.current)Se.style.opacity="1",Se.style.position="absolute",Se.style.top="0",Se.style.left="0",z.current.appendChild(Se),Se.style.opacity="0",Se.style.transition="opacity 200ms ease-in",setTimeout(()=>{Se.style.opacity="1"},10),setTimeout(()=>{if(z.current){z.current.innerHTML=X.svgHTML;const ve=z.current.querySelector("svg");ve&&(ve.style.opacity="1",ve.style.transition="")}_(X),o(!1)},220);else{if(z.current){z.current.innerHTML=X.svgHTML;const ve=z.current.querySelector("svg");ve&&(ve.style.opacity="1")}_(X),o(!1)}return}((be=z.current)==null?void 0:be.querySelector("svg"))&&J();const ne=Dd({scoreUrl:N.scoreUrl,transition:void 0,renderPage:b,loadedWidth:N.width||L,loadedHeight:N.height||H,scale:h,loadedPagesCount:y});s(ne)},[b,M,_,o]),M7(()=>{if(!r||!z.current||!N||!ce())return;const X=N.page,ee=X+1,ne=X-1;ee<=y&&!M(ee)&&(console.log(`[ScoreView] Pre-rendering page ${ee}`),oe(ee)),ne>=1&&!M(ne)&&(console.log(`[ScoreView] Pre-rendering page ${ne}`),oe(ne))},[N,y,r,M]);const oe=async X=>{if(!(!r||!N))try{const ee=performance.now(),ne=document.createElement("div");ne.style.display="none",ne.style.position="absolute",ne.style.top="-9999px",document.body.appendChild(ne);const be=Dd({scoreUrl:N.scoreUrl,transition:void 0,renderPage:X,loadedWidth:N.width||L,loadedHeight:N.height||H,scale:N.scale,loadedPagesCount:y}),Ce=await se(be,ne);if(Ce.success&&Ce.result){const Se=Ce.result,ve=ne.innerHTML,he={...Se.newSvg,svgHTML:ve};D(X,he),console.log(`[ScoreView] Pre-rendered page ${X} in ${(performance.now()-ee).toFixed(0)}ms`)}document.body.removeChild(ne)}catch(ee){console.error(`Error pre-rendering page ${X}:`,ee)}};return q.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[q.jsx("div",{ref:z,className:"static-score "+Y.join(" "),style:{width:"100%",height:"100%",background:t||"white","--score-bg-color":t},onClick:B}),q.jsx(Dx,{visible:W})]})}function L7({playingState:e,seekPosition:t,svgContainerRef:n}){const r=C.useRef(null),i=l=>{var u;return((u=l[l.length-1])==null?void 0:u.tstamp)||0},o=l=>{if(!n.current)return[];const u=n.current.getBoundingClientRect(),c=i(l.timemap),d=Math.round(u.left+2*n.current.clientWidth/3+(u.right-u.width)),f=l.timemap.filter(p=>p.measureOn!==void 0).map(p=>({id:p.measureOn,ts:p.tstamp})),h=[];return f.forEach(p=>{var g;if(p.id){const v=CSS.escape(p.id),b=(g=n.current)==null?void 0:g.querySelector(`#${v}`);if(b){const y=b.getBoundingClientRect(),E=d-Math.floor(y.left),x=p.ts/c;h.push({transform:`translateX(${E}px)`,offset:x})}}}),h.length>0&&(h[h.length-1].offset=1),h},a=(l,u,c)=>{if(!n.current||!l||l.timemap.length===0)return;const d=n.current.querySelector("svg");if(!d)return;const f=o(l),p={duration:i(l.timemap),fill:"forwards",endDelay:3e3};r.current=d.animate(f,p),u>0&&(r.current.currentTime=u),c&&r.current.pause()},s=()=>{var u;if(!n.current)return;const l=document.querySelector(".score-container");if(l){const c=(u=n.current)==null?void 0:u.getBoundingClientRect(),d=c?`${c.left}px`:"0px",f=c?`${c.left+c.right}px`:"100%";l.style.setProperty("--expand-left",d),l.style.setProperty("--host-width",f)}};return C.useEffect(()=>{if(!r.current)return;const l=r.current;e===It.PAUSED&&l.playState==="running"?l.pause():e===It.PLAYING&&l.playState!=="running"?l.play():e===It.STOPPED&&(l.cancel(),l.currentTime=0)},[e]),C.useEffect(()=>{!r.current||t==-1||(r.current.currentTime=t)},[t]),C.useEffect(()=>()=>{r.current&&r.current.cancel()},[]),{animationRef:r,startAnimation:a,setupAutoScrollLayout:s,getAudioDurationMillis:i}}function D7(e){const{backgroundColor:t}=e,{verovio:n}=C.useContext(ql),{t:r}=cr("common"),i=ge.use.setScoreLayout(),o=ge.use.setIsLoading(),a=ge.use.pendingAction(),s=ge.use.setPendingAction(),l=ge.use.score(),u=ge.use.showingMei(),c=ge.use.seekPosition(),d=ge.use.playingPosition(),f=ge.use.playingState(),h=ge.use.setPlayingState(),p=ge.use.showEditorial(),g=ge.use.setShowEditorial(),v=ge.use.appOptions(),b=ge.use.choiceOptions(),y=ge.use.transposition(),E=ge.use.showReconstructions(),x=ge.use.showOriginalClefs(),O=ge.use.measureNumberInterval(),S=ge.use.renderedSvgData(),T=ge.use.setRenderedSvgData(),[I,N]=C.useState(!1),{ref:_,width:P,height:A}=cp.useComponentSize(),{svgContainerClasses:M,isSpotlightVisible:D}=Lx({autoScroll:!0,showEditorial:p,playingState:f,svgContainerRef:_,svgContainerHeight:A}),{startAnimation:R,setupAutoScrollLayout:$}=L7({playingState:f,seekPosition:c,svgContainerRef:_}),{executeAction:F}=Mx({t:r,verovio:n,svgContainerWidth:P,svgContainerHeight:A,appOptions:v,choiceOptions:b,transposition:y,showReconstructions:E,showOriginalClefs:x,setScoreLayout:i,showMusicAnalysis:!1,measureNumberInterval:O,showMusicAnalysisByDefault:!1}),B=z=>{p&&g(!1);const L=I_({height:A,meiStr:z.singleVerseMei});s(L)};return C.useEffect(()=>{!l||!n||A<=0||B(l)},[_.current]),C.useEffect(()=>{!l||!n||A<=0||(!S||S.id!="svg-auto-scrolling")&&B(l)},[A]),C.useEffect(()=>{!a||!n||!u||!_.current||(async()=>{const{success:z,nextAction:L,result:H,showSpinner:W}=await F(a,_.current);if(W&&N(!0),z){if(L)s(L);else if(s(null),N(!1),H&&a.type==="renderAutoScroll"){const k=H,{newSvg:G}=k;T(G),o(!1),$(),f==It.PLAYING?R(G,d,!1):f==It.PAUSED?R(G,d,!0):(R(G,0,!1),h(It.PLAYING))}}else console.error("Action execution failed"),N(!1)})()},[a,n,u]),q.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[q.jsx("div",{ref:_,className:"scrolling-score "+M.join(" "),style:{width:"100%",height:"100%",background:t||"white",transform:"translate3d(0,0,0)",backfaceVisibility:"hidden",perspective:"1000px","--score-bg-color":t}}),q.jsx(Dx,{visible:I}),q.jsx("div",{className:`score-spotlight-overlay ${D?"visible":""}`})]})}function k7(e){const[t,n]=C.useState(!1);return C.useEffect(()=>{if(e.current===null)return;const r=new IntersectionObserver(([i])=>n(i.isIntersecting));return r.observe(e.current),()=>{r.disconnect()}},[e]),t}const R7=1e3,$7=({track:e,getContent:t})=>{const n=C.useRef(null),r=C.useRef(-1),[i,o]=C.useState(void 0);return C.useEffect(()=>{function a(s){if(n.current&&(n.current.style.visibility="hidden",r.current!=-1&&(window.clearTimeout(r.current),r.current=-1),n.current&&(top!=null&&top.innerHeight))){const l=s.clientX-n.current.clientWidth/2,u=s.clientY-top.innerHeight-n.current.clientHeight/2-8;n.current.style.transform=`translate(${l}px, ${u}px)`;const c=t(s);(!c||c!=i)&&o(c),c&&(r.current=window.setTimeout(()=>{n.current&&(n.current.style.visibility="visible")},R7))}}return e.addEventListener("mousemove",a),()=>e.removeEventListener("mousemove",a)},[e,t,i]),zr.createPortal(q.jsx("div",{className:"mouse-tracker",ref:n,children:i}),document.body)},F7=e=>{var t;return((t=e[e.length-1])==null?void 0:t.tstamp)||0};function B7(e,t){const{t:n}=cr("common"),{backgroundColor:r,height:i,showMusicAnalysisByDefault:o}=e,a=ge.use.score(),s=ge.use.autoScroll(),l=ge.use.setAutoScroll(),u=ge.use.playingState(),c=ge.use.setPlayingState(),d=ge.use.currentPage(),f=ge.use.goToNextPage(),h=ge.use.goToPreviousPage(),p=ge.use.pageCount(),g=ge.use.resetPlayerPosition(),v=ge.use.showEditorial(),b=ge.use.renderedSvgData(),[y,E]=C.useState(!1),x=C.useRef(null),O=k7(x);C.useImperativeHandle(t,()=>({scrollIntoView:()=>{var I;(I=x.current)==null||I.scrollIntoView(!0)}}));const S=Bz({onSwipedLeft:I=>{u!=It.PLAYING&&d<p&&(g(),f())},onSwipedRight:I=>{u!=It.PLAYING&&d>1&&(g(),h())},delta:10,swipeDuration:300,preventScrollOnSwipe:!0}),T=C.useMemo(()=>b!=null&&b.timemap&&b.timemap.length>0?F7(b.timemap):0,[b]);return C.useEffect(()=>{!O&&u==It.PLAYING&&c(It.PAUSED)},[O]),C.useEffect(()=>{u!=It.STOPPED&&c(It.STOPPED)},[a]),C.useEffect(()=>{u==It.STOPPED&&s&&l(!1)},[u]),q.jsxs("div",{ref:x,className:"score-viewer",onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:{position:"relative",width:"100%",height:i},children:[q.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},children:[x.current?q.jsx(a7,{style:{flex:"0"},fullScreenElement:x.current,showDownloadButton:e.showDownloadButton??!1,audioDuration:T}):null,q.jsx("div",{className:"score-container swipeable-container",...S,style:{flex:"1",backgroundColor:r,width:"100%",overflow:"hidden"},children:s?q.jsx(D7,{backgroundColor:r,showMusicAnalysisByDefault:o}):q.jsx(kx,{backgroundColor:r,showMusicAnalysisByDefault:o})})]}),q.jsx(Xz,{}),v&&(b!=null&&b.id)?q.jsx(e7,{}):null,x.current&&y&&q.jsx($7,{track:x.current,getContent:I=>{var A,M;const N=(A=I.target)==null?void 0:A.closest("g.staff.bounding-box"),_=(M=I.target)==null?void 0:M.closest("g.measure"),P=_==null?void 0:_.getAttribute("data-n");return N&&P?n("score.measureNumber",{number:P}):void 0}})]})}const z7=C.forwardRef(B7);function tte(){}function nte(){}function Rx(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const a=n.slice(i,r).trim();(a||!o)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function $x(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const H7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V7={};function Fx(e,t){return(V7.jsx?j7:H7).test(e)}const U7=/[ \t\n\f\r]/g;function W7(e){return typeof e=="object"?e.type==="text"?Bx(e.value):!1:Bx(e)}function Bx(e){return e.replace(U7,"")===""}let cl=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};cl.prototype.normal={},cl.prototype.property={},cl.prototype.space=void 0;function zx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new cl(n,r,t)}function dl(e){return e.toLowerCase()}let yr=class{constructor(t,n){this.attribute=n,this.property=t}};yr.prototype.attribute="",yr.prototype.booleanish=!1,yr.prototype.boolean=!1,yr.prototype.commaOrSpaceSeparated=!1,yr.prototype.commaSeparated=!1,yr.prototype.defined=!1,yr.prototype.mustUseProperty=!1,yr.prototype.number=!1,yr.prototype.overloadedBoolean=!1,yr.prototype.property="",yr.prototype.spaceSeparated=!1,yr.prototype.space=void 0;let Y7=0;const Ft=qo(),jn=qo(),mp=qo(),Ze=qo(),yn=qo(),qa=qo(),kr=qo();function qo(){return 2**++Y7}const pp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ft,booleanish:jn,commaOrSpaceSeparated:kr,commaSeparated:qa,number:Ze,overloadedBoolean:mp,spaceSeparated:yn},Symbol.toStringTag,{value:"Module"})),gp=Object.keys(pp);let vp=class extends yr{constructor(t,n,r,i){let o=-1;if(super(t,n),Hx(this,"space",i),typeof r=="number")for(;++o<gp.length;){const a=gp[o];Hx(this,gp[o],(r&pp[a])===pp[a])}}};vp.prototype.defined=!0;function Hx(e,t,n){n&&(e[t]=n)}function Xa(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new vp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[dl(r)]=r,n[dl(o.attribute)]=r}return new cl(t,n,e.space)}const jx=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:jn,ariaAutoComplete:null,ariaBusy:jn,ariaChecked:jn,ariaColCount:Ze,ariaColIndex:Ze,ariaColSpan:Ze,ariaControls:yn,ariaCurrent:null,ariaDescribedBy:yn,ariaDetails:null,ariaDisabled:jn,ariaDropEffect:yn,ariaErrorMessage:null,ariaExpanded:jn,ariaFlowTo:yn,ariaGrabbed:jn,ariaHasPopup:null,ariaHidden:jn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yn,ariaLevel:Ze,ariaLive:null,ariaModal:jn,ariaMultiLine:jn,ariaMultiSelectable:jn,ariaOrientation:null,ariaOwns:yn,ariaPlaceholder:null,ariaPosInSet:Ze,ariaPressed:jn,ariaReadOnly:jn,ariaRelevant:null,ariaRequired:jn,ariaRoleDescription:yn,ariaRowCount:Ze,ariaRowIndex:Ze,ariaRowSpan:Ze,ariaSelected:jn,ariaSetSize:Ze,ariaSort:null,ariaValueMax:Ze,ariaValueMin:Ze,ariaValueNow:Ze,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Vx(e,t){return t in e?e[t]:t}function Ux(e,t){return Vx(e,t.toLowerCase())}const q7=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qa,acceptCharset:yn,accessKey:yn,action:null,allow:null,allowFullScreen:Ft,allowPaymentRequest:Ft,allowUserMedia:Ft,alt:null,as:null,async:Ft,autoCapitalize:null,autoComplete:yn,autoFocus:Ft,autoPlay:Ft,blocking:yn,capture:null,charSet:null,checked:Ft,cite:null,className:yn,cols:Ze,colSpan:null,content:null,contentEditable:jn,controls:Ft,controlsList:yn,coords:Ze|qa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ft,defer:Ft,dir:null,dirName:null,disabled:Ft,download:mp,draggable:jn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ft,formTarget:null,headers:yn,height:Ze,hidden:mp,high:Ze,href:null,hrefLang:null,htmlFor:yn,httpEquiv:yn,id:null,imageSizes:null,imageSrcSet:null,inert:Ft,inputMode:null,integrity:null,is:null,isMap:Ft,itemId:null,itemProp:yn,itemRef:yn,itemScope:Ft,itemType:yn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ft,low:Ze,manifest:null,max:null,maxLength:Ze,media:null,method:null,min:null,minLength:Ze,multiple:Ft,muted:Ft,name:null,nonce:null,noModule:Ft,noValidate:Ft,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ft,optimum:Ze,pattern:null,ping:yn,placeholder:null,playsInline:Ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ft,referrerPolicy:null,rel:yn,required:Ft,reversed:Ft,rows:Ze,rowSpan:Ze,sandbox:yn,scope:null,scoped:Ft,seamless:Ft,selected:Ft,shadowRootClonable:Ft,shadowRootDelegatesFocus:Ft,shadowRootMode:null,shape:null,size:Ze,sizes:null,slot:null,span:Ze,spellCheck:jn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ze,step:null,style:null,tabIndex:Ze,target:null,title:null,translate:null,type:null,typeMustMatch:Ft,useMap:null,value:jn,width:Ze,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yn,axis:null,background:null,bgColor:null,border:Ze,borderColor:null,bottomMargin:Ze,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ft,declare:Ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Ze,leftMargin:Ze,link:null,longDesc:null,lowSrc:null,marginHeight:Ze,marginWidth:Ze,noResize:Ft,noHref:Ft,noShade:Ft,noWrap:Ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Ze,rules:null,scheme:null,scrolling:jn,standby:null,summary:null,text:null,topMargin:Ze,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ze,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ft,disableRemotePlayback:Ft,prefix:null,property:null,results:Ze,security:null,unselectable:null},space:"html",transform:Ux}),X7=Xa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:kr,accentHeight:Ze,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ze,amplitude:Ze,arabicForm:null,ascent:Ze,attributeName:null,attributeType:null,azimuth:Ze,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ze,by:null,calcMode:null,capHeight:Ze,className:yn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ze,diffuseConstant:Ze,direction:null,display:null,dur:null,divisor:Ze,dominantBaseline:null,download:Ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ze,enableBackground:null,end:null,event:null,exponent:Ze,externalResourcesRequired:null,fill:null,fillOpacity:Ze,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qa,g2:qa,glyphName:qa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ze,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ze,horizOriginX:Ze,horizOriginY:Ze,id:null,ideographic:Ze,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ze,k:Ze,k1:Ze,k2:Ze,k3:Ze,k4:Ze,kernelMatrix:kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ze,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ze,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ze,overlineThickness:Ze,paintOrder:null,panose1:null,path:null,pathLength:Ze,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ze,pointsAtY:Ze,pointsAtZ:Ze,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kr,rev:kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kr,requiredFeatures:kr,requiredFonts:kr,requiredFormats:kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ze,specularExponent:Ze,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ze,strikethroughThickness:Ze,string:null,stroke:null,strokeDashArray:kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ze,strokeOpacity:Ze,strokeWidth:null,style:null,surfaceScale:Ze,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kr,tabIndex:Ze,tableValues:null,target:null,targetX:Ze,targetY:Ze,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ze,underlineThickness:Ze,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ze,values:null,vAlphabetic:Ze,vMathematical:Ze,vectorEffect:null,vHanging:Ze,vIdeographic:Ze,version:null,vertAdvY:Ze,vertOriginX:Ze,vertOriginY:Ze,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ze,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Vx}),Wx=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Yx=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ux}),qx=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),K7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},G7=/[A-Z]/g,Xx=/-[a-z]/g,Q7=/^data[-\w.:]+$/i;function bp(e,t){const n=dl(t);let r=t,i=yr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Q7.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Xx,J7);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Xx.test(o)){let a=o.replace(G7,Z7);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=vp}return new i(r,t)}function Z7(e){return"-"+e.toLowerCase()}function J7(e){return e.charAt(1).toUpperCase()}const Hc=zx([jx,q7,Wx,Yx,qx],"html"),Ka=zx([jx,X7,Wx,Yx,qx],"svg");function yp(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Kx(e){return e.join(" ").trim()}var Ep={},Gx=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ej=/\n/g,tj=/^\s*/,nj=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rj=/^:\s*/,ij=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,oj=/^[;\s]*/,aj=/^\s+|\s+$/g,sj=`
296
296
  `,Qx="/",Zx="*",Xo="",lj="comment",uj="declaration",cj=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var g=p.match(ej);g&&(n+=g.length);var v=p.lastIndexOf(sj);r=~v?p.length-v:r+p.length}function o(){var p={line:n,column:r};return function(g){return g.position=new a(p),u(),g}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(p){var g=new Error(t.source+":"+n+":"+r+": "+p);if(g.reason=p,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function l(p){var g=p.exec(e);if(g){var v=g[0];return i(v),e=e.slice(v.length),g}}function u(){l(tj)}function c(p){var g;for(p=p||[];g=d();)g!==!1&&p.push(g);return p}function d(){var p=o();if(!(Qx!=e.charAt(0)||Zx!=e.charAt(1))){for(var g=2;Xo!=e.charAt(g)&&(Zx!=e.charAt(g)||Qx!=e.charAt(g+1));)++g;if(g+=2,Xo===e.charAt(g-1))return s("End of comment missing");var v=e.slice(2,g-2);return r+=2,i(v),e=e.slice(g),r+=2,p({type:lj,comment:v})}}function f(){var p=o(),g=l(nj);if(g){if(d(),!l(rj))return s("property missing ':'");var v=l(ij),b=p({type:uj,property:Jx(g[0].replace(Gx,Xo)),value:v?Jx(v[0].replace(Gx,Xo)):Xo});return l(oj),b}}function h(){var p=[];c(p);for(var g;g=f();)g!==!1&&(p.push(g),c(p));return p}return u(),h()};function Jx(e){return e?e.replace(aj,Xo):Xo}var dj=Nn&&Nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.default=hj;var fj=dj(cj);function hj(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,fj.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}var jc={};Object.defineProperty(jc,"__esModule",{value:!0}),jc.camelCase=void 0;var mj=/^--[a-zA-Z0-9_-]+$/,pj=/-([a-z])/g,gj=/^[^-]+$/,vj=/^-(webkit|moz|ms|o|khtml)-/,bj=/^-(ms)-/,yj=function(e){return!e||gj.test(e)||mj.test(e)},Ej=function(e,t){return t.toUpperCase()},eT=function(e,t){return"".concat(t,"-")},Sj=function(e,t){return t===void 0&&(t={}),yj(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(bj,eT):e=e.replace(vj,eT),e.replace(pj,Ej))};jc.camelCase=Sj;var Cj=Nn&&Nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wj=Cj(Ep),xj=jc;function Sp(e,t){var n={};return!e||typeof e!="string"||(0,wj.default)(e,function(r,i){r&&i&&(n[(0,xj.camelCase)(r,t)]=i)}),n}Sp.default=Sp;var Tj=Sp;const Oj=Ul(Tj),Vc=tT("end"),Mi=tT("start");function tT(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Nj(e){const t=Mi(e),n=Vc(e);if(t&&n)return{start:t,end:n}}function fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nT(e.position):"start"in e||"end"in e?nT(e):"line"in e||"column"in e?Cp(e):""}function Cp(e){return rT(e&&e.line)+":"+rT(e&&e.column)}function nT(e){return Cp(e&&e.start)+"-"+Cp(e&&e.end)}function rT(e){return e&&typeof e=="number"?e:1}class sr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=fl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}sr.prototype.file="",sr.prototype.name="",sr.prototype.reason="",sr.prototype.message="",sr.prototype.stack="",sr.prototype.column=void 0,sr.prototype.line=void 0,sr.prototype.ancestors=void 0,sr.prototype.cause=void 0,sr.prototype.fatal=void 0,sr.prototype.place=void 0,sr.prototype.ruleId=void 0,sr.prototype.source=void 0;const wp={}.hasOwnProperty,_j=new Map,Ij=/[A-Z]/g,Aj=new Set(["table","tbody","thead","tfoot","tr"]),Pj=new Set(["td","th"]),iT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mj(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zj(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Bj(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ka:Hc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=oT(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function oT(e,t,n){if(t.type==="element")return Lj(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Dj(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Rj(e,t,n);if(t.type==="mdxjsEsm")return kj(e,t);if(t.type==="root")return $j(e,t,n);if(t.type==="text")return Fj(e,t)}function Lj(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ka,e.schema=i),e.ancestors.push(t);const o=sT(e,t.tagName,!1),a=Hj(e,t);let s=Tp(e,t);return Aj.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!W7(l):!0})),aT(e,a,o,t),xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Dj(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hl(e,t.position)}function kj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hl(e,t.position)}function Rj(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ka,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:sT(e,t.name,!0),a=jj(e,t),s=Tp(e,t);return aT(e,a,o,t),xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function $j(e,t,n){const r={};return xp(r,Tp(e,t)),e.create(t,e.Fragment,r,n)}function Fj(e,t){return t.value}function aT(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Bj(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function zj(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Mi(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Hj(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wp.call(t.properties,i)){const o=Vj(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Pj.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jj(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else hl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else hl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Tp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:_j;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=oT(e,o,a);s!==void 0&&n.push(s)}return n}function Vj(e,t,n){const r=bp(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$x(n):Kx(n)),r.property==="style"){let i=typeof n=="object"?n:Uj(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wj(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?K7[r.property]||r.property:r.attribute,n]}}function Uj(e,t){try{return Oj(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new sr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=iT+"#cannot-parse-style-attribute",i}}function sT(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=Fx(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Fx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);hl(e)}function hl(e,t){const n=new sr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=iT+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wj(e){const t={};let n;for(n in e)wp.call(e,n)&&(t[Yj(n)]=e[n]);return t}function Yj(e){let t=e.replace(Ij,qj);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qj(e){return"-"+e.toLowerCase()}const Op={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Xj={};function Np(e,t){const n=Xj,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lT(e,r,i)}function lT(e,t,n){if(Kj(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uT(e.children,t,n)}return Array.isArray(e)?uT(e,t,n):""}function uT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lT(e[i],t,n);return r.join("")}function Kj(e){return!!(e&&typeof e=="object")}const cT=document.createElement("i");function _p(e){const t="&"+e+";";cT.innerHTML=t;const n=cT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Rr(e,e.length,0,t),e):t}const dT={}.hasOwnProperty;function fT(e){const t={};let n=-1;for(;++n<e.length;)Gj(t,e[n]);return t}function Gj(e,t){let n;for(n in t){const i=(dT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){dT.call(i,a)||(i[a]=[]);const s=o[a];Qj(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Qj(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rr(e,0,0,r)}function hT(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ci(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fr=vo(/[A-Za-z]/),lr=vo(/[\dA-Za-z]/),Zj=vo(/[#-'*+\--9=?A-Z^-~]/);function Uc(e){return e!==null&&(e<32||e===127)}const Ip=vo(/\d/),Jj=vo(/[\dA-Fa-f]/),eV=vo(/[!-/:-@[-`{-~]/);function Et(e){return e!==null&&e<-2}function gn(e){return e!==null&&(e<0||e===32)}function Yt(e){return e===-2||e===-1||e===32}const Wc=vo(new RegExp("\\p{P}|\\p{S}","u")),Ko=vo(/\s/);function vo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ga(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&lr(e.charCodeAt(n+1))&&lr(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Jt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return Yt(l)?(e.enter(n),s(l)):t(l)}function s(l){return Yt(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const tV={tokenize:nV};function nV(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Jt(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Et(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const rV={tokenize:iV},mT={tokenize:oV};function iV(e){const t=this,n=[];let r=0,i,o,a;return s;function s(E){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,l,u)(E)}return u(E)}function l(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const x=t.events.length;let O=x,S;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){S=t.events[O][1].end;break}b(r);let T=x;for(;T<t.events.length;)t.events[T][1].end={...S},T++;return Rr(t.events,O+1,0,t.events.slice(x)),t.events.length=T,u(E)}return s(E)}function u(E){if(r===n.length){if(!i)return f(E);if(i.currentConstruct&&i.currentConstruct.concrete)return p(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mT,c,d)(E)}function c(E){return i&&y(),b(r),f(E)}function d(E){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(E)}function f(E){return t.containerState={},e.attempt(mT,h,p)(E)}function h(E){return r++,n.push([t.currentConstruct,t.containerState]),f(E)}function p(E){if(E===null){i&&y(),b(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(E)}function g(E){if(E===null){v(e.exit("chunkFlow"),!0),b(0),e.consume(E);return}return Et(E)?(e.consume(E),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(E),g)}function v(E,x){const O=t.sliceStream(E);if(x&&O.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(O),t.parser.lazy[E.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const T=t.events.length;let I=T,N,_;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(N){_=t.events[I][1].end;break}N=!0}for(b(r),S=T;S<t.events.length;)t.events[S][1].end={..._},S++;Rr(t.events,I+1,0,t.events.slice(T)),t.events.length=S}}function b(E){let x=n.length;for(;x-- >E;){const O=n[x];t.containerState=O[1],O[0].exit.call(t,e)}n.length=E}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oV(e,t,n){return Jt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qa(e){if(e===null||gn(e)||Ko(e))return 1;if(Wc(e))return 2}function Yc(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Ap={name:"attention",resolveAll:aV,tokenize:sV};function aV(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};pT(d,-l),pT(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Xr(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Xr(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=Xr(u,Yc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Xr(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Xr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Rr(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sV(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qa(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),c=Qa(l),d=!c||c===2&&i||n.includes(l),f=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?d:d&&(i||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(l)}}function pT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const lV={name:"autolink",tokenize:uV};function uV(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return fr(h)?(e.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||lr(h)?(r=1,s(h)):u(h)}function s(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||lr(h))&&r++<32?(e.consume(h),s):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Uc(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):Zj(h)?(e.consume(h),u):n(h)}function c(h){return lr(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||lr(h))&&r++<63){const p=h===45?f:d;return e.consume(h),p}return n(h)}}const ml={partial:!0,tokenize:cV};function cV(e,t,n){return r;function r(o){return Yt(o)?Jt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Et(o)?t(o):n(o)}}const gT={continuation:{tokenize:fV},exit:hV,name:"blockQuote",tokenize:dV};function dV(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Yt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function fV(e,t,n){const r=this;return i;function i(a){return Yt(a)?Jt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(gT,t,n)(a)}}function hV(e){e.exit("blockQuote")}const vT={name:"characterEscape",tokenize:mV};function mV(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return eV(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const bT={name:"characterReference",tokenize:pV};function pV(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=lr,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Jj,c):(e.enter("characterReferenceValue"),o=7,a=Ip,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===lr&&!_p(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),c):n(d)}}const yT={partial:!0,tokenize:vV},ET={concrete:!0,name:"codeFenced",tokenize:gV};function gV(e,t,n){const r=this,i={partial:!0,tokenize:O};let o=0,a=0,s;return l;function l(S){return u(S)}function u(S){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===s?(a++,e.consume(S),c):a<3?n(S):(e.exit("codeFencedFenceSequence"),Yt(S)?Jt(e,d,"whitespace")(S):d(S))}function d(S){return S===null||Et(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(yT,g,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||Et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):Yt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jt(e,h,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),f)}function h(S){return S===null||Et(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?n(S):(e.consume(S),p)}function g(S){return e.attempt(i,x,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),b}function b(S){return o>0&&Yt(S)?Jt(e,y,"linePrefix",o+1)(S):y(S)}function y(S){return S===null||Et(S)?e.check(yT,g,x)(S):(e.enter("codeFlowValue"),E(S))}function E(S){return S===null||Et(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),E)}function x(S){return e.exit("codeFenced"),t(S)}function O(S,T,I){let N=0;return _;function _(R){return S.enter("lineEnding"),S.consume(R),S.exit("lineEnding"),P}function P(R){return S.enter("codeFencedFence"),Yt(R)?Jt(S,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):A(R)}function A(R){return R===s?(S.enter("codeFencedFenceSequence"),M(R)):I(R)}function M(R){return R===s?(N++,S.consume(R),M):N>=a?(S.exit("codeFencedFenceSequence"),Yt(R)?Jt(S,D,"whitespace")(R):D(R)):I(R)}function D(R){return R===null||Et(R)?(S.exit("codeFencedFence"),T(R)):I(R)}}}function vV(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Pp={name:"codeIndented",tokenize:yV},bV={partial:!0,tokenize:EV};function yV(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Jt(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):Et(u)?e.attempt(bV,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||Et(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function EV(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Jt(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Et(a)?i(a):n(a)}}const SV={name:"codeText",previous:wV,resolve:CV,tokenize:xV};function CV(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function wV(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xV(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):Et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||Et(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class TV{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&pl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);pl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pl(this.left,n.reverse())}}}function pl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ST(e){const t={};let n=-1,r,i,o,a,s,l,u;const c=new TV(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,OV(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Rr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function OV(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let c,d,f=-1,h=n,p=0,g=0;const v=[g];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(g=f+1,v.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),f=v.length;f--;){const b=s.slice(v[f],v[f+1]),y=o.pop();l.push([y,y+b.length-1]),e.splice(y,2,b)}for(l.reverse(),f=-1;++f<l.length;)u[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return u}const NV={resolve:IV,tokenize:AV},_V={partial:!0,tokenize:PV};function IV(e){return ST(e),e}function AV(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Et(s)?e.check(_V,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function PV(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Jt(e,o,"linePrefix")}function o(a){if(a===null||Et(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function CT(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),f):b===null||b===32||b===41||Uc(b)?n(b):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(b))}function f(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||Et(b)?n(b):(e.consume(b),b===92?p:h)}function p(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function g(b){return!c&&(b===null||b===41||gn(b))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(b)):c<u&&b===40?(e.consume(b),c++,g):b===41?(e.consume(b),c--,g):b===null||b===32||b===40||Uc(b)?n(b):(e.consume(b),b===92?v:g)}function v(b){return b===40||b===41||b===92?(e.consume(b),g):g(b)}}function wT(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):Et(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||Et(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!Yt(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function xT(e,t,n,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===a?(e.exit(o),l(a)):f===null?n(f):Et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Jt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||Et(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===a||f===92?(e.consume(f),c):c(f)}}function gl(e,t){let n;return r;function r(i){return Et(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Yt(i)?Jt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const MV={name:"definition",tokenize:DV},LV={partial:!0,tokenize:kV};function DV(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),a(h)}function a(h){return wT.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return gn(h)?gl(e,u)(h):u(h)}function u(h){return CT(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(LV,d,d)(h)}function d(h){return Yt(h)?Jt(e,f,"whitespace")(h):f(h)}function f(h){return h===null||Et(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function kV(e,t,n){return r;function r(s){return gn(s)?gl(e,i)(s):n(s)}function i(s){return xT(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Yt(s)?Jt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Et(s)?t(s):n(s)}}const RV={name:"hardBreakEscape",tokenize:$V};function $V(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Et(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const FV={name:"headingAtx",resolve:BV,tokenize:zV};function BV(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function zV(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||gn(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||Et(c)?(e.exit("atxHeading"),t(c)):Yt(c)?Jt(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||gn(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const HV=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],TT=["pre","script","style","textarea"],jV={concrete:!0,name:"htmlFlow",resolveTo:WV,tokenize:YV},VV={partial:!0,tokenize:XV},UV={partial:!0,tokenize:qV};function WV(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function YV(e,t,n){const r=this;let i,o,a,s,l;return u;function u(k){return c(k)}function c(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),o=!0,g):k===63?(e.consume(k),i=3,r.interrupt?t:L):fr(k)?(e.consume(k),a=String.fromCharCode(k),v):n(k)}function f(k){return k===45?(e.consume(k),i=2,h):k===91?(e.consume(k),i=5,s=0,p):fr(k)?(e.consume(k),i=4,r.interrupt?t:L):n(k)}function h(k){return k===45?(e.consume(k),r.interrupt?t:L):n(k)}function p(k){const G="CDATA[";return k===G.charCodeAt(s++)?(e.consume(k),s===G.length?r.interrupt?t:A:p):n(k)}function g(k){return fr(k)?(e.consume(k),a=String.fromCharCode(k),v):n(k)}function v(k){if(k===null||k===47||k===62||gn(k)){const G=k===47,Y=a.toLowerCase();return!G&&!o&&TT.includes(Y)?(i=1,r.interrupt?t(k):A(k)):HV.includes(a.toLowerCase())?(i=6,G?(e.consume(k),b):r.interrupt?t(k):A(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):o?y(k):E(k))}return k===45||lr(k)?(e.consume(k),a+=String.fromCharCode(k),v):n(k)}function b(k){return k===62?(e.consume(k),r.interrupt?t:A):n(k)}function y(k){return Yt(k)?(e.consume(k),y):_(k)}function E(k){return k===47?(e.consume(k),_):k===58||k===95||fr(k)?(e.consume(k),x):Yt(k)?(e.consume(k),E):_(k)}function x(k){return k===45||k===46||k===58||k===95||lr(k)?(e.consume(k),x):O(k)}function O(k){return k===61?(e.consume(k),S):Yt(k)?(e.consume(k),O):E(k)}function S(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,T):Yt(k)?(e.consume(k),S):I(k)}function T(k){return k===l?(e.consume(k),l=null,N):k===null||Et(k)?n(k):(e.consume(k),T)}function I(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||gn(k)?O(k):(e.consume(k),I)}function N(k){return k===47||k===62||Yt(k)?E(k):n(k)}function _(k){return k===62?(e.consume(k),P):n(k)}function P(k){return k===null||Et(k)?A(k):Yt(k)?(e.consume(k),P):n(k)}function A(k){return k===45&&i===2?(e.consume(k),$):k===60&&i===1?(e.consume(k),F):k===62&&i===4?(e.consume(k),H):k===63&&i===3?(e.consume(k),L):k===93&&i===5?(e.consume(k),z):Et(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(VV,W,M)(k)):k===null||Et(k)?(e.exit("htmlFlowData"),M(k)):(e.consume(k),A)}function M(k){return e.check(UV,D,W)(k)}function D(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),R}function R(k){return k===null||Et(k)?M(k):(e.enter("htmlFlowData"),A(k))}function $(k){return k===45?(e.consume(k),L):A(k)}function F(k){return k===47?(e.consume(k),a="",B):A(k)}function B(k){if(k===62){const G=a.toLowerCase();return TT.includes(G)?(e.consume(k),H):A(k)}return fr(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),B):A(k)}function z(k){return k===93?(e.consume(k),L):A(k)}function L(k){return k===62?(e.consume(k),H):k===45&&i===2?(e.consume(k),L):A(k)}function H(k){return k===null||Et(k)?(e.exit("htmlFlowData"),W(k)):(e.consume(k),H)}function W(k){return e.exit("htmlFlow"),t(k)}}function qV(e,t,n){const r=this;return i;function i(a){return Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function XV(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ml,t,n)}}const KV={name:"htmlText",tokenize:GV};function GV(e,t,n){const r=this;let i,o,a;return s;function s(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),O):L===63?(e.consume(L),E):fr(L)?(e.consume(L),I):n(L)}function u(L){return L===45?(e.consume(L),c):L===91?(e.consume(L),o=0,p):fr(L)?(e.consume(L),y):n(L)}function c(L){return L===45?(e.consume(L),h):n(L)}function d(L){return L===null?n(L):L===45?(e.consume(L),f):Et(L)?(a=d,F(L)):(e.consume(L),d)}function f(L){return L===45?(e.consume(L),h):d(L)}function h(L){return L===62?$(L):L===45?f(L):d(L)}function p(L){const H="CDATA[";return L===H.charCodeAt(o++)?(e.consume(L),o===H.length?g:p):n(L)}function g(L){return L===null?n(L):L===93?(e.consume(L),v):Et(L)?(a=g,F(L)):(e.consume(L),g)}function v(L){return L===93?(e.consume(L),b):g(L)}function b(L){return L===62?$(L):L===93?(e.consume(L),b):g(L)}function y(L){return L===null||L===62?$(L):Et(L)?(a=y,F(L)):(e.consume(L),y)}function E(L){return L===null?n(L):L===63?(e.consume(L),x):Et(L)?(a=E,F(L)):(e.consume(L),E)}function x(L){return L===62?$(L):E(L)}function O(L){return fr(L)?(e.consume(L),S):n(L)}function S(L){return L===45||lr(L)?(e.consume(L),S):T(L)}function T(L){return Et(L)?(a=T,F(L)):Yt(L)?(e.consume(L),T):$(L)}function I(L){return L===45||lr(L)?(e.consume(L),I):L===47||L===62||gn(L)?N(L):n(L)}function N(L){return L===47?(e.consume(L),$):L===58||L===95||fr(L)?(e.consume(L),_):Et(L)?(a=N,F(L)):Yt(L)?(e.consume(L),N):$(L)}function _(L){return L===45||L===46||L===58||L===95||lr(L)?(e.consume(L),_):P(L)}function P(L){return L===61?(e.consume(L),A):Et(L)?(a=P,F(L)):Yt(L)?(e.consume(L),P):N(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,M):Et(L)?(a=A,F(L)):Yt(L)?(e.consume(L),A):(e.consume(L),D)}function M(L){return L===i?(e.consume(L),i=void 0,R):L===null?n(L):Et(L)?(a=M,F(L)):(e.consume(L),M)}function D(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||gn(L)?N(L):(e.consume(L),D)}function R(L){return L===47||L===62||gn(L)?N(L):n(L)}function $(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function F(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),B}function B(L){return Yt(L)?Jt(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):z(L)}function z(L){return e.enter("htmlTextData"),a(L)}}const Mp={name:"labelEnd",resolveAll:eU,resolveTo:tU,tokenize:nU},QV={tokenize:rU},ZV={tokenize:iU},JV={tokenize:oU};function eU(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Rr(e,0,e.length,n),e}function tU(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Xr(s,e.slice(o+1,o+r+3)),s=Xr(s,[["enter",c,t]]),s=Xr(s,Yc(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Xr(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Xr(s,e.slice(a+1)),s=Xr(s,[["exit",l,t]]),Rr(e,o,e.length,s),e}function nU(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(ci(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(QV,c,a?c:d)(f):f===91?e.attempt(ZV,c,a?u:d)(f):a?c(f):d(f)}function u(f){return e.attempt(JV,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function rU(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return gn(d)?gl(e,o)(d):o(d)}function o(d){return d===41?c(d):CT(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return gn(d)?gl(e,l)(d):c(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?xT(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return gn(d)?gl(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function iU(e,t,n){const r=this;return i;function i(s){return wT.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function oU(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const aU={name:"labelStartImage",resolveAll:Mp.resolveAll,tokenize:sU};function sU(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const lU={name:"labelStartLink",resolveAll:Mp.resolveAll,tokenize:uU};function uU(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Lp={name:"lineEnding",tokenize:cU};function cU(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Jt(e,t,"linePrefix")}}const qc={name:"thematicBreak",tokenize:dU};function dU(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Et(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Yt(u)?Jt(e,s,"whitespace")(u):s(u))}}const Er={continuation:{tokenize:pU},exit:vU,name:"list",tokenize:mU},fU={partial:!0,tokenize:bU},hU={partial:!0,tokenize:gU};function mU(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ip(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(qc,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Ip(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ml,r.interrupt?n:c,e.attempt(fU,f,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return Yt(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function pU(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ml,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Yt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hU,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jt(e,e.attempt(Er,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function gU(e,t,n){const r=this;return Jt(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function vU(e){e.exit(this.containerState.type)}function bU(e,t,n){const r=this;return Jt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Yt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const OT={name:"setextUnderline",resolveTo:yU,tokenize:EU};function yU(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function EU(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),Yt(u)?Jt(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Et(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const SU={tokenize:CU};function CU(e){const t=this,n=e.attempt(ml,r,e.attempt(this.parser.constructs.flowInitial,i,Jt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(NV,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const wU={resolveAll:_T()},xU=NT("string"),TU=NT("text");function NT(e){return{resolveAll:_T(e==="text"?OU:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function _T(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function OU(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const NU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:MV},disable:{null:[]},document:{42:Er,43:Er,45:Er,48:Er,49:Er,50:Er,51:Er,52:Er,53:Er,54:Er,55:Er,56:Er,57:Er,62:gT},flow:{35:FV,42:qc,45:[OT,qc],60:jV,61:OT,95:qc,96:ET,126:ET},flowInitial:{[-2]:Pp,[-1]:Pp,32:Pp},insideSpan:{null:[Ap,wU]},string:{38:bT,92:vT},text:{[-5]:Lp,[-4]:Lp,[-3]:Lp,33:aU,38:bT,42:Ap,60:[lV,KV],91:lU,92:[RV,vT],93:Mp,95:Ap,96:SV}},Symbol.toStringTag,{value:"Module"}));function _U(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:T(O),check:T(S),consume:y,enter:E,exit:x,interrupt:T(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function d(P){return a=Xr(a,P),v(),a[a.length-1]!==null?[]:(I(t,0),u.events=Yc(o,u.events,u),u.events)}function f(P,A){return AU(h(P),A)}function h(P){return IU(a,P)}function p(){const{_bufferIndex:P,_index:A,line:M,column:D,offset:R}=r;return{_bufferIndex:P,_index:A,line:M,column:D,offset:R}}function g(P){i[P.line]=P.column,_()}function v(){let P;for(;r._index<a.length;){const A=a[r._index];if(typeof A=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<A.length;)b(A.charCodeAt(r._bufferIndex));else b(A)}}function b(P){c=c(P)}function y(P){Et(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,_()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function E(P,A){const M=A||{};return M.type=P,M.start=p(),u.events.push(["enter",M,u]),s.push(M),M}function x(P){const A=s.pop();return A.end=p(),u.events.push(["exit",A,u]),A}function O(P,A){I(P,A.from)}function S(P,A){A.restore()}function T(P,A){return M;function M(D,R,$){let F,B,z,L;return Array.isArray(D)?W(D):"tokenize"in D?W([D]):H(D);function H(te){return se;function se(ce){const ue=ce!==null&&te[ce],de=ce!==null&&te.null,J=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(de)?de:de?[de]:[]];return W(J)(ce)}}function W(te){return F=te,B=0,te.length===0?$:k(te[B])}function k(te){return se;function se(ce){return L=N(),z=te,te.partial||(u.currentConstruct=te),te.name&&u.parser.constructs.disable.null.includes(te.name)?Y():te.tokenize.call(A?Object.assign(Object.create(u),A):u,l,G,Y)(ce)}}function G(te){return P(z,L),R}function Y(te){return L.restore(),++B<F.length?k(F[B]):$}}}function I(P,A){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&Rr(u.events,A,u.events.length-A,P.resolve(u.events.slice(A),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function N(){const P=p(),A=u.previous,M=u.currentConstruct,D=u.events.length,R=Array.from(s);return{from:D,restore:$};function $(){r=P,u.previous=A,u.currentConstruct=M,u.events.length=D,s=R,_()}}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function IU(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function AU(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
297
297
  `;break}case-3:{a=`\r
298
298
  `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function PU(e){const r={constructs:fT([NU,...(e||{}).extensions||[]]),content:i(tV),defined:[],document:i(rV),flow:i(SU),lazy:{},string:i(xU),text:i(TU)};return r;function i(o){return a;function a(s){return _U(r,o,s)}}}function MU(e){for(;!ST(e););return e}const IT=/[\0\t\n\r]/g;function LU(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,c,d,f,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(IT.lastIndex=d,u=IT.exec(o),f=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(f),!u){t=o.slice(d);break}if(h===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const DU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kU(e){return e.replace(DU,RU)}function RU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return hT(n.slice(o?2:1),o?16:10)}return _p(n)||e}const AT={}.hasOwnProperty;function $U(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FU(n)(MU(PU(n).document().write(LU()(e,t,!0))))}function FU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Se),autolinkProtocol:N,autolinkEmail:N,atxHeading:o(ee),blockQuote:o(de),characterEscape:N,characterReference:N,codeFenced:o(J),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(J,a),codeText:o(Z,a),codeTextData:N,data:N,codeFlowValue:N,definition:o(oe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(X),hardBreakEscape:o(ne),hardBreakTrailing:o(ne),htmlFlow:o(be,a),htmlFlowData:N,htmlText:o(be,a),htmlTextData:N,image:o(Ce),label:a,link:o(Se),listItem:o(he),listItemValue:f,listOrdered:o(ve,d),listUnordered:o(ve),paragraph:o(Ae),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ee),strong:o(Ie),thematicBreak:o(Me)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:ue,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:te,characterReference:se,codeFenced:l(v),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:_,codeIndented:l(b),codeText:l(R),codeTextData:_,data:_,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:E,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(M),htmlFlowData:_,htmlText:l(D),htmlTextData:_,image:l(F),label:z,labelText:B,lineEnding:P,link:l($),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:G,resourceDestinationString:L,resourceTitleString:H,resource:W,setextHeading:l(I),setextHeadingLineSequence:T,setextHeadingText:S,strong:l(),thematicBreak:l()}};PT(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let le={type:"root",children:[]};const pe={stack:[le],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},ye=[];let Fe=-1;for(;++Fe<Q.length;)if(Q[Fe][1].type==="listOrdered"||Q[Fe][1].type==="listUnordered")if(Q[Fe][0]==="enter")ye.push(Fe);else{const je=ye.pop();Fe=i(Q,je,Fe)}for(Fe=-1;++Fe<Q.length;){const je=t[Q[Fe][0]];AT.call(je,Q[Fe][1].type)&&je[Q[Fe][1].type].call(Object.assign({sliceSerialize:Q[Fe][2].sliceSerialize},pe),Q[Fe][1])}if(pe.tokenStack.length>0){const je=pe.tokenStack[pe.tokenStack.length-1];(je[1]||MT).call(pe,void 0,je[0])}for(le.position={start:bo(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:bo(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)le=t.transforms[Fe](le)||le;return le}function i(Q,le,pe){let ye=le-1,Fe=-1,je=!1,De,we,Le,Ue;for(;++ye<=pe;){const Te=Q[ye];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?Fe++:Fe--,Ue=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(De&&!Ue&&!Fe&&!Le&&(Le=ye),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!Fe&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Fe===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(De){let Be=ye;for(we=void 0;Be--;){const it=Q[Be];if(it[1].type==="lineEnding"||it[1].type==="lineEndingBlank"){if(it[0]==="exit")continue;we&&(Q[we][1].type="lineEndingBlank",je=!0),it[1].type="lineEnding",we=Be}else if(!(it[1].type==="linePrefix"||it[1].type==="blockQuotePrefix"||it[1].type==="blockQuotePrefixWhitespace"||it[1].type==="blockQuoteMarker"||it[1].type==="listItemIndent"))break}Le&&(!we||Le<we)&&(De._spread=!0),De.end=Object.assign({},we?Q[we][1].start:Te[1].end),Q.splice(we||ye,0,["exit",De,Te[2]]),ye++,pe++}if(Te[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};De=Be,Q.splice(ye,0,["enter",Be,Te[2]]),ye++,pe++,Le=void 0,Ue=!0}}}return Q[le][1]._spread=je,pe}function o(Q,le){return pe;function pe(ye){s.call(this,Q(ye),ye),le&&le.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(Q,le,pe){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([le,pe||void 0]),Q.position={start:bo(le.start),end:void 0}}function l(Q){return le;function le(pe){Q&&Q.call(this,pe),u.call(this,pe)}}function u(Q,le){const pe=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==Q.type&&(le?le.call(this,Q,ye[0]):(ye[1]||MT).call(this,Q,ye[0]));else throw new Error("Cannot close `"+Q.type+"` ("+fl({start:Q.start,end:Q.end})+"): it’s not open");pe.position.end=bo(Q.end)}function c(){return Np(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(Q){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.lang=Q}function p(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.meta=Q}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/(\r?\n|\r)$/g,"")}function y(Q){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=ci(this.sliceSerialize(Q)).toLowerCase()}function E(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function x(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function O(Q){const le=this.stack[this.stack.length-1];if(!le.depth){const pe=this.sliceSerialize(Q).length;le.depth=pe}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function T(Q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function N(Q){const pe=this.stack[this.stack.length-1].children;let ye=pe[pe.length-1];(!ye||ye.type!=="text")&&(ye=me(),ye.position={start:bo(Q.start),end:void 0},pe.push(ye)),this.stack.push(ye)}function _(Q){const le=this.stack.pop();le.value+=this.sliceSerialize(Q),le.position.end=bo(Q.end)}function P(Q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=le.children[le.children.length-1];pe.position.end=bo(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(N.call(this,Q),_.call(this,Q))}function A(){this.data.atHardBreak=!0}function M(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function D(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function R(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function $(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function F(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function B(Q){const le=this.sliceSerialize(Q),pe=this.stack[this.stack.length-2];pe.label=kU(le),pe.identifier=ci(le).toLowerCase()}function z(){const Q=this.stack[this.stack.length-1],le=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const ye=Q.children;pe.children=ye}else pe.alt=le}function L(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function H(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function G(Q){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=ci(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Y(Q){this.data.characterReferenceType=Q.type}function te(Q){const le=this.sliceSerialize(Q),pe=this.data.characterReferenceType;let ye;pe?(ye=hT(le,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=_p(le);const Fe=this.stack[this.stack.length-1];Fe.value+=ye}function se(Q){const le=this.stack.pop();le.position.end=bo(Q.end)}function ce(Q){_.call(this,Q);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(Q)}function ue(Q){_.call(this,Q);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(Q)}function de(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function ee(){return{type:"heading",depth:0,children:[]}}function ne(){return{type:"break"}}function be(){return{type:"html",value:""}}function Ce(){return{type:"image",title:null,url:"",alt:null}}function Se(){return{type:"link",title:null,url:"",children:[]}}function ve(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function he(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function me(){return{type:"text",value:""}}function Me(){return{type:"thematicBreak"}}}function bo(e){return{line:e.line,column:e.column,offset:e.offset}}function PT(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PT(e,r):BU(e,r)}}function BU(e,t){let n;for(n in t)if(AT.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function MT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is still open")}function zU(e){const t=this;t.parser=n;function n(r){return $U(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HU(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -375,6 +375,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
375
375
  .transform-component-module_content__FBWxo img {
376
376
  pointer-events: none;
377
377
  }
378
- `,SN={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};OJ(NJ);var _J=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=e.wrapperProps,u=l===void 0?{}:l,c=e.contentProps,d=c===void 0?{}:c,f=C.useContext(Sd),h=f.init,p=f.cleanupWindowEvents,g=C.useRef(null),v=C.useRef(null);return C.useEffect(function(){var b=g.current,y=v.current;return b!==null&&y!==null&&h&&(h==null||h(b,y)),function(){p==null||p()}},[]),C.createElement("div",xo({},u,{ref:g,className:"".concat(Ig.wrapperClass," ").concat(SN.wrapper," ").concat(r),style:a}),C.createElement("div",xo({},d,{ref:v,className:"".concat(Ig.contentClass," ").concat(SN.content," ").concat(o),style:s}),t))},IJ=function(){var e=C.useContext(Sd);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e},AJ=function(){var e=IJ();return bd(e)};function PJ({path:e,items:t}){const{t:n}=cr("common"),r=ge.use.isSplitView(),i=ge.use.splitViewOrientation(),o=ge.use.setIsSplitView(),[a,s]=C.useState(0),[l,u]=C.useState(null),[c,d]=C.useState(0),f=C.useCallback(()=>{const{zoomIn:x,zoomOut:O,resetTransform:S}=AJ(),T=N=>{s(N-1),S()},I=C.useCallback(()=>{o(!1)},[o]);return C.useEffect(()=>{S()},[r,i,S]),q.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[q.jsxs(vn,{direction:"horizontal",size:12,style:{flex:"0",marginLeft:"12px"},children:[q.jsx(Hn,{icon:q.jsx(Cm,{}),onClick:()=>x()}),q.jsx(Hn,{icon:q.jsx(wm,{}),onClick:()=>O()}),q.jsx(Hn,{onClick:()=>S(),children:n("reset")})]}),t.length>1?q.jsx(Pm,{style:{flex:"1",textAlign:"center"},align:"center",current:a+1,defaultPageSize:1,total:t.length,simple:!1,onChange:T}):null,r?q.jsx(Hn,{icon:q.jsx(Ui,{}),onClick:()=>I()}):null]})},[t,a,r,i,close,n,o]);C.useEffect(()=>{if(l){const{top:x}=l.getBoundingClientRect(),O=window.innerHeight-x-24;d(O)}},[l]),C.useEffect(()=>{s(0)},[t]),C.useEffect(()=>{},[i]);const h=C.useMemo(()=>`transform-${r?"split":"tab"}-${i}`,[r,i]),p=C.useMemo(()=>e+t[a].file,[a,t]),g=C.useMemo(()=>t[a].name,[a,t]),v=C.useMemo(()=>{const x=r&&i==="vertical",O=r&&i==="horizontal";return x?{width:"100%",height:"auto"}:O?{maxWidth:"100%",maxHeight:`${c}px`,width:"auto",height:"auto"}:{height:`${c}px`,width:"auto"}},[r,i,c]),b=C.useMemo(()=>r&&i==="vertical"?.7:1,[r,i]),y=C.useMemo(()=>!(r&&i==="vertical")&&!(r&&i==="horizontal"),[r,i]),E=C.useMemo(()=>{const x=r&&i==="horizontal",O={width:"100%",height:"100%",padding:"12px"};return x?{...O,display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column"}:O},[r,i]);return q.jsx(TJ,{initialScale:b,minScale:.1,maxScale:5,centerOnInit:y,limitToBounds:!0,doubleClick:{disabled:!1,mode:"zoomIn",step:.5},wheel:{step:.1},children:q.jsxs(q.Fragment,{children:[q.jsx(f,{}),q.jsx(_J,{wrapperStyle:{width:"100%",height:"100%"},children:q.jsx("div",{style:E,ref:x=>u(x),children:q.jsx("img",{src:p,alt:g,style:v})})})]})},h)}function CN({t:e,config:t,normalizeFicta:n,onScoreAnalyzed:r,onFetchScoreError:i}){const o=ge.use.scoreCache(),a=ge.use.setScoreCache(),s=ge.use.score(),l=ge.use.setScore(),u=ge.use.setShowNVerses(),c=ge.use.setNormalizeFicta(),d=ge.use.setShowReconstructions(),f=ge.use.setShowOriginalClefs(),h=ge.use.setTransposition(),p=async S=>{const T=await fetch(S);if(!T.ok)throw new Error(`Failed to fetch MEI file: ${T.status} ${T.statusText}`);const I=await T.text(),_=new DOMParser().parseFromString(I,"text/xml"),P=_.querySelector("parsererror");if(P)throw new Error(`Invalid XML content: ${P.textContent}`);if(!_.documentElement)throw new Error("Invalid XML: No root element found");return I},g=S=>{const T=new hp(S);return n&&T.addNormalizeFictaFilter(),T.addNVersesFilter(1),T.filterScore()},v=()=>{const S=document.querySelector(".svg-container svg");S&&S.classList.add("transition-zero-end")},b=(S,T)=>{if(s){if(T==s)return;v()}u(null),c(null),d({},!0),f(null),h(null),l(T),r&&r(S,T.properties)},y=C.useCallback(S=>{const T=performance.now();(async()=>{if(S===null)return;const I=t.scores[S];if(!I){console.error(`No score definition found for index ${S}`);return}const N=t.settings.basePath+I.path+"/",_=N+I.meiFile,P=I.encodingProperties;if(o[_]){const A=o[_];b(S,A)}else try{const A=await p(_),M=new hp(A);t.settings.renderTitlesFromMEI&&(M.addTitlesFilter(),M.addReonstructionNamesFilter()),M.addEnsureMeasuresIdFilter(),M.addEnsureSectionsIdFilter();const D=M.filterScore(),R=new zc(e,0,D),$={...R.getScoreProperties(),encodedTransposition:P.encodedTransposition??void 0},F=I.audioBaseFile&&I.audioBaseFile!=""?N+I.audioBaseFile:null,B=[];if(I.audioOverlays)for(const H of I.audioOverlays)B.push({id:`overlay-staff-${H.staff}`,label:H.appLabel,url:N+H.file,volume:1});const z=R.getEditorial(),L={url:_,title:I.title,originalMei:D,singleVerseMei:g(D),properties:$,editorialItems:z,audioUrl:F,audioOverlayTracks:B};a({[_]:L}),b(S,L),console.log(`Score fetched from network: ${_} took ${performance.now()-T}ms`)}catch(A){i&&i(_,A)}})()},[t.scores,t.settings.basePath,t.settings.renderTitlesFromMEI,o,s,l,a,r,n]),E=()=>{l(null)},x=C.useCallback(S=>{const T=t.scores[S];return!!(T&&T.introductionFile)},[t.scores]),O=C.useCallback(S=>{const T=t.scores[S];return!!(T&&T.text&&T.text.length>0)},[t.scores]);return{fetchScore:y,unloadScore:E,hasIntro:x,hasText:O}}const Lg="updating",MJ=async e=>fetch(e).then(t=>{const n=t.headers.get("Content-Type");if(t.ok&&n&&(n.includes("text/markdown")||n.includes("text/plain")))return t.text();{const r=new ti("Content error",`Unsupported content type from url ${e} (${n})`);return Promise.reject(r)}},t=>(console.error(`Error fetching text from ${e}:`,t),Promise.reject(new ti("Network error",`Failed to fetch text from url ${e} (${t.message})`)))),Dg=e=>e.name&&e.name.length>0?e.name:e.type&&e.type.length>0?e.type[0].toUpperCase()+e.type.substring(1):"";function wN({config:e}){const t=ge.use.textCache(),n=ge.use.setTextCache(),r=ge.use.textComments(),i=ge.use.setTextComments(),o=ge.use.textIntroduction(),a=ge.use.setTextIntroduction(),s=ge.use.textLyrics(),l=ge.use.setTextLyrics(),u=C.useCallback((p,g)=>e.settings.basePath+p.path+"/"+g,[e.settings.basePath]),c=p=>p!=null&&p.length>0,d=C.useCallback(p=>{const g=u(p,""),v=c(p==null?void 0:p.text)?p.text.map(E=>g+E.file):null,b=c(p==null?void 0:p.textCommentsFile)?g+p.textCommentsFile:null,y=c(p==null?void 0:p.introductionFile)?g+p.introductionFile:null;return{lyricsUrls:v,commentsUrl:b,introductionUrl:y}},[u]),f=C.useCallback(p=>{var v;const g=[];return(v=p==null?void 0:p.text)==null||v.forEach(b=>{const y=u(p,b.file),E=t[y];E&&E!=Lg&&g.push({title:Dg(b),text:E})}),g},[t,u]);return{fetchTextParts:C.useCallback(p=>{const g=e.scores[p];if(!g)return;const{lyricsUrls:v,commentsUrl:b,introductionUrl:y}=d(g),E=[...v||[],...b?[b]:[],...y?[y]:[]];if(E.length==0)return;const x=Object.keys(t).filter(T=>t[T]!=Lg);console.log(`Fetching text parts for score ${p}: introductionUrl: ${y}`),i(b?x.includes(b)?t[b]:void 0:null),a(y?x.includes(y)?t[y]:void 0:null),l(v?v.every(T=>x.includes(T))?f(g):void 0:null,!0);const O=E.filter(T=>!Object.keys(t).includes(T));if(O.length==0)return;const S={};O.forEach(T=>{S[T]=Lg}),n(S,!1),O.forEach(T=>{MJ(T).then(I=>{zr.unstable_batchedUpdates(()=>{var N;if(n({[T]:I},!1),b&&T==b)i(I);else if(y&&T==y)a(I);else if(v&&v.includes(T)){const _=(N=g.text)==null?void 0:N.find(P=>T==u(g,P.file));_&&l([{title:Dg(_),text:I}],!1)}})},I=>{console.log(`${I.type}: ${I.message}`),zr.unstable_batchedUpdates(()=>{var N;if(n({[T]:I},!1),b&&T==b)i(I);else if(y&&T==y)a(I);else if(v&&v.includes(T)){const _=(N=g.text)==null?void 0:N.find(P=>T==u(g,P.file));_&&l([{title:Dg(_),text:I}],!1)}})})})},[u,e.scores,t,f,n,i,a,l]),textIntroduction:o,textLyrics:s,textComments:r}}const LJ=e=>{const{t}=cr("common"),n=C.useMemo(()=>i=>{const o=[];if(!i)return o.push({field:"config",message:t("configValidation.configRequired")}),o;if(!i.settings)o.push({field:"settings",message:t("configValidation.settingsRequired")});else{const a=i.settings;typeof a.showScoreSelector!="boolean"&&o.push({field:"settings.showScoreSelector",message:t("configValidation.showScoreSelectorBoolean")}),typeof a.showTitle!="boolean"&&o.push({field:"settings.showTitle",message:t("configValidation.showTitleBoolean")}),typeof a.showDownloadButton!="boolean"&&o.push({field:"settings.showDownloadButton",message:t("configValidation.showDownloadButtonBoolean")}),typeof a.showIntroductionSection!="boolean"&&o.push({field:"settings.showIntroductionSection",message:t("configValidation.showIntroductionSectionBoolean")}),typeof a.showTextSection!="boolean"&&o.push({field:"settings.showTextSection",message:t("configValidation.showTextSectionBoolean")}),typeof a.showFacsimileSection!="boolean"&&o.push({field:"settings.showFacsimileSection",message:t("configValidation.showFacsimileSectionBoolean")}),typeof a.renderTitlesFromMEI!="boolean"&&o.push({field:"settings.renderTitlesFromMEI",message:t("configValidation.renderTitlesFromMEIBoolean")}),typeof a.allowUserLanguageChange!="boolean"&&o.push({field:"settings.allowUserLanguageChange",message:t("configValidation.allowUserLanguageChangeBoolean")}),(!a.basePath||typeof a.basePath!="string")&&o.push({field:"settings.basePath",message:t("configValidation.basePathRequired")}),(!a.facsimileImagesPath||typeof a.facsimileImagesPath!="string")&&o.push({field:"settings.facsimileImagesPath",message:t("configValidation.facsimileImagesPathRequired")}),a.backgroundColor&&typeof a.backgroundColor!="string"&&o.push({field:"settings.backgroundColor",message:t("configValidation.backgroundColorString")}),a.language&&typeof a.language!="string"&&o.push({field:"settings.language",message:t("configValidation.languageString")})}return Array.isArray(i.scores)?i.scores.length===0?o.push({field:"scores",message:t("configValidation.scoresNotEmpty")}):i.scores.forEach((a,s)=>{(!a.title||typeof a.title!="string")&&o.push({field:`scores[${s}].title`,message:t("configValidation.scoreTitleRequired")}),(!a.path||typeof a.path!="string")&&o.push({field:`scores[${s}].path`,message:t("configValidation.scorePathRequired")}),(!a.meiFile||typeof a.meiFile!="string")&&o.push({field:`scores[${s}].meiFile`,message:t("configValidation.scoreMeiFileRequired")}),a.encodingProperties||o.push({field:`scores[${s}].encodingProperties`,message:t("configValidation.scoreEncodingPropertiesRequired")}),a.audioOverlays&&!Array.isArray(a.audioOverlays)&&o.push({field:`scores[${s}].audioOverlays`,message:t("configValidation.scoreAudioOverlaysArray")}),a.text&&!Array.isArray(a.text)&&o.push({field:`scores[${s}].text`,message:t("configValidation.scoreTextArray")}),a.facsimileItems&&!Array.isArray(a.facsimileItems)&&o.push({field:`scores[${s}].facsimileItems`,message:t("configValidation.scoreFacsimileItemsArray")})}):o.push({field:"scores",message:t("configValidation.scoresArray")}),o},[t]),r=C.useMemo(()=>n(e),[e,n]);return{configErrors:r,hasConfigErrors:r.length>0}},DJ=e=>e!=null&&e.startsWith("-")?"+"+e.substring(1):e!=null&&e.startsWith("+")||e&&e.length>1?"-"+e.substring(1):"";function kJ({allowUserLanguageChange:e,showMusicAnalysisByDefault:t,onClose:n,open:r}){var ne,be,Ce,Se,ve;const{t:i,i18n:o}=cr("common"),a=ge.use.score(),s=ge.use.showNVerses(),l=ge.use.setShowNVerses(),u=ge.use.showOriginalClefs(),c=ge.use.setShowOriginalClefs(),d=ge.use.showReconstructions(),f=ge.use.setShowReconstructions(),h=ge.use.showEditorial(),p=ge.use.setShowEditorial(),g=ge.use.normalizeFicta(),v=ge.use.setNormalizeFicta(),b=ge.use.transposition(),y=ge.use.setTransposition(),E=ge.use.showMusicAnalysis(),x=ge.use.setShowMusicAnalysis(),O=ge.use.isSplitView(),S=ge.use.setIsSplitView(),T=ge.use.splitViewOrientation(),I=ge.use.setSplitViewOrientation(),N=ge.use.measureNumberInterval(),_=ge.use.setMeasureNumberInterval(),P=C.useCallback(he=>{l(he)},[l]),A=C.useCallback((he,Ae)=>{console.log(`Selected reconstruction for staff ${he}: ${Ae}`),f({[he]:Ae},!1)},[f]),M=C.useCallback(he=>{p(he)},[p]),D=C.useCallback(he=>{v(he)},[v]),R=C.useCallback(()=>{console.log(`Show original clefs: ${!u}`),c(!u)},[u,c]),$=C.useCallback(()=>{var he;if(b!=null)y(null);else{const Ae=DJ((he=a==null?void 0:a.properties)==null?void 0:he.encodedTransposition);y(Ae)}},[b,(ne=a==null?void 0:a.properties)==null?void 0:ne.encodedTransposition,y]),F=C.useCallback(he=>{x(he)},[x]),B=C.useCallback(he=>{_(he)},[_]),z=C.useMemo(()=>{var he;return((he=a==null?void 0:a.properties)==null?void 0:he.numVerses)||0},[(be=a==null?void 0:a.properties)==null?void 0:be.numVerses]),L=C.useMemo(()=>a!=null&&a.properties?Object.entries(a.properties.reconstructions).length:0,[a==null?void 0:a.properties]),H=C.useMemo(()=>{var he;return((he=a==null?void 0:a.properties)==null?void 0:he.hasOriginalClefs)||!1},[(Ce=a==null?void 0:a.properties)==null?void 0:Ce.hasOriginalClefs]),W=C.useMemo(()=>Array.from({length:z},(he,Ae)=>1+Ae).map(he=>({value:he,label:i("scoreOptions.verseAmmount",{count:he})})),[z,i]),k=C.useMemo(()=>{var Ae,Ie;if(((Ae=a==null?void 0:a.properties)==null?void 0:Ae.reconstructions)===void 0)return[];const he=[];for(const me of(Ie=a==null?void 0:a.properties)==null?void 0:Ie.reconstructions){if(me.reconstructionsForVoice.length===0)continue;const Me=[];for(const Q of me.reconstructionsForVoice){const le=Q.label!="none"?Q.label.split(":")[3]:i("scoreOptions.reconstructionNone");Me.push({value:Q.label,label:le})}he.push({staff:me.staff,voiceName:me.voiceName,selectOptions:Me})}return he},[L,i]),G=C.useMemo(()=>a!=null&&a.properties?!a.properties.hasEditorial:!0,[a==null?void 0:a.properties]),Y=C.useMemo(()=>a!=null&&a.properties?!a.properties.hasFicta:!0,[a==null?void 0:a.properties]),te=C.useMemo(()=>{var he,Ae;return((he=a==null?void 0:a.properties)==null?void 0:he.encodedTransposition)!==void 0&&((Ae=a==null?void 0:a.properties)==null?void 0:Ae.encodedTransposition)!==""},[a==null?void 0:a.properties]),se=C.useMemo(()=>W.length>0,[a==null?void 0:a.properties]),ue=C.useMemo(()=>L>0,[a==null?void 0:a.properties])?k==null?void 0:k.map(he=>q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:12,children:q.jsx(vn,{direction:"vertical",children:q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.reconstruction",{voiceName:he.voiceName})})})}),q.jsx(pn,{span:10,children:q.jsx(vr,{size:"middle",options:he.selectOptions||[],defaultValue:(d==null?void 0:d[he.staff])??"none",disabled:he.selectOptions?he.selectOptions.length<=1:!0,onSelect:Ae=>A(he.staff,Ae)})})]})):null,de=C.useCallback(he=>{sessionStorage.setItem(Ld,he),o.changeLanguage(he)},[o]),J=[{label:"Tabs",value:"tabs"},{label:"Horizontal Split",value:"horizontal-split"},{label:"Vertical Split",value:"vertical-split"}],Z=C.useCallback(he=>{he==="tabs"?S(!1):(S(!0),he==="horizontal-split"?I("horizontal"):he==="vertical-split"&&I("vertical"))},[S,I]),oe=e?p0.map(he=>({label:he.label,value:he.key})):[],X=e?q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.language.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.language.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{value:o.language,options:oe,onSelect:de})})]}):null,ee=jo?null:q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.uiLayout.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.uiLayout.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{defaultValue:O?`${T}-split`:"tabs",options:J,onSelect:Z})})]});return q.jsx(Sm,{title:i("scoreOptions.title"),open:r,onClose:n,children:q.jsxs(vn,{direction:"vertical",size:"large",children:[(X||ee)&&q.jsxs(q.Fragment,{children:[q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.uiSettings.title")}),q.jsxs(vn,{direction:"vertical",size:"middle",children:[X,ee]}),q.jsx(pm,{})]}),q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.scoreViewerSettings.title")}),q.jsx(vn,{direction:"vertical",size:"middle",children:q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...h?{}:{type:"secondary"},children:i("scoreOptions.editorialNotes.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...h?{}:{type:"secondary"},children:i("scoreOptions.editorialNotes.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{value:h||!1,defaultValue:!1,disabled:G,onChange:M})})]})}),q.jsx(pm,{}),q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.scoreSettings.title")}),q.jsxs(vn,{direction:"vertical",size:"middle",children:[ue,q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...g?{}:{type:"secondary"},children:i("scoreOptions.normalizeFicta.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...g?{}:{type:"secondary"},children:i("scoreOptions.normalizeFicta.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:g||!1,disabled:Y,onChange:D})})]}),H&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...u?{}:{type:"secondary"},children:i("scoreOptions.originalClefs.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...u?{}:{type:"secondary"},children:i("scoreOptions.originalClefs.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:u||!1,disabled:!H,onChange:R})})]}),te&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...b?{}:{type:"secondary"},children:i("scoreOptions.noTransposition.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...b?{}:{type:"secondary"},children:i("scoreOptions.noTransposition.description",{encodedTransposition:(Se=a==null?void 0:a.properties)==null?void 0:Se.encodedTransposition})})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:b!=null,disabled:!((ve=a==null?void 0:a.properties)!=null&&ve.encodedTransposition),onChange:$})})]}),q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...E?{}:{type:"secondary"},children:i("scoreOptions.harmonicAnalysis.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...E?{}:{type:"secondary"},children:i("scoreOptions.harmonicAnalysis.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:E||t,onChange:F})})]}),se&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...s?{}:{type:"secondary"},children:i("scoreOptions.limitVerses.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...s?{}:{type:"secondary"},children:i("scoreOptions.limitVerses.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{size:"large",options:W,style:{width:120},defaultValue:s||z,disabled:z<=1,onSelect:P})})]}),q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:12,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.measureNumberInterval.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.measureNumberInterval.description")})]})}),q.jsx(pn,{span:12,children:q.jsx(vr,{options:[{label:i("scoreOptions.measureIntervalPage"),value:0},{label:i("scoreOptions.measureInterval10"),value:10},{label:i("scoreOptions.measureInterval5"),value:5},{label:i("scoreOptions.measureInterval1"),value:1}],defaultValue:N??10,onChange:B})})]})]})]})})}const RJ=e=>m.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512",xmlSpace:"preserve",...e},m.createElement("g",null,m.createElement("g",null,m.createElement("path",{d:"M503.319,5.939c-5.506-4.705-12.783-6.767-19.958-5.635L169.555,49.852c-12.04,1.901-20.909,12.28-20.909,24.47v99.097 v156.903H99.097C44.455,330.323,0,371.073,0,421.161C0,471.25,44.455,512,99.097,512c54.642,0,99.097-40.75,99.097-90.839v-66.065 V194.588l264.258-41.725v136.169h-49.548c-54.642,0-99.097,40.75-99.097,90.839s44.455,90.839,99.097,90.839 S512,429.959,512,379.871v-66.065V123.871V24.774C512,17.529,508.827,10.646,503.319,5.939z"}))));function $J({scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}){const{t:s}=cr("common"),l=ge.use.activeTab(),u=ge.use.setActiveTab(),c=C.useMemo(()=>i||o||a?[n?{key:"intro",label:q.jsx(vn,{direction:"horizontal",children:s("tab.introduction")}),children:n}:null,{key:"music",label:q.jsxs(vn,{direction:"horizontal",children:[q.jsx(tl,{component:RJ}),s("tab.music")]}),children:e},t?{key:"text",label:q.jsxs(vn,{direction:"horizontal",children:[q.jsx(sC,{}),s("tab.text")]}),children:t}:null,r?{key:"facsimile",label:q.jsxs(vn,{direction:"horizontal",children:[" ",q.jsx(OC,{}),s("tab.facsimile")]}),children:r}:null].filter(h=>h!=null):[],[e,t,n,r,i,o,a,s]),d=C.useCallback(h=>{u(h)},[u]);return c.length>1?q.jsx(mm,{items:c,defaultActiveKey:"music",onChange:d,style:{width:"100%",flex:"1",...l==="text"||l==="intro"?{height:"100%"}:{}}}):q.jsx(q.Fragment,{children:e})}function FJ({scoreView:e,textView:t,introView:n,facsimileView:r,sizes:i,setSizes:o}){const a=ge.use.activeSplitView(),s=ge.use.splitViewOrientation(),l=()=>a==="facsimile"?r:a==="text"?t:a==="intro"?n:null;return q.jsx(q.Fragment,{children:q.jsxs(Tc,{layout:s,onResize:o,style:{height:"100%",boxShadow:"0 0 10px rgba(0, 0, 0, 0.1)"},children:[q.jsx(Tc.Panel,{size:i[0],resizable:!0,children:e}),q.jsx(Tc.Panel,{size:i[1],children:l()})]})})}function BJ({scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}){const s=ge.use.isSplitView(),l=ge.use.splitViewOrientation(),u=ge.use.activeSplitView(),c=ge.use.setActiveSplitView(),d=ge.use.activeTab(),f=ge.use.setActiveTab(),[h,p]=C.useState(["50%","50%"]);C.useEffect(()=>{p(["50%","50%"])},[s,l]);const g=C.useCallback(O=>O===null||O==="facsimile"&&r===null||O==="text"&&t===null?!1:!(O==="intro"&&n===null),[r,t,n]),v=C.useCallback(()=>!g(d),[g,d]),b=C.useCallback(()=>!g(u),[g,u]),y=C.useCallback(()=>{const O=[];return r&&O.push("facsimile"),n&&O.push("intro"),t&&O.push("text"),O},[r,n,t]);C.useEffect(()=>{if(s&&b()){const O=y();O.length>0&&c(O[0])}else!s&&v()&&f("music")},[s,r,n,t,b,v,y,c,f]);const E=!s&&(i||o||a),x=[n,t,r].filter(Boolean).length>0;return s?q.jsx(FJ,{scoreView:e,textView:t,introView:n,facsimileView:r,sizes:h,setSizes:p}):E&&x?q.jsx($J,{scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}):e}function zJ({facsimileView:e,introView:t,textView:n}){const{t:r}=cr("common"),i=ge.use.activeSplitView(),o=ge.use.setActiveSplitView(),a=C.useMemo(()=>[e?{label:r("tab.facsimile"),value:"facsimile"}:null,t?{label:r("tab.introduction"),value:"intro"}:null,n?{label:r("tab.text"),value:"text"}:null].filter(l=>l!=null),[e,t,n,r]),s=C.useCallback(l=>{o(l)},[o]);return a.length===0?null:q.jsxs(vn,{direction:"horizontal",style:{marginBottom:"10px",textAlign:"start",flex:"0"},children:[q.jsxs(dn.Text,{style:{marginLeft:"10px"},children:[r("heading.splitViewSelector"),":"]}),q.jsx(vr,{style:{minWidth:"200px",marginRight:"10px"},options:a,value:i,onChange:s})]})}function HJ({showScoreSelector:e,showOptions:t,selectorLabel:n,scoreItems:r,onScoreSelectedChanged:i,facsimileView:o,introView:a,textView:s,onShowDrawer:l}){const{t:u}=cr("common"),c=ge.use.isSplitView(),d=ge.use.playingState(),f=u(n==="work"?"heading.work":"heading.section"),h=C.useMemo(()=>e?q.jsxs(vn,{direction:"horizontal",style:{marginBottom:"10px",textAlign:"start",flex:"0"},children:[q.jsxs(dn.Text,{style:{marginLeft:"10px"},children:[f,":"]}),q.jsx(vr,{style:{minWidth:"200px",marginRight:"10px"},defaultValue:0,options:r,onChange:i})]}):null,[e,r,i,u]),p=C.useMemo(()=>c?q.jsx(zJ,{facsimileView:o,introView:a,textView:s}):null,[c,o,a,s]);return q.jsxs(vn,{direction:"horizontal",style:{width:"100%",justifyContent:h||p?"space-between":"flex-end",alignItems:"center"},children:[h,p,t?q.jsx(Hn,{icon:q.jsx(tl,{component:PC}),onClick:l,disabled:d===Ct.PLAYING,children:u("scoreControls.settings")}):null]})}function jJ({configLanguage:e,configScores:t,configShowScoreSelector:n,playingState:r,setPlayingState:i,activeTab:o,scoreViewContainerRef:a,showOriginalClefs:s,showReconstructions:l,onVisualizationOptionsChanged:u,i18n:c,loadAll:d}){const f=Uw(),h=C.useRef(!1);C.useEffect(()=>{e&&e!=="autodetect"&&sessionStorage.getItem(Ld)==null&&c.changeLanguage(e)},[e,c]),C.useEffect(()=>{t.length>0&&n&&!h.current&&(h.current=!0,d(0))},[]),C.useEffect(()=>{u&&s!=null&&u({showOriginalClefs:s})},[s]),C.useEffect(()=>{u&&Object.keys(l).length>0&&u({showReconstructions:l})},[l]),C.useEffect(()=>{r==Ct.PLAYING&&i(Ct.STOPPED)},[l]),C.useEffect(()=>{jo&&f.isLandscape&&o=="music"&&setTimeout(()=>{var p;(p=a.current)==null||p.scrollIntoView()},100)},[f.orientation,o,a])}const VJ=({config:e,width:t,height:n,onScoreAnalyzed:r,onVisualizationOptionsChanged:i},o)=>{const{t:a,i18n:s}=cr("common"),{configErrors:l,hasConfigErrors:u}=LJ(e),c=ge.use.score(),d=ge.use.showReconstructions(),f=ge.use.normalizeFicta(),h=ge.use.showOriginalClefs(),p=ge.use.activeTab(),g=ge.use.playingState(),v=ge.use.setPlayingState(),b=ge.use.goToSection(),y=E0(),E=Uw(),[x,O]=C.useState(null),[S,T]=C.useState(!1),[I,N]=C.useState(!1),[_,P]=C.useState([]),A=C.useRef(null),[M,D]=C.useState(!1),R=(ve,he)=>{O({url:ve,error:he}),F()},{fetchScore:$,unloadScore:F,hasIntro:B,hasText:z}=CN({t:a,config:e,normalizeFicta:f,onScoreAnalyzed:r,onFetchScoreError:R}),{fetchTextParts:L,textIntroduction:H,textLyrics:W,textComments:k}=wN({config:e}),G=C.useMemo(()=>jo&&E.isLandscape?"scroll":"hidden",[jo,E,n]),Y=ve=>q.jsx(wi,{theme:{algorithm:pB.defaultAlgorithm,token:{fontSize:jo?12:16}},children:q.jsx(ql.Provider,{value:{verovio:y},children:q.jsx(_z,{children:q.jsx("div",{className:"score-viewer-top-element",style:{width:t,height:n,overflow:G},children:q.jsx("div",{style:{width:"calc(100% - 12px)",height:"calc(100% - 12px)",padding:"6px",display:"flex",flexDirection:"column"},children:ve})})})})});if(u)return Y(q.jsx(wg,{message:a("error.configValidation"),description:q.jsxs("div",{children:[q.jsx("p",{children:a("configValidation.configurationErrorDescription")}),q.jsx("ul",{children:l.map((ve,he)=>q.jsxs("li",{children:[q.jsxs("strong",{children:[ve.field,":"]})," ",ve.message]},he))})]})}));const te=C.useCallback(ve=>{O(null),T(B(ve)),N(z(ve)),P(e.scores[ve].facsimileItems||[]),$(ve),L(ve)},[e.scores,$,L]);C.useImperativeHandle(o,()=>({goToSection:ve=>{b(ve)},selectScore:ve=>{ve===null?F():ve>=0&&ve<e.scores.length&&te(ve)}})),jJ({configLanguage:e.settings.language,configScores:e.scores,configShowScoreSelector:e.settings.showScoreSelector,playingState:g,setPlayingState:v,activeTab:p,scoreViewContainerRef:A,showOriginalClefs:h,showReconstructions:d,onVisualizationOptionsChanged:i,i18n:s,loadAll:te});const se=ve=>{te(ve)},ce=C.useMemo(()=>e.scores.map((ve,he)=>({label:ve.title,value:he})),[e.scores]),ue=C.useMemo(()=>jo&&E.isLandscape?n:"100%",[jo,E,n]),de=C.useMemo(()=>e.settings.showIntroductionSection&&S?q.jsx(JO,{intro:H}):null,[e.settings.showIntroductionSection,S,H]),J=C.useMemo(()=>x!=null?q.jsx(wg,{message:a("error.fetchingScore.title"),description:q.jsxs("div",{children:[q.jsx("p",{children:a("error.fetchingScore.details",{url:x.url})}),x.error.message.split(`
378
+ `,SN={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};OJ(NJ);var _J=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=e.wrapperProps,u=l===void 0?{}:l,c=e.contentProps,d=c===void 0?{}:c,f=C.useContext(Sd),h=f.init,p=f.cleanupWindowEvents,g=C.useRef(null),v=C.useRef(null);return C.useEffect(function(){var b=g.current,y=v.current;return b!==null&&y!==null&&h&&(h==null||h(b,y)),function(){p==null||p()}},[]),C.createElement("div",xo({},u,{ref:g,className:"".concat(Ig.wrapperClass," ").concat(SN.wrapper," ").concat(r),style:a}),C.createElement("div",xo({},d,{ref:v,className:"".concat(Ig.contentClass," ").concat(SN.content," ").concat(o),style:s}),t))},IJ=function(){var e=C.useContext(Sd);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e},AJ=function(){var e=IJ();return bd(e)};function PJ({path:e,items:t}){const{t:n}=cr("common"),r=ge.use.isSplitView(),i=ge.use.splitViewOrientation(),o=ge.use.setIsSplitView(),[a,s]=C.useState(0),[l,u]=C.useState(null),[c,d]=C.useState(0),f=C.useCallback(()=>{const{zoomIn:x,zoomOut:O,resetTransform:S}=AJ(),T=N=>{s(N-1),S()},I=C.useCallback(()=>{o(!1)},[o]);return C.useEffect(()=>{S()},[r,i,S]),q.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[q.jsxs(vn,{direction:"horizontal",size:12,style:{flex:"0",marginLeft:"12px"},children:[q.jsx(Hn,{icon:q.jsx(Cm,{}),onClick:()=>x()}),q.jsx(Hn,{icon:q.jsx(wm,{}),onClick:()=>O()}),q.jsx(Hn,{onClick:()=>S(),children:n("reset")})]}),t.length>1?q.jsx(Pm,{style:{flex:"1",textAlign:"center"},align:"center",current:a+1,defaultPageSize:1,total:t.length,simple:!1,onChange:T}):null,r?q.jsx(Hn,{icon:q.jsx(Ui,{}),onClick:()=>I()}):null]})},[t,a,r,i,close,n,o]);C.useEffect(()=>{if(l){const{top:x}=l.getBoundingClientRect(),O=window.innerHeight-x-24;d(O)}},[l]),C.useEffect(()=>{s(0)},[t]),C.useEffect(()=>{},[i]);const h=C.useMemo(()=>`transform-${r?"split":"tab"}-${i}`,[r,i]),p=C.useMemo(()=>e+t[a].file,[a,t]),g=C.useMemo(()=>t[a].name,[a,t]),v=C.useMemo(()=>{const x=r&&i==="vertical",O=r&&i==="horizontal";return x?{width:"100%",height:"auto"}:O?{maxWidth:"100%",maxHeight:`${c}px`,width:"auto",height:"auto"}:{height:`${c}px`,width:"auto"}},[r,i,c]),b=C.useMemo(()=>r&&i==="vertical"?.7:1,[r,i]),y=C.useMemo(()=>!(r&&i==="vertical")&&!(r&&i==="horizontal"),[r,i]),E=C.useMemo(()=>{const x=r&&i==="horizontal",O={width:"100%",height:"100%",padding:"12px"};return x?{...O,display:"flex",alignItems:"flex-start",justifyContent:"flex-start",flexDirection:"column"}:O},[r,i]);return q.jsx(TJ,{initialScale:b,minScale:.1,maxScale:5,centerOnInit:y,limitToBounds:!0,doubleClick:{disabled:!1,mode:"zoomIn",step:.5},wheel:{step:.1},children:q.jsxs(q.Fragment,{children:[q.jsx(f,{}),q.jsx(_J,{wrapperStyle:{width:"100%",height:"100%"},children:q.jsx("div",{style:E,ref:x=>u(x),children:q.jsx("img",{src:p,alt:g,style:v})})})]})},h)}function CN({t:e,config:t,normalizeFicta:n,onScoreAnalyzed:r,onFetchScoreError:i}){const o=ge.use.scoreCache(),a=ge.use.setScoreCache(),s=ge.use.score(),l=ge.use.setScore(),u=ge.use.setShowNVerses(),c=ge.use.setNormalizeFicta(),d=ge.use.setShowReconstructions(),f=ge.use.setShowOriginalClefs(),h=ge.use.setTransposition(),p=async S=>{const T=await fetch(S);if(!T.ok)throw new Error(`Failed to fetch MEI file: ${T.status} ${T.statusText}`);const I=await T.text(),_=new DOMParser().parseFromString(I,"text/xml"),P=_.querySelector("parsererror");if(P)throw new Error(`Invalid XML content: ${P.textContent}`);if(!_.documentElement)throw new Error("Invalid XML: No root element found");return I},g=S=>{const T=new hp(S);return n&&T.addNormalizeFictaFilter(),T.addNVersesFilter(1),T.filterScore()},v=()=>{const S=document.querySelector(".svg-container svg");S&&S.classList.add("transition-zero-end")},b=(S,T)=>{if(s){if(T==s)return;v()}u(null),c(null),d({},!0),f(null),h(null),l(T),r&&r(S,T.properties)},y=C.useCallback(S=>{const T=performance.now();(async()=>{if(S===null)return;const I=t.scores[S];if(!I){console.error(`No score definition found for index ${S}`);return}const N=t.settings.basePath+I.path+"/",_=N+I.meiFile,P=I.encodingProperties;if(o[_]){const A=o[_];b(S,A)}else try{const A=await p(_),M=new hp(A);t.settings.renderTitlesFromMEI&&(M.addTitlesFilter(),M.addReonstructionNamesFilter()),M.addEnsureMeasuresIdFilter(),M.addEnsureSectionsIdFilter();const D=M.filterScore(),R=new zc(e,0,D),$={...R.getScoreProperties(),encodedTransposition:P.encodedTransposition??void 0},F=I.audioBaseFile&&I.audioBaseFile!=""?N+I.audioBaseFile:null,B=[];if(I.audioOverlays)for(const H of I.audioOverlays)B.push({id:`overlay-staff-${H.staff}`,label:H.appLabel,url:N+H.file,volume:1});const z=R.getEditorial(),L={url:_,title:I.title,originalMei:D,singleVerseMei:g(D),properties:$,editorialItems:z,audioUrl:F,audioOverlayTracks:B};a({[_]:L}),b(S,L),console.log(`Score fetched from network: ${_} took ${performance.now()-T}ms`)}catch(A){i&&i(_,A)}})()},[t.scores,t.settings.basePath,t.settings.renderTitlesFromMEI,o,s,l,a,r,n]),E=()=>{l(null)},x=C.useCallback(S=>{const T=t.scores[S];return!!(T&&T.introductionFile)},[t.scores]),O=C.useCallback(S=>{const T=t.scores[S];return!!(T&&T.text&&T.text.length>0)},[t.scores]);return{fetchScore:y,unloadScore:E,hasIntro:x,hasText:O}}const Lg="updating",MJ=async e=>fetch(e).then(t=>{const n=t.headers.get("Content-Type");if(t.ok&&n&&(n.includes("text/markdown")||n.includes("text/plain")))return t.text();{const r=new ti("Content error",`Unsupported content type from url ${e} (${n})`);return Promise.reject(r)}},t=>(console.error(`Error fetching text from ${e}:`,t),Promise.reject(new ti("Network error",`Failed to fetch text from url ${e} (${t.message})`)))),Dg=e=>e.name&&e.name.length>0?e.name:e.type&&e.type.length>0?e.type[0].toUpperCase()+e.type.substring(1):"";function wN({config:e}){const t=ge.use.textCache(),n=ge.use.setTextCache(),r=ge.use.textComments(),i=ge.use.setTextComments(),o=ge.use.textIntroduction(),a=ge.use.setTextIntroduction(),s=ge.use.textLyrics(),l=ge.use.setTextLyrics(),u=C.useCallback((p,g)=>e.settings.basePath+p.path+"/"+g,[e.settings.basePath]),c=p=>p!=null&&p.length>0,d=C.useCallback(p=>{const g=u(p,""),v=c(p==null?void 0:p.text)?p.text.map(E=>g+E.file):null,b=c(p==null?void 0:p.textCommentsFile)?g+p.textCommentsFile:null,y=c(p==null?void 0:p.introductionFile)?g+p.introductionFile:null;return{lyricsUrls:v,commentsUrl:b,introductionUrl:y}},[u]),f=C.useCallback(p=>{var v;const g=[];return(v=p==null?void 0:p.text)==null||v.forEach(b=>{const y=u(p,b.file),E=t[y];E&&E!=Lg&&g.push({title:Dg(b),text:E})}),g},[t,u]);return{fetchTextParts:C.useCallback(p=>{const g=e.scores[p];if(!g)return;const{lyricsUrls:v,commentsUrl:b,introductionUrl:y}=d(g),E=[...v||[],...b?[b]:[],...y?[y]:[]];if(E.length==0)return;const x=Object.keys(t).filter(T=>t[T]!=Lg);console.log(`Fetching text parts for score ${p}: introductionUrl: ${y}`),i(b?x.includes(b)?t[b]:void 0:null),a(y?x.includes(y)?t[y]:void 0:null),l(v?v.every(T=>x.includes(T))?f(g):void 0:null,!0);const O=E.filter(T=>!Object.keys(t).includes(T));if(O.length==0)return;const S={};O.forEach(T=>{S[T]=Lg}),n(S,!1),O.forEach(T=>{MJ(T).then(I=>{zr.unstable_batchedUpdates(()=>{var N;if(n({[T]:I},!1),b&&T==b)i(I);else if(y&&T==y)a(I);else if(v&&v.includes(T)){const _=(N=g.text)==null?void 0:N.find(P=>T==u(g,P.file));_&&l([{title:Dg(_),text:I}],!1)}})},I=>{console.log(`${I.type}: ${I.message}`),zr.unstable_batchedUpdates(()=>{var N;if(n({[T]:I},!1),b&&T==b)i(I);else if(y&&T==y)a(I);else if(v&&v.includes(T)){const _=(N=g.text)==null?void 0:N.find(P=>T==u(g,P.file));_&&l([{title:Dg(_),text:I}],!1)}})})})},[u,e.scores,t,f,n,i,a,l]),textIntroduction:o,textLyrics:s,textComments:r}}const LJ=e=>{const{t}=cr("common"),n=C.useMemo(()=>i=>{const o=[];if(!i)return o.push({field:"config",message:t("configValidation.configRequired")}),o;if(!i.settings)o.push({field:"settings",message:t("configValidation.settingsRequired")});else{const a=i.settings;typeof a.showScoreSelector!="boolean"&&o.push({field:"settings.showScoreSelector",message:t("configValidation.showScoreSelectorBoolean")}),typeof a.showTitle!="boolean"&&o.push({field:"settings.showTitle",message:t("configValidation.showTitleBoolean")}),typeof a.showDownloadButton!="boolean"&&o.push({field:"settings.showDownloadButton",message:t("configValidation.showDownloadButtonBoolean")}),typeof a.showIntroductionSection!="boolean"&&o.push({field:"settings.showIntroductionSection",message:t("configValidation.showIntroductionSectionBoolean")}),typeof a.showTextSection!="boolean"&&o.push({field:"settings.showTextSection",message:t("configValidation.showTextSectionBoolean")}),typeof a.showFacsimileSection!="boolean"&&o.push({field:"settings.showFacsimileSection",message:t("configValidation.showFacsimileSectionBoolean")}),typeof a.renderTitlesFromMEI!="boolean"&&o.push({field:"settings.renderTitlesFromMEI",message:t("configValidation.renderTitlesFromMEIBoolean")}),typeof a.allowUserLanguageChange!="boolean"&&o.push({field:"settings.allowUserLanguageChange",message:t("configValidation.allowUserLanguageChangeBoolean")}),(!a.basePath||typeof a.basePath!="string")&&o.push({field:"settings.basePath",message:t("configValidation.basePathRequired")}),(!a.facsimileImagesPath||typeof a.facsimileImagesPath!="string")&&o.push({field:"settings.facsimileImagesPath",message:t("configValidation.facsimileImagesPathRequired")}),a.backgroundColor&&typeof a.backgroundColor!="string"&&o.push({field:"settings.backgroundColor",message:t("configValidation.backgroundColorString")}),a.language&&typeof a.language!="string"&&o.push({field:"settings.language",message:t("configValidation.languageString")})}return Array.isArray(i.scores)?i.scores.length===0?o.push({field:"scores",message:t("configValidation.scoresNotEmpty")}):i.scores.forEach((a,s)=>{(!a.title||typeof a.title!="string")&&o.push({field:`scores[${s}].title`,message:t("configValidation.scoreTitleRequired")}),(!a.path||typeof a.path!="string")&&o.push({field:`scores[${s}].path`,message:t("configValidation.scorePathRequired")}),(!a.meiFile||typeof a.meiFile!="string")&&o.push({field:`scores[${s}].meiFile`,message:t("configValidation.scoreMeiFileRequired")}),a.encodingProperties||o.push({field:`scores[${s}].encodingProperties`,message:t("configValidation.scoreEncodingPropertiesRequired")}),a.audioOverlays&&!Array.isArray(a.audioOverlays)&&o.push({field:`scores[${s}].audioOverlays`,message:t("configValidation.scoreAudioOverlaysArray")}),a.text&&!Array.isArray(a.text)&&o.push({field:`scores[${s}].text`,message:t("configValidation.scoreTextArray")}),a.facsimileItems&&!Array.isArray(a.facsimileItems)&&o.push({field:`scores[${s}].facsimileItems`,message:t("configValidation.scoreFacsimileItemsArray")})}):o.push({field:"scores",message:t("configValidation.scoresArray")}),o},[t]),r=C.useMemo(()=>n(e),[e,n]);return{configErrors:r,hasConfigErrors:r.length>0}},DJ=e=>e!=null&&e.startsWith("-")?"+"+e.substring(1):e!=null&&e.startsWith("+")||e&&e.length>1?"-"+e.substring(1):"";function kJ({allowUserLanguageChange:e,showMusicAnalysisByDefault:t,onClose:n,open:r}){var ne,be,Ce,Se,ve;const{t:i,i18n:o}=cr("common"),a=ge.use.score(),s=ge.use.showNVerses(),l=ge.use.setShowNVerses(),u=ge.use.showOriginalClefs(),c=ge.use.setShowOriginalClefs(),d=ge.use.showReconstructions(),f=ge.use.setShowReconstructions(),h=ge.use.showEditorial(),p=ge.use.setShowEditorial(),g=ge.use.normalizeFicta(),v=ge.use.setNormalizeFicta(),b=ge.use.transposition(),y=ge.use.setTransposition(),E=ge.use.showMusicAnalysis(),x=ge.use.setShowMusicAnalysis(),O=ge.use.isSplitView(),S=ge.use.setIsSplitView(),T=ge.use.splitViewOrientation(),I=ge.use.setSplitViewOrientation(),N=ge.use.measureNumberInterval(),_=ge.use.setMeasureNumberInterval(),P=C.useCallback(he=>{l(he)},[l]),A=C.useCallback((he,Ae)=>{console.log(`Selected reconstruction for staff ${he}: ${Ae}`),f({[he]:Ae},!1)},[f]),M=C.useCallback(he=>{p(he)},[p]),D=C.useCallback(he=>{v(he)},[v]),R=C.useCallback(()=>{console.log(`Show original clefs: ${!u}`),c(!u)},[u,c]),$=C.useCallback(()=>{var he;if(b!=null)y(null);else{const Ae=DJ((he=a==null?void 0:a.properties)==null?void 0:he.encodedTransposition);y(Ae)}},[b,(ne=a==null?void 0:a.properties)==null?void 0:ne.encodedTransposition,y]),F=C.useCallback(he=>{x(he)},[x]),B=C.useCallback(he=>{_(he)},[_]),z=C.useMemo(()=>{var he;return((he=a==null?void 0:a.properties)==null?void 0:he.numVerses)||0},[(be=a==null?void 0:a.properties)==null?void 0:be.numVerses]),L=C.useMemo(()=>a!=null&&a.properties?Object.entries(a.properties.reconstructions).length:0,[a==null?void 0:a.properties]),H=C.useMemo(()=>{var he;return((he=a==null?void 0:a.properties)==null?void 0:he.hasOriginalClefs)||!1},[(Ce=a==null?void 0:a.properties)==null?void 0:Ce.hasOriginalClefs]),W=C.useMemo(()=>Array.from({length:z},(he,Ae)=>1+Ae).map(he=>({value:he,label:i("scoreOptions.verseAmmount",{count:he})})),[z,i]),k=C.useMemo(()=>{var Ae,Ie;if(((Ae=a==null?void 0:a.properties)==null?void 0:Ae.reconstructions)===void 0)return[];const he=[];for(const me of(Ie=a==null?void 0:a.properties)==null?void 0:Ie.reconstructions){if(me.reconstructionsForVoice.length===0)continue;const Me=[];for(const Q of me.reconstructionsForVoice){const le=Q.label!="none"?Q.label.split(":")[3]:i("scoreOptions.reconstructionNone");Me.push({value:Q.label,label:le})}he.push({staff:me.staff,voiceName:me.voiceName,selectOptions:Me})}return he},[L,i]),G=C.useMemo(()=>a!=null&&a.properties?!a.properties.hasEditorial:!0,[a==null?void 0:a.properties]),Y=C.useMemo(()=>a!=null&&a.properties?!a.properties.hasFicta:!0,[a==null?void 0:a.properties]),te=C.useMemo(()=>{var he,Ae;return((he=a==null?void 0:a.properties)==null?void 0:he.encodedTransposition)!==void 0&&((Ae=a==null?void 0:a.properties)==null?void 0:Ae.encodedTransposition)!==""},[a==null?void 0:a.properties]),se=C.useMemo(()=>W.length>0,[a==null?void 0:a.properties]),ue=C.useMemo(()=>L>0,[a==null?void 0:a.properties])?k==null?void 0:k.map(he=>q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:12,children:q.jsx(vn,{direction:"vertical",children:q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.reconstruction",{voiceName:he.voiceName})})})}),q.jsx(pn,{span:10,children:q.jsx(vr,{size:"middle",options:he.selectOptions||[],defaultValue:(d==null?void 0:d[he.staff])??"none",disabled:he.selectOptions?he.selectOptions.length<=1:!0,onSelect:Ae=>A(he.staff,Ae)})})]})):null,de=C.useCallback(he=>{sessionStorage.setItem(Ld,he),o.changeLanguage(he)},[o]),J=[{label:"Tabs",value:"tabs"},{label:"Horizontal Split",value:"horizontal-split"},{label:"Vertical Split",value:"vertical-split"}],Z=C.useCallback(he=>{he==="tabs"?S(!1):(S(!0),he==="horizontal-split"?I("horizontal"):he==="vertical-split"&&I("vertical"))},[S,I]),oe=e?p0.map(he=>({label:he.label,value:he.key})):[],X=e?q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.language.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.language.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{value:o.language,options:oe,onSelect:de})})]}):null,ee=jo?null:q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.uiLayout.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.uiLayout.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{defaultValue:O?`${T}-split`:"tabs",options:J,onSelect:Z})})]});return q.jsx(Sm,{title:i("scoreOptions.title"),open:r,onClose:n,children:q.jsxs(vn,{direction:"vertical",size:"large",children:[(X||ee)&&q.jsxs(q.Fragment,{children:[q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.uiSettings.title")}),q.jsxs(vn,{direction:"vertical",size:"middle",children:[X,ee]}),q.jsx(pm,{})]}),q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.scoreViewerSettings.title")}),q.jsx(vn,{direction:"vertical",size:"middle",children:q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...h?{}:{type:"secondary"},children:i("scoreOptions.editorialNotes.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...h?{}:{type:"secondary"},children:i("scoreOptions.editorialNotes.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{value:h||!1,defaultValue:!1,disabled:G,onChange:M})})]})}),q.jsx(pm,{}),q.jsx(dn.Title,{level:5,style:{margin:0},children:i("scoreOptions.scoreSettings.title")}),q.jsxs(vn,{direction:"vertical",size:"middle",children:[ue,q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...g?{}:{type:"secondary"},children:i("scoreOptions.normalizeFicta.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...g?{}:{type:"secondary"},children:i("scoreOptions.normalizeFicta.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:g||!1,disabled:Y,onChange:D})})]}),H&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...u?{}:{type:"secondary"},children:i("scoreOptions.originalClefs.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...u?{}:{type:"secondary"},children:i("scoreOptions.originalClefs.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:u||!1,disabled:!H,onChange:R})})]}),te&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...b?{}:{type:"secondary"},children:i("scoreOptions.noTransposition.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...b?{}:{type:"secondary"},children:i("scoreOptions.noTransposition.description",{encodedTransposition:(Se=a==null?void 0:a.properties)==null?void 0:Se.encodedTransposition})})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:b!=null,disabled:!((ve=a==null?void 0:a.properties)!=null&&ve.encodedTransposition),onChange:$})})]}),q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:20,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...E?{}:{type:"secondary"},children:i("scoreOptions.harmonicAnalysis.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...E?{}:{type:"secondary"},children:i("scoreOptions.harmonicAnalysis.description")})]})}),q.jsx(pn,{span:4,children:q.jsx(Ho,{defaultValue:E||t,onChange:F})})]}),se&&q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:16,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,...s?{}:{type:"secondary"},children:i("scoreOptions.limitVerses.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},...s?{}:{type:"secondary"},children:i("scoreOptions.limitVerses.description")})]})}),q.jsx(pn,{span:8,children:q.jsx(vr,{size:"large",options:W,style:{width:120},defaultValue:s||z,disabled:z<=1,onSelect:P})})]}),q.jsxs(Pr,{align:"middle",children:[q.jsx(pn,{span:12,children:q.jsxs(vn,{direction:"vertical",children:[q.jsx(dn.Text,{strong:!0,children:i("scoreOptions.measureNumberInterval.title")}),q.jsx(dn.Text,{style:{fontWeight:"lighter",fontSize:"0.8em"},children:i("scoreOptions.measureNumberInterval.description")})]})}),q.jsx(pn,{span:12,children:q.jsx(vr,{options:[{label:i("scoreOptions.measureIntervalPage"),value:0},{label:i("scoreOptions.measureInterval10"),value:10},{label:i("scoreOptions.measureInterval5"),value:5},{label:i("scoreOptions.measureInterval1"),value:1}],defaultValue:N??10,onChange:B})})]})]})]})})}const RJ=e=>m.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512",xmlSpace:"preserve",...e},m.createElement("g",null,m.createElement("g",null,m.createElement("path",{d:"M503.319,5.939c-5.506-4.705-12.783-6.767-19.958-5.635L169.555,49.852c-12.04,1.901-20.909,12.28-20.909,24.47v99.097 v156.903H99.097C44.455,330.323,0,371.073,0,421.161C0,471.25,44.455,512,99.097,512c54.642,0,99.097-40.75,99.097-90.839v-66.065 V194.588l264.258-41.725v136.169h-49.548c-54.642,0-99.097,40.75-99.097,90.839s44.455,90.839,99.097,90.839 S512,429.959,512,379.871v-66.065V123.871V24.774C512,17.529,508.827,10.646,503.319,5.939z"}))));function $J({scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}){const{t:s}=cr("common"),l=ge.use.activeTab(),u=ge.use.setActiveTab(),c=C.useMemo(()=>i||o||a?[n?{key:"intro",label:q.jsx(vn,{direction:"horizontal",children:s("tab.introduction")}),children:n}:null,{key:"music",label:q.jsxs(vn,{direction:"horizontal",children:[q.jsx(tl,{component:RJ}),s("tab.music")]}),children:e},t?{key:"text",label:q.jsxs(vn,{direction:"horizontal",children:[q.jsx(sC,{}),s("tab.text")]}),children:t}:null,r?{key:"facsimile",label:q.jsxs(vn,{direction:"horizontal",children:[" ",q.jsx(OC,{}),s("tab.facsimile")]}),children:r}:null].filter(h=>h!=null):[],[e,t,n,r,i,o,a,s]),d=C.useCallback(h=>{u(h)},[u]);return c.length>1?q.jsx(mm,{items:c,defaultActiveKey:"music",onChange:d,style:{width:"100%",flex:"1",...l==="text"||l==="intro"?{height:"100%"}:{}}}):q.jsx(q.Fragment,{children:e})}function FJ({scoreView:e,textView:t,introView:n,facsimileView:r,sizes:i,setSizes:o}){const a=ge.use.activeSplitView(),s=ge.use.splitViewOrientation(),l=()=>a==="facsimile"?r:a==="text"?t:a==="intro"?n:null;return q.jsx(q.Fragment,{children:q.jsxs(Tc,{layout:s,onResize:o,style:{height:"100%",boxShadow:"0 0 10px rgba(0, 0, 0, 0.1)"},children:[q.jsx(Tc.Panel,{size:i[0],resizable:!0,children:e}),q.jsx(Tc.Panel,{size:i[1],children:l()})]})})}function BJ({scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}){const s=ge.use.isSplitView(),l=ge.use.splitViewOrientation(),u=ge.use.activeSplitView(),c=ge.use.setActiveSplitView(),d=ge.use.activeTab(),f=ge.use.setActiveTab(),[h,p]=C.useState(["50%","50%"]);C.useEffect(()=>{p(["50%","50%"])},[s,l]);const g=C.useCallback(O=>O===null||O==="facsimile"&&r===null||O==="text"&&t===null?!1:!(O==="intro"&&n===null),[r,t,n]),v=C.useCallback(()=>!g(d),[g,d]),b=C.useCallback(()=>!g(u),[g,u]),y=C.useCallback(()=>{const O=[];return r&&O.push("facsimile"),n&&O.push("intro"),t&&O.push("text"),O},[r,n,t]);C.useEffect(()=>{if(s&&b()){const O=y();O.length>0&&c(O[0])}else!s&&v()&&f("music")},[s,r,n,t,b,v,y,c,f]);const E=!s&&(i||o||a),x=[n,t,r].filter(Boolean).length>0;return s?q.jsx(FJ,{scoreView:e,textView:t,introView:n,facsimileView:r,sizes:h,setSizes:p}):E&&x?q.jsx($J,{scoreView:e,textView:t,introView:n,facsimileView:r,showIntroductionSection:i,showTextSection:o,showFacsimileSection:a}):e}function zJ({facsimileView:e,introView:t,textView:n}){const{t:r}=cr("common"),i=ge.use.activeSplitView(),o=ge.use.setActiveSplitView(),a=C.useMemo(()=>[e?{label:r("tab.facsimile"),value:"facsimile"}:null,t?{label:r("tab.introduction"),value:"intro"}:null,n?{label:r("tab.text"),value:"text"}:null].filter(l=>l!=null),[e,t,n,r]),s=C.useCallback(l=>{o(l)},[o]);return a.length===0?null:q.jsxs(vn,{direction:"horizontal",style:{marginBottom:"10px",textAlign:"start",flex:"0"},children:[q.jsxs(dn.Text,{style:{marginLeft:"10px"},children:[r("heading.splitViewSelector"),":"]}),q.jsx(vr,{style:{minWidth:"200px",marginRight:"10px"},options:a,value:i,onChange:s})]})}function HJ({showScoreSelector:e,showOptions:t,selectorLabel:n,scoreItems:r,onScoreSelectedChanged:i,facsimileView:o,introView:a,textView:s,onShowDrawer:l}){const{t:u}=cr("common"),c=ge.use.isSplitView(),d=ge.use.playingState(),f=u(n==="work"?"heading.work":"heading.section"),h=C.useMemo(()=>e?q.jsxs(vn,{direction:"horizontal",style:{marginBottom:"10px",textAlign:"start",flex:"0"},children:[q.jsxs(dn.Text,{style:{marginLeft:"10px"},children:[f,":"]}),q.jsx(vr,{style:{minWidth:"200px",marginRight:"10px"},defaultValue:0,options:r,onChange:i})]}):null,[e,r,i,u]),p=C.useMemo(()=>c?q.jsx(zJ,{facsimileView:o,introView:a,textView:s}):null,[c,o,a,s]);return q.jsxs(vn,{direction:"horizontal",style:{width:"100%",justifyContent:h||p?"space-between":"flex-end",alignItems:"center"},children:[h,p,t?q.jsx(Hn,{icon:q.jsx(tl,{component:PC}),onClick:l,disabled:d===It.PLAYING,children:u("scoreControls.settings")}):null]})}function jJ({configLanguage:e,configScores:t,configShowScoreSelector:n,playingState:r,setPlayingState:i,activeTab:o,scoreViewContainerRef:a,showOriginalClefs:s,showReconstructions:l,onVisualizationOptionsChanged:u,i18n:c,loadAll:d}){const f=Uw(),h=C.useRef(!1);C.useEffect(()=>{e&&e!=="autodetect"&&sessionStorage.getItem(Ld)==null&&c.changeLanguage(e)},[e,c]),C.useEffect(()=>{t.length>0&&n&&!h.current&&(h.current=!0,d(0))},[]),C.useEffect(()=>{u&&s!=null&&u({showOriginalClefs:s})},[s]),C.useEffect(()=>{u&&Object.keys(l).length>0&&u({showReconstructions:l})},[l]),C.useEffect(()=>{r==It.PLAYING&&i(It.STOPPED)},[l]),C.useEffect(()=>{jo&&f.isLandscape&&o=="music"&&setTimeout(()=>{var p;(p=a.current)==null||p.scrollIntoView()},100)},[f.orientation,o,a])}const VJ=({config:e,width:t,height:n,onScoreAnalyzed:r,onVisualizationOptionsChanged:i},o)=>{const{t:a,i18n:s}=cr("common"),{configErrors:l,hasConfigErrors:u}=LJ(e),c=ge.use.score(),d=ge.use.showReconstructions(),f=ge.use.normalizeFicta(),h=ge.use.showOriginalClefs(),p=ge.use.activeTab(),g=ge.use.playingState(),v=ge.use.setPlayingState(),b=ge.use.goToSection(),y=E0(),E=Uw(),[x,O]=C.useState(null),[S,T]=C.useState(!1),[I,N]=C.useState(!1),[_,P]=C.useState([]),A=C.useRef(null),[M,D]=C.useState(!1),R=(ve,he)=>{O({url:ve,error:he}),F()},{fetchScore:$,unloadScore:F,hasIntro:B,hasText:z}=CN({t:a,config:e,normalizeFicta:f,onScoreAnalyzed:r,onFetchScoreError:R}),{fetchTextParts:L,textIntroduction:H,textLyrics:W,textComments:k}=wN({config:e}),G=C.useMemo(()=>jo&&E.isLandscape?"scroll":"hidden",[jo,E,n]),Y=ve=>q.jsx(wi,{theme:{algorithm:pB.defaultAlgorithm,token:{fontSize:jo?12:16}},children:q.jsx(ql.Provider,{value:{verovio:y},children:q.jsx(_z,{children:q.jsx("div",{className:"score-viewer-top-element",style:{width:t,height:n,overflow:G},children:q.jsx("div",{style:{width:"calc(100% - 12px)",height:"calc(100% - 12px)",padding:"6px",display:"flex",flexDirection:"column"},children:ve})})})})});if(u)return Y(q.jsx(wg,{message:a("error.configValidation"),description:q.jsxs("div",{children:[q.jsx("p",{children:a("configValidation.configurationErrorDescription")}),q.jsx("ul",{children:l.map((ve,he)=>q.jsxs("li",{children:[q.jsxs("strong",{children:[ve.field,":"]})," ",ve.message]},he))})]})}));const te=C.useCallback(ve=>{O(null),T(B(ve)),N(z(ve)),P(e.scores[ve].facsimileItems||[]),$(ve),L(ve)},[e.scores,$,L]);C.useImperativeHandle(o,()=>({goToSection:ve=>{b(ve)},selectScore:ve=>{ve===null?F():ve>=0&&ve<e.scores.length&&te(ve)}})),jJ({configLanguage:e.settings.language,configScores:e.scores,configShowScoreSelector:e.settings.showScoreSelector,playingState:g,setPlayingState:v,activeTab:p,scoreViewContainerRef:A,showOriginalClefs:h,showReconstructions:d,onVisualizationOptionsChanged:i,i18n:s,loadAll:te});const se=ve=>{te(ve)},ce=C.useMemo(()=>e.scores.map((ve,he)=>({label:ve.title,value:he})),[e.scores]),ue=C.useMemo(()=>jo&&E.isLandscape?n:"100%",[jo,E,n]),de=C.useMemo(()=>e.settings.showIntroductionSection&&S?q.jsx(JO,{intro:H}):null,[e.settings.showIntroductionSection,S,H]),J=C.useMemo(()=>x!=null?q.jsx(wg,{message:a("error.fetchingScore.title"),description:q.jsxs("div",{children:[q.jsx("p",{children:a("error.fetchingScore.details",{url:x.url})}),x.error.message.split(`
379
379
  `).map((ve,he)=>q.jsxs("p",{children:[" ",ve," "]},he))]})}):q.jsx(z7,{ref:A,backgroundColor:e.settings.backgroundColor,showDownloadButton:e.settings.showDownloadButton,showMusicAnalysisByDefault:e.settings.showMusicAnalysisByDefault,height:ue}),[e.settings.backgroundColor,e.settings.showDownloadButton,ue,x,a]),Z=C.useMemo(()=>e.settings.showTextSection&&I?q.jsx(JO,{items:W,comments:k}):null,[e.settings.showTextSection,I,W,k]),oe=C.useMemo(()=>e.settings.showTitle&&(c!=null&&c.title)?q.jsx(dn.Title,{style:{flex:"0"},level:3,children:c.title}):null,[e.settings.showTitle,c]),X=C.useMemo(()=>e.settings.showFacsimileSection&&(_!=null&&_.length)?q.jsx(PJ,{path:e.settings.facsimileImagesPath,items:_}):null,[e.settings.showFacsimileSection,e.settings.facsimileImagesPath,_]),ee=C.useMemo(()=>q.jsx(BJ,{scoreView:J,textView:Z,introView:de,facsimileView:X,showIntroductionSection:e.settings.showIntroductionSection,showTextSection:e.settings.showTextSection,showFacsimileSection:e.settings.showFacsimileSection}),[J,Z,de,X,e.settings.showIntroductionSection,e.settings.showTextSection,e.settings.showFacsimileSection]),ne=C.useCallback(()=>{D(!0)},[]),be=C.useCallback(()=>{D(!1)},[]),Ce=C.useMemo(()=>M?q.jsx(kJ,{allowUserLanguageChange:e.settings.allowUserLanguageChange,showMusicAnalysisByDefault:e.settings.showMusicAnalysisByDefault,onClose:be,open:M}):null,[M,e.settings.allowUserLanguageChange,be]),Se=C.useMemo(()=>q.jsx(HJ,{showScoreSelector:e.scores.length>1&&e.settings.showScoreSelector,showOptions:e.settings.showOptions,selectorLabel:e.settings.selectorLabel||"work",scoreItems:ce,onScoreSelectedChanged:se,facsimileView:X,introView:de,textView:Z,onShowDrawer:ne}),[e.scores.length,e.settings.showScoreSelector,ce,se,X,de,Z,ne]);return Y(q.jsxs(q.Fragment,{children:[Se,oe,Ce,ee]}))},xN=C.forwardRef(VJ);Ln.Context=ql,Ln.ScoreView=kx,Ln.ScoreViewer=xN,Ln.default=xN,Ln.useScoreManager=CN,Ln.useStore=ge,Ln.useTextParts=wN,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
380
380
  //# sourceMappingURL=score-viewer.umd.cjs.map