@vis3/kit 1.0.0-alpha.5 → 1.0.0-alpha.7
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.
- package/dist/index.mjs +19 -16
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5717,7 +5717,7 @@ function $$(e) {
|
|
|
5717
5717
|
};
|
|
5718
5718
|
}
|
|
5719
5719
|
function j$(e) {
|
|
5720
|
-
return /\.(?:jpg|jpeg|png|gif|bmp|webp)$/.test(e) && !e.endsWith("/");
|
|
5720
|
+
return /\.(?:jpg|jpeg|png|gif|bmp|tiff|svg|webp)$/.test(e) && !e.endsWith("/");
|
|
5721
5721
|
}
|
|
5722
5722
|
function F$(e) {
|
|
5723
5723
|
return /\.(?:mp4|avi|flv|wmv|mov|webm)$/.test(e) && !e.endsWith("/");
|
|
@@ -88411,21 +88411,24 @@ function aD(e) {
|
|
|
88411
88411
|
const n = document.getElementById("bucketContainer");
|
|
88412
88412
|
if (!e)
|
|
88413
88413
|
return;
|
|
88414
|
-
|
|
88415
|
-
|
|
88416
|
-
|
|
88417
|
-
|
|
88418
|
-
|
|
88419
|
-
|
|
88420
|
-
|
|
88421
|
-
|
|
88422
|
-
|
|
88423
|
-
|
|
88424
|
-
|
|
88425
|
-
|
|
88426
|
-
|
|
88427
|
-
|
|
88428
|
-
|
|
88414
|
+
let i;
|
|
88415
|
+
const a = () => {
|
|
88416
|
+
i && window.clearTimeout(i), i = window.setTimeout(() => {
|
|
88417
|
+
const s = e.getBoundingClientRect();
|
|
88418
|
+
let l = window.innerHeight - s.top - 1;
|
|
88419
|
+
if (n) {
|
|
88420
|
+
const u = window.getComputedStyle(n?.parentElement);
|
|
88421
|
+
l -= Number.parseInt(u.paddingBottom);
|
|
88422
|
+
} else
|
|
88423
|
+
l = e.parentElement.clientHeight;
|
|
88424
|
+
r({
|
|
88425
|
+
width: s.width,
|
|
88426
|
+
height: l
|
|
88427
|
+
});
|
|
88428
|
+
}, 200);
|
|
88429
|
+
}, o = new ResizeObserver(a);
|
|
88430
|
+
return o.observe(e), () => {
|
|
88431
|
+
o.disconnect(), i && window.clearTimeout(i);
|
|
88429
88432
|
};
|
|
88430
88433
|
}, [e]), t;
|
|
88431
88434
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -82,7 +82,7 @@ ${i}
|
|
|
82
82
|
* @license BSD-3-Clause
|
|
83
83
|
* @version 10.0.6
|
|
84
84
|
*/const ER="array",HR="bit",Kh="bits",_R="byte",Jh="bytes",F6="",wR="exponent",CR="function",bs="iec",AR="Invalid number",MR="Invalid rounding method",Ss="jedec",PR="object",ed=".",kR="round",DR="s",VR="kbit",RR="kB",IR=" ",NR="string",BR="0",au={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function $R(e,{bits:t=!1,pad:r=!1,base:n=-1,round:i=2,locale:a=F6,localeOptions:o={},separator:s=F6,spacer:l=IR,symbols:u={},standard:c=F6,output:Q=NR,fullform:T=!1,fullforms:f=[],exponent:h=-1,roundingMethod:m=kR,precision:g=0}={}){let d=h,p=Number(e),y=[],x=0,O=F6;n===-1&&c.length===0?(n=10,c=Ss):n===-1&&c.length>0?(c=c===bs?bs:Ss,n=c===bs?2:10):(n=n===2?2:10,c=n===10||c===Ss?Ss:bs);const v=n===10?1e3:1024,L=T===!0,b=p<0,S=Math[m];if(typeof e!="bigint"&&isNaN(e))throw new TypeError(AR);if(typeof S!==CR)throw new TypeError(MR);if(b&&(p=-p),(d===-1||isNaN(d))&&(d=Math.floor(Math.log(p)/Math.log(v)),d<0&&(d=0)),d>8&&(g>0&&(g+=8-d),d=8),Q===wR)return d;if(p===0)y[0]=0,O=y[1]=au.symbol[c][t?Kh:Jh][d];else{x=p/(n===2?Math.pow(2,d*10):Math.pow(1e3,d)),t&&(x=x*8,x>=v&&d<8&&(x=x/v,d++));const E=Math.pow(10,d>0?i:0);y[0]=S(x*E)/E,y[0]===v&&d<8&&h===-1&&(y[0]=1,d++),O=y[1]=n===10&&d===1?t?VR:RR:au.symbol[c][t?Kh:Jh][d]}if(b&&(y[0]=-y[0]),g>0&&(y[0]=y[0].toPrecision(g)),y[1]=u[y[1]]||y[1],a===!0?y[0]=y[0].toLocaleString():a.length>0?y[0]=y[0].toLocaleString(a,o):s.length>0&&(y[0]=y[0].toString().replace(ed,s)),r&&Number.isInteger(y[0])===!1&&i>0){const E=s||ed,C=y[0].toString().split(E),A=C[1]||F6,w=A.length,M=i-w;y[0]=`${C[0]}${E}${A.padEnd(w+M,BR)}`}return L&&(y[1]=f[d]?f[d]:au.fullform[c][d]+(t?HR:_R)+(y[0]===1?F6:DR)),Q===ER?y:Q===PR?{value:y[0],symbol:y[1],exponent:d,unit:O}:y.join(l)}const jR={type:"fileSize",name:"文件大小",desc:"格式化文件大小",format:(e,t={})=>{if(Yh(e))return"";const r={base:2,standard:"jedec",...t};return $R(+e,r)}},FR=Object.freeze(Object.defineProperty({__proto__:null,basename:vR,dateTime:bR,extension:SR,fileSize:jR},Symbol.toStringTag,{value:"Module"})),ou={...FR};function qR(e){if(ou[e.type]){console.warn(`Formatter ${e.type} already exists.`);return}ou[e.type]=e}function ZR(e,t,r){const n=ou[e];return n?n.format(t,r):(console.error(`Formatter type: ${e} does not exist.`),t)}const Es={add:qR,format:ZR};var su,td;function zR(){return td||(td=1,su={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),su}var XR=zR();const UR=Rr(XR);var WR=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function rd(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=e.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(t.name=r[1],(UR[r[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var n=e.indexOf("-->");return{type:"comment",comment:n!==-1?e.slice(4,n):""}}for(var i=new RegExp(WR),a=null;(a=i.exec(e))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var GR=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,YR=/^\s*$/,KR=Object.create(null);function nd(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(nd,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var JR={parse:function(e,t){t||(t={}),t.components||(t.components=KR);var r,n=[],i=[],a=-1,o=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");n.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(GR,function(l,u){if(o){if(l!=="</"+r.name+">")return;o=!1}var c,Q=l.charAt(1)!=="/",T=l.startsWith("<!--"),f=u+l.length,h=e.charAt(f);if(T){var m=rd(l);return a<0?(n.push(m),n):((c=i[a]).children.push(m),n)}if(Q&&(a++,(r=rd(l)).type==="tag"&&t.components[r.name]&&(r.type="component",o=!0),r.voidElement||o||!h||h==="<"||r.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),a===0&&n.push(r),(c=i[a-1])&&c.children.push(r),i[a]=r),(!Q||r.voidElement)&&(a>-1&&(r.voidElement||r.name===l.slice(2,-1))&&(a--,r=a===-1?n:i[a]),!o&&h!=="<"&&h)){c=a===-1?n:i[a].children;var g=e.indexOf("<",f),d=e.slice(f,g===-1?void 0:g);YR.test(d)&&(d=" "),(g>-1&&a+c.length>=0||d!==" ")&&c.push({type:"text",content:d})}}),n},stringify:function(e){return e.reduce(function(t,r){return t+nd("",r)},"")}};const Hs=(...e)=>{console?.warn&&(F1(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},id={},m5=(...e)=>{F1(e[0])&&id[e[0]]||(F1(e[0])&&(id[e[0]]=new Date),Hs(...e))},ad=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},lu=(e,t,r)=>{e.loadNamespaces(t,ad(e,r))},od=(e,t,r,n)=>{if(F1(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return lu(e,r,n);r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,ad(e,n))},eI=(e,t,r={})=>!t.languages||!t.languages.length?(m5("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{if(r.bindI18n?.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),sd=e=>e.displayName||e.name||(F1(e)&&e.length>0?e:"Unknown"),F1=e=>typeof e=="string",h4=e=>typeof e=="object"&&e!==null,tI=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rI={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},nI=e=>rI[e];let uu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(tI,nI)};const ld=(e={})=>{uu={...uu,...e}},cu=()=>uu;let ud;const cd=e=>{ud=e},q6=()=>ud,Qu=(e,t)=>{if(!e)return!1;const r=e.props?.children??e.children;return t?r.length>0:!!r},Tu=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Z6(t):t},iI=e=>Array.isArray(e)&&e.every(W.isValidElement),Z6=e=>Array.isArray(e)?e:[e],aI=(e,t)=>{const r={...t};return r.props=Object.assign(e.props,t.props),r},Qd=(e,t)=>{if(!e)return"";let r="";const n=Z6(e),i=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return n.forEach((a,o)=>{if(F1(a))r+=`${a}`;else if(W.isValidElement(a)){const{props:s,type:l}=a,u=Object.keys(s).length,c=i.indexOf(l)>-1,Q=s.children;if(!Q&&c&&!u)r+=`<${l}/>`;else if(!Q&&(!c||u)||s.i18nIsDynamicList)r+=`<${o}></${o}>`;else if(c&&u===1&&F1(Q))r+=`<${l}>${Q}</${l}>`;else{const T=Qd(Q,t);r+=`<${o}>${T}</${o}>`}}else if(a===null)Hs("Trans: the passed in value is invalid - seems you passed in a null child.");else if(h4(a)){const{format:s,...l}=a,u=Object.keys(l);if(u.length===1){const c=s?`${u[0]}, ${s}`:u[0];r+=`{{${c}}}`}else Hs("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",a)}else Hs("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",a)}),r},oI=(e,t,r,n,i,a)=>{if(t==="")return[];const o=n.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(o.map(g=>`<${g}`).join("|")).test(t);if(!e&&!s&&!a)return[t];const l={},u=g=>{Z6(g).forEach(p=>{F1(p)||(Qu(p)?u(Tu(p)):h4(p)&&!W.isValidElement(p)&&Object.assign(l,p))})};u(e);const c=JR.parse(`<0>${t}</0>`),Q={...l,...i},T=(g,d,p)=>{const y=Tu(g),x=h(y,d.children,p);return iI(y)&&x.length===0||g.props?.i18nIsDynamicList?y:x},f=(g,d,p,y,x)=>{g.dummy?(g.children=d,p.push(W.cloneElement(g,{key:y},x?void 0:d))):p.push(...W.Children.map([g],O=>{const v={...O.props};return delete v.i18nIsDynamicList,W.createElement(O.type,{...v,key:y,ref:O.ref},x?null:d)}))},h=(g,d,p)=>{const y=Z6(g);return Z6(d).reduce((O,v,L)=>{const b=v.children?.[0]?.content&&r.services.interpolator.interpolate(v.children[0].content,Q,r.language);if(v.type==="tag"){let S=y[parseInt(v.name,10)];p.length===1&&!S&&(S=p[0][v.name]),S||(S={});const E=Object.keys(v.attrs).length!==0?aI({props:v.attrs},S):S,C=W.isValidElement(E),A=C&&Qu(v,!0)&&!v.voidElement,w=s&&h4(E)&&E.dummy&&!C,M=h4(e)&&Object.hasOwnProperty.call(e,v.name);if(F1(E)){const P=r.services.interpolator.interpolate(E,Q,r.language);O.push(P)}else if(Qu(E)||A){const P=T(E,v,p);f(E,P,O,L)}else if(w){const P=h(y,v.children,p);f(E,P,O,L)}else if(Number.isNaN(parseFloat(v.name)))if(M){const P=T(E,v,p);f(E,P,O,L,v.voidElement)}else if(n.transSupportBasicHtmlNodes&&o.indexOf(v.name)>-1)if(v.voidElement)O.push(W.createElement(v.name,{key:`${v.name}-${L}`}));else{const P=h(y,v.children,p);O.push(W.createElement(v.name,{key:`${v.name}-${L}`},P))}else if(v.voidElement)O.push(`<${v.name} />`);else{const P=h(y,v.children,p);O.push(`<${v.name}>${P}</${v.name}>`)}else if(h4(E)&&!C){const P=v.children[0]?b:null;P&&O.push(P)}else f(E,b,O,L,v.children.length!==1||!b)}else if(v.type==="text"){const S=n.transWrapTextNodes,E=a?n.unescape(r.services.interpolator.interpolate(v.content,Q,r.language)):r.services.interpolator.interpolate(v.content,Q,r.language);S?O.push(W.createElement(S,{key:`${v.name}-${L}`},E)):O.push(E)}return O},[])},m=h([{dummy:!0,children:e||[]}],c,Z6(e||[]));return Tu(m[0])},Td=(e,t,r)=>{const n=e.key||t,i=W.cloneElement(e,{key:n});if(!i.props||!i.props.children||r.indexOf(`${t}/>`)<0&&r.indexOf(`${t} />`)<0)return i;function a(){return W.createElement(W.Fragment,null,i)}return W.createElement(a)},sI=(e,t)=>e.map((r,n)=>Td(r,n,t)),lI=(e,t)=>{const r={};return Object.keys(e).forEach(n=>{Object.assign(r,{[n]:Td(e[n],n,t)})}),r},uI=(e,t)=>e?Array.isArray(e)?sI(e,t):h4(e)?lI(e,t):(m5("<Trans /> component prop expects an object or an array"),null):null;function fd({children:e,count:t,parent:r,i18nKey:n,context:i,tOptions:a={},values:o,defaults:s,components:l,ns:u,i18n:c,t:Q,shouldUnescape:T,...f}){const h=c||q6();if(!h)return m5("You will need to pass in an i18next instance by using i18nextReactModule"),e;const m=Q||h.t.bind(h)||(A=>A),g={...cu(),...h.options?.react};let d=u||m.ns||h.options?.defaultNS;d=F1(d)?[d]:d||["translation"];const p=Qd(e,g),y=s||p||g.transEmptyNodeValue||n,{hashTransKey:x}=g,O=n||(x?x(p||y):p||y);h.options?.interpolation?.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables});const v=o||t!==void 0&&!h.options?.interpolation?.alwaysFormat||!e?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},L={...a,context:i||a.context,count:t,...o,...v,defaultValue:y,ns:d},b=O?m(O,L):y,S=uI(l,b),E=oI(S||e,b,h,g,L,T),C=r??g.defaultTransParent;return C?W.createElement(C,f,E):E}const hd={type:"3rdParty",init(e){ld(e.options.react),cd(e)}},g5=W.createContext();class cI{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const dd=e=>async t=>{const r=await e.getInitialProps?.(t)??{},n=pd();return{...r,...n}},pd=()=>{const e=q6(),t=e.reportNamespaces?.getUsedNamespaces()??[],r={},n={};return e.languages.forEach(i=>{n[i]={},t.forEach(a=>{n[i][a]=e.getResourceBundle(i,a)||{}})}),r.initialI18nStore=n,r.initialLanguage=e.language,r};function QI({children:e,count:t,parent:r,i18nKey:n,context:i,tOptions:a={},values:o,defaults:s,components:l,ns:u,i18n:c,t:Q,shouldUnescape:T,...f}){const{i18n:h,defaultNS:m}=W.useContext(g5)||{},g=c||h||q6(),d=Q||g?.t.bind(g);return fd({children:e,count:t,parent:r,i18nKey:n,context:i,tOptions:a,values:o,defaults:s,components:l,ns:u||d?.ns||m||g?.options?.defaultNS,i18n:g,t:Q,shouldUnescape:T,...f})}const TI=(e,t)=>{const r=W.useRef();return W.useEffect(()=>{r.current=e},[e,t]),r.current},md=(e,t,r,n)=>e.getFixedT(t,r,n),fI=(e,t,r,n)=>W.useCallback(md(e,t,r,n),[e,t,r,n]),s1=(e,t={})=>{const{i18n:r}=t,{i18n:n,defaultNS:i}=W.useContext(g5)||{},a=r||n||q6();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new cI),!a){m5("You will need to pass in an i18next instance by using initReactI18next");const x=(v,L)=>F1(L)?L:h4(L)&&F1(L.defaultValue)?L.defaultValue:Array.isArray(v)?v[v.length-1]:v,O=[x,{},!1];return O.t=x,O.i18n={},O.ready=!1,O}a.options.react?.wait&&m5("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...cu(),...a.options.react,...t},{useSuspense:s,keyPrefix:l}=o;let u=e||i||a.options?.defaultNS;u=F1(u)?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces?.(u);const c=(a.isInitialized||a.initializedStoreOnce)&&u.every(x=>eI(x,a,o)),Q=fI(a,t.lng||null,o.nsMode==="fallback"?u:u[0],l),T=()=>Q,f=()=>md(a,t.lng||null,o.nsMode==="fallback"?u:u[0],l),[h,m]=W.useState(T);let g=u.join();t.lng&&(g=`${t.lng}${g}`);const d=TI(g),p=W.useRef(!0);W.useEffect(()=>{const{bindI18n:x,bindI18nStore:O}=o;p.current=!0,!c&&!s&&(t.lng?od(a,t.lng,u,()=>{p.current&&m(f)}):lu(a,u,()=>{p.current&&m(f)})),c&&d&&d!==g&&p.current&&m(f);const v=()=>{p.current&&m(f)};return x&&a?.on(x,v),O&&a?.store.on(O,v),()=>{p.current=!1,a&&x?.split(" ").forEach(L=>a.off(L,v)),O&&a&&O.split(" ").forEach(L=>a.store.off(L,v))}},[a,g]),W.useEffect(()=>{p.current&&c&&m(T)},[a,l,c]);const y=[h,a,c];if(y.t=h,y.i18n=a,y.ready=c,c||!c&&!s)return y;throw new Promise(x=>{t.lng?od(a,t.lng,u,()=>x()):lu(a,u,()=>x())})},hI=(e,t={})=>function(n){function i({forwardedRef:o,...s}){const[l,u,c]=s1(e,{...s,keyPrefix:t.keyPrefix}),Q={...s,t:l,i18n:u,tReady:c};return t.withRef&&o?Q.ref=o:!t.withRef&&o&&(Q.forwardedRef=o),W.createElement(n,Q)}i.displayName=`withI18nextTranslation(${sd(n)})`,i.WrappedComponent=n;const a=(o,s)=>W.createElement(i,Object.assign({},o,{forwardedRef:s}));return t.withRef?W.forwardRef(a):i},dI=({ns:e,children:t,...r})=>{const[n,i,a]=s1(e,r);return t(n,{i18n:i,lng:i.language},a)};function gd({i18n:e,defaultNS:t,children:r}){const n=W.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return W.createElement(g5.Provider,{value:n},r)}const Od=(e,t,r={})=>{const{i18n:n}=r,{i18n:i}=W.useContext(g5)||{},a=n||i||q6();a.options?.isClone||(e&&!a.initializedStoreOnce&&(a.services.resourceStore.data=e,a.options.ns=Object.values(e).reduce((o,s)=>(Object.keys(s).forEach(l=>{o.indexOf(l)<0&&o.push(l)}),o),a.options.ns),a.initializedStoreOnce=!0,a.isInitialized=!0),t&&!a.initializedLanguageOnce&&(a.changeLanguage(t),a.initializedLanguageOnce=!0))},pI=()=>function(t){function r({initialI18nStore:n,initialLanguage:i,...a}){return Od(n,i),W.createElement(t,{...a})}return r.getInitialProps=dd(t),r.displayName=`withI18nextSSR(${sd(t)})`,r.WrappedComponent=t,r},mI=()=>"",gI=()=>"",OI=()=>"",yI=()=>"",vI=()=>"",xI=()=>"",ke=e=>typeof e=="string",O5=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},yd=e=>e==null?"":""+e,LI=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},bI=/###/g,vd=e=>e&&e.indexOf("###")>-1?e.replace(bI,"."):e,xd=e=>!e||ke(e),y5=(e,t,r)=>{const n=ke(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(xd(e))return{};const a=vd(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return xd(e)?{}:{obj:e,k:vd(n[i])}},Ld=(e,t,r)=>{const{obj:n,k:i}=y5(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=y5(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=y5(e,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},SI=(e,t,r,n)=>{const{obj:i,k:a}=y5(e,t,Object);i[a]=i[a]||[],i[a].push(r)},_s=(e,t)=>{const{obj:r,k:n}=y5(e,t);if(r)return r[n]},EI=(e,t,r)=>{const n=_s(e,r);return n!==void 0?n:_s(t,r)},bd=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?ke(e[n])||e[n]instanceof String||ke(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):bd(e[n],t[n],r):e[n]=t[n]);return e},z6=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var HI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const _I=e=>ke(e)?e.replace(/[&<>"'\/]/g,t=>HI[t]):e;class wI{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const CI=[" ",",","?","!",";"],AI=new wI(20),MI=(e,t,r)=>{t=t||"",r=r||"";const n=CI.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=AI.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},fu=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=a;l<n.length;++l)if(l!==a&&(s+=r),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;a+=l-a+1;break}i=o}return i},ws=e=>e&&e.replace("_","-"),PI={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Cs{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||PI,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(ke(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Cs(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Cs(this.logger,t)}}var Nr=new Cs;class As{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[s,l]=o;for(let u=0;u<l;u++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let u=0;u<l;u++)s.apply(s,[t,...n])})}}class Sd extends As{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,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 r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?s.push(...n):ke(n)&&a?s.push(...n.split(a)):s.push(n)));const l=_s(this.data,s);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!ke(n)?l:fu(this.data&&this.data[t]&&this.data[t][r],n,a)}addResource(t,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),Ld(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(ke(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let l=_s(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?bd(l,n,a):l={...l,...n},Ld(this.data,s,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var Ed={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,r,n,i))}),t}};const Hd={};class Ms extends As{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),LI(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Nr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!MI(t,n,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ke(a)?[a]:a};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(i)}return{key:t,namespaces:ke(a)?[a]:a}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],r),l=s[s.length-1],u=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const x=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${x}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${x}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const Q=this.resolve(t,r);let T=Q&&Q.res;const f=Q&&Q.usedKey||o,h=Q&&Q.exactUsedKey||o,m=Object.prototype.toString.apply(T),g=["[object Number]","[object Function]","[object RegExp]"],d=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!ke(T)&&typeof T!="boolean"&&typeof T!="number";if(p&&T&&y&&g.indexOf(m)<0&&!(ke(d)&&Array.isArray(T))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,T,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(Q.res=x,Q.usedParams=this.getUsedParamsDetails(r),Q):x}if(a){const x=Array.isArray(T),O=x?[]:{},v=x?h:f;for(const L in T)if(Object.prototype.hasOwnProperty.call(T,L)){const b=`${v}${a}${L}`;O[L]=this.translate(b,{...r,joinArrays:!1,ns:s}),O[L]===b&&(O[L]=T[L])}T=O}}else if(p&&ke(d)&&Array.isArray(T))T=T.join(d),T&&(T=this.extendTranslation(T,t,r,n));else{let x=!1,O=!1;const v=r.count!==void 0&&!ke(r.count),L=Ms.hasDefaultValue(r),b=v?this.pluralResolver.getSuffix(u,r.count,r):"",S=r.ordinal&&v?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",E=v&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),C=E&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${b}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(T)&&L&&(x=!0,T=C),this.isValidLookup(T)||(O=!0,T=o);const w=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:T,M=L&&C!==T&&this.options.updateMissing;if(O||x||M){if(this.logger.log(M?"updateKey":"missingKey",u,l,o,M?C:T),a){const I=this.resolve(o,{...r,keySeparator:!1});I&&I.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 P=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let I=0;I<N.length;I++)P.push(N[I]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(r.lng||this.language):P.push(r.lng||this.language);const B=(I,V,_)=>{const k=L&&_!==T?_:w;this.options.missingKeyHandler?this.options.missingKeyHandler(I,l,V,k,M,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,l,V,k,M,r),this.emit("missingKey",I,l,V,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?P.forEach(I=>{const V=this.pluralResolver.getSuffixes(I,r);E&&r[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(_=>{B([I],o+_,r[`defaultValue${_}`]||C)})}):B(P,o,C))}T=this.extendTranslation(T,t,r,Q,n),O&&T===o&&this.options.appendNamespaceToMissingKey&&(T=`${l}:${o}`),(O||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,x?T:void 0):T=this.options.parseMissingKeyHandler(T))}return i?(Q.res=T,Q.usedParams=this.getUsedParamsDetails(r),Q):T}extendTranslation(t,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=ke(t)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const T=t.match(this.interpolator.nestingRegexp);c=T&&T.length}let Q=n.replace&&!ke(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(Q={...this.options.interpolation.defaultVariables,...Q}),t=this.interpolator.interpolate(t,Q,n.lng||this.language||i.usedLng,n),u){const T=t.match(this.interpolator.nestingRegexp),f=T&&T.length;c<f&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var T=arguments.length,f=new Array(T),h=0;h<T;h++)f[h]=arguments[h];return a&&a[0]===f[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):o.translate(...f,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=ke(s)?[s]:s;return t!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(t=Ed.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return ke(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;i=c;let Q=u.namespaces;this.options.fallbackNS&&(Q=Q.concat(this.options.fallbackNS));const T=r.count!==void 0&&!ke(r.count),f=T&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),h=r.context!==void 0&&(ke(r.context)||typeof r.context=="number")&&r.context!=="",m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);Q.forEach(g=>{this.isValidLookup(n)||(s=g,!Hd[`${m[0]}-${g}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Hd[`${m[0]}-${g}`]=!0,this.logger.warn(`key "${i}" for languages "${m.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!!!")),m.forEach(d=>{if(this.isValidLookup(n))return;o=d;const p=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,c,d,g,r);else{let x;T&&(x=this.pluralResolver.getSuffix(d,r.count,r));const O=`${this.options.pluralSeparator}zero`,v=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(T&&(p.push(c+x),r.ordinal&&x.indexOf(v)===0&&p.push(c+x.replace(v,this.options.pluralSeparator)),f&&p.push(c+O)),h){const L=`${c}${this.options.contextSeparator}${r.context}`;p.push(L),T&&(p.push(L+x),r.ordinal&&x.indexOf(v)===0&&p.push(L+x.replace(v,this.options.pluralSeparator)),f&&p.push(L+O))}}let y;for(;y=p.pop();)this.isValidLookup(n)||(a=y,n=this.getResource(d,g,y,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!ke(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}const hu=e=>e.charAt(0).toUpperCase()+e.slice(1);class _d{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nr.create("languageUtils")}getScriptPartFromCode(t){if(t=ws(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=ws(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(ke(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=hu(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=hu(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=hu(n[2].toLowerCase()))),n.join("-")}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 r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),ke(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return ke(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):ke(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let kI=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],DI={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const VI=["v1","v2","v3"],RI=["v4"],wd={zero:0,one:1,two:2,few:3,many:4,other:5},II=()=>{const e={};return kI.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:DI[t.fc]}})}),e};class NI{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Nr.create("pluralResolver"),(!this.options.compatibilityJSON||RI.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=II(),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=ws(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>wd[i]-wd[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!VI.includes(this.options.compatibilityJSON)}}const Cd=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=EI(e,t,r);return!a&&i&&ke(r)&&(a=fu(e,r,n),a===void 0&&(a=fu(t,r,n))),a},du=e=>e.replace(/\$/g,"$$$$");class BI{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Nr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:Q,nestingPrefix:T,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:g,maxReplaces:d,alwaysFormat:p}=t.interpolation;this.escape=r!==void 0?r:_I,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?z6(a):o||"{{",this.suffix=s?z6(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":Q||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=T?z6(T):f||z6("$t("),this.nestingSuffix=h?z6(h):m||z6(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=d||1e3,this.alwaysFormat=p!==void 0?p:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"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,r,n,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=f=>{if(f.indexOf(this.formatSeparator)<0){const d=Cd(r,l,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(d,void 0,n,{...i,...r,interpolationkey:f}):d}const h=f.split(this.formatSeparator),m=h.shift().trim(),g=h.join(this.formatSeparator).trim();return this.format(Cd(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...i,...r,interpolationkey:m})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,Q=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>du(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?du(this.escape(f)):du(f)}].forEach(f=>{for(s=0;a=f.regex.exec(t);){const h=a[1].trim();if(o=u(h),o===void 0)if(typeof c=="function"){const g=c(t,a,i);o=ke(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))o="";else if(Q){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),o="";else!ke(o)&&!this.useRawValueToEscape&&(o=yd(o));const m=f.safeValue(o);if(t=t.replace(a[0],m),Q?(f.regex.lastIndex+=o.length,f.regex.lastIndex-=a[0].length):f.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const Q=l.split(new RegExp(`${c}[ ]*{`));let T=`{${Q[1]}`;l=Q[0],T=this.interpolate(T,o);const f=T.match(/'/g),h=T.match(/"/g);(f&&f.length%2===0&&!h||h.length%2!==0)&&(T=T.replace(/'/g,'"'));try{o=JSON.parse(T),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${T}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!ke(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(Q=>Q.trim());i[1]=c.shift(),l=c,u=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!ke(a))return a;ke(a)||(a=yd(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),u&&(a=l.reduce((c,Q)=>this.format(c,Q,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const $I=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},X6=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=t[o];return s||(s=e(ws(n),i),t[o]=s),s(r)}};class jI{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Nr.create("formatter"),this.options=t,this.formats={number:X6((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:X6((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:X6((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:X6((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:X6((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(t)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=X6(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:c}=$I(l);if(this.formats[u]){let Q=s;try{const T=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},f=T.locale||T.lng||i.locale||i.lng||n;Q=this.formats[u](s,f,{...c,...i,...T})}catch(T){this.logger.warn(T)}return Q}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const FI=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class qI extends As{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Nr.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=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},s={},l={};return t.forEach(u=>{let c=!0;r.forEach(Q=>{const T=`${u}|${Q}`;!n.reload&&this.store.hasResourceBundle(u,Q)?this.state[T]=2:this.state[T]<0||(this.state[T]===1?o[T]===void 0&&(o[T]=!0):(this.state[T]=1,c=!1,o[T]===void 0&&(o[T]=!0),a[T]===void 0&&(a[T]=!0),l[Q]===void 0&&(l[Q]=!0)))}),c||(s[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const s={};this.queue.forEach(l=>{SI(l.loaded,[a],o),FI(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(Q=>{s[u][Q]===void 0&&(s[u][Q]=!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,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const Q=this.waitingReads.shift();this.read(Q.lng,Q.ns,Q.fcName,Q.tried,Q.wait,Q.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(t,r);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,r,s)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ke(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ke(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,r,n,i,l):c=u(t,r,n,i),c&&typeof c.then=="function"?c.then(Q=>s(null,Q)).catch(s):s(null,c)}catch(c){s(c)}else u(t,r,n,i,s,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const Ad=()=>({debug:!1,initImmediate:!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]),ke(e[1])&&(t.defaultValue=e[1]),ke(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Md=e=>(ke(e.ns)&&(e.ns=[e.ns]),ke(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ke(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ps=()=>{},ZI=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class v5 extends As{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Md(t),this.services={},this.logger=Nr,this.modules={external:[]},ZI(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(ke(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=Ad();this.options={...i,...this.options,...Md(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Nr.init(a(this.modules.logger),this.options):Nr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=jI);const Q=new _d(this.options);this.store=new Sd(this.options.resources,this.options);const T=this.services;T.logger=Nr,T.resourceStore=this.store,T.languageUtils=Q,T.pluralResolver=new NI(Q,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(T.formatter=a(c),T.formatter.init(T,this.options),this.options.interpolation.format=T.formatter.format.bind(T.formatter)),T.interpolator=new BI(this.options),T.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},T.backendConnector=new qI(a(this.modules.backend),T.resourceStore,T,this.options),T.backendConnector.on("*",function(f){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];t.emit(f,...m)}),this.modules.languageDetector&&(T.languageDetector=a(this.modules.languageDetector),T.languageDetector.init&&T.languageDetector.init(T,this.options.detection,this.options)),this.modules.i18nFormat&&(T.i18nFormat=a(this.modules.i18nFormat),T.i18nFormat.init&&T.i18nFormat.init(this)),this.translator=new Ms(this.services,this.options),this.translator.on("*",function(f){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];t.emit(f,...m)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ps),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=O5(),u=()=>{const c=(Q,T)=>{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),l.resolve(T),n(Q,T)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const i=ke(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,r,n){const i=O5();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Ps),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),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"&&Ed.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 r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=O5();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=ke(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,r,n){var i=this;const a=function(o,s){let l;if(typeof s!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),Q=2;Q<u;Q++)c[Q-2]=arguments[Q];l=i.options.overloadTranslationOptionHandler([o,s].concat(c))}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||a.keyPrefix);const T=i.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(o)?f=o.map(h=>`${l.keyPrefix}${T}${h}`):f=l.keyPrefix?`${l.keyPrefix}${T}${o}`:o,i.t(f,l)};return ke(t)?a.lng=t:a.lngs=t,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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 n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=O5();return this.options.ns?(ke(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=O5();ke(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["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"],n=this.services&&this.services.languageUtils||new _d(Ad());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new v5(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new v5(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new Sd(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Ms(a.services,i),a.translator.on("*",function(s){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a.emit(s,...u)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ke=v5.createInstance();Ke.createInstance=v5.createInstance,Ke.createInstance,Ke.dir,Ke.init,Ke.loadResources,Ke.reloadResources,Ke.use,Ke.changeLanguage,Ke.getFixedT,Ke.t,Ke.exists,Ke.setDefaultNamespace,Ke.hasLoadedNamespace,Ke.loadNamespaces,Ke.loadLanguages;const{slice:zI,forEach:XI}=[];function UI(e){return XI.call(zI.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}function WI(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(r=>r.test(e))}const Pd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,GI=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let a=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!Pd.test(n.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${n.domain}`}if(n.path){if(!Pd.test(n.path))throw new TypeError("option path is invalid");a+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(a+="; Partitioned"),a},kd={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=GI(e,t,i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let i=r[n];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 YI={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return kd.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:i,cookieOptions:a}=t;r&&typeof document<"u"&&kd.create(r,e,n,i,a)}},KI={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));const a=n.substring(1).split("&");for(let o=0;o<a.length;o++){const s=a[o].indexOf("=");s>0&&a[o].substring(0,s)===t&&(r=a[o].substring(s+1))}}return r}},JI={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const a=i.substring(1);if(t){const o=a.split("&");for(let s=0;s<o.length;s++){const l=o[s].indexOf("=");l>0&&o[s].substring(0,l)===t&&(n=o[s].substring(l+1))}}if(n)return n;if(!n&&r>-1){const o=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?o[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return n}};let U6=null;const Dd=()=>{if(U6!==null)return U6;try{if(U6=typeof window<"u"&&window.localStorage!==null,!U6)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{U6=!1}return U6};var eN={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Dd())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&Dd()&&window.localStorage.setItem(r,e)}};let W6=null;const Vd=()=>{if(W6!==null)return W6;try{if(W6=typeof window<"u"&&window.sessionStorage!==null,!W6)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{W6=!1}return W6};var tN={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Vd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&Vd()&&window.sessionStorage.setItem(r,e)}},rN={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let a=0;a<r.length;a++)t.push(r[a]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},nN={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},iN={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof t=="number"?t:0]?.replace("/",""):void 0}},aN={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};let Rd=!1;try{document.cookie,Rd=!0}catch{}const Id=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Rd||Id.splice(1,1);const oN=()=>({order:Id,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Nd{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=UI(r,this.options||{},oN()),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=n,this.addDetector(YI),this.addDetector(KI),this.addDetector(eN),this.addDetector(tN),this.addDetector(rN),this.addDetector(nN),this.addDetector(iN),this.addDetector(aN),this.addDetector(JI)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.filter(n=>n!=null&&!WI(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}Nd.type="languageDetector";const Bd={"en-US":{translation:{cloud:"Cloud Documents",local:"Local Documents",demoTips:"The current version is a demo version. The data will be automatically cleared at midnight every day. Please back up important data in time. If you need to use it completely, please",localDeploy:"Local deployment",email:"Email address",emailPlease:"Please enter your email address",emailFormatPlease:"Please enter a valid email address",passwordPlease:"Please enter your password",password:"Password",passwordConfirm:"Confirm password",passwordConfirmPlease:"Please confirm your password",passwordRepeatedUnMatch:"The two passwords entered are inconsistent",passwordCannotContainsWhitespace:"Password cannot contain spaces",passwordLengthError:"Password length must be 6-18 characters",signUp:"Sign up",signUpSuccess:"Sign up successfully",signUpFailed:"Sign up failed",alreadyHaveAccount:"Already have an account?",openSourceToolbox:"Open source toolbox",documentation:"Documentation",logout:"Logout",goTo:"Go to",toolboxWelcome:"Welcome to OpenDataLab open source tools 🎉",tryOnline:"Try online",opendatalabDescription:"An open data platform that leads the AI big model era, providing a large amount of multi-modal high-quality data sets to help AI 落地",labelllmDescription:"Professional LLM dialogue annotation, through flexible tool configuration and wide compatibility with various data modalities, to create high-quality data for large models",minerUDescription:"One-stop open source high-quality data extraction tool, supports multiple formats (PDF/webpage/ebook), intelligent extraction, generating high-quality data",labelUDescription:"A lightweight open source annotation tool, freely combining various tools, seamlessly compatible with multiple data formats, and supporting loading of pre-annotation to accelerate annotation efficiency",status:"Status",createdBy:"Created by",download:"Download",delete:"Delete",deleteConfirm:"Are you sure you want to delete?",confirm:"Confirm",saveUnModified:"Save the edited content?",saveAndExit:"Save and exit",dontSave:"Don't save",preview:"Preview",exitPreview:"Exit preview",copy:"Copy",copied:"Copied",deleteAll:"Delete all files",deleteAllConfirm:"Are you sure you want to delete all files?",cancel:"Cancel",ok:"OK",account:{username:"Username",usernamePlaceholder:"Please enter your username",usernameRequired:"Username is required",usernameMinLength:"Username must be at least 3 characters",password:"Password",passwordMinLength:"Password must be at least 6 characters",passwordPlaceholder:"Please enter your password",passwordRequired:"Password is required",passwordConfirm:"Confirm password",passwordConfirmPlaceholder:"Please confirm your password",passwordConfirmRequired:"Please confirm your password",usernameIncorrect:"Username is incorrect",passwordIncorrect:"Password is incorrect",noAccountFound:"No account found",loginSuccess:"Login successfully",login:"Login",logout:"Logout",register:"Register",passwordConfirmError:"The two passwords entered are inconsistent",registerSuccess:"Register successfully",registerFailed:"Register failed",registerPlaceholder:"Please enter your email address",registerFormatPlaceholder:"Please enter a valid email address",registerPasswordPlaceholder:"Please enter your password",registerPasswordConfirmPlaceholder:"Please confirm your password",registerPasswordConfirmRequired:"Please confirm your password",createNewAccount:"Create new account",haveAccount:"Already have an account?",loginNow:"Login now"},slogan:"Large model corpus visualization tool",sloganDescription:"Seamless integration of mainstream cloud storage and local data sources, deep parsing of multi-format data content",fileList:"File List",bucketUpdated:"Bucket updated",editBucket:"Edit Bucket",noData:"No data",bucketForm:{deleteConfirm:"Are you sure you want to delete this bucket?",triggerTooltipMessage:"Add Bucket or Object path",addBucket:"Add Bucket",addPath:"Add S3 path",add:"Add",save:"Save",cancel:"Cancel",pathTooltip:"The timeout for checking accessibility is 30 seconds. If it exceeds the timeout, it will be determined as inaccessible",alertMessage:"Please select or add an AK/SK with access to the target path",name:"Name",namePlaceholder:"Bucket name (optional)",path:"S3 Path",remove:"Remove",refresh:"Refresh",pathPlaceholder:"Bucket path, start with s3://",pathRequired:"Please enter the path",atLeastOnePath:"At least one path is required",pathAdded:"Path added successfully",pathValidMessage:"Please enter a valid s3 path, must start with s3://",endpoint:"Endpoint",endpointPlaceholder:"Endpoint",endpointRequired:"Please enter the endpoint",endpointAccessible:"Endpoint is accessible",endpointInvalid:"This endpoint cannot be accessed",endpointValidMessage:"Please enter a valid url format",keychainId:"AK&SK",keychainIdRequired:"Please select AK&SK",noPermission:"The selected AK&SK does not have permission to access this path","AS&SKManagement":"AK&SK"},directoryTree:{show:"Expand file tree",hide:"Collapse file tree",loadMore:"Load more"},keychain:{deleted:"AK&SK deleted",updated:"AK&SK updated",add:"Add AK&SK",deleteConfirm:"Are you sure you want to delete this AK&SK?","addAS&SKTips":"To get access permission to Bucket or Object address, please add AK&SK of S3 cluster","noAK&SK":"No Data",name:"Name",namePlaceholder:"Put a label on the AK&SK",accessKeyId:"Access Key ID",accessKeyIdPlaceholder:"Access Key ID",secretKeyId:"Secret Key ID",secretKeyIdPlaceholder:"Secret Key ID",added:"AK&SK added successfully"},upload:{upload:"Upload",unzipError:"Unzip file failed",warcError:"Parse WARC file failed",readError:"Read file failed",drag:"Click or drag file to upload to the browser",recommend:"Support format: json, jsonl, jsonl.gz, html, md, csv, txt",deleteSuccess:"Removed",deleteFailed:"Remove failed",maxSize:"The maximum size of the file is",sameName:"The file with the same name already exists",success:"Added",failed:"Add failed"},renderer:{downloadZipFile:"Download ZIP File",close:"Close",fileInfo:"File Information",fileSize:"File Size",author:"Author",lastModified:"Last Modified",returnToParent:"Return to Parent Directory",prevPage:"Previous Page",nextPage:"Next Page",openInNewTab:"Open in New Tab",downloadFile:"Download",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",copyFullPath:"Copy Full Path",showDirInfo:"Show Directory Information",dirInfo:"Directory Information",copied:"Copied to Clipboard",iKnow:"I Understand",addNow:"Add Now",noPermission:"No View Permission",needPermission:"To get view permission, please select AK&SK and add this address",pathNotExist:"Path does not exist or you do not have access permission",ifPathExists:"If the path exists, you can add path authorization access yourself",step1AddKey:"Step 1: Add Secret Key - Add an S3 key with permission to the target path",step2AddPath:"Step 2: Add Address - Use this key to add address authorization access",arrayTypeRequired:"Array type required",confirm:"Confirm",clear:"Clear",baseUrlEffect:"Effect: /abc.css => https://example.com/abc.css",convertToFullUrl:"Convert Absolute Path to Full URL",cancelLineWrap:"Disable Line Wrap",lineWrap:"Enable Line Wrap",closePreview:"Close Preview",openPreview:"Preview",katexDesc:"Suitable for common markdown documents, faster rendering",mathjaxDesc:"Suitable for complex mathematical formulas, slower rendering",raw:"Raw",image:"Image",html:"HTML",json:"JSON",markdown:"Markdown",contentList:"Content List",imgList:"Image List"},fullscreen:{exitFullscreenFailed:"Exit fullscreen failed",enterFullscreenFailed:"Enter fullscreen failed"},bucket:{fileDirectory:"File Directory",prevPage:"Previous Page",nextPage:"Next Page",returnToParent:"Return to Parent Directory",searchPath:"Search Path",copyPath:"Copy Path",directory:"Directory",pathMustStartWithS3:"Path must start with s3://",searchPlaceholder:"Enter address to search",duplicatedBuckets:"Duplicated Buckets, please select one"},textPreviewer:{prevSection:"Previous Section",nextSection:"Next Section"},codeViewer:{unparsableData:"Unparsable data type"},addFirstBucket:"Add your first bucket",currentSupport:"Currently supported cloud storage platforms:",supportedCloudPlatforms:{huawei:"Huawei Cloud",tencent:"Tencent Cloud",sensetime:"SenseTime AOS",aws:"AWS",aliyun:"Aliyun OSS",inspur:"Inspur Cloud",microsoft:"Microsoft Azure"}}},"zh-CN":{translation:{cloud:"云端文件",local:"本地文件",demoTips:"当前为体验版,每日凌晨数据将自动清空,请及时备份重要数据。如需完整使用,建议",localDeploy:"本地部署",login:"登录",email:"Email邮箱地址",emailPlease:"请输入邮箱",emailFormatPlease:"请输入正确的邮箱格式",passwordPlease:"请输入密码",password:"密码",passwordConfirm:"确认密码",passwordConfirmPlease:"请确认密码",passwordRepeatedUnMatch:"两次输入的密码不一致",passwordCannotContainsWhitespace:"密码不能包含空格",passwordLengthError:"密码长度为6-18位",signUp:"注册",signUpSuccess:"注册成功",signUpFailed:"注册失败",alreadyHaveAccount:"已有账号?",openSourceToolbox:"开源工具箱",documentation:"帮助文档",logout:"退出登录",goTo:"立即前往",toolboxWelcome:"欢迎使用 OpenDataLab 开源工具 🎉",tryOnline:"在线体验",opendatalabDescription:"一个引领 AI 大模型时代的开放数据平台,提供了海量的、多模态的优质数据集,助力 AI 开发落地",labelllmDescription:"专业致力于 LLM 对话标注,通过灵活的工具配置与多种数据模态的广泛兼容,为大模型打造高质量数据",minerUDescription:"一站式开源高质量数据提取工具,支持多格式(PDF/网页/电子书),智能萃取,生成高质量语料",labelUDescription:"一款轻量级开源标注工具,自由组合多样工具,无缝兼容多格式数据,同时支持载入预标注,加速标注效率",status:"状态",createdBy:"创建者",download:"下载",delete:"删除",deleteConfirm:"确定删除?",confirm:"提示",saveUnModified:"是否保存已编辑的内容?",saveAndExit:"保存并退出",dontSave:"不保存",preview:"预览",exitPreview:"退出预览",copy:"复制",copied:"已复制",deleteAll:"删除所有文件",deleteAllConfirm:"确定删除所有文件?",cancel:"取消",ok:"确定",account:{username:"用户名",usernamePlaceholder:"请输入用户名",usernameRequired:"用户名是必填项",usernameMinLength:"用户名至少3个字符",password:"密码",passwordMinLength:"密码至少6个字符",passwordPlaceholder:"请输入密码",passwordRequired:"密码是必填项",passwordConfirm:"确认密码",passwordConfirmPlaceholder:"请确认密码",passwordConfirmRequired:"请确认密码",usernameIncorrect:"用户名不正确",passwordIncorrect:"密码不正确",noAccountFound:"没有找到账号",loginSuccess:"登录成功",login:"登录",logout:"退出登录",register:"注册",passwordConfirmError:"两次输入的密码不一致",registerSuccess:"注册成功",registerFailed:"注册失败",registerPlaceholder:"请输入邮箱",registerFormatPlaceholder:"请输入正确的邮箱格式",registerPasswordPlaceholder:"请输入密码",registerPasswordConfirmPlaceholder:"请确认密码",registerPasswordConfirmRequired:"请确认密码",createNewAccount:"创建新账号",haveAccount:"已有账号?",loginNow:"立即登录"},slogan:"大模型语料可视化工具",sloganDescription:"无缝对接主流云存储与本地数据源,深度解析多格式数据内容",fileList:"文件列表",bucketUpdated:"Bucket 更新",editBucket:"编辑 Bucket",noData:"暂无数据",bucketForm:{deleteConfirm:"确定删除此 Bucket?",triggerTooltipMessage:"添加 Bucket 或 Object 路径",addBucket:"添加 Bucket",addPath:"添加 S3 路径",add:"添加",save:"保存",cancel:"取消",pathTooltip:"检查访问权限的超时时间为30秒。如果超过超时时间,则确定为不可访问",alertMessage:"请选择或添加对目标路径有权限的 AK/SK",name:"名称",namePlaceholder:"Bucket 名称(可选)",path:"S3 路径",remove:"删除",refresh:"刷新",pathPlaceholder:"Bucket 路径,以 s3:// 开头",pathRequired:"请输入路径",atLeastOnePath:"至少一个路径是必填项",pathAdded:"路径添加成功",pathValidMessage:"请输入有效的 s3 路径,必须以 s3:// 开头",endpoint:"Endpoint",endpointPlaceholder:"Endpoint",endpointRequired:"请输入 Endpoint",endpointAccessible:"Endpoint 可访问",endpointInvalid:"此 Endpoint 无法访问",endpointValidMessage:"请输入有效的 url 格式",keychainId:"AK&SK",keychainIdRequired:"请选择 AK&SK",noPermission:"选择的 AK&SK 没有权限访问此路径","AS&SKManagement":"AK&SK 管理"},directoryTree:{show:"展开文件树",hide:"折叠文件树",loadMore:"加载更多"},keychain:{deleted:"AK&SK 已删除",updated:"AK&SK 已更新",add:"添加 AK&SK",deleteConfirm:"确定删除此 AK&SK","addAS&SKTips":"要获取 Bucket 或 Object 地址的访问权限,请添加 S3 集群的 AK&SK","noAK&SK":"暂无数据",name:"名称",namePlaceholder:"请输入 AK&SK 别名",accessKeyId:"Access Key ID",accessKeyIdPlaceholder:"请输入 Access Key ID",secretKeyId:"Secret Key ID",secretKeyIdPlaceholder:"请输入 Secret Key ID",added:"AK&SK 添加成功"},upload:{upload:"上传",unzipError:"解压文件失败",warcError:"解析 WARC 文件失败",readError:"读取文件失败",drag:"点击或拖拽文件到浏览器",recommend:"支持格式:json, jsonl, jsonl.gz, html, md, csv, txt",deleteSuccess:"删除成功",deleteFailed:"删除失败",maxSize:"文件最大大小为",sameName:"文件名已存在",success:"上传成功",failed:"上传失败"},renderer:{downloadZipFile:"下载压缩文件",close:"关闭",fileInfo:"文件信息",fileSize:"文件大小",author:"作者",lastModified:"最后更新时间",returnToParent:"返回上级目录",fullscreen:"全屏",exitFullscreen:"退出全屏",prevPage:"上一页",nextPage:"下一页",openInNewTab:"新标签页打开",downloadFile:"下载完整文件",copyFullPath:"复制完整路径",showDirInfo:"显示目录信息",dirInfo:"目录信息",copied:"已复制到剪贴板",iKnow:"我知道了",addNow:"立即添加",noPermission:"暂无查看权限",needPermission:"如需获取查看权限,请选择AK&SK并添加此地址",pathNotExist:"路径不存在或没有此路径访问权限",ifPathExists:"如路径存在,可自行添加路径授权访问",step1AddKey:"Step1. 新增密钥:添加对目标路径有权限的S3密钥",step2AddPath:"Step2. 添加地址:使用此密钥添加地址授权访问",arrayTypeRequired:"必须为数组类型",confirm:"确定",clear:"清空",baseUrlEffect:"效果:/abc.css => https://example.com/abc.css",convertToFullUrl:"将绝对路径转换为完整URL",cancelLineWrap:"取消换行",lineWrap:"换行",closePreview:"关闭预览",openPreview:"预览",katexDesc:"适合常见md文档,渲染速度快",mathjaxDesc:"适合复杂数学公式,渲染速度慢",raw:"原始内容",image:"图片",html:"网页",json:"JSON",markdown:"Markdown",contentList:"内容列表",imgList:"图片列表"},fullscreen:{exitFullscreenFailed:"退出全屏失败",enterFullscreenFailed:"进入全屏失败"},bucket:{fileDirectory:"文件目录",prevPage:"上一页",nextPage:"下一页",returnToParent:"返回上级目录",searchPath:"检索路径",copyPath:"复制路径",directory:"目录",pathMustStartWithS3:"路径必须以s3://开头",searchPlaceholder:"输入地址检索",duplicatedBuckets:"存在多个 Bucket,请选择一个"},textPreviewer:{prevSection:"上一段",nextSection:"下一段"},codeViewer:{unparsableData:"不可解析成字符串的数据的数据"},addFirstBucket:"添加第一个 Bucket",currentSupport:"目前支持的云存储平台:",supportedCloudPlatforms:{huawei:"华为云",tencent:"腾讯云",sensetime:"商汤大装置AOS",aws:"AWS",aliyun:"阿里云 OSS",inspur:"浪潮云",microsoft:"微软 Azure"}}}};Ke.use(Nd).use(hd).init({resources:Bd,fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});function pu(e){return e&&typeof e=="object"&&!Array.isArray(e)}function mu(e,...t){if(!t.length)return e;const r=t.shift();if(pu(e)&&pu(r))for(const n in r)pu(r[n])?(e[n]||Object.assign(e,{[n]:{}}),mu(e[n],r[n])):Object.assign(e,{[n]:r[n]});return mu(e,...t)}const sN=(e,t)=>{const[r,n]=W.useState(()=>{try{const i=localStorage.getItem(e);return typeof i!="string"?(localStorage.setItem(e,JSON.stringify(t)),t):JSON.parse(i)}catch{return t}});return W.useEffect(()=>{try{const i=JSON.stringify(r);localStorage.setItem(e,i)}catch{}}),[r,n]},gu="labelu-lang-change";function lN(e){const{locales:t,children:r,locale:n}=e,[,i]=sN("lang",()=>Ke.language);W.useEffect(()=>{n&&(Ke.changeLanguage(n),i(n))},[n,i]);const a=W.useCallback(o=>{Ke.changeLanguage(o.detail),i(o.detail)},[i]);return W.useEffect(()=>(document.addEventListener(gu,a),()=>{document.removeEventListener(gu,a)}),[a]),W.useEffect(()=>{i(Ke.language)},[Ke.language]),W.useEffect(()=>{t&&Object.keys(t||{}).forEach(o=>{Ke.addResourceBundle(o,"translation",mu({},Bd[o],t[o]),!0)})},[t]),j.jsx(gd,{i18n:Ke,children:r})}const uN=e=>{Ke.changeLanguage(e),localStorage.setItem("lang",e),document.dispatchEvent(new CustomEvent(gu,{detail:e}))};function $d(e){let t;if(!e)return;const r=e.split("?")[0];return Zd(r)&&(t="video"),qd(r)&&(t="image"),zd(r)&&(t="audio"),Xd(r)&&(t="zip"),r.endsWith("/")&&(t="folder"),(r.endsWith(".html")||r.endsWith(".htm")||r.endsWith(".xhtml"))&&(t="html"),r.endsWith(".csv")&&(t="csv"),(r.endsWith(".jsonl")||r.endsWith(".jsonl.gz")||r.endsWith(".warc")||r.endsWith(".warc.gz"))&&(t="jsonl"),r.endsWith(".json")&&(t="json"),(r.endsWith(".md")||r.endsWith(".markdown"))&&(t="markdown"),r.endsWith(".pdf")&&(t="pdf"),r.endsWith(".xml")&&(t="xml"),r.endsWith(".py")&&(t="python"),(r.endsWith(".xls")||r.endsWith(".xlsx"))&&(t="csv"),(r.endsWith(".ppt")||r.endsWith(".PPT"))&&(t="ppt"),r.endsWith(".epub")&&(t="epub"),r.endsWith(".mobi")&&(t="mobi"),t}function cN(e,t){let r=e.path;return r.startsWith("s3://")||(r=`${t}${r}`),["bucket","directory"].includes(e.type)&&!r.endsWith("/")&&(r=`${r}/`),r}function G6(){return Math.random().toString(36).substr(2)}function ks(e,t,r){if(e==null)return r;if(Array.isArray(t))return jd(e,t,r);const n=QN(t);return jd(e,n,r)}function QN(e){if(!e)return[];const t=[];let r=0;const n=e.length;let i="";for(;r<n;){let a=e[r];if(a==="["){if(i&&(t.push(i),i=""),r++,e[r]==='"'||e[r]==="'"){const o=e[r];for(r++;r<n&&e[r]!==o;)i+=e[r],r++;r++}else{for(;r<n&&e[r]!=="]";)i+=e[r],r++;/^\d+$/.test(i)&&(t.push(parseInt(i,10)),i="")}e[r]==="]"&&r++,i&&(t.push(i),i="")}else a==="."?(i&&(t.push(i),i=""),r++):(i+=a,r++)}return i&&t.push(i),t}function jd(e,t,r){if(!t.length)return e;let n=e;for(let i=0;i<t.length;i++){if(n==null)return r;n=n[t[i]]}return n===void 0?r:n}function Fd(e){if(typeof e!="string")return{headers:[],data:[]};const t=e.split(`
|
|
85
|
-
`),r=t[0].split(","),n=t.slice(1).map(i=>{const a={};return i.split(",").forEach((o,s)=>{a[r[s]]=o}),a});return{headers:r,data:n}}function qd(e){return/\.(?:jpg|jpeg|png|gif|bmp|webp)$/.test(e)&&!e.endsWith("/")}function Zd(e){return/\.(?:mp4|avi|flv|wmv|mov|webm)$/.test(e)&&!e.endsWith("/")}function zd(e){return/\.(?:mp3|wav|wma|ogg|flac)$/.test(e)&&!e.endsWith("/")}function Xd(e){return/\.(?:zip|rar|7z|tar|gz|bz2)$/.test(e)&&!e.endsWith("/")}function Ud(e){if(!e||typeof e!="string")return"";const t=new URL(e).pathname;return decodeURIComponent(t.split("/").pop()??"")}function Ds(e){if(typeof e!="string"||!e)return;const t=e.match(/bytes=(\d+),(\d+)/);if(t)return{byte:Number(t[1]),size:Number(t[2])}}function Wd(e){if(!e)return"";const[t,r]=e.split("?"),n=Ds(r);return n?`${t}?bytes=${n.byte+n.size},0`:""}function TN(e){return e.startsWith("s3://")?e.split("s3://")[1].split("/")[0]:""}function Gd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Gd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Yd(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Gd(e))&&(n&&(n+=" "),n+=t);return n}const Kd=W.createContext({});function d4(){const e=W.useContext(Kd);if(!e)throw new Error("usePreviewBlockContext must be used within a PreviewBlockProvider");return e}const fN={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},hN=Object.prototype.toString;function Ge(e){const t=hN.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t==="file"?"object":t}const dN="object",pN="array";function mN(e,t={}){return e.replace(/\{\{\w+\}\}/g,r=>{const n=r.replace(/[{}]/g,""),i=t[n],a=Ge(i);return a===dN||a===pN?JSON.stringify(i):i})}function gN(e,t,r=e){var n;const i=(n=fN[e])!==null&&n!==void 0?n:r;return mN(i,t)}function ON(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function yN(e,t){return{type:"error",name:e,code:ON(e),message:gN(e,t),data:t}}function Ae(e){return yN.bind(null,e)}function x5(e,t=[]){for(let r=0;r<e.length;r+=1){const n=e[r];Array.isArray(n)?x5(n,t):t.push(n)}return t}const L5={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:["_id"],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function b5(e,t,r){const n={...t};return Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:()=>({index:r,schema:e})}),n}function q1(e){return e?.type==="error"}function vN(e){return e instanceof Promise}function Vs(e){return q1(e)||vN(e)}const{DECLARATOR_ONEOF:Y6}=L5;function xN(e,t,r=e.rootSchema,n="#"){if(t!=null&&r[Y6]){const o=[],s=r[Y6],l=t[r[Y6]];if(l===void 0)return e.errors.missingOneOfPropertyError({property:s,pointer:n,schema:r,value:t});for(let u=0;u<r.oneOf.length;u+=1){const c=e.resolveRef(r.oneOf[u]),Q=e.step(s,c,t,n);if(q1(Q))return Q;let T=x5(e.validate(l,Q,n));if(T=T.filter(Vs),T.length>0)o.push(...T);else return b5(r,c,u)}return e.errors.oneOfPropertyError({property:s,value:l,pointer:n,schema:r,errors:o})}const i=[],a=[];for(let o=0;o<r.oneOf.length;o+=1){const s=e.resolveRef(r.oneOf[o]);let l=x5(e.validate(t,s,n));l=l.filter(Vs),l.length>0?a.push(...l):i.push({index:o,schema:s})}return i.length===1?b5(r,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:n,schema:r,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf,errors:a})}function LN(e,t,r,n){if(r==null||t.properties==null)return-1;let i=0;const a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){const s=a[o];r[s]!=null&&e.isValid(r[s],t.properties[s],n)&&(i+=1)}return i}function Ou(e,t,r=e.rootSchema,n="#"){if(t!=null&&r[Y6]){const a=[],o=r[Y6],s=t[r[Y6]];if(s===void 0)return e.errors.missingOneOfPropertyError({property:o,pointer:n,schema:r,value:t});for(let l=0;l<r.oneOf.length;l+=1){const u=e.resolveRef(r.oneOf[l]),c=e.step(o,u,t,n);if(q1(c))return c;let Q=x5(e.validate(s,c,n));if(Q=Q.filter(Vs),Q.length>0)a.push(...Q);else return b5(r,u,l)}return e.errors.oneOfPropertyError({property:o,value:s,pointer:n,schema:r,errors:a})}const i=[];for(let a=0;a<r.oneOf.length;a+=1){const o=e.resolveRef(r.oneOf[a]);e.isValid(t,o,n)&&i.push({schema:o,index:a})}if(i.length===1)return b5(r,i[0].schema,i[0].index);if(Ge(t)==="object"){let a,o=-1,s=0;for(let l=0;l<r.oneOf.length;l+=1){const u=e.resolveRef(r.oneOf[l]),c=LN(e,u,t);s<c&&(s=c,a=r.oneOf[l],o=l)}return a===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf}):b5(r,a,o)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:n,schema:r,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf})}const bN=(e,t,r,n)=>{if(Array.isArray(t.oneOf)){const i=e.resolveOneOf(r,t,n);if(q1(i))return i}};var yu,Jd;function SN(){if(Jd)return yu;Jd=1;var e=function(p){return t(p)&&!r(p)};function t(d){return!!d&&typeof d=="object"}function r(d){var p=Object.prototype.toString.call(d);return p==="[object RegExp]"||p==="[object Date]"||a(d)}var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103;function a(d){return d.$$typeof===i}function o(d){return Array.isArray(d)?[]:{}}function s(d,p){return p.clone!==!1&&p.isMergeableObject(d)?m(o(d),d,p):d}function l(d,p,y){return d.concat(p).map(function(x){return s(x,y)})}function u(d,p){if(!p.customMerge)return m;var y=p.customMerge(d);return typeof y=="function"?y:m}function c(d){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d).filter(function(p){return Object.propertyIsEnumerable.call(d,p)}):[]}function Q(d){return Object.keys(d).concat(c(d))}function T(d,p){try{return p in d}catch{return!1}}function f(d,p){return T(d,p)&&!(Object.hasOwnProperty.call(d,p)&&Object.propertyIsEnumerable.call(d,p))}function h(d,p,y){var x={};return y.isMergeableObject(d)&&Q(d).forEach(function(O){x[O]=s(d[O],y)}),Q(p).forEach(function(O){f(d,O)||(T(d,O)&&y.isMergeableObject(p[O])?x[O]=u(O,y)(d[O],p[O],y):x[O]=s(p[O],y))}),x}function m(d,p,y){y=y||{},y.arrayMerge=y.arrayMerge||l,y.isMergeableObject=y.isMergeableObject||e,y.cloneUnlessOtherwiseSpecified=s;var x=Array.isArray(p),O=Array.isArray(d),v=x===O;return v?x?y.arrayMerge(d,p,y):h(d,p,y):s(p,y)}m.all=function(p,y){if(!Array.isArray(p))throw new Error("first argument should be an array");return p.reduce(function(x,O){return m(x,O,y)},{})};var g=m;return yu=g,yu}var EN=SN();const ep=Rr(EN),HN=(e,t)=>t,tp=(e,t)=>ep(e,t,{arrayMerge:HN}),_N=(e,t)=>{const r=e.concat(t);return r.filter((n,i)=>r.indexOf(n)===i)},wN=(e,t)=>ep(e,t,{arrayMerge:_N});function y1(e,t){const r=Ge(e),n=Ge(t);if(r!==n)return e;const i=wN(e,t);return e.getOneOfOrigin?Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),i}function S5(e,...t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),e.getOneOfOrigin&&Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),r}var CN=Function.prototype.toString,vu=Object.create,AN=Object.prototype.toString,MN=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e}();function PN(){return new MN}function kN(){return new WeakMap}var DN=typeof WeakMap<"u"?kN:PN;function xu(e){if(!e)return vu(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:vu(e);if(t&&~CN.call(t).indexOf("[native code]"))try{return new t}catch{}return vu(e)}function VN(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function RN(e){return e.flags}var IN=/test/g.flags==="g"?RN:VN;function rp(e){var t=AN.call(e);return t.substring(8,t.length-1)}function NN(e){return e[Symbol.toStringTag]||rp(e)}var BN=typeof Symbol<"u"?NN:rp,$N=Object.defineProperty,jN=Object.getOwnPropertyDescriptor,np=Object.getOwnPropertyNames,Lu=Object.getOwnPropertySymbols,ip=Object.prototype,ap=ip.hasOwnProperty,FN=ip.propertyIsEnumerable,op=typeof Lu=="function";function qN(e){return np(e).concat(Lu(e))}var ZN=op?qN:np;function Rs(e,t,r){for(var n=ZN(e),i=0,a=n.length,o=void 0,s=void 0;i<a;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(s=jN(e,o),!s){t[o]=r.copier(e[o],r);continue}!s.get&&!s.set&&(s.value=r.copier(s.value,r));try{$N(t,o,s)}catch{t[o]=s.value}}return t}function zN(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function XN(e,t){var r=new t.Constructor;return t.cache.set(e,r),Rs(e,r,t)}function sp(e,t){return e.slice(0)}function UN(e,t){return e.slice(0,e.size,e.type)}function WN(e,t){return new t.Constructor(sp(e.buffer))}function GN(e,t){return new t.Constructor(e.getTime())}function lp(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function YN(e,t){return Rs(e,lp(e,t),t)}function KN(e,t){var r=xu(t.prototype);t.cache.set(e,r);for(var n in e)ap.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function JN(e,t){var r=xu(t.prototype);t.cache.set(e,r);for(var n in e)ap.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=Lu(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],FN.call(e,s)&&(r[s]=t.copier(e[s],t));return r}var eB=op?JN:KN;function tB(e,t){var r=xu(t.prototype);return t.cache.set(e,r),Rs(e,r,t)}function bu(e,t){return new t.Constructor(e.valueOf())}function rB(e,t){var r=new t.Constructor(e.source,IN(e));return r.lastIndex=e.lastIndex,r}function Is(e,t){return e}function up(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function nB(e,t){return Rs(e,up(e,t),t)}var iB=Array.isArray,Su=Object.assign,aB=Object.getPrototypeOf||function(e){return e.__proto__},cp={array:zN,arrayBuffer:sp,blob:UN,dataView:WN,date:GN,error:Is,map:lp,object:eB,regExp:rB,set:up},oB=Su({},cp,{array:XN,map:YN,object:tB,set:nB});function sB(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:bu,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:bu,Object:e.object,Promise:Is,RegExp:e.regExp,Set:e.set,String:bu,WeakMap:Is,WeakSet:Is,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Qp(e){var t=Su({},cp,e),r=sB(t),n=r.Array,i=r.Object;function a(o,s){if(s.prototype=s.Constructor=void 0,!o||typeof o!="object")return o;if(s.cache.has(o))return s.cache.get(o);if(s.prototype=aB(o),s.Constructor=s.prototype&&s.prototype.constructor,!s.Constructor||s.Constructor===Object)return i(o,s);if(iB(o))return n(o,s);var l=r[BN(o)];return l?l(o,s):typeof o.then=="function"?o:i(o,s)}return function(s){return a(s,{Constructor:void 0,cache:DN(),copier:a,prototype:void 0})}}function lB(e){return Qp(Su({},oB,e))}lB({});var Ns=Qp({});function Bs(e,t,r){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){const n=e.validate(r,e.resolveRef(t.if));if(n.length===0&&t.then)return e.resolveRef(t.then);if(n.length!==0&&t.else)return e.resolveRef(t.else)}}}const uB=(e,t,r,n)=>{const i=Bs(e,t,r);if(i)return e.validate(r,i,n)};function Tp(e,t,r){var n;const i={...(n=e.resolveRef(t))!==null&&n!==void 0?n:{}},a=Bs(e,i,r);return a||S5(i,"if","then","else")}function cB(e,t,r=e.rootSchema){let n=Ns(r);for(let i=0;i<r.allOf.length;i+=1){const a=Tp(e,r.allOf[i],t);n=y1(n,a)}return delete n.allOf,n}function fp(e,t){const{allOf:r}=t;if(!Array.isArray(r)||r.length===0)return;let n={};return r.forEach(i=>{n=y1(n,e.resolveRef(i))}),n}const QB=(e,t,r,n)=>{const{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;const a=[];return t.allOf.forEach(o=>{a.push(...e.validate(r,o,n))}),a};function TB(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function fB(e){return e.filter((t,r)=>e.indexOf(t)===r)}function M3(e){return Ge(e)==="object"}function hp(e,t,r){const{dependencies:n}=t;if(!M3(n)||!M3(r))return;let i=!1,a={required:[]};if(Object.keys(n).forEach(o=>{var s,l;if(r[o]==null&&!(!((s=t.required)===null||s===void 0)&&s.includes(o)||!((l=a.required)===null||l===void 0)&&l.includes(o)))return;const u=n[o];if(Array.isArray(u)){i=!0,a.required.push(...u);return}if(M3(u)){i=!0,a=y1(a,e.resolveRef(u));return}}),i)return a.required=fB(a.required),a}const hB=(e,t,r,n)=>{if(Ge(t.dependencies)!=="object")return;const i=[];return Object.keys(r).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:n,schema:t,value:r}));return}let o;const s=Ge(t.dependencies[a]);if(s==="array")o=t.dependencies[a].filter(l=>r[l]===void 0).map(l=>e.errors.missingDependencyError({missingProperty:l,pointer:n,schema:t,value:r}));else if(s==="object")o=e.validate(r,t.dependencies[a],n);else throw new Error(`Invalid dependency definition for ${n}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function dp(e,t,r){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let n;return t.anyOf.forEach(i=>{i=e.resolveRef(i),e.isValid(r,i)&&(n=n?y1(n,i):i)}),n}function dB(e,t,r=e.rootSchema,n="#"){const{anyOf:i}=r;if(!Array.isArray(i)||i.length===0)return r;const a=dp(e,r,t);if(a==null)return e.errors.anyOfError({pointer:n,schema:r,value:t,anyOf:JSON.stringify(i)});const o=y1(r,a);return S5(o,"anyOf")}const pB=(e,t,r,n)=>{if(!(!Array.isArray(t.anyOf)||t.anyOf.length===0)){for(let i=0;i<t.anyOf.length;i+=1)if(e.isValid(r,t.anyOf[i]))return;return e.errors.anyOfError({pointer:n,schema:t,value:r,anyOf:t.anyOf})}},pp=["allOf","anyOf","oneOf","dependencies","if","then","else"],mB=["allOf","anyOf","oneOf","dependencies","if"];function gB(e){const t=Object.keys(e);return mB.findIndex(r=>t.includes(r))!==-1}function Eu(e,t,r,n){let i,a;if(t=e.resolveRef(t),t.oneOf){const c=Ou(e,r,t,n);q1(c)?a=c:c&&(i=y1(i??{},c))}if(Array.isArray(t.allOf)){const c=t.allOf.map(Q=>{if(gB(Q)){let T=Eu(e,Q,r,n);return T?(T=y1(Q,T),S5(T,...pp)):void 0}return Q});if(c.length>0){const Q=fp(e,{allOf:c});i=y1(i??{},Q)}}const o=dp(e,t,r);o&&(i=y1(i??{},o));const s=hp(e,t,r);s&&(i=y1(i??{},s));const l=Bs(e,t,r);if(l&&(i=y1(i??{},l)),i==null)return a;const u=Eu(e,i,r,n);return u&&(i=y1(i,u)),S5(i,...pp)}const OB=["allOf","anyOf","oneOf","dependencies","if","then","else"];function mp(e,t,r,n){let i=Eu(e,t,r,n);return i?(i=y1(t,i),S5(i,...OB)):t}class yB{constructor(t,r){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=t,this.typeKeywords=Ns(t.typeKeywords),this.validateKeyword=Object.assign({},t.validateKeyword),this.validateType=Object.assign({},t.validateType),this.validateFormat=Object.assign({},t.validateFormat),this.errors=Object.assign({},t.errors),this.setSchema(r)}get rootSchema(){return this.__rootSchema}set rootSchema(t){t!=null&&(this.__rootSchema=this.config.compileSchema(this,t))}addRemoteSchema(t,r){this.config.addRemoteSchema(this,t,r)}compileSchema(t){var r;return this.config.compileSchema(this,t,(r=this.rootSchema)!==null&&r!==void 0?r:t)}createSchemaOf(t){return this.config.createSchemaOf(t)}each(t,r,n,i){return this.config.each(this,t,r,n,i)}eachSchema(t,r=this.rootSchema){return this.config.eachSchema(r,t)}getChildSchemaSelection(t,r){return this.config.getChildSchemaSelection(this,t,r)}getSchema(t){return this.config.getSchema(this,t)}getTemplate(t,r,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,t,r,n)}isValid(t,r,n){return this.config.isValid(this,t,r,n)}resolveAnyOf(t,r,n){return this.config.resolveAnyOf(this,t,r,n)}resolveAllOf(t,r){return this.config.resolveAllOf(this,t,r)}resolveRef(t){return this.config.resolveRef(t,this.rootSchema)}resolveOneOf(t,r,n){return this.config.resolveOneOf(this,t,r,n)}setSchema(t){this.rootSchema=t}step(t,r,n,i){return this.config.step(this,t,r,n,i)}validate(t,r,n){return this.config.validate(this,t,r,n)}}function vB(e,t,r){r.id=r.id||t,e.remotes[t]=e.compileSchema(r)}var $s={exports:{}},xB=$s.exports,gp;function LB(){return gp||(gp=1,function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:xB,()=>(()=>{var r={d:(w,M)=>{for(var P in M)r.o(M,P)&&!r.o(w,P)&&Object.defineProperty(w,P,{enumerable:!0,get:M[P]})},o:(w,M)=>Object.prototype.hasOwnProperty.call(w,M),r:w=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})}},n={};function i(w){return w==="#"||w===""||Array.isArray(w)&&w.length===0||!1}r.r(n),r.d(n,{default:()=>A,get:()=>T,isRoot:()=>i,join:()=>E,remove:()=>O,removeUndefinedItems:()=>x,set:()=>d,split:()=>Q,splitLast:()=>C});const a=/~1/g,o=/~0/g,s=/\/+/g,l=/(^[#/]*|\/+$)/g;function u(w){return w.replace(a,"/").replace(o,"~")}function c(w){return u(decodeURIComponent(w))}function Q(w){if(w==null||typeof w!="string"||i(w))return Array.isArray(w)?w:[];const M=w.indexOf("#")>=0?c:u,P=(w=(w=w.replace(s,"/")).replace(l,"")).split("/");for(let N=0,B=P.length;N<B;N+=1)P[N]=M(P[N]);return P}function T(w,M,P=void 0){if(M==null||w==null)return P;if(i(M))return w;const N=f(w,Q(M));return N===void 0?P:N}function f(w,M){const P=M.shift();if(w!==void 0)return P!==void 0?f(w[P],M):w}const h=/^\[.*\]$/,m=/^\[(.+)\]$/;function g(w,M){return w==="__proto__"||w=="constructor"&&M.length>0&&M[0]=="prototype"}function d(w,M,P){if(M==null)return w;const N=Q(M);if(N.length===0)return w;w==null&&(w=h.test(N[0])?[]:{});let B,I,V=w;for(;N.length>1;)B=N.shift(),I=h.test(N[0]),g(B,N)||(V=y(V,B,I));return B=N.pop(),p(V,B,P),w}function p(w,M,P){let N;const B=M.match(m);M==="[]"&&Array.isArray(w)?w.push(P):B?(N=B.pop(),w[N]=P):w[M]=P}function y(w,M,P){if(w[M]!=null)return w[M];const N=P?[]:{};return p(w,M,N),N}function x(w){let M=0,P=0;for(;M+P<w.length;)w[M+P]===void 0&&(P+=1),w[M]=w[M+P],M+=1;return w.length=w.length-P,w}function O(w,M,P){const N=Q(M),B=N.pop(),I=T(w,N);return I&&delete I[B],Array.isArray(I)&&P!==!0&&x(I),w}const v=/\/+/g,L=/~/g,b=/\//g;function S(w,M){if(w.length===0)return M?"#":"";for(let P=0,N=w.length;P<N;P+=1)w[P]=w[P].replace(L,"~0").replace(b,"~1"),M&&(w[P]=encodeURIComponent(w[P]));return((M?"#/":"/")+w.join("/")).replace(v,"/")}function E(w,...M){const P=[];if(Array.isArray(w))return S(w,arguments[1]===!0);const N=arguments[arguments.length-1],B=typeof N=="boolean"?N:w&&w[0]==="#";for(let V=0,_=arguments.length;V<_;V+=1)P.push.apply(P,Q(arguments[V]));const I=[];for(let V=0,_=P.length;V<_;V+=1)if(P[V]===".."){if(I.length===0)return B?"#":"";I.pop()}else I.push(P[V]);return S(I,B)}function C(w){const M=Q(w);if(M.length===0)return typeof w=="string"&&w[0]==="#"?["#",M[0]]:["",void 0];if(M.length===1)return w[0]==="#"?["#",M[0]]:["",M[0]];const P=M.pop();return[E(M,w[0]==="#"),P]}const A={get:T,set:d,remove:O,join:E,split:Q,splitLast:C,isRoot:i,removeUndefinedItems:x};return n})())}($s)),$s.exports}var K6=LB();const E5=Rr(K6);var js={},M1={},H5={},Op;function bB(){if(Op)return H5;Op=1,Object.defineProperty(H5,"__esModule",{value:!0}),H5.TokenError=void 0;let e=class extends Error{constructor(r,n){if(super(r),this.message=r,this.token=n,n&&n.errors)n.errors.push(this);else throw this}inspect(){return"SyntaxError: "+this.message}};return H5.TokenError=e,H5}var yp;function SB(){if(yp)return M1;yp=1,Object.defineProperty(M1,"__esModule",{value:!0}),M1.Parser=M1.findRuleByName=M1.parseRuleName=M1.escapeRegExp=M1.readToken=void 0;const e=/^[A-Z0-9_]+$/,t=/(\?|\+|\*)$/,r=/^(@|&|!)/,n="WS",i=bB();function a(m,g){let d=g.exec(m);return d&&d.index==0?d[0].length==0&&g.source.length>0?null:{type:null,text:d[0],rest:m.substr(d[0].length),start:0,end:d[0].length-1,fullText:d[0],errors:[],children:[],parent:null}:null}M1.readToken=a;function o(m){return m.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}M1.escapeRegExp=o;function s(m){m.rest="",m.children&&m.children.forEach(g=>s(g))}function l(m,g){m.start+=g,m.end+=g,m.children&&m.children.forEach(d=>l(d,m.start))}function u(m,g){g.errors&&g.errors.length&&g.errors.forEach(d=>m.push(d)),g.children&&g.children.forEach(d=>u(m,d))}function c(m){let g=t.exec(m),d=r.exec(m),p=g&&g[0]||"",y=d&&d[0]||"",x={raw:m,name:m.replace(t,"").replace(r,""),isOptional:p=="?"||p=="*",allowRepetition:p=="+"||p=="*",atLeastOne:p=="+",lookupPositive:y=="&",lookupNegative:y=="!",pinned:y=="@",lookup:!1,isLiteral:!1};return x.isLiteral=x.name[0]=="'"||x.name[0]=='"',x.lookup=x.lookupNegative||x.lookupPositive,x}M1.parseRuleName=c;function Q(m,g){let d=c(m);return g.cachedRules[d.name]||null}M1.findRuleByName=Q;function T(m,g){if(m.children){let d=m.children.filter(p=>p.type&&g.test(p.type));for(let p=0;p<d.length;p++){let y=m.children.indexOf(d[p]);y!=-1&&m.children.splice(y,1)}m.children.forEach(p=>T(p,g))}}const f=["EOF"];class h{constructor(g,d){this.grammarRules=g,this.options=d,this.cachedRules={},this.debug=d?d.debug===!0:!1;let p=[],y=[];if(g.forEach(x=>{let O=c(x.name);if(O.name in this.cachedRules){p.push("Duplicated rule "+O.name);return}else this.cachedRules[O.name]=x;if(!x.bnf||!x.bnf.length){let v="Missing rule content, rule: "+x.name;p.indexOf(v)==-1&&p.push(v)}else x.bnf.forEach(v=>{if(typeof v[0]=="string"&&c(v[0]).name==x.name){let b="Left recursion is not allowed, rule: "+x.name;p.indexOf(b)==-1&&p.push(b)}v.forEach(L=>{if(typeof L=="string"){let b=c(L);!b.isLiteral&&y.indexOf(b.name)==-1&&f.indexOf(b.name)==-1&&y.push(b.name)}})});n==x.name&&(x.implicitWs=!1),x.implicitWs&&y.indexOf(n)==-1&&y.push(n),x.recover&&y.indexOf(x.recover)==-1&&y.push(x.recover)}),y.forEach(x=>{x in this.cachedRules||p.push("Missing rule "+x)}),p.length)throw new Error(p.join(`
|
|
85
|
+
`),r=t[0].split(","),n=t.slice(1).map(i=>{const a={};return i.split(",").forEach((o,s)=>{a[r[s]]=o}),a});return{headers:r,data:n}}function qd(e){return/\.(?:jpg|jpeg|png|gif|bmp|tiff|svg|webp)$/.test(e)&&!e.endsWith("/")}function Zd(e){return/\.(?:mp4|avi|flv|wmv|mov|webm)$/.test(e)&&!e.endsWith("/")}function zd(e){return/\.(?:mp3|wav|wma|ogg|flac)$/.test(e)&&!e.endsWith("/")}function Xd(e){return/\.(?:zip|rar|7z|tar|gz|bz2)$/.test(e)&&!e.endsWith("/")}function Ud(e){if(!e||typeof e!="string")return"";const t=new URL(e).pathname;return decodeURIComponent(t.split("/").pop()??"")}function Ds(e){if(typeof e!="string"||!e)return;const t=e.match(/bytes=(\d+),(\d+)/);if(t)return{byte:Number(t[1]),size:Number(t[2])}}function Wd(e){if(!e)return"";const[t,r]=e.split("?"),n=Ds(r);return n?`${t}?bytes=${n.byte+n.size},0`:""}function TN(e){return e.startsWith("s3://")?e.split("s3://")[1].split("/")[0]:""}function Gd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Gd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Yd(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Gd(e))&&(n&&(n+=" "),n+=t);return n}const Kd=W.createContext({});function d4(){const e=W.useContext(Kd);if(!e)throw new Error("usePreviewBlockContext must be used within a PreviewBlockProvider");return e}const fN={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},hN=Object.prototype.toString;function Ge(e){const t=hN.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t==="file"?"object":t}const dN="object",pN="array";function mN(e,t={}){return e.replace(/\{\{\w+\}\}/g,r=>{const n=r.replace(/[{}]/g,""),i=t[n],a=Ge(i);return a===dN||a===pN?JSON.stringify(i):i})}function gN(e,t,r=e){var n;const i=(n=fN[e])!==null&&n!==void 0?n:r;return mN(i,t)}function ON(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function yN(e,t){return{type:"error",name:e,code:ON(e),message:gN(e,t),data:t}}function Ae(e){return yN.bind(null,e)}function x5(e,t=[]){for(let r=0;r<e.length;r+=1){const n=e[r];Array.isArray(n)?x5(n,t):t.push(n)}return t}const L5={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:["_id"],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function b5(e,t,r){const n={...t};return Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:()=>({index:r,schema:e})}),n}function q1(e){return e?.type==="error"}function vN(e){return e instanceof Promise}function Vs(e){return q1(e)||vN(e)}const{DECLARATOR_ONEOF:Y6}=L5;function xN(e,t,r=e.rootSchema,n="#"){if(t!=null&&r[Y6]){const o=[],s=r[Y6],l=t[r[Y6]];if(l===void 0)return e.errors.missingOneOfPropertyError({property:s,pointer:n,schema:r,value:t});for(let u=0;u<r.oneOf.length;u+=1){const c=e.resolveRef(r.oneOf[u]),Q=e.step(s,c,t,n);if(q1(Q))return Q;let T=x5(e.validate(l,Q,n));if(T=T.filter(Vs),T.length>0)o.push(...T);else return b5(r,c,u)}return e.errors.oneOfPropertyError({property:s,value:l,pointer:n,schema:r,errors:o})}const i=[],a=[];for(let o=0;o<r.oneOf.length;o+=1){const s=e.resolveRef(r.oneOf[o]);let l=x5(e.validate(t,s,n));l=l.filter(Vs),l.length>0?a.push(...l):i.push({index:o,schema:s})}return i.length===1?b5(r,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:n,schema:r,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf,errors:a})}function LN(e,t,r,n){if(r==null||t.properties==null)return-1;let i=0;const a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){const s=a[o];r[s]!=null&&e.isValid(r[s],t.properties[s],n)&&(i+=1)}return i}function Ou(e,t,r=e.rootSchema,n="#"){if(t!=null&&r[Y6]){const a=[],o=r[Y6],s=t[r[Y6]];if(s===void 0)return e.errors.missingOneOfPropertyError({property:o,pointer:n,schema:r,value:t});for(let l=0;l<r.oneOf.length;l+=1){const u=e.resolveRef(r.oneOf[l]),c=e.step(o,u,t,n);if(q1(c))return c;let Q=x5(e.validate(s,c,n));if(Q=Q.filter(Vs),Q.length>0)a.push(...Q);else return b5(r,u,l)}return e.errors.oneOfPropertyError({property:o,value:s,pointer:n,schema:r,errors:a})}const i=[];for(let a=0;a<r.oneOf.length;a+=1){const o=e.resolveRef(r.oneOf[a]);e.isValid(t,o,n)&&i.push({schema:o,index:a})}if(i.length===1)return b5(r,i[0].schema,i[0].index);if(Ge(t)==="object"){let a,o=-1,s=0;for(let l=0;l<r.oneOf.length;l+=1){const u=e.resolveRef(r.oneOf[l]),c=LN(e,u,t);s<c&&(s=c,a=r.oneOf[l],o=l)}return a===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf}):b5(r,a,o)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:n,schema:r,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:n,schema:r,oneOf:r.oneOf})}const bN=(e,t,r,n)=>{if(Array.isArray(t.oneOf)){const i=e.resolveOneOf(r,t,n);if(q1(i))return i}};var yu,Jd;function SN(){if(Jd)return yu;Jd=1;var e=function(p){return t(p)&&!r(p)};function t(d){return!!d&&typeof d=="object"}function r(d){var p=Object.prototype.toString.call(d);return p==="[object RegExp]"||p==="[object Date]"||a(d)}var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103;function a(d){return d.$$typeof===i}function o(d){return Array.isArray(d)?[]:{}}function s(d,p){return p.clone!==!1&&p.isMergeableObject(d)?m(o(d),d,p):d}function l(d,p,y){return d.concat(p).map(function(x){return s(x,y)})}function u(d,p){if(!p.customMerge)return m;var y=p.customMerge(d);return typeof y=="function"?y:m}function c(d){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d).filter(function(p){return Object.propertyIsEnumerable.call(d,p)}):[]}function Q(d){return Object.keys(d).concat(c(d))}function T(d,p){try{return p in d}catch{return!1}}function f(d,p){return T(d,p)&&!(Object.hasOwnProperty.call(d,p)&&Object.propertyIsEnumerable.call(d,p))}function h(d,p,y){var x={};return y.isMergeableObject(d)&&Q(d).forEach(function(O){x[O]=s(d[O],y)}),Q(p).forEach(function(O){f(d,O)||(T(d,O)&&y.isMergeableObject(p[O])?x[O]=u(O,y)(d[O],p[O],y):x[O]=s(p[O],y))}),x}function m(d,p,y){y=y||{},y.arrayMerge=y.arrayMerge||l,y.isMergeableObject=y.isMergeableObject||e,y.cloneUnlessOtherwiseSpecified=s;var x=Array.isArray(p),O=Array.isArray(d),v=x===O;return v?x?y.arrayMerge(d,p,y):h(d,p,y):s(p,y)}m.all=function(p,y){if(!Array.isArray(p))throw new Error("first argument should be an array");return p.reduce(function(x,O){return m(x,O,y)},{})};var g=m;return yu=g,yu}var EN=SN();const ep=Rr(EN),HN=(e,t)=>t,tp=(e,t)=>ep(e,t,{arrayMerge:HN}),_N=(e,t)=>{const r=e.concat(t);return r.filter((n,i)=>r.indexOf(n)===i)},wN=(e,t)=>ep(e,t,{arrayMerge:_N});function y1(e,t){const r=Ge(e),n=Ge(t);if(r!==n)return e;const i=wN(e,t);return e.getOneOfOrigin?Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(i,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),i}function S5(e,...t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),e.getOneOfOrigin&&Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),r}var CN=Function.prototype.toString,vu=Object.create,AN=Object.prototype.toString,MN=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e}();function PN(){return new MN}function kN(){return new WeakMap}var DN=typeof WeakMap<"u"?kN:PN;function xu(e){if(!e)return vu(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:vu(e);if(t&&~CN.call(t).indexOf("[native code]"))try{return new t}catch{}return vu(e)}function VN(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function RN(e){return e.flags}var IN=/test/g.flags==="g"?RN:VN;function rp(e){var t=AN.call(e);return t.substring(8,t.length-1)}function NN(e){return e[Symbol.toStringTag]||rp(e)}var BN=typeof Symbol<"u"?NN:rp,$N=Object.defineProperty,jN=Object.getOwnPropertyDescriptor,np=Object.getOwnPropertyNames,Lu=Object.getOwnPropertySymbols,ip=Object.prototype,ap=ip.hasOwnProperty,FN=ip.propertyIsEnumerable,op=typeof Lu=="function";function qN(e){return np(e).concat(Lu(e))}var ZN=op?qN:np;function Rs(e,t,r){for(var n=ZN(e),i=0,a=n.length,o=void 0,s=void 0;i<a;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(s=jN(e,o),!s){t[o]=r.copier(e[o],r);continue}!s.get&&!s.set&&(s.value=r.copier(s.value,r));try{$N(t,o,s)}catch{t[o]=s.value}}return t}function zN(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function XN(e,t){var r=new t.Constructor;return t.cache.set(e,r),Rs(e,r,t)}function sp(e,t){return e.slice(0)}function UN(e,t){return e.slice(0,e.size,e.type)}function WN(e,t){return new t.Constructor(sp(e.buffer))}function GN(e,t){return new t.Constructor(e.getTime())}function lp(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function YN(e,t){return Rs(e,lp(e,t),t)}function KN(e,t){var r=xu(t.prototype);t.cache.set(e,r);for(var n in e)ap.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function JN(e,t){var r=xu(t.prototype);t.cache.set(e,r);for(var n in e)ap.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=Lu(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],FN.call(e,s)&&(r[s]=t.copier(e[s],t));return r}var eB=op?JN:KN;function tB(e,t){var r=xu(t.prototype);return t.cache.set(e,r),Rs(e,r,t)}function bu(e,t){return new t.Constructor(e.valueOf())}function rB(e,t){var r=new t.Constructor(e.source,IN(e));return r.lastIndex=e.lastIndex,r}function Is(e,t){return e}function up(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function nB(e,t){return Rs(e,up(e,t),t)}var iB=Array.isArray,Su=Object.assign,aB=Object.getPrototypeOf||function(e){return e.__proto__},cp={array:zN,arrayBuffer:sp,blob:UN,dataView:WN,date:GN,error:Is,map:lp,object:eB,regExp:rB,set:up},oB=Su({},cp,{array:XN,map:YN,object:tB,set:nB});function sB(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:bu,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:bu,Object:e.object,Promise:Is,RegExp:e.regExp,Set:e.set,String:bu,WeakMap:Is,WeakSet:Is,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Qp(e){var t=Su({},cp,e),r=sB(t),n=r.Array,i=r.Object;function a(o,s){if(s.prototype=s.Constructor=void 0,!o||typeof o!="object")return o;if(s.cache.has(o))return s.cache.get(o);if(s.prototype=aB(o),s.Constructor=s.prototype&&s.prototype.constructor,!s.Constructor||s.Constructor===Object)return i(o,s);if(iB(o))return n(o,s);var l=r[BN(o)];return l?l(o,s):typeof o.then=="function"?o:i(o,s)}return function(s){return a(s,{Constructor:void 0,cache:DN(),copier:a,prototype:void 0})}}function lB(e){return Qp(Su({},oB,e))}lB({});var Ns=Qp({});function Bs(e,t,r){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){const n=e.validate(r,e.resolveRef(t.if));if(n.length===0&&t.then)return e.resolveRef(t.then);if(n.length!==0&&t.else)return e.resolveRef(t.else)}}}const uB=(e,t,r,n)=>{const i=Bs(e,t,r);if(i)return e.validate(r,i,n)};function Tp(e,t,r){var n;const i={...(n=e.resolveRef(t))!==null&&n!==void 0?n:{}},a=Bs(e,i,r);return a||S5(i,"if","then","else")}function cB(e,t,r=e.rootSchema){let n=Ns(r);for(let i=0;i<r.allOf.length;i+=1){const a=Tp(e,r.allOf[i],t);n=y1(n,a)}return delete n.allOf,n}function fp(e,t){const{allOf:r}=t;if(!Array.isArray(r)||r.length===0)return;let n={};return r.forEach(i=>{n=y1(n,e.resolveRef(i))}),n}const QB=(e,t,r,n)=>{const{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;const a=[];return t.allOf.forEach(o=>{a.push(...e.validate(r,o,n))}),a};function TB(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function fB(e){return e.filter((t,r)=>e.indexOf(t)===r)}function M3(e){return Ge(e)==="object"}function hp(e,t,r){const{dependencies:n}=t;if(!M3(n)||!M3(r))return;let i=!1,a={required:[]};if(Object.keys(n).forEach(o=>{var s,l;if(r[o]==null&&!(!((s=t.required)===null||s===void 0)&&s.includes(o)||!((l=a.required)===null||l===void 0)&&l.includes(o)))return;const u=n[o];if(Array.isArray(u)){i=!0,a.required.push(...u);return}if(M3(u)){i=!0,a=y1(a,e.resolveRef(u));return}}),i)return a.required=fB(a.required),a}const hB=(e,t,r,n)=>{if(Ge(t.dependencies)!=="object")return;const i=[];return Object.keys(r).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:n,schema:t,value:r}));return}let o;const s=Ge(t.dependencies[a]);if(s==="array")o=t.dependencies[a].filter(l=>r[l]===void 0).map(l=>e.errors.missingDependencyError({missingProperty:l,pointer:n,schema:t,value:r}));else if(s==="object")o=e.validate(r,t.dependencies[a],n);else throw new Error(`Invalid dependency definition for ${n}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function dp(e,t,r){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let n;return t.anyOf.forEach(i=>{i=e.resolveRef(i),e.isValid(r,i)&&(n=n?y1(n,i):i)}),n}function dB(e,t,r=e.rootSchema,n="#"){const{anyOf:i}=r;if(!Array.isArray(i)||i.length===0)return r;const a=dp(e,r,t);if(a==null)return e.errors.anyOfError({pointer:n,schema:r,value:t,anyOf:JSON.stringify(i)});const o=y1(r,a);return S5(o,"anyOf")}const pB=(e,t,r,n)=>{if(!(!Array.isArray(t.anyOf)||t.anyOf.length===0)){for(let i=0;i<t.anyOf.length;i+=1)if(e.isValid(r,t.anyOf[i]))return;return e.errors.anyOfError({pointer:n,schema:t,value:r,anyOf:t.anyOf})}},pp=["allOf","anyOf","oneOf","dependencies","if","then","else"],mB=["allOf","anyOf","oneOf","dependencies","if"];function gB(e){const t=Object.keys(e);return mB.findIndex(r=>t.includes(r))!==-1}function Eu(e,t,r,n){let i,a;if(t=e.resolveRef(t),t.oneOf){const c=Ou(e,r,t,n);q1(c)?a=c:c&&(i=y1(i??{},c))}if(Array.isArray(t.allOf)){const c=t.allOf.map(Q=>{if(gB(Q)){let T=Eu(e,Q,r,n);return T?(T=y1(Q,T),S5(T,...pp)):void 0}return Q});if(c.length>0){const Q=fp(e,{allOf:c});i=y1(i??{},Q)}}const o=dp(e,t,r);o&&(i=y1(i??{},o));const s=hp(e,t,r);s&&(i=y1(i??{},s));const l=Bs(e,t,r);if(l&&(i=y1(i??{},l)),i==null)return a;const u=Eu(e,i,r,n);return u&&(i=y1(i,u)),S5(i,...pp)}const OB=["allOf","anyOf","oneOf","dependencies","if","then","else"];function mp(e,t,r,n){let i=Eu(e,t,r,n);return i?(i=y1(t,i),S5(i,...OB)):t}class yB{constructor(t,r){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=t,this.typeKeywords=Ns(t.typeKeywords),this.validateKeyword=Object.assign({},t.validateKeyword),this.validateType=Object.assign({},t.validateType),this.validateFormat=Object.assign({},t.validateFormat),this.errors=Object.assign({},t.errors),this.setSchema(r)}get rootSchema(){return this.__rootSchema}set rootSchema(t){t!=null&&(this.__rootSchema=this.config.compileSchema(this,t))}addRemoteSchema(t,r){this.config.addRemoteSchema(this,t,r)}compileSchema(t){var r;return this.config.compileSchema(this,t,(r=this.rootSchema)!==null&&r!==void 0?r:t)}createSchemaOf(t){return this.config.createSchemaOf(t)}each(t,r,n,i){return this.config.each(this,t,r,n,i)}eachSchema(t,r=this.rootSchema){return this.config.eachSchema(r,t)}getChildSchemaSelection(t,r){return this.config.getChildSchemaSelection(this,t,r)}getSchema(t){return this.config.getSchema(this,t)}getTemplate(t,r,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,t,r,n)}isValid(t,r,n){return this.config.isValid(this,t,r,n)}resolveAnyOf(t,r,n){return this.config.resolveAnyOf(this,t,r,n)}resolveAllOf(t,r){return this.config.resolveAllOf(this,t,r)}resolveRef(t){return this.config.resolveRef(t,this.rootSchema)}resolveOneOf(t,r,n){return this.config.resolveOneOf(this,t,r,n)}setSchema(t){this.rootSchema=t}step(t,r,n,i){return this.config.step(this,t,r,n,i)}validate(t,r,n){return this.config.validate(this,t,r,n)}}function vB(e,t,r){r.id=r.id||t,e.remotes[t]=e.compileSchema(r)}var $s={exports:{}},xB=$s.exports,gp;function LB(){return gp||(gp=1,function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:xB,()=>(()=>{var r={d:(w,M)=>{for(var P in M)r.o(M,P)&&!r.o(w,P)&&Object.defineProperty(w,P,{enumerable:!0,get:M[P]})},o:(w,M)=>Object.prototype.hasOwnProperty.call(w,M),r:w=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})}},n={};function i(w){return w==="#"||w===""||Array.isArray(w)&&w.length===0||!1}r.r(n),r.d(n,{default:()=>A,get:()=>T,isRoot:()=>i,join:()=>E,remove:()=>O,removeUndefinedItems:()=>x,set:()=>d,split:()=>Q,splitLast:()=>C});const a=/~1/g,o=/~0/g,s=/\/+/g,l=/(^[#/]*|\/+$)/g;function u(w){return w.replace(a,"/").replace(o,"~")}function c(w){return u(decodeURIComponent(w))}function Q(w){if(w==null||typeof w!="string"||i(w))return Array.isArray(w)?w:[];const M=w.indexOf("#")>=0?c:u,P=(w=(w=w.replace(s,"/")).replace(l,"")).split("/");for(let N=0,B=P.length;N<B;N+=1)P[N]=M(P[N]);return P}function T(w,M,P=void 0){if(M==null||w==null)return P;if(i(M))return w;const N=f(w,Q(M));return N===void 0?P:N}function f(w,M){const P=M.shift();if(w!==void 0)return P!==void 0?f(w[P],M):w}const h=/^\[.*\]$/,m=/^\[(.+)\]$/;function g(w,M){return w==="__proto__"||w=="constructor"&&M.length>0&&M[0]=="prototype"}function d(w,M,P){if(M==null)return w;const N=Q(M);if(N.length===0)return w;w==null&&(w=h.test(N[0])?[]:{});let B,I,V=w;for(;N.length>1;)B=N.shift(),I=h.test(N[0]),g(B,N)||(V=y(V,B,I));return B=N.pop(),p(V,B,P),w}function p(w,M,P){let N;const B=M.match(m);M==="[]"&&Array.isArray(w)?w.push(P):B?(N=B.pop(),w[N]=P):w[M]=P}function y(w,M,P){if(w[M]!=null)return w[M];const N=P?[]:{};return p(w,M,N),N}function x(w){let M=0,P=0;for(;M+P<w.length;)w[M+P]===void 0&&(P+=1),w[M]=w[M+P],M+=1;return w.length=w.length-P,w}function O(w,M,P){const N=Q(M),B=N.pop(),I=T(w,N);return I&&delete I[B],Array.isArray(I)&&P!==!0&&x(I),w}const v=/\/+/g,L=/~/g,b=/\//g;function S(w,M){if(w.length===0)return M?"#":"";for(let P=0,N=w.length;P<N;P+=1)w[P]=w[P].replace(L,"~0").replace(b,"~1"),M&&(w[P]=encodeURIComponent(w[P]));return((M?"#/":"/")+w.join("/")).replace(v,"/")}function E(w,...M){const P=[];if(Array.isArray(w))return S(w,arguments[1]===!0);const N=arguments[arguments.length-1],B=typeof N=="boolean"?N:w&&w[0]==="#";for(let V=0,_=arguments.length;V<_;V+=1)P.push.apply(P,Q(arguments[V]));const I=[];for(let V=0,_=P.length;V<_;V+=1)if(P[V]===".."){if(I.length===0)return B?"#":"";I.pop()}else I.push(P[V]);return S(I,B)}function C(w){const M=Q(w);if(M.length===0)return typeof w=="string"&&w[0]==="#"?["#",M[0]]:["",void 0];if(M.length===1)return w[0]==="#"?["#",M[0]]:["",M[0]];const P=M.pop();return[E(M,w[0]==="#"),P]}const A={get:T,set:d,remove:O,join:E,split:Q,splitLast:C,isRoot:i,removeUndefinedItems:x};return n})())}($s)),$s.exports}var K6=LB();const E5=Rr(K6);var js={},M1={},H5={},Op;function bB(){if(Op)return H5;Op=1,Object.defineProperty(H5,"__esModule",{value:!0}),H5.TokenError=void 0;let e=class extends Error{constructor(r,n){if(super(r),this.message=r,this.token=n,n&&n.errors)n.errors.push(this);else throw this}inspect(){return"SyntaxError: "+this.message}};return H5.TokenError=e,H5}var yp;function SB(){if(yp)return M1;yp=1,Object.defineProperty(M1,"__esModule",{value:!0}),M1.Parser=M1.findRuleByName=M1.parseRuleName=M1.escapeRegExp=M1.readToken=void 0;const e=/^[A-Z0-9_]+$/,t=/(\?|\+|\*)$/,r=/^(@|&|!)/,n="WS",i=bB();function a(m,g){let d=g.exec(m);return d&&d.index==0?d[0].length==0&&g.source.length>0?null:{type:null,text:d[0],rest:m.substr(d[0].length),start:0,end:d[0].length-1,fullText:d[0],errors:[],children:[],parent:null}:null}M1.readToken=a;function o(m){return m.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}M1.escapeRegExp=o;function s(m){m.rest="",m.children&&m.children.forEach(g=>s(g))}function l(m,g){m.start+=g,m.end+=g,m.children&&m.children.forEach(d=>l(d,m.start))}function u(m,g){g.errors&&g.errors.length&&g.errors.forEach(d=>m.push(d)),g.children&&g.children.forEach(d=>u(m,d))}function c(m){let g=t.exec(m),d=r.exec(m),p=g&&g[0]||"",y=d&&d[0]||"",x={raw:m,name:m.replace(t,"").replace(r,""),isOptional:p=="?"||p=="*",allowRepetition:p=="+"||p=="*",atLeastOne:p=="+",lookupPositive:y=="&",lookupNegative:y=="!",pinned:y=="@",lookup:!1,isLiteral:!1};return x.isLiteral=x.name[0]=="'"||x.name[0]=='"',x.lookup=x.lookupNegative||x.lookupPositive,x}M1.parseRuleName=c;function Q(m,g){let d=c(m);return g.cachedRules[d.name]||null}M1.findRuleByName=Q;function T(m,g){if(m.children){let d=m.children.filter(p=>p.type&&g.test(p.type));for(let p=0;p<d.length;p++){let y=m.children.indexOf(d[p]);y!=-1&&m.children.splice(y,1)}m.children.forEach(p=>T(p,g))}}const f=["EOF"];class h{constructor(g,d){this.grammarRules=g,this.options=d,this.cachedRules={},this.debug=d?d.debug===!0:!1;let p=[],y=[];if(g.forEach(x=>{let O=c(x.name);if(O.name in this.cachedRules){p.push("Duplicated rule "+O.name);return}else this.cachedRules[O.name]=x;if(!x.bnf||!x.bnf.length){let v="Missing rule content, rule: "+x.name;p.indexOf(v)==-1&&p.push(v)}else x.bnf.forEach(v=>{if(typeof v[0]=="string"&&c(v[0]).name==x.name){let b="Left recursion is not allowed, rule: "+x.name;p.indexOf(b)==-1&&p.push(b)}v.forEach(L=>{if(typeof L=="string"){let b=c(L);!b.isLiteral&&y.indexOf(b.name)==-1&&f.indexOf(b.name)==-1&&y.push(b.name)}})});n==x.name&&(x.implicitWs=!1),x.implicitWs&&y.indexOf(n)==-1&&y.push(n),x.recover&&y.indexOf(x.recover)==-1&&y.push(x.recover)}),y.forEach(x=>{x in this.cachedRules||p.push("Missing rule "+x)}),p.length)throw new Error(p.join(`
|
|
86
86
|
`))}getAST(g,d){d||(d=this.grammarRules.filter(y=>!y.fragment&&y.name.indexOf("%")!=0)[0].name);let p=this.parse(g,d);if(p){u(p.errors,p),l(p,0),T(p,/^%/),(!this.options||!this.options.keepUpperRules)&&T(p,e);let y=p.rest;y&&new i.TokenError(`Unexpected end of input:
|
|
87
87
|
`+y,p),s(p),p.rest=y}return p}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(g,d,p=0){let y=null,x=c(d),O,v=this.debug&&!e.test(x.name);v&&console.log(new Array(p).join("│ ")+"Trying to get "+d+" from "+JSON.stringify(g.split(`
|
|
88
88
|
`)[0]));let L=x.name,b=Q(x.name,this);if(x.name=="EOF"){if(g.length)return null;if(g.length==0)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!b&&x.isLiteral){let S=x.name.trim();if(S.startsWith('"')?S=JSON.parse(S):S.startsWith("'")&&(S=S.replace(/^'(.+)'$/,"$1").replace(/\\'/g,"'")),S==="")return{type:"%%EMPTY%%",text:"",rest:g,start:0,end:0,fullText:"",errors:[],children:[],parent:null};O=new RegExp(o(S)),L=null}}catch(S){return S instanceof ReferenceError&&console.error(S),null}if(O){let S=a(g,O);if(S)return S.type=L,S}else{let S=b.bnf;S instanceof Array&&S.forEach(E=>{if(y)return;let C=null,A={type:x.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:g};b.fragment&&(A.fragment=!0);let w=g,M=0,P=E.length>0,N=!1;for(let B=0;B<E.length;B++)if(typeof E[B]=="string"){let I=c(E[B]);P=P&&I.isOptional;let V,_=!1;do{if(V=null,b.implicitWs&&(V=this.parse(w,I.name,p+1),!V)){let k;do if(k=this.parse(w,n,p+1),k)A.text=A.text+k.text,A.end=A.text.length,k.parent=A,A.children.push(k),w=w.substr(k.text.length),M+=k.text.length;else break;while(k&&k.text.length)}if(V=V||this.parse(w,I.name,p+1),I.lookupNegative){if(V)return;break}if(I.lookupPositive&&!V)return;if(!V&&(I.isOptional||I.atLeastOne&&_))break;if(V&&b.pinned==B+1&&(C=V,v&&console.log(new Array(p+1).join("│ ")+"└─ "+V.type+" PINNED")),V||(V=this.parseRecovery(b,w,p+1)),!V)if(C)y=A,V={type:"SyntaxError",text:w,children:[],end:w.length,errors:[],fullText:"",parent:null,start:0,rest:""},w.length?new i.TokenError(`Unexpected end of input. Expecting ${I.name} Got: ${w}`,V):new i.TokenError(`Unexpected end of input. Missing ${I.name}`,V),v&&console.log(new Array(p+1).join("│ ")+"└─ "+V.type+" "+JSON.stringify(V.text));else return;if(_=!0,N=!0,V.type=="%%EMPTY%%")break;V.start+=M,V.end+=M,!I.lookupPositive&&V.type&&(V.fragment?V.children&&V.children.forEach(k=>{k.start+=M,k.end+=M,k.parent=A,A.children.push(k)}):(V.parent=A,A.children.push(V))),I.lookup&&(V.lookup=!0),v&&console.log(new Array(p+1).join("│ ")+"└─ "+V.type+" "+JSON.stringify(V.text)),!I.lookup&&!V.lookup&&(A.text=A.text+V.text,A.end=A.text.length,w=w.substr(V.text.length),M+=V.text.length),A.rest=w}while(V&&I.allowRepetition&&w.length&&!V.lookup)}else{let I=a(w,E[B]);if(!I)return;v&&console.log(new Array(p+1).join("│ ")+"└> "+JSON.stringify(I.text)+E[B].source),N=!0,I.start+=M,I.end+=M,A.text=A.text+I.text,A.end=A.text.length,w=w.substr(I.text.length),M+=I.text.length,A.rest=w}N&&(y=A,v&&console.log(new Array(p).join("│ ")+"├<─┴< PUSHING "+y.type+" "+JSON.stringify(y.text)))}),y&&b.simplifyWhenOneChildren&&y.children.length==1&&(y=y.children[0])}return y||v&&console.log(d+" NOT RESOLVED FROM "+g),y}parseRecovery(g,d,p){if(g.recover&&d.length){let y=this.debug;y&&console.log(new Array(p+1).join("│ ")+"Trying to recover until token "+g.recover+" from "+JSON.stringify(d.split(`
|
|
@@ -385,7 +385,7 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var R=le(G,ne,te,oe,ae+"
|
|
|
385
385
|
`;function e7e({className:e,name:t,value:r,extraTail:n,titleExtra:i}){const a=W.useRef(null),[o,{wrap:s}]=ki(),[l]=Mi(r),[u,c]=W.useState(r);W.useEffect(()=>{c(r)},[r]);const Q=W.useMemo(()=>({wrap:s??!1,value:u,onChange:c}),[s,u]);return j.jsx(t4.Provider,{value:Q,children:j.jsx(R2,{ref:a,className:e,titleExtra:i,name:t,extra:j.jsxs(Jse,{children:[j.jsx(K2,{elementRef:a}),o,l,n]}),children:j.jsx(UQ,{})})})}const Pf={content_list:Sse,img_list:jse,html:kse,markdown:Kse,json:Gse,image:Rse,raw:e7e,csv:Hse},t7e={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"文件类数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},url:{type:"string",description:"文件的URL,通常适用于从互联网上获取的PDF/电子书,可为空。",default:""},path:{type:"string",description:"文件的存储路径,通常为S3路径。",default:""},date:{type:"integer",description:"采集的爬取时间"},content_length:{type:"integer",description:"文件大小,字节数"},content_type:{type:"string",description:"文件类型"},title:{type:"string",description:"网页的标题"},body_bytes:{type:"string",description:"文件的字节流采用base64编码表示"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},required:["track_id","path","body_bytes"]},r7e={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"HTML数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},url:{type:"string",description:"网页的URL,电子书等网页数据,可留空。",default:""},status:{type:"integer",default:200,description:"采集的HTTP返回码",minimum:100,maximum:599},request_header:{type:"object",description:"采集的HTTP返回头"},response_header:{type:"object",description:"采集的HTTP返回头"},date:{type:"integer",description:"采集的爬取时间"},content_length:{type:"integer",description:"HTTP的响应体长度"},content_charset:{type:"string",description:"HTTP的响应体编码"},title:{type:"string",description:"网页的标题"},base_url:{type:"string",description:"网页的base url,如果有"},body_bytes:{type:"string",description:"网页的body部分的二进制数据"},html:{type:"string",description:"网页的完整HTML文本"},main_html:{type:"string",description:"网页的主要HTML文本"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},anyOf:[{required:["main_html"]},{required:["body_bytes"]},{required:["html"]}],required:["track_id","url"]},n7e={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"图文交错数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},id:{type:"string",description:"全局唯一的数据ID。一条原始数据,经过多次清洗,其内容可能会发生变化,这种情况下,每次清洗出的数据,应该具有不同的ID。"},url:{type:"string",description:"来源URL。非网页数据,该字段可以留空。"},title:{type:"string",description:"网页的标题"},base_url:{type:"string",description:"网页的base url,如果有"},content_list:{type:"array",description:"文档中的内容列表,包含文本、图像、或其它媒体内容的信息。",items:{$ref:"#/definitions/ContentItem"}},language:{type:"string",description:"多语言数据集,可采用该字段标识每篇文档的语言。",enum:["zh","zh-Hans","en","zh-Hant","code-python","code-java","code-c","code-cpp"]},split:{type:"string",enum:["train","val","test","exam"]},data_source:{type:"string",enum:["code-github","zh-zhihu-article","zh-zhihu-answer","zh-baidu-jingyan","zh-cnnews","mm-laion-5b","zh-toutiao-news","mm-cc-12m"]},subset:{type:"string",description:"有些data_source,可能有多个子集,在这里记录。"},sub_path:{type:"string",description:"数据的子路径。"},labels:{type:"object",$ref:"#/definitions/LabelItem",description:"文档的标签。该字段是一个对象(字典),对象中的各个字段对应的值应该尽可能是基本类型(数值、布尔值、标签等)。"},pii:{type:"object",description:"个人隐私信息识别结果"},html:{type:"string",description:"网页的完整HTML文本"},main_html:{type:"string",description:"网页的主要HTML文本"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},anyOf:[{required:["main_html"]},{required:["body_bytes"]},{required:["html"]}],required:["track_id","url"],definitions:{ContentItem:{type:"object",description:"content_list item",properties:{type:{type:"string",enum:["image","text","audio","video","table","list","code","quote","hr","equation"]},html:{type:"string"},text_level:{type:"integer",maximum:9,minimum:0,default:0,description:"文本的heading级别,0表示普通正文,1表示一级标题,以此类推。当type为text时,该字段才有意义。"},text_format:{type:"string",enum:["text","md","latex"]},text:{type:"string"},table_caption:{type:"string",description:"表格的caption,当type为table时,该字段才有意义。"},img_urls:{type:"array",items:{type:"string"},description:"当type为image时,该字段为图片的url"},img_url_hash:{type:"string",description:"当type为image时,该字段为图片的hash值"},img_path:{type:"string",description:"图像的s3路径"},img_alt:{type:"string",description:"图像的alt属性"},img_data:{type:"string",description:"当type为image,且图像链接为data url时,该字段为data url的内容。"},img_title:{type:"string",description:"图像的title属性"},img_caption:{type:"string",description:"图像的caption"},sources:{type:"array",items:{type:"string"},description:"当type为video/audio时,该字段包含了媒体文件的链接。"}},required:["type"]},LabelItem:{type:"object",properties:{is_safe:{type:"boolean",description:"表示内容是安全的,无需进行其他内容相关的过滤。"},pjwk_cates:{type:"object",description:"世界知识树分类"},subject_cates:{type:"object",description:"学科分类"},xp_num:{type:"string",description:"抽取时名中的规则"},drop_list:{type:"boolean",description:"抽取时是否有丢弃正文中的列表"},has_gov_cn:{type:"boolean",description:"是否有gov.cn域名"},is_url_gfwed:{type:"boolean",description:"域名是否在防火墙名单中"},source_charset:{type:"string",description:"源网页的字符集"},en_fluency_bert_prob:{type:"number",description:"英文流利度"},en_non_ad_bert_prob:{type:"number",description:"英文非广告概率"},en_politics_ft_prob:{type:"number",description:"涉政概率"},en_toxic_ft_prob:{type:"number",description:"毒害概率"},domain_level:{type:"string",description:"域名等级"},unsafe_word_min_level:{type:"string",description:"关键字等级"}}}}},i7e=new Pu(n7e),a7e=new Pu(r7e),o7e=new Pu(t7e),s7e={html:"html",main_html:"html",content:"markdown",content_list:"content_list",img_list:"img_list"},l7e=["html","main_html","body_bytes"],u7e=["content_list"],c7e=["path","track_loc"],Q7e=["content","img_list"],T7e=Ee(Yk)`
|
|
386
386
|
height: 100%;
|
|
387
387
|
overflow: auto;
|
|
388
|
-
`;function Yk({renderAs:e,...t}){const[r,{renderType:n}]=wee(e),i=Pf[n??e]??Pf.raw,a=W.useMemo(()=>({builtIns:r}),[r]);return j.jsx(lS.Provider,{value:a,children:j.jsx(i,{...t})})}function Kk(e){const[t,r]=W.useState({width:0,height:0});return W.useLayoutEffect(()=>{const n=document.getElementById("bucketContainer");if(!e)return;const i=
|
|
388
|
+
`;function Yk({renderAs:e,...t}){const[r,{renderType:n}]=wee(e),i=Pf[n??e]??Pf.raw,a=W.useMemo(()=>({builtIns:r}),[r]);return j.jsx(lS.Provider,{value:a,children:j.jsx(i,{...t})})}function Kk(e){const[t,r]=W.useState({width:0,height:0});return W.useLayoutEffect(()=>{const n=document.getElementById("bucketContainer");if(!e)return;let i;const a=()=>{i&&window.clearTimeout(i),i=window.setTimeout(()=>{const s=e.getBoundingClientRect();let l=window.innerHeight-s.top-1;if(n){const u=window.getComputedStyle(n?.parentElement);l-=Number.parseInt(u.paddingBottom)}else l=e.parentElement.clientHeight;r({width:s.width,height:l})},200)},o=new ResizeObserver(a);return o.observe(e),()=>{o.disconnect(),i&&window.clearTimeout(i)}},[e]),t}function Jk(e,t){return e==="content"?"markdown":typeof t=="string"&&t.replace(/\r|\n/g,"").startsWith("<!DOCTYPE html>")||e==="html"||e==="main_html"?"html":e==="content_list"||e==="img_list"?e:(Array.isArray(t),"raw")}class i5{current;parent;constructor(t,r){this.current=t,this.parent=r}get fullPath(){let t=this.current,r=this.parent;for(;r;)r.current!==""?t=`${r.current}.${t}`:t=`${t}`,r=r.parent;return t}}const f7e=Ee.div`
|
|
389
389
|
display: flex;
|
|
390
390
|
gap: 0.5rem;
|
|
391
391
|
align-items: center;
|