myquizbot-react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ (function(V,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],U):(V=typeof globalThis<"u"?globalThis:V||self,U(V.MyQuizBot={},V.React))})(this,(function(V,U){"use strict";var pe={exports:{}},se={};var qe;function _t(){if(qe)return se;qe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var c in s)c!=="key"&&(i[c]=s[c])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:i}}return se.Fragment=t,se.jsx=n,se.jsxs=n,se}var oe={};var Be;function Nt(){return Be||(Be=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===q?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case m:return"Fragment";case k:return"Profiler";case R:return"StrictMode";case H:return"Suspense";case F:return"SuspenseList";case P:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case b:return"Portal";case C:return l.displayName||"Context";case x:return(l._context.displayName||"Context")+".Consumer";case _:var y=l.render;return l=l.displayName,l||(l=y.displayName||y.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Q:return y=l.displayName||null,y!==null?y:e(l.type)||"Memo";case z:y=l._payload,l=l._init;try{return e(l(y))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var y=!1}catch{y=!0}if(y){y=console;var S=y.error,A=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return S.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),t(l)}}function r(l){if(l===m)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===z)return"<...>";try{var y=e(l);return y?"<"+y+">":"<...>"}catch{return"<...>"}}function s(){var l=v.A;return l===null?null:l.getOwner()}function i(){return Error("react-stack-top-frame")}function o(l){if(I.call(l,"key")){var y=Object.getOwnPropertyDescriptor(l,"key").get;if(y&&y.isReactWarning)return!1}return l.key!==void 0}function c(l,y){function S(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}S.isReactWarning=!0,Object.defineProperty(l,"key",{get:S,configurable:!0})}function p(){var l=e(this.type);return fe[l]||(fe[l]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),l=this.props.ref,l!==void 0?l:null}function f(l,y,S,A,G,Le){var N=S.ref;return l={$$typeof:d,type:l,key:y,props:S,_owner:A},(N!==void 0?N:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:p}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Le}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function u(l,y,S,A,G,Le){var N=y.children;if(N!==void 0)if(A)if(W(N)){for(A=0;A<N.length;A++)h(N[A]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(N);if(I.call(y,"key")){N=e(l);var re=Object.keys(y).filter(function(rr){return rr!=="key"});A=0<re.length?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}",Oe[N+A]||(re=0<re.length?"{"+re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,A,N,re,N),Oe[N+A]=!0)}if(N=null,S!==void 0&&(n(S),N=""+S),o(y)&&(n(y.key),N=""+y.key),"key"in y){S={};for(var De in y)De!=="key"&&(S[De]=y[De])}else S=y;return N&&c(S,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,N,S,s(),G,Le)}function h(l){E(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===z&&(l._payload.status==="fulfilled"?E(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function E(l){return typeof l=="object"&&l!==null&&l.$$typeof===d}var O=U,d=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),C=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),v=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,W=Array.isArray,ne=console.createTask?console.createTask:function(){return null};O={react_stack_bottom_frame:function(l){return l()}};var B,fe={},$=O.react_stack_bottom_frame.bind(O,i)(),de=ne(r(i)),Oe={};oe.Fragment=m,oe.jsx=function(l,y,S){var A=1e4>v.recentlyCreatedOwnerStacks++;return u(l,y,S,!1,A?Error("react-stack-top-frame"):$,A?ne(r(l)):de)},oe.jsxs=function(l,y,S){var A=1e4>v.recentlyCreatedOwnerStacks++;return u(l,y,S,!0,A?Error("react-stack-top-frame"):$,A?ne(r(l)):de)}})()),oe}var ze;function Ct(){return ze||(ze=1,process.env.NODE_ENV==="production"?pe.exports=_t():pe.exports=Nt()),pe.exports}var g=Ct();function Ie(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pt}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:he,toStringTag:Me}=Symbol,me=(e=>t=>{const n=Pt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),M=e=>(e=e.toLowerCase(),t=>me(t)===e),be=e=>t=>typeof t===e,{isArray:Z}=Array,ee=be("undefined");function ie(e){return e!==null&&!ee(e)&&e.constructor!==null&&!ee(e.constructor)&&L(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const He=M("ArrayBuffer");function jt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&He(e.buffer),t}const kt=be("string"),L=be("function"),$e=be("number"),ae=e=>e!==null&&typeof e=="object",Ft=e=>e===!0||e===!1,ye=e=>{if(me(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Me in e)&&!(he in e)},vt=e=>{if(!ae(e)||ie(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ut=M("Date"),Lt=M("File"),Dt=M("Blob"),qt=M("FileList"),Bt=e=>ae(e)&&L(e.pipe),zt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||L(e.append)&&((t=me(e))==="formdata"||t==="object"&&L(e.toString)&&e.toString()==="[object FormData]"))},It=M("URLSearchParams"),[Mt,Ht,$t,Jt]=["ReadableStream","Request","Response","Headers"].map(M),Wt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ie(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Je(e,t){if(ie(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,We=e=>!ee(e)&&e!==Y;function xe(){const{caseless:e,skipUndefined:t}=We(this)&&this||{},n={},r=(s,i)=>{const o=e&&Je(n,i)||i;ye(n[o])&&ye(s)?n[o]=xe(n[o],s):ye(s)?n[o]=xe({},s):Z(s)?n[o]=s.slice():(!t||!ee(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&ce(arguments[s],r);return n}const Vt=(e,t,n,{allOwnKeys:r}={})=>(ce(t,(s,i)=>{n&&L(s)?e[i]=Ie(s,n):e[i]=s},{allOwnKeys:r}),e),Yt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Kt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Gt=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),en=(e,t)=>{const r=(e&&e[he]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},tn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},nn=M("HTMLFormElement"),rn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ve=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sn=M("RegExp"),Ye=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ce(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},on=e=>{Ye(e,(t,n)=>{if(L(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(L(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},an=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},cn=()=>{},ln=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function un(e){return!!(e&&L(e.append)&&e[Me]==="FormData"&&e[he])}const fn=e=>{const t=new Array(10),n=(r,s)=>{if(ae(r)){if(t.indexOf(r)>=0)return;if(ie(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Z(r)?[]:{};return ce(r,(o,c)=>{const p=n(o,s+1);!ee(p)&&(i[c]=p)}),t[s]=void 0,i}}return r};return n(e,0)},dn=M("AsyncFunction"),pn=e=>e&&(ae(e)||L(e))&&L(e.then)&&L(e.catch),Ke=((e,t)=>e?setImmediate:t?((n,r)=>(Y.addEventListener("message",({source:s,data:i})=>{s===Y&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Y.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(Y.postMessage)),hn=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||Ke,a={isArray:Z,isArrayBuffer:He,isBuffer:ie,isFormData:zt,isArrayBufferView:jt,isString:kt,isNumber:$e,isBoolean:Ft,isObject:ae,isPlainObject:ye,isEmptyObject:vt,isReadableStream:Mt,isRequest:Ht,isResponse:$t,isHeaders:Jt,isUndefined:ee,isDate:Ut,isFile:Lt,isBlob:Dt,isRegExp:sn,isFunction:L,isStream:Bt,isURLSearchParams:It,isTypedArray:Zt,isFileList:qt,forEach:ce,merge:xe,extend:Vt,trim:Wt,stripBOM:Yt,inherits:Kt,toFlatObject:Xt,kindOf:me,kindOfTest:M,endsWith:Qt,toArray:Gt,forEachEntry:en,matchAll:tn,isHTMLForm:nn,hasOwnProperty:Ve,hasOwnProp:Ve,reduceDescriptors:Ye,freezeMethods:on,toObjectSet:an,toCamelCase:rn,noop:cn,toFiniteNumber:ln,findKey:Je,global:Y,isContextDefined:We,isSpecCompliantForm:un,toJSONObject:fn,isAsyncFn:dn,isThenable:pn,setImmediate:Ke,asap:hn,isIterable:e=>e!=null&&L(e[he])};function w(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=w.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Qe[e]={value:e}}),Object.defineProperties(w,Qe),Object.defineProperty(Xe,"isAxiosError",{value:!0}),w.from=(e,t,n,r,s,i)=>{const o=Object.create(Xe);a.toFlatObject(e,o,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const c=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return w.call(o,c,p,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const mn=null;function _e(e){return a.isPlainObject(e)||a.isArray(e)}function Ge(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ze(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ge(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function bn(e){return a.isArray(e)&&!e.some(_e)}const yn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function we(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!a.isUndefined(m[b])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!p&&a.isBlob(d))throw new w("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?p&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,b,m){let R=d;if(d&&!m&&typeof d=="object"){if(a.endsWith(b,"{}"))b=r?b:b.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&bn(d)||(a.isFileList(d)||a.endsWith(b,"[]"))&&(R=a.toArray(d)))return b=Ge(b),R.forEach(function(x,C){!(a.isUndefined(x)||x===null)&&t.append(o===!0?Ze([b],C,i):o===null?b:b+"[]",f(x))}),!1}return _e(d)?!0:(t.append(Ze(m,b,i),f(d)),!1)}const h=[],E=Object.assign(yn,{defaultVisitor:u,convertValue:f,isVisitable:_e});function O(d,b){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+b.join("."));h.push(d),a.forEach(d,function(R,k){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(k)?k.trim():k,b,E))===!0&&O(R,b?b.concat(k):[k])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return O(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ne(e,t){this._pairs=[],e&&we(e,this,t)}const tt=Ne.prototype;tt.append=function(t,n){this._pairs.push([t,n])},tt.toString=function(t){const n=t?function(r){return t.call(this,r,et)}:et;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function wn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||wn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new Ne(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},En={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ne,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",Pe=typeof navigator=="object"&&navigator||void 0,gn=Ce&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),Rn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sn=Ce&&window.location.href||"http://localhost",j={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:gn,hasStandardBrowserWebWorkerEnv:Rn,navigator:Pe,origin:Sn},Symbol.toStringTag,{value:"Module"})),...En};function Tn(e,t){return we(e,new j.classes.URLSearchParams,{visitor:function(n,r,s,i){return j.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function On(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function An(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),p=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,p?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=An(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(On(r),s,n,0)}),n}return null}function xn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const le={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return we(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),xn(t)):t}],transformResponse:[function(t){const n=this.transitional||le.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?w.from(c,w.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{le.headers[e]={}});const _n=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=e=>{const t={};let n,r,s;return e&&e.split(`
7
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&_n[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(Ee):String(e)}function Cn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Pn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function je(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function jn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let D=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,p,f){const u=ue(p);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||p]=Ee(c))}const o=(c,p)=>a.forEach(c,(f,u)=>i(f,u,p));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!Pn(t))o(Nn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},p,f;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[f=u[0]]=(p=c[f])?a.isArray(p)?[...p,u[1]]:[p,u[1]]:u[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ue(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Cn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ue(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||je(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ue(o),o){const c=a.findKey(r,o);c&&(!n||je(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||je(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=Ee(s),delete n[i];return}const c=t?jn(i):String(i).trim();c!==i&&delete n[i],n[c]=Ee(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
8
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=ue(o);r[c]||(kn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(D.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(D);function ke(e,t){const n=this||le,r=t||n,s=D.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function at(e){return!!(e&&e.__CANCEL__)}function te(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(te,w,{__CANCEL__:!0});function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(p){const f=Date.now(),u=r[i];o||(o=f),n[s]=p,r[s]=f;let h=i,E=0;for(;h!==s;)E+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o<t)return;const O=u&&f-u;return O?Math.round(E*1e3/O):void 0}}function Un(e,t){let n=0,r=1e3/t,s,i;const o=(f,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const u=Date.now(),h=u-n;h>=r?o(f,u):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const ge=(e,t,n=3)=>{let r=0;const s=vn(50,250);return Un(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,p=o-r,f=s(p),u=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:p,rate:f||void 0,estimated:f&&c&&u?(c-o)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},lt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ut=e=>(...t)=>a.asap(()=>e(...t)),Ln=j.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,j.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,Dn=j.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function qn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Bn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ft(e,t,n){let r=!qn(t);return e&&(r||n==!1)?Bn(e,t):t}const dt=e=>e instanceof D?{...e}:e;function K(e,t){t=t||{};const n={};function r(f,u,h,E){return a.isPlainObject(f)&&a.isPlainObject(u)?a.merge.call({caseless:E},f,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(f,u,h,E){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f,h,E)}else return r(f,u,h,E)}function i(f,u){if(!a.isUndefined(u))return r(void 0,u)}function o(f,u){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,h){if(h in t)return r(f,u);if(h in e)return r(void 0,f)}const p={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(f,u,h)=>s(dt(f),dt(u),h,!0)};return a.forEach(Object.keys({...e,...t}),function(u){const h=p[u]||s,E=h(e[u],t[u],u);a.isUndefined(E)&&h!==c||(n[u]=E)}),n}const pt=e=>{const t=K({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=D.from(o),t.url=nt(ft(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const p=n.getHeaders(),f=["content-type","content-length"];Object.entries(p).forEach(([u,h])=>{f.includes(u.toLowerCase())&&o.set(u,h)})}}if(j.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Ln(t.url))){const p=s&&i&&Dn.read(i);p&&o.set(s,p)}return t},zn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=pt(e);let i=s.data;const o=D.from(s.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:f}=s,u,h,E,O,d;function b(){O&&O(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function R(){if(!m)return;const x=D.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:x,config:e,request:m};ct(function(F){n(F),b()},function(F){r(F),b()},_),m=null}"onloadend"in m?m.onloadend=R:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(R)},m.onabort=function(){m&&(r(new w("Request aborted",w.ECONNABORTED,e,m)),m=null)},m.onerror=function(C){const _=C&&C.message?C.message:"Network Error",H=new w(_,w.ERR_NETWORK,e,m);H.event=C||null,r(H),m=null},m.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||st;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new w(C,_.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&a.forEach(o.toJSON(),function(C,_){m.setRequestHeader(_,C)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),f&&([E,d]=ge(f,!0),m.addEventListener("progress",E)),p&&m.upload&&([h,O]=ge(p),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",O)),(s.cancelToken||s.signal)&&(u=x=>{m&&(r(!x||x.type?new te(null,e,m):x),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const k=Fn(s.url);if(k&&j.protocols.indexOf(k)===-1){r(new w("Unsupported protocol "+k+":",w.ERR_BAD_REQUEST,e));return}m.send(i||null)})},In=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(f){if(!s){s=!0,c();const u=f instanceof Error?f:this.reason;r.abort(u instanceof w?u:new te(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new w(`timeout ${t} of ms exceeded`,w.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:p}=r;return p.unsubscribe=()=>a.asap(c),p}},Mn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Hn=async function*(e,t){for await(const n of $n(e))yield*Mn(n,t)},$n=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ht=(e,t,n,r)=>{const s=Hn(e,t);let i=0,o,c=p=>{o||(o=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:f,value:u}=await s.next();if(f){c(),p.close();return}let h=u.byteLength;if(n){let E=i+=h;n(E)}p.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(p){return c(p),s.return()}},{highWaterMark:2})},mt=64*1024,{isFunction:Re}=a,Jn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:bt,TextEncoder:yt}=a.global,wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Wn=e=>{e=a.merge.call({skipUndefined:!0},Jn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Re(t):typeof fetch=="function",i=Re(n),o=Re(r);if(!s)return!1;const c=s&&Re(bt),p=s&&(typeof yt=="function"?(d=>b=>d.encode(b))(new yt):async d=>new Uint8Array(await new n(d).arrayBuffer())),f=i&&c&&wt(()=>{let d=!1;const b=new n(j.origin,{body:new bt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!b}),u=o&&c&&wt(()=>a.isReadableStream(new r("").body)),h={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(b,m)=>{let R=b&&b[d];if(R)return R.call(b);throw new w(`Response type '${d}' is not supported`,w.ERR_NOT_SUPPORT,m)})});const E=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new n(j.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await p(d)).byteLength},O=async(d,b)=>{const m=a.toFiniteNumber(d.getContentLength());return m??E(b)};return async d=>{let{url:b,method:m,data:R,signal:k,cancelToken:x,timeout:C,onDownloadProgress:_,onUploadProgress:H,responseType:F,headers:Q,withCredentials:z="same-origin",fetchOptions:P}=pt(d),q=t||fetch;F=F?(F+"").toLowerCase():"text";let v=In([k,x&&x.toAbortSignal()],C),I=null;const W=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let ne;try{if(H&&f&&m!=="get"&&m!=="head"&&(ne=await O(Q,R))!==0){let l=new n(b,{method:"POST",body:R,duplex:"half"}),y;if(a.isFormData(R)&&(y=l.headers.get("content-type"))&&Q.setContentType(y),l.body){const[S,A]=lt(ne,ge(ut(H)));R=ht(l.body,mt,S,A)}}a.isString(z)||(z=z?"include":"omit");const B=i&&"credentials"in n.prototype,fe={...P,signal:v,method:m.toUpperCase(),headers:Q.normalize().toJSON(),body:R,duplex:"half",credentials:B?z:void 0};I=i&&new n(b,fe);let $=await(i?q(I,P):q(b,fe));const de=u&&(F==="stream"||F==="response");if(u&&(_||de&&W)){const l={};["status","statusText","headers"].forEach(G=>{l[G]=$[G]});const y=a.toFiniteNumber($.headers.get("content-length")),[S,A]=_&&lt(y,ge(ut(_),!0))||[];$=new r(ht($.body,mt,S,()=>{A&&A(),W&&W()}),l)}F=F||"text";let Oe=await h[a.findKey(h,F)||"text"]($,d);return!de&&W&&W(),await new Promise((l,y)=>{ct(l,y,{data:Oe,headers:D.from($.headers),status:$.status,statusText:$.statusText,config:d,request:I})})}catch(B){throw W&&W(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,d,I),{cause:B.cause||B}):w.from(B,B&&B.code,d,I)}}},Vn=new Map,Et=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,p,f,u=Vn;for(;c--;)p=i[c],f=u.get(p),f===void 0&&u.set(p,f=c?new Map:Wn(t)),u=f;return f};Et();const Fe={http:mn,xhr:zn,fetch:{get:Et}};a.forEach(Fe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gt=e=>`- ${e}`,Yn=e=>a.isFunction(e)||e===null||e===!1;function Kn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let c;if(s=r,!Yn(r)&&(s=Fe[(c=String(r)).toLowerCase()],s===void 0))throw new w(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
9
+ `+o.map(gt).join(`
10
+ `):" "+gt(o[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Rt={getAdapter:Kn,adapters:Fe};function ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new te(null,e)}function St(e){return ve(e),e.headers=D.from(e.headers),e.data=ke.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rt.getAdapter(e.adapter||le.adapter,e)(e).then(function(r){return ve(e),r.data=ke.call(e,e.transformResponse,r),r.headers=D.from(r.headers),r},function(r){return at(r)||(ve(e),r&&r.response&&(r.response.data=ke.call(e,e.transformResponse,r.response),r.response.headers=D.from(r.response.headers))),Promise.reject(r)})}const Tt="1.13.2",Se={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Se[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ot={};Se.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Tt+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new w(s(o," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!Ot[o]&&(Ot[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}},Se.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xn(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],p=c===void 0||o(c,i,e);if(p!==!0)throw new w("option "+i+" must be "+p,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+i,w.ERR_BAD_OPTION)}}const Te={assertOptions:Xn,validators:Se},J=Te.validators;let X=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rt,response:new rt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
11
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=K(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Te.assertOptions(r,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Te.assertOptions(s,{encode:J.function,serialize:J.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Te.assertOptions(n,{baseUrl:J.spelling("baseURL"),withXsrfToken:J.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=D.concat(o,i);const c=[];let p=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(p=p&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const f=[];this.interceptors.response.forEach(function(b){f.push(b.fulfilled,b.rejected)});let u,h=0,E;if(!p){const d=[St.bind(this),void 0];for(d.unshift(...c),d.push(...f),E=d.length,u=Promise.resolve(n);h<E;)u=u.then(d[h++],d[h++]);return u}E=c.length;let O=n;for(;h<E;){const d=c[h++],b=c[h++];try{O=d(O)}catch(m){b.call(this,m);break}}try{u=St.call(this,O)}catch(d){return Promise.reject(d)}for(h=0,E=f.length;h<E;)u=u.then(f[h++],f[h++]);return u}getUri(t){t=K(this.defaults,t);const n=ft(t.baseURL,t.url,t.allowAbsoluteUrls);return nt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){X.prototype[t]=function(n,r){return this.request(K(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(K(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}X.prototype[t]=n(),X.prototype[t+"Form"]=n(!0)});let Qn=class xt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new te(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new xt(function(s){t=s}),cancel:t}}};function Gn(e){return function(n){return e.apply(null,n)}}function Zn(e){return a.isObject(e)&&e.isAxiosError===!0}const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ue).forEach(([e,t])=>{Ue[t]=e});function At(e){const t=new X(e),n=Ie(X.prototype.request,t);return a.extend(n,X.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return At(K(e,s))},n}const T=At(le);T.Axios=X,T.CanceledError=te,T.CancelToken=Qn,T.isCancel=at,T.VERSION=Tt,T.toFormData=we,T.AxiosError=w,T.Cancel=T.CanceledError,T.all=function(t){return Promise.all(t)},T.spread=Gn,T.isAxiosError=Zn,T.mergeConfig=K,T.AxiosHeaders=D,T.formToJSON=e=>ot(a.isHTMLForm(e)?new FormData(e):e),T.getAdapter=Rt.getAdapter,T.HttpStatusCode=Ue,T.default=T;const{Axios:ur,AxiosError:fr,CanceledError:dr,isCancel:pr,CancelToken:hr,VERSION:mr,all:br,Cancel:yr,isAxiosError:wr,spread:Er,toFormData:gr,AxiosHeaders:Rr,HttpStatusCode:Sr,formToJSON:Tr,getAdapter:Or,mergeConfig:Ar}=T;class er{client;constructor(t){this.client=T.create({baseURL:t||void 0||"http://localhost:5003",headers:{"Content-Type":"application/json"}})}setApiKey(t){this.client.defaults.headers.common.Authorization=`Bearer ${t}`}async getQuiz(t){try{return(await this.client.get(`/quiz/${t}`)).data}catch(n){throw T.isAxiosError(n)?new Error(`Failed to fetch quiz: ${n.response?.data?.message||n.message}`):n}}async submitAnswer(t,n,r){try{await this.client.post(`/quiz/session/${t}/answer`,{questionId:n,answer:r})}catch(s){throw T.isAxiosError(s)?new Error(`Failed to submit answer: ${s.response?.data?.message||s.message}`):s}}async createSession(t){try{return(await this.client.post("/quiz/session",{quizId:t})).data}catch(n){throw T.isAxiosError(n)?new Error(`Failed to create session: ${n.response?.data?.message||n.message}`):n}}async completeSession(t){try{await this.client.post(`/quiz/session/${t}/complete`)}catch(n){throw T.isAxiosError(n)?new Error(`Failed to complete session: ${n.response?.data?.message||n.message}`):n}}}const tr=({nodes:e,onAnswer:t,onProgress:n,onComplete:r})=>{const[s,i]=U.useState(0),[o,c]=U.useState({});U.useEffect(()=>{n({currentStep:s+1,totalSteps:e.length,percentage:(s+1)/e.length*100})},[s,e.length,n]);const p=h=>{const E=e[s],O={...o,[E.id]:h};c(O),t({questionId:E.id,answer:h,timestamp:Date.now()}),s<e.length-1?i(s+1):r()},f=()=>{s>0&&i(s-1)};if(e.length===0)return g.jsx("div",{className:"quiz-steps-empty",children:"No questions available"});const u=e[s];return g.jsxs("div",{className:"quiz-steps-container",children:[g.jsx("div",{className:"quiz-steps-progress",children:g.jsx("div",{className:"quiz-steps-progress-bar",style:{width:`${(s+1)/e.length*100}%`}})}),g.jsxs("div",{className:"quiz-steps-content",children:[g.jsx("div",{className:"quiz-steps-header",children:g.jsxs("span",{className:"quiz-steps-counter",children:["Question ",s+1," of ",e.length]})}),g.jsxs("div",{className:"quiz-steps-question",children:[g.jsx("h2",{children:u.data.label||u.data.content}),u.data.content&&u.data.label&&g.jsx("p",{children:u.data.content})]}),g.jsxs("div",{className:"quiz-steps-options",children:[u.type==="multipleChoice"&&u.data.options?.map((h,E)=>g.jsx("button",{className:"quiz-steps-option",onClick:()=>p(h.value||h),children:h.label||h},E)),u.type==="text"&&g.jsxs("div",{className:"quiz-steps-text-input",children:[g.jsx("input",{type:"text",placeholder:"Type your answer...",onKeyPress:h=>{h.key==="Enter"&&p(h.target.value)}}),g.jsx("button",{onClick:h=>{const E=h.currentTarget.previousElementSibling;p(E.value)},children:"Submit"})]})]}),g.jsx("div",{className:"quiz-steps-navigation",children:s>0&&g.jsx("button",{className:"quiz-steps-nav-button",onClick:f,children:"Previous"})})]})]})},nr=({quizId:e,apiKey:t,mode:n="steps",baseUrl:r,onStart:s,onAnswer:i,onProgress:o,onComplete:c,onError:p,className:f,style:u})=>{const[h,E]=U.useState(null),[O,d]=U.useState(!0),[b,m]=U.useState(null),[R,k]=U.useState(null),[x,C]=U.useState({}),_=U.useRef(null);U.useEffect(()=>{_.current=new er(r),_.current.setApiKey(t),(async()=>{try{d(!0),m(null);const q=await _.current.getQuiz(e);E(q);const v=await _.current.createSession(e);if(k(v.sessionId),s){const I={quizId:e,timestamp:Date.now()};s(I)}d(!1)}catch(q){const v=q instanceof Error?q.message:"Failed to load quiz";if(m(v),d(!1),p){const I={error:q instanceof Error?q:new Error(v),message:v,timestamp:Date.now()};p(I)}}})()},[e,t,r,s,p]);const H=async P=>{const q={...x,[P.questionId]:P.answer};if(C(q),R&&_.current)try{await _.current.submitAnswer(R,P.questionId,P.answer)}catch(v){console.error("Failed to submit answer:",v)}i&&i(P)},F=P=>{o&&o(P)},Q=async()=>{if(R&&_.current)try{await _.current.completeSession(R)}catch(P){console.error("Failed to complete session:",P)}if(c){const P={quizId:e,answers:x,timestamp:Date.now(),sessionId:R||void 0};c(P)}};if(O)return g.jsxs("div",{className:`quiz-container quiz-loading ${f||""}`,style:u,children:[g.jsx("div",{className:"quiz-spinner"}),g.jsx("p",{children:"Loading quiz..."})]});if(b)return g.jsxs("div",{className:`quiz-container quiz-error ${f||""}`,style:u,children:[g.jsx("div",{className:"quiz-error-icon",children:"⚠️"}),g.jsx("h3",{children:"Failed to Load Quiz"}),g.jsx("p",{children:b})]});if(!h)return null;const z=n||h.renderMode||"steps";return g.jsxs("div",{className:`quiz-container ${f||""}`,style:u,children:[z==="steps"&&g.jsx(tr,{nodes:h.nodes,onAnswer:H,onProgress:F,onComplete:Q}),z==="single"&&g.jsx("div",{className:"quiz-single-mode",children:g.jsx("p",{children:"Single mode not yet implemented"})}),z==="flow"&&g.jsx("div",{className:"quiz-flow-mode",children:g.jsx("p",{children:"Flow mode not yet implemented"})})]})};V.Quiz=nr,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
package/dist/react.css ADDED
@@ -0,0 +1 @@
1
+ .quiz-steps-container{max-width:800px;margin:0 auto;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.quiz-steps-progress{width:100%;height:8px;background-color:#e0e0e0;border-radius:4px;overflow:hidden;margin-bottom:30px}.quiz-steps-progress-bar{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);transition:width .3s ease}.quiz-steps-content{background:#fff;border-radius:12px;padding:40px;box-shadow:0 4px 6px #0000001a}.quiz-steps-header{margin-bottom:20px}.quiz-steps-counter{font-size:14px;color:#667eea;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.quiz-steps-question h2{font-size:28px;color:#2d3748;margin:0 0 12px;line-height:1.3}.quiz-steps-question p{font-size:16px;color:#718096;margin:0 0 30px;line-height:1.6}.quiz-steps-options{display:flex;flex-direction:column;gap:12px;margin-bottom:30px}.quiz-steps-option{padding:16px 24px;background:#f7fafc;border:2px solid #e2e8f0;border-radius:8px;font-size:16px;color:#2d3748;cursor:pointer;transition:all .2s ease;text-align:left}.quiz-steps-option:hover{background:#edf2f7;border-color:#667eea;transform:translateY(-2px);box-shadow:0 4px 12px #667eea26}.quiz-steps-text-input{display:flex;gap:12px}.quiz-steps-text-input input{flex:1;padding:16px;border:2px solid #e2e8f0;border-radius:8px;font-size:16px;transition:border-color .2s ease}.quiz-steps-text-input input:focus{outline:none;border-color:#667eea}.quiz-steps-text-input button{padding:16px 32px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}.quiz-steps-text-input button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #667eea4d}.quiz-steps-navigation{display:flex;justify-content:flex-start}.quiz-steps-nav-button{padding:12px 24px;background:transparent;color:#667eea;border:2px solid #667eea;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease}.quiz-steps-nav-button:hover{background:#667eea;color:#fff}.quiz-steps-empty{text-align:center;padding:60px 20px;color:#718096;font-size:18px}@media(max-width:768px){.quiz-steps-container{padding:12px}.quiz-steps-content{padding:24px}.quiz-steps-question h2{font-size:22px}.quiz-steps-text-input{flex-direction:column}}.quiz-container{width:100%;min-height:400px}.quiz-loading,.quiz-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center}.quiz-spinner{width:48px;height:48px;border:4px solid #e2e8f0;border-top-color:#667eea;border-radius:50%;animation:quiz-spin .8s linear infinite;margin-bottom:20px}@keyframes quiz-spin{to{transform:rotate(360deg)}}.quiz-loading p{color:#718096;font-size:16px;margin:0}.quiz-error-icon{font-size:48px;margin-bottom:16px}.quiz-error h3{color:#e53e3e;font-size:24px;margin:0 0 12px}.quiz-error p{color:#718096;font-size:16px;margin:0;max-width:500px}.quiz-single-mode,.quiz-flow-mode{padding:40px;text-align:center;color:#718096}
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "myquizbot-react",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "description": "React component library for MyQuizBot - Interactive quiz components with API integration",
7
+ "main": "./dist/myquizbot-react.umd.js",
8
+ "module": "./dist/myquizbot-react.es.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/myquizbot-react.es.js",
14
+ "require": "./dist/myquizbot-react.umd.js"
15
+ },
16
+ "./dist/style.css": "./dist/style.css"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "tsc -b && vite build",
24
+ "lint": "eslint .",
25
+ "preview": "vite preview"
26
+ },
27
+ "peerDependencies": {
28
+ "react": "^18.0.0 || ^19.0.0",
29
+ "react-dom": "^18.0.0 || ^19.0.0"
30
+ },
31
+ "dependencies": {
32
+ "axios": "^1.13.2"
33
+ },
34
+ "devDependencies": {
35
+ "@eslint/js": "^9.39.1",
36
+ "@types/node": "^24.10.1",
37
+ "@types/react": "^19.2.5",
38
+ "@types/react-dom": "^19.2.3",
39
+ "@vitejs/plugin-react": "^5.1.1",
40
+ "eslint": "^9.39.1",
41
+ "eslint-plugin-react-hooks": "^7.0.1",
42
+ "eslint-plugin-react-refresh": "^0.4.24",
43
+ "globals": "^16.5.0",
44
+ "react": "^19.2.0",
45
+ "react-dom": "^19.2.0",
46
+ "typescript": "~5.9.3",
47
+ "typescript-eslint": "^8.46.4",
48
+ "vite": "^7.2.4",
49
+ "vite-plugin-dts": "^4.5.4"
50
+ },
51
+ "keywords": [
52
+ "react",
53
+ "quiz",
54
+ "component",
55
+ "myquizbot",
56
+ "interactive"
57
+ ],
58
+ "author": "",
59
+ "license": "MIT"
60
+ }