@sapia-ai/chatbot-v3 1.0.3 → 1.1.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.
- package/dist/{EmbeddedVideoPlayer-CNcds-dW.js → EmbeddedVideoPlayer-COUZHpPa.js} +14 -14
- package/dist/{Preview-Dmns6UWL.js → Preview-wPnYtccF.js} +3 -3
- package/dist/api/client.d.ts +6 -2
- package/dist/api/types/messages.d.ts +16 -5
- package/dist/api/types/responses.d.ts +48 -7
- package/dist/api.js +2 -2
- package/dist/core/bubbles/types.d.ts +2 -5
- package/dist/core/i18n/languages.d.ts +6 -1
- package/dist/core/interview.d.ts +15 -8
- package/dist/core/media/mimeTypes.d.ts +6 -1
- package/dist/core/media/recorder.d.ts +11 -2
- package/dist/core/store.d.ts +21 -1
- package/dist/core/theme/contrast.d.ts +6 -0
- package/dist/core/theme/cssVariables.d.ts +5 -0
- package/dist/core/theme/types.d.ts +3 -0
- package/dist/{dist-BSi28_cP.js → dist-BOe6WyvN.js} +92 -92
- package/dist/{dist-B9SbMqZU.js → dist-Bwlks_W8.js} +98 -98
- package/dist/{fix-webm-duration-BWL-ZRDX.js → fix-webm-duration-QAy9T6AR.js} +2 -2
- package/dist/index.js +7445 -5039
- package/dist/{jsx-runtime-8QqjHL5t.js → jsx-runtime-24G8w2Bf.js} +2 -2
- package/dist/{messages-Czlp86gl.js → messages-DCvBcspv.js} +260 -245
- package/dist/react/AnswerInput.d.ts +4 -5
- package/dist/react/bubbleViewModel.d.ts +25 -9
- package/dist/react/strings.d.ts +26 -3
- package/dist/{react-DJysvNxz.js → react-BjO903pN.js} +33 -33
- package/dist/{react-QrtEtv1G.js → react-Bw5AugJc.js} +31 -31
- package/dist/{react-dE7BdGuR.js → react-D8hV9uow.js} +10 -10
- package/dist/{react-NauLB_WU.js → react-DDjfkpOE.js} +38 -38
- package/dist/{react-Dbs-sPBo.js → react-DEF8h8hc.js} +37 -37
- package/dist/{react-B0K-sClg.js → react-DOgLiyZi.js} +2 -2
- package/dist/{react-be7q6yw_.js → react-DPFikgTM.js} +55 -55
- package/dist/{react-ChCcxVnw.js → react-qa12DkXH.js} +34 -34
- package/dist/{react-czRIxT0g.js → react-y4vaW3OH.js} +46 -46
- package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +14 -5
- package/dist/ui/chat/ChatLog/ChatLog.d.ts +6 -4
- package/dist/ui/chat/EditBanner/EditBanner.d.ts +16 -0
- package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +46 -0
- package/dist/ui/chat/types.d.ts +21 -8
- package/dist/ui/constants.d.ts +1 -0
- package/dist/ui/inputs/OptionList/OptionList.d.ts +3 -1
- package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +11 -4
- package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +6 -2
- package/dist/ui/markdown.d.ts +4 -0
- package/dist/ui/motion.d.ts +2 -0
- package/dist/ui/primitives/Button/Button.d.ts +5 -1
- package/dist/ui/primitives/Dialog/Dialog.d.ts +2 -1
- package/dist/ui/shell/WidgetRoot/WidgetRoot.d.ts +7 -1
- package/dist-umd/sapia-chatbot.umd.js +394 -270
- package/package.json +4 -1
|
@@ -567,18 +567,18 @@ function z(e) {
|
|
|
567
567
|
function ot(e) {
|
|
568
568
|
return P.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function st(e, t, n) {
|
|
571
571
|
return e ? e.concat(t).map(function(e, t) {
|
|
572
572
|
return e = ot(e), !n && t ? "[" + e + "]" : e;
|
|
573
573
|
}).join(n ? "." : "") : t;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function ct(e) {
|
|
576
576
|
return P.isArray(e) && !e.some(z);
|
|
577
577
|
}
|
|
578
|
-
var
|
|
578
|
+
var lt = P.toFlatObject(P, {}, null, function(e) {
|
|
579
579
|
return /^is[A-Z]/.test(e);
|
|
580
580
|
});
|
|
581
|
-
function
|
|
581
|
+
function B(e, t, n) {
|
|
582
582
|
if (!P.isObject(e)) throw TypeError("target must be an object");
|
|
583
583
|
t = t || new FormData(), n = P.toFlatObject(n, {
|
|
584
584
|
metaTokens: !0,
|
|
@@ -598,16 +598,16 @@ function V(e, t, n) {
|
|
|
598
598
|
}
|
|
599
599
|
function d(e, n, i) {
|
|
600
600
|
let s = e;
|
|
601
|
-
if (P.isReactNative(t) && P.isReactNativeBlob(e)) return t.append(
|
|
601
|
+
if (P.isReactNative(t) && P.isReactNativeBlob(e)) return t.append(st(i, n, a), u(e)), !1;
|
|
602
602
|
if (e && !i && typeof e == "object") {
|
|
603
603
|
if (P.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
604
|
-
else if (P.isArray(e) &&
|
|
605
|
-
!(P.isUndefined(e) || e === null) && t.append(o === !0 ?
|
|
604
|
+
else if (P.isArray(e) && ct(e) || (P.isFileList(e) || P.endsWith(n, "[]")) && (s = P.toArray(e))) return n = ot(n), s.forEach(function(e, r) {
|
|
605
|
+
!(P.isUndefined(e) || e === null) && t.append(o === !0 ? st([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
606
606
|
}), !1;
|
|
607
607
|
}
|
|
608
|
-
return z(e) ? !0 : (t.append(
|
|
608
|
+
return z(e) ? !0 : (t.append(st(i, n, a), u(e)), !1);
|
|
609
609
|
}
|
|
610
|
-
let f = [], p = Object.assign(
|
|
610
|
+
let f = [], p = Object.assign(lt, {
|
|
611
611
|
defaultVisitor: d,
|
|
612
612
|
convertValue: u,
|
|
613
613
|
isVisitable: z
|
|
@@ -626,7 +626,7 @@ function V(e, t, n) {
|
|
|
626
626
|
}
|
|
627
627
|
//#endregion
|
|
628
628
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
629
|
-
function
|
|
629
|
+
function ut(e) {
|
|
630
630
|
let t = {
|
|
631
631
|
"!": "%21",
|
|
632
632
|
"'": "%27",
|
|
@@ -639,29 +639,29 @@ function lt(e) {
|
|
|
639
639
|
return t[e];
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
this._pairs = [], e &&
|
|
642
|
+
function dt(e, t) {
|
|
643
|
+
this._pairs = [], e && B(e, this, t);
|
|
644
644
|
}
|
|
645
|
-
var
|
|
646
|
-
|
|
645
|
+
var ft = dt.prototype;
|
|
646
|
+
ft.append = function(e, t) {
|
|
647
647
|
this._pairs.push([e, t]);
|
|
648
|
-
},
|
|
648
|
+
}, ft.toString = function(e) {
|
|
649
649
|
let t = e ? function(t) {
|
|
650
|
-
return e.call(this, t,
|
|
651
|
-
} :
|
|
650
|
+
return e.call(this, t, ut);
|
|
651
|
+
} : ut;
|
|
652
652
|
return this._pairs.map(function(e) {
|
|
653
653
|
return t(e[0]) + "=" + t(e[1]);
|
|
654
654
|
}, "").join("&");
|
|
655
655
|
};
|
|
656
656
|
//#endregion
|
|
657
657
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/buildURL.js
|
|
658
|
-
function
|
|
658
|
+
function pt(e) {
|
|
659
659
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function mt(e, t, n) {
|
|
662
662
|
if (!t) return e;
|
|
663
|
-
let r = n && n.encode ||
|
|
664
|
-
if (o = a ? a(t, i) : P.isURLSearchParams(t) ? t.toString() : new
|
|
663
|
+
let r = n && n.encode || pt, i = P.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
664
|
+
if (o = a ? a(t, i) : P.isURLSearchParams(t) ? t.toString() : new dt(t, i).toString(r), o) {
|
|
665
665
|
let t = e.indexOf("#");
|
|
666
666
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
667
667
|
}
|
|
@@ -669,7 +669,7 @@ function pt(e, t, n) {
|
|
|
669
669
|
}
|
|
670
670
|
//#endregion
|
|
671
671
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
672
|
-
var
|
|
672
|
+
var ht = class {
|
|
673
673
|
constructor() {
|
|
674
674
|
this.handlers = [];
|
|
675
675
|
}
|
|
@@ -692,16 +692,16 @@ var mt = class {
|
|
|
692
692
|
t !== null && e(t);
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
},
|
|
695
|
+
}, gt = {
|
|
696
696
|
silentJSONParsing: !0,
|
|
697
697
|
forcedJSONParsing: !0,
|
|
698
698
|
clarifyTimeoutError: !1,
|
|
699
699
|
legacyInterceptorReqResOrdering: !0,
|
|
700
700
|
advertiseZstdAcceptEncoding: !1
|
|
701
|
-
},
|
|
701
|
+
}, _t = {
|
|
702
702
|
isBrowser: !0,
|
|
703
703
|
classes: {
|
|
704
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
704
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : dt,
|
|
705
705
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
706
706
|
Blob: typeof Blob < "u" ? Blob : null
|
|
707
707
|
},
|
|
@@ -713,59 +713,59 @@ var mt = class {
|
|
|
713
713
|
"url",
|
|
714
714
|
"data"
|
|
715
715
|
]
|
|
716
|
-
},
|
|
717
|
-
hasBrowserEnv: () =>
|
|
718
|
-
hasStandardBrowserEnv: () =>
|
|
719
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
720
|
-
navigator: () =>
|
|
721
|
-
origin: () =>
|
|
722
|
-
}),
|
|
716
|
+
}, vt = /* @__PURE__ */ s({
|
|
717
|
+
hasBrowserEnv: () => yt,
|
|
718
|
+
hasStandardBrowserEnv: () => xt,
|
|
719
|
+
hasStandardBrowserWebWorkerEnv: () => St,
|
|
720
|
+
navigator: () => bt,
|
|
721
|
+
origin: () => Ct
|
|
722
|
+
}), yt = typeof window < "u" && typeof document < "u", bt = typeof navigator == "object" && navigator || void 0, xt = yt && (!bt || [
|
|
723
723
|
"ReactNative",
|
|
724
724
|
"NativeScript",
|
|
725
725
|
"NS"
|
|
726
|
-
].indexOf(
|
|
727
|
-
...
|
|
728
|
-
...
|
|
726
|
+
].indexOf(bt.product) < 0), St = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ct = yt && window.location.href || "http://localhost", V = {
|
|
727
|
+
...vt,
|
|
728
|
+
..._t
|
|
729
729
|
};
|
|
730
730
|
//#endregion
|
|
731
731
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
732
|
-
function
|
|
733
|
-
return
|
|
732
|
+
function wt(e, t) {
|
|
733
|
+
return B(e, new V.classes.URLSearchParams(), {
|
|
734
734
|
visitor: function(e, t, n, r) {
|
|
735
|
-
return
|
|
735
|
+
return V.isNode && P.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
736
736
|
},
|
|
737
737
|
...t
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
740
|
//#endregion
|
|
741
741
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
742
|
-
function
|
|
742
|
+
function Tt(e) {
|
|
743
743
|
return P.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function Et(e) {
|
|
746
746
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
747
747
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
748
748
|
return t;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Dt(e) {
|
|
751
751
|
function t(e, n, r, i) {
|
|
752
752
|
let a = e[i++];
|
|
753
753
|
if (a === "__proto__") return !0;
|
|
754
754
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
755
|
-
return a = !a && P.isArray(r) ? r.length : a, s ? (P.hasOwnProp(r, a) ? r[a] = P.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!P.hasOwnProp(r, a) || !P.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && P.isArray(r[a]) && (r[a] =
|
|
755
|
+
return a = !a && P.isArray(r) ? r.length : a, s ? (P.hasOwnProp(r, a) ? r[a] = P.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!P.hasOwnProp(r, a) || !P.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && P.isArray(r[a]) && (r[a] = Et(r[a])), !o);
|
|
756
756
|
}
|
|
757
757
|
if (P.isFormData(e) && P.isFunction(e.entries)) {
|
|
758
758
|
let n = {};
|
|
759
759
|
return P.forEachEntry(e, (e, r) => {
|
|
760
|
-
t(
|
|
760
|
+
t(Tt(e), r, n, 0);
|
|
761
761
|
}), n;
|
|
762
762
|
}
|
|
763
763
|
return null;
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/defaults/index.js
|
|
767
|
-
var
|
|
768
|
-
function
|
|
767
|
+
var H = (e, t) => e != null && P.hasOwnProp(e, t) ? e[t] : void 0;
|
|
768
|
+
function Ot(e, t, n) {
|
|
769
769
|
if (P.isString(e)) try {
|
|
770
770
|
return (t || JSON.parse)(e), P.trim(e);
|
|
771
771
|
} catch (e) {
|
|
@@ -773,8 +773,8 @@ function Dt(e, t, n) {
|
|
|
773
773
|
}
|
|
774
774
|
return (n || JSON.stringify)(e);
|
|
775
775
|
}
|
|
776
|
-
var
|
|
777
|
-
transitional:
|
|
776
|
+
var U = {
|
|
777
|
+
transitional: gt,
|
|
778
778
|
adapter: [
|
|
779
779
|
"xhr",
|
|
780
780
|
"http",
|
|
@@ -782,30 +782,30 @@ var W = {
|
|
|
782
782
|
],
|
|
783
783
|
transformRequest: [function(e, t) {
|
|
784
784
|
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = P.isObject(e);
|
|
785
|
-
if (i && P.isHTMLForm(e) && (e = new FormData(e)), P.isFormData(e)) return r ? JSON.stringify(
|
|
785
|
+
if (i && P.isHTMLForm(e) && (e = new FormData(e)), P.isFormData(e)) return r ? JSON.stringify(Dt(e)) : e;
|
|
786
786
|
if (P.isArrayBuffer(e) || P.isBuffer(e) || P.isStream(e) || P.isFile(e) || P.isBlob(e) || P.isReadableStream(e)) return e;
|
|
787
787
|
if (P.isArrayBufferView(e)) return e.buffer;
|
|
788
788
|
if (P.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
789
789
|
let a;
|
|
790
790
|
if (i) {
|
|
791
|
-
let t =
|
|
792
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
791
|
+
let t = H(this, "formSerializer");
|
|
792
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return wt(e, t).toString();
|
|
793
793
|
if ((a = P.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
794
|
-
let n =
|
|
795
|
-
return
|
|
794
|
+
let n = H(this, "env"), r = n && n.FormData;
|
|
795
|
+
return B(a ? { "files[]": e } : e, r && new r(), t);
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
798
|
+
return i || r ? (t.setContentType("application/json", !1), Ot(e)) : e;
|
|
799
799
|
}],
|
|
800
800
|
transformResponse: [function(e) {
|
|
801
|
-
let t =
|
|
801
|
+
let t = H(this, "transitional") || U.transitional, n = t && t.forcedJSONParsing, r = H(this, "responseType"), i = r === "json";
|
|
802
802
|
if (P.isResponse(e) || P.isReadableStream(e)) return e;
|
|
803
803
|
if (e && P.isString(e) && (n && !r || i)) {
|
|
804
804
|
let n = !(t && t.silentJSONParsing) && i;
|
|
805
805
|
try {
|
|
806
|
-
return JSON.parse(e,
|
|
806
|
+
return JSON.parse(e, H(this, "parseReviver"));
|
|
807
807
|
} catch (e) {
|
|
808
|
-
if (n) throw e.name === "SyntaxError" ? R.from(e, R.ERR_BAD_RESPONSE, this, null,
|
|
808
|
+
if (n) throw e.name === "SyntaxError" ? R.from(e, R.ERR_BAD_RESPONSE, this, null, H(this, "response")) : e;
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
811
|
return e;
|
|
@@ -816,8 +816,8 @@ var W = {
|
|
|
816
816
|
maxContentLength: -1,
|
|
817
817
|
maxBodyLength: -1,
|
|
818
818
|
env: {
|
|
819
|
-
FormData:
|
|
820
|
-
Blob:
|
|
819
|
+
FormData: V.classes.FormData,
|
|
820
|
+
Blob: V.classes.Blob
|
|
821
821
|
},
|
|
822
822
|
validateStatus: function(e) {
|
|
823
823
|
return e >= 200 && e < 300;
|
|
@@ -836,43 +836,43 @@ P.forEach([
|
|
|
836
836
|
"patch",
|
|
837
837
|
"query"
|
|
838
838
|
], (e) => {
|
|
839
|
-
|
|
839
|
+
U.headers[e] = {};
|
|
840
840
|
});
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/transformData.js
|
|
843
|
-
function
|
|
844
|
-
let n = this ||
|
|
843
|
+
function kt(e, t) {
|
|
844
|
+
let n = this || U, r = t || n, i = L.from(r.headers), a = r.data;
|
|
845
845
|
return P.forEach(e, function(e) {
|
|
846
846
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
847
847
|
}), i.normalize(), a;
|
|
848
848
|
}
|
|
849
849
|
//#endregion
|
|
850
850
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/cancel/isCancel.js
|
|
851
|
-
function
|
|
851
|
+
function At(e) {
|
|
852
852
|
return !!(e && e.__CANCEL__);
|
|
853
853
|
}
|
|
854
854
|
//#endregion
|
|
855
855
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
856
|
-
var
|
|
856
|
+
var W = class extends R {
|
|
857
857
|
constructor(e, t, n) {
|
|
858
858
|
super(e == null ? "canceled" : e, R.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
859
859
|
}
|
|
860
860
|
};
|
|
861
861
|
//#endregion
|
|
862
862
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/settle.js
|
|
863
|
-
function
|
|
863
|
+
function jt(e, t, n) {
|
|
864
864
|
let r = n.config.validateStatus;
|
|
865
865
|
!n.status || !r || r(n.status) ? e(n) : t(new R("Request failed with status code " + n.status, n.status >= 400 && n.status < 500 ? R.ERR_BAD_REQUEST : R.ERR_BAD_RESPONSE, n.config, n.request, n));
|
|
866
866
|
}
|
|
867
867
|
//#endregion
|
|
868
868
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/parseProtocol.js
|
|
869
|
-
function
|
|
869
|
+
function Mt(e) {
|
|
870
870
|
let t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
871
871
|
return t && t[1] || "";
|
|
872
872
|
}
|
|
873
873
|
//#endregion
|
|
874
874
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/speedometer.js
|
|
875
|
-
function
|
|
875
|
+
function Nt(e, t) {
|
|
876
876
|
e = e || 10;
|
|
877
877
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
878
878
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -887,7 +887,7 @@ function Mt(e, t) {
|
|
|
887
887
|
}
|
|
888
888
|
//#endregion
|
|
889
889
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/throttle.js
|
|
890
|
-
function
|
|
890
|
+
function Pt(e, t) {
|
|
891
891
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
892
892
|
n = r, i = null, a && (clearTimeout(a), a = null), e(...t);
|
|
893
893
|
};
|
|
@@ -900,9 +900,9 @@ function Nt(e, t) {
|
|
|
900
900
|
}
|
|
901
901
|
//#endregion
|
|
902
902
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
903
|
-
var
|
|
904
|
-
let r = 0, i =
|
|
905
|
-
return
|
|
903
|
+
var G = (e, t, n = 3) => {
|
|
904
|
+
let r = 0, i = Nt(50, 250);
|
|
905
|
+
return Pt((n) => {
|
|
906
906
|
if (!n || typeof n.loaded != "number") return;
|
|
907
907
|
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = o == null ? a : Math.min(a, o), c = Math.max(0, s - r), l = i(c);
|
|
908
908
|
r = Math.max(r, s), e({
|
|
@@ -917,14 +917,14 @@ var K = (e, t, n = 3) => {
|
|
|
917
917
|
[t ? "download" : "upload"]: !0
|
|
918
918
|
});
|
|
919
919
|
}, n);
|
|
920
|
-
},
|
|
920
|
+
}, Ft = (e, t) => {
|
|
921
921
|
let n = e != null;
|
|
922
922
|
return [(r) => t[0]({
|
|
923
923
|
lengthComputable: n,
|
|
924
924
|
total: e,
|
|
925
925
|
loaded: r
|
|
926
926
|
}), t[1]];
|
|
927
|
-
},
|
|
927
|
+
}, It = (e) => (...t) => P.asap(() => e(...t)), Lt = V.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, V.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(V.origin), V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)) : () => !0, Rt = V.hasStandardBrowserEnv ? {
|
|
928
928
|
write(e, t, n, r, i, a, o) {
|
|
929
929
|
if (typeof document > "u") return;
|
|
930
930
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
@@ -951,24 +951,24 @@ var K = (e, t, n = 3) => {
|
|
|
951
951
|
};
|
|
952
952
|
//#endregion
|
|
953
953
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
954
|
-
function
|
|
954
|
+
function zt(e) {
|
|
955
955
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
956
956
|
}
|
|
957
957
|
//#endregion
|
|
958
958
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/combineURLs.js
|
|
959
|
-
function
|
|
959
|
+
function Bt(e, t) {
|
|
960
960
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
961
961
|
}
|
|
962
962
|
//#endregion
|
|
963
963
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/buildFullPath.js
|
|
964
|
-
function
|
|
965
|
-
let r = !
|
|
966
|
-
return e && (r || n === !1) ?
|
|
964
|
+
function Vt(e, t, n) {
|
|
965
|
+
let r = !zt(t);
|
|
966
|
+
return e && (r || n === !1) ? Bt(e, t) : t;
|
|
967
967
|
}
|
|
968
968
|
//#endregion
|
|
969
969
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/mergeConfig.js
|
|
970
|
-
var
|
|
971
|
-
function
|
|
970
|
+
var Ht = (e) => e instanceof L ? { ...e } : e;
|
|
971
|
+
function K(e, t) {
|
|
972
972
|
t = t || {};
|
|
973
973
|
let n = Object.create(null);
|
|
974
974
|
Object.defineProperty(n, "hasOwnProperty", {
|
|
@@ -1026,7 +1026,7 @@ function q(e, t) {
|
|
|
1026
1026
|
allowedSocketPaths: o,
|
|
1027
1027
|
responseEncoding: o,
|
|
1028
1028
|
validateStatus: s,
|
|
1029
|
-
headers: (e, t, n) => i(
|
|
1029
|
+
headers: (e, t, n) => i(Ht(e), Ht(t), n, !0)
|
|
1030
1030
|
};
|
|
1031
1031
|
return P.forEach(Object.keys({
|
|
1032
1032
|
...e,
|
|
@@ -1039,28 +1039,28 @@ function q(e, t) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
//#endregion
|
|
1041
1041
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/resolveConfig.js
|
|
1042
|
-
var
|
|
1043
|
-
function
|
|
1042
|
+
var Ut = ["content-type", "content-length"];
|
|
1043
|
+
function Wt(e, t, n) {
|
|
1044
1044
|
if (n !== "content-only") {
|
|
1045
1045
|
e.set(t);
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
1048
|
Object.entries(t).forEach(([t, n]) => {
|
|
1049
|
-
|
|
1049
|
+
Ut.includes(t.toLowerCase()) && e.set(t, n);
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
|
-
var
|
|
1053
|
-
function
|
|
1054
|
-
let t =
|
|
1055
|
-
if (t.headers = s = L.from(s), t.url =
|
|
1056
|
-
let e = a && o &&
|
|
1052
|
+
var Gt = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => String.fromCharCode(parseInt(t, 16)));
|
|
1053
|
+
function Kt(e) {
|
|
1054
|
+
let t = K({}, e), n = (e) => P.hasOwnProp(t, e) ? t[e] : void 0, r = n("data"), i = n("withXSRFToken"), a = n("xsrfHeaderName"), o = n("xsrfCookieName"), s = n("headers"), c = n("auth"), l = n("baseURL"), u = n("allowAbsoluteUrls"), d = n("url");
|
|
1055
|
+
if (t.headers = s = L.from(s), t.url = mt(Vt(l, d, u), n("params"), n("paramsSerializer")), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? Gt(c.password) : ""))), P.isFormData(r) && (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv || P.isReactNative(r) ? s.setContentType(void 0) : P.isFunction(r.getHeaders) && Wt(s, r.getHeaders(), n("formDataHeaderPolicy"))), V.hasStandardBrowserEnv && (P.isFunction(i) && (i = i(t)), i === !0 || i == null && Lt(t.url))) {
|
|
1056
|
+
let e = a && o && Rt.read(o);
|
|
1057
1057
|
e && s.set(a, e);
|
|
1058
1058
|
}
|
|
1059
1059
|
return t;
|
|
1060
1060
|
}
|
|
1061
|
-
var
|
|
1061
|
+
var qt = typeof XMLHttpRequest < "u" && function(e) {
|
|
1062
1062
|
return new Promise(function(t, n) {
|
|
1063
|
-
let r =
|
|
1063
|
+
let r = Kt(e), i = r.data, a = L.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1064
1064
|
function m() {
|
|
1065
1065
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1066
1066
|
}
|
|
@@ -1069,7 +1069,7 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1069
1069
|
function g() {
|
|
1070
1070
|
if (!h) return;
|
|
1071
1071
|
let r = L.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1072
|
-
|
|
1072
|
+
jt(function(e) {
|
|
1073
1073
|
t(e), m();
|
|
1074
1074
|
}, function(e) {
|
|
1075
1075
|
n(e), m();
|
|
@@ -1090,27 +1090,27 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1090
1090
|
let r = new R(t && t.message ? t.message : "Network Error", R.ERR_NETWORK, e, h);
|
|
1091
1091
|
r.event = t || null, n(r), m(), h = null;
|
|
1092
1092
|
}, h.ontimeout = function() {
|
|
1093
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1093
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || gt;
|
|
1094
1094
|
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new R(t, i.clarifyTimeoutError ? R.ETIMEDOUT : R.ECONNABORTED, e, h)), m(), h = null;
|
|
1095
1095
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && P.forEach(Xe(a), function(e, t) {
|
|
1096
1096
|
h.setRequestHeader(t, e);
|
|
1097
|
-
}), P.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] =
|
|
1098
|
-
h && (n(!t || t.type ? new
|
|
1097
|
+
}), P.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = G(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = G(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1098
|
+
h && (n(!t || t.type ? new W(null, e, h) : t), h.abort(), m(), h = null);
|
|
1099
1099
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1100
|
-
let _ =
|
|
1101
|
-
if (_ && !
|
|
1100
|
+
let _ = Mt(r.url);
|
|
1101
|
+
if (_ && !V.protocols.includes(_)) {
|
|
1102
1102
|
n(new R("Unsupported protocol " + _ + ":", R.ERR_BAD_REQUEST, e));
|
|
1103
1103
|
return;
|
|
1104
1104
|
}
|
|
1105
1105
|
h.send(i || null);
|
|
1106
1106
|
});
|
|
1107
|
-
},
|
|
1107
|
+
}, Jt = (e, t) => {
|
|
1108
1108
|
if (e = e ? e.filter(Boolean) : [], !t && !e.length) return;
|
|
1109
1109
|
let n = new AbortController(), r = !1, i = function(e) {
|
|
1110
1110
|
if (!r) {
|
|
1111
1111
|
r = !0, o();
|
|
1112
1112
|
let t = e instanceof Error ? e : this.reason;
|
|
1113
|
-
n.abort(t instanceof R ? t : new
|
|
1113
|
+
n.abort(t instanceof R ? t : new W(t instanceof Error ? t.message : t));
|
|
1114
1114
|
}
|
|
1115
1115
|
}, a = t && setTimeout(() => {
|
|
1116
1116
|
a = null, i(new R(`timeout of ${t}ms exceeded`, R.ETIMEDOUT));
|
|
@@ -1122,7 +1122,7 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1122
1122
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1123
1123
|
let { signal: s } = n;
|
|
1124
1124
|
return s.unsubscribe = () => P.asap(o), s;
|
|
1125
|
-
},
|
|
1125
|
+
}, Yt = function* (e, t) {
|
|
1126
1126
|
let n = e.byteLength;
|
|
1127
1127
|
if (!t || n < t) {
|
|
1128
1128
|
yield e;
|
|
@@ -1130,9 +1130,9 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
let r = 0, i;
|
|
1132
1132
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1133
|
-
},
|
|
1134
|
-
for await (let n of
|
|
1135
|
-
},
|
|
1133
|
+
}, Xt = async function* (e, t) {
|
|
1134
|
+
for await (let n of Zt(e)) yield* Yt(n, t);
|
|
1135
|
+
}, Zt = async function* (e) {
|
|
1136
1136
|
if (e[Symbol.asyncIterator]) {
|
|
1137
1137
|
yield* e;
|
|
1138
1138
|
return;
|
|
@@ -1147,8 +1147,8 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1147
1147
|
} finally {
|
|
1148
1148
|
await t.cancel();
|
|
1149
1149
|
}
|
|
1150
|
-
},
|
|
1151
|
-
let i =
|
|
1150
|
+
}, Qt = (e, t, n, r) => {
|
|
1151
|
+
let i = Xt(e, t), a = 0, o, s = (e) => {
|
|
1152
1152
|
o || (o = !0, r && r(e));
|
|
1153
1153
|
};
|
|
1154
1154
|
return new ReadableStream({
|
|
@@ -1172,7 +1172,7 @@ var Kt = typeof XMLHttpRequest < "u" && function(e) {
|
|
|
1172
1172
|
};
|
|
1173
1173
|
//#endregion
|
|
1174
1174
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
1175
|
-
function
|
|
1175
|
+
function $t(e) {
|
|
1176
1176
|
if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
|
|
1177
1177
|
let t = e.indexOf(",");
|
|
1178
1178
|
if (t < 0) return 0;
|
|
@@ -1203,32 +1203,32 @@ function Qt(e) {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
//#endregion
|
|
1205
1205
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/env/data.js
|
|
1206
|
-
var
|
|
1206
|
+
var en = "1.17.0", tn = 64 * 1024, { isFunction: q } = P, nn = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => String.fromCharCode(parseInt(t, 16))), rn = (e) => {
|
|
1207
1207
|
if (!P.isString(e)) return e;
|
|
1208
1208
|
try {
|
|
1209
1209
|
return decodeURIComponent(e);
|
|
1210
1210
|
} catch {
|
|
1211
1211
|
return e;
|
|
1212
1212
|
}
|
|
1213
|
-
},
|
|
1213
|
+
}, an = (e, ...t) => {
|
|
1214
1214
|
try {
|
|
1215
1215
|
return !!e(...t);
|
|
1216
1216
|
} catch {
|
|
1217
1217
|
return !1;
|
|
1218
1218
|
}
|
|
1219
|
-
},
|
|
1219
|
+
}, on = (e) => {
|
|
1220
1220
|
let t = e.indexOf("://"), n = e;
|
|
1221
1221
|
return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
|
|
1222
|
-
},
|
|
1222
|
+
}, sn = (e) => {
|
|
1223
1223
|
let t = P.global !== void 0 && P.global !== null ? P.global : globalThis, { ReadableStream: n, TextEncoder: r } = t;
|
|
1224
1224
|
e = P.merge.call({ skipUndefined: !0 }, {
|
|
1225
1225
|
Request: t.Request,
|
|
1226
1226
|
Response: t.Response
|
|
1227
1227
|
}, e);
|
|
1228
|
-
let { fetch: i, Request: a, Response: o } = e, s = i ?
|
|
1228
|
+
let { fetch: i, Request: a, Response: o } = e, s = i ? q(i) : typeof fetch == "function", c = q(a), l = q(o);
|
|
1229
1229
|
if (!s) return !1;
|
|
1230
|
-
let u = s &&
|
|
1231
|
-
let e = !1, t = new a(
|
|
1230
|
+
let u = s && q(n), d = s && (typeof r == "function" ? ((e) => (t) => e.encode(t))(new r()) : async (e) => new Uint8Array(await new a(e).arrayBuffer())), f = c && u && an(() => {
|
|
1231
|
+
let e = !1, t = new a(V.origin, {
|
|
1232
1232
|
body: new n(),
|
|
1233
1233
|
method: "POST",
|
|
1234
1234
|
get duplex() {
|
|
@@ -1236,7 +1236,7 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}), r = t.headers.has("Content-Type");
|
|
1238
1238
|
return t.body != null && t.body.cancel(), e && !r;
|
|
1239
|
-
}), p = l && u &&
|
|
1239
|
+
}), p = l && u && an(() => P.isReadableStream(new o("").body)), m = { stream: p && ((e) => e.body) };
|
|
1240
1240
|
s && [
|
|
1241
1241
|
"text",
|
|
1242
1242
|
"arrayBuffer",
|
|
@@ -1253,7 +1253,7 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1253
1253
|
let h = async (e) => {
|
|
1254
1254
|
if (e == null) return 0;
|
|
1255
1255
|
if (P.isBlob(e)) return e.size;
|
|
1256
|
-
if (P.isSpecCompliantForm(e)) return (await new a(
|
|
1256
|
+
if (P.isSpecCompliantForm(e)) return (await new a(V.origin, {
|
|
1257
1257
|
method: "POST",
|
|
1258
1258
|
body: e
|
|
1259
1259
|
}).arrayBuffer()).byteLength;
|
|
@@ -1264,9 +1264,9 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1264
1264
|
return n == null ? h(t) : n;
|
|
1265
1265
|
};
|
|
1266
1266
|
return async (e) => {
|
|
1267
|
-
let { url: t, method: n, data: s, signal: l, cancelToken: u, timeout: d, onDownloadProgress: h, onUploadProgress: _, responseType: v, headers: y, withCredentials: b = "same-origin", fetchOptions: x, maxContentLength: S, maxBodyLength: C } =
|
|
1267
|
+
let { url: t, method: n, data: s, signal: l, cancelToken: u, timeout: d, onDownloadProgress: h, onUploadProgress: _, responseType: v, headers: y, withCredentials: b = "same-origin", fetchOptions: x, maxContentLength: S, maxBodyLength: C } = Kt(e), w = P.isNumber(S) && S > -1, ee = P.isNumber(C) && C > -1, T = (t) => P.hasOwnProp(e, t) ? e[t] : void 0, te = i || fetch;
|
|
1268
1268
|
v = v ? (v + "").toLowerCase() : "text";
|
|
1269
|
-
let E =
|
|
1269
|
+
let E = Jt([l, u && u.toAbortSignal()], d), D = null, O = E && E.unsubscribe && (() => {
|
|
1270
1270
|
E.unsubscribe();
|
|
1271
1271
|
}), ne;
|
|
1272
1272
|
try {
|
|
@@ -1274,14 +1274,14 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1274
1274
|
if (l && (i = {
|
|
1275
1275
|
username: l.username || "",
|
|
1276
1276
|
password: l.password || ""
|
|
1277
|
-
}),
|
|
1278
|
-
let e = new URL(t,
|
|
1277
|
+
}), on(t)) {
|
|
1278
|
+
let e = new URL(t, V.origin);
|
|
1279
1279
|
!i && (e.username || e.password) && (i = {
|
|
1280
|
-
username:
|
|
1281
|
-
password:
|
|
1280
|
+
username: rn(e.username),
|
|
1281
|
+
password: rn(e.password)
|
|
1282
1282
|
}), (e.username || e.password) && (e.username = "", e.password = "", t = e.href);
|
|
1283
1283
|
}
|
|
1284
|
-
if (i && (y.delete("authorization"), y.set("Authorization", "Basic " + btoa(
|
|
1284
|
+
if (i && (y.delete("authorization"), y.set("Authorization", "Basic " + btoa(nn((i.username || "") + ":" + (i.password || ""))))), w && typeof t == "string" && t.startsWith("data:") && $t(t) > S) throw new R("maxContentLength size of " + S + " exceeded", R.ERR_BAD_RESPONSE, e, D);
|
|
1285
1285
|
if (ee && n !== "get" && n !== "head") {
|
|
1286
1286
|
let t = await g(y, s);
|
|
1287
1287
|
if (typeof t == "number" && isFinite(t) && t > C) throw new R("Request body larger than maxBodyLength limit", R.ERR_BAD_REQUEST, e, D);
|
|
@@ -1293,8 +1293,8 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1293
1293
|
duplex: "half"
|
|
1294
1294
|
}), n;
|
|
1295
1295
|
if (P.isFormData(s) && (n = e.headers.get("content-type")) && y.setContentType(n), e.body) {
|
|
1296
|
-
let [t, n] =
|
|
1297
|
-
s =
|
|
1296
|
+
let [t, n] = Ft(ne, G(It(_)));
|
|
1297
|
+
s = Qt(e.body, tn, t, n);
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
P.isString(b) || (b = b ? "include" : "omit");
|
|
@@ -1303,7 +1303,7 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1303
1303
|
let e = y.getContentType();
|
|
1304
1304
|
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && y.delete("content-type");
|
|
1305
1305
|
}
|
|
1306
|
-
y.set("User-Agent", "axios/" +
|
|
1306
|
+
y.set("User-Agent", "axios/" + en, !1);
|
|
1307
1307
|
let d = {
|
|
1308
1308
|
...x,
|
|
1309
1309
|
signal: E,
|
|
@@ -1329,8 +1329,8 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1329
1329
|
].forEach((e) => {
|
|
1330
1330
|
t[e] = k[e];
|
|
1331
1331
|
});
|
|
1332
|
-
let n = P.toFiniteNumber(k.headers.get("content-length")), [r, i] = h &&
|
|
1333
|
-
k = new o(
|
|
1332
|
+
let n = P.toFiniteNumber(k.headers.get("content-length")), [r, i] = h && Ft(n, G(It(h), !0)) || [], a = 0;
|
|
1333
|
+
k = new o(Qt(k.body, tn, (t) => {
|
|
1334
1334
|
if (w && (a = t, a > S)) throw new R("maxContentLength size of " + S + " exceeded", R.ERR_BAD_RESPONSE, e, D);
|
|
1335
1335
|
r && r(t);
|
|
1336
1336
|
}, () => {
|
|
@@ -1344,7 +1344,7 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1344
1344
|
if (j != null && (typeof j.byteLength == "number" ? t = j.byteLength : typeof j.size == "number" ? t = j.size : typeof j == "string" && (t = typeof r == "function" ? new r().encode(j).byteLength : j.length)), typeof t == "number" && t > S) throw new R("maxContentLength size of " + S + " exceeded", R.ERR_BAD_RESPONSE, e, D);
|
|
1345
1345
|
}
|
|
1346
1346
|
return !A && O && O(), await new Promise((t, n) => {
|
|
1347
|
-
|
|
1347
|
+
jt(t, n, {
|
|
1348
1348
|
data: j,
|
|
1349
1349
|
headers: L.from(k.headers),
|
|
1350
1350
|
status: k.status,
|
|
@@ -1361,24 +1361,24 @@ var $t = "1.17.0", en = 64 * 1024, { isFunction: J } = P, tn = (e) => encodeURIC
|
|
|
1361
1361
|
throw t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new R("Network Error", R.ERR_NETWORK, e, D, t && t.response), { cause: t.cause || t }) : R.from(t, t && t.code, e, D, t && t.response);
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
|
-
},
|
|
1364
|
+
}, cn = /* @__PURE__ */ new Map(), ln = (e) => {
|
|
1365
1365
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1366
1366
|
r,
|
|
1367
1367
|
i,
|
|
1368
1368
|
n
|
|
1369
|
-
], o = a.length, s, c, l =
|
|
1370
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1369
|
+
], o = a.length, s, c, l = cn;
|
|
1370
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : sn(t)), l = c;
|
|
1371
1371
|
return c;
|
|
1372
1372
|
};
|
|
1373
|
-
|
|
1373
|
+
ln();
|
|
1374
1374
|
//#endregion
|
|
1375
1375
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/adapters/adapters.js
|
|
1376
|
-
var
|
|
1376
|
+
var un = {
|
|
1377
1377
|
http: null,
|
|
1378
|
-
xhr:
|
|
1379
|
-
fetch: { get:
|
|
1378
|
+
xhr: qt,
|
|
1379
|
+
fetch: { get: ln }
|
|
1380
1380
|
};
|
|
1381
|
-
P.forEach(
|
|
1381
|
+
P.forEach(un, (e, t) => {
|
|
1382
1382
|
if (e) {
|
|
1383
1383
|
try {
|
|
1384
1384
|
Object.defineProperty(e, "name", {
|
|
@@ -1392,50 +1392,50 @@ P.forEach(ln, (e, t) => {
|
|
|
1392
1392
|
});
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
|
-
var
|
|
1396
|
-
function
|
|
1395
|
+
var dn = (e) => `- ${e}`, fn = (e) => P.isFunction(e) || e === null || e === !1;
|
|
1396
|
+
function pn(e, t) {
|
|
1397
1397
|
e = P.isArray(e) ? e : [e];
|
|
1398
1398
|
let { length: n } = e, r, i, a = {};
|
|
1399
1399
|
for (let o = 0; o < n; o++) {
|
|
1400
1400
|
r = e[o];
|
|
1401
1401
|
let n;
|
|
1402
|
-
if (i = r, !
|
|
1402
|
+
if (i = r, !fn(r) && (i = un[(n = String(r)).toLowerCase()], i === void 0)) throw new R(`Unknown adapter '${n}'`);
|
|
1403
1403
|
if (i && (P.isFunction(i) || (i = i.get(t)))) break;
|
|
1404
1404
|
a[n || "#" + o] = i;
|
|
1405
1405
|
}
|
|
1406
1406
|
if (!i) {
|
|
1407
1407
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1408
|
-
throw new R("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(
|
|
1408
|
+
throw new R("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(dn).join("\n") : " " + dn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1409
1409
|
}
|
|
1410
1410
|
return i;
|
|
1411
1411
|
}
|
|
1412
|
-
var
|
|
1413
|
-
getAdapter:
|
|
1414
|
-
adapters:
|
|
1412
|
+
var mn = {
|
|
1413
|
+
getAdapter: pn,
|
|
1414
|
+
adapters: un
|
|
1415
1415
|
};
|
|
1416
1416
|
//#endregion
|
|
1417
1417
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
1418
|
-
function mn(e) {
|
|
1419
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new G(null, e);
|
|
1420
|
-
}
|
|
1421
1418
|
function hn(e) {
|
|
1422
|
-
|
|
1419
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new W(null, e);
|
|
1420
|
+
}
|
|
1421
|
+
function gn(e) {
|
|
1422
|
+
return hn(e), e.headers = L.from(e.headers), e.data = kt.call(e, e.transformRequest), [
|
|
1423
1423
|
"post",
|
|
1424
1424
|
"put",
|
|
1425
1425
|
"patch"
|
|
1426
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1427
|
-
|
|
1426
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), mn.getAdapter(e.adapter || U.adapter, e)(e).then(function(t) {
|
|
1427
|
+
hn(e), e.response = t;
|
|
1428
1428
|
try {
|
|
1429
|
-
t.data =
|
|
1429
|
+
t.data = kt.call(e, e.transformResponse, t);
|
|
1430
1430
|
} finally {
|
|
1431
1431
|
delete e.response;
|
|
1432
1432
|
}
|
|
1433
1433
|
return t.headers = L.from(t.headers), t;
|
|
1434
1434
|
}, function(t) {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!At(t) && (hn(e), t && t.response)) {
|
|
1436
1436
|
e.response = t.response;
|
|
1437
1437
|
try {
|
|
1438
|
-
t.response.data =
|
|
1438
|
+
t.response.data = kt.call(e, e.transformResponse, t.response);
|
|
1439
1439
|
} finally {
|
|
1440
1440
|
delete e.response;
|
|
1441
1441
|
}
|
|
@@ -1446,7 +1446,7 @@ function hn(e) {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/validator.js
|
|
1449
|
-
var
|
|
1449
|
+
var J = {};
|
|
1450
1450
|
[
|
|
1451
1451
|
"object",
|
|
1452
1452
|
"boolean",
|
|
@@ -1455,23 +1455,23 @@ var Y = {};
|
|
|
1455
1455
|
"string",
|
|
1456
1456
|
"symbol"
|
|
1457
1457
|
].forEach((e, t) => {
|
|
1458
|
-
|
|
1458
|
+
J[e] = function(n) {
|
|
1459
1459
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1460
1460
|
};
|
|
1461
1461
|
});
|
|
1462
|
-
var
|
|
1463
|
-
|
|
1462
|
+
var _n = {};
|
|
1463
|
+
J.transitional = function(e, t, n) {
|
|
1464
1464
|
function r(e, t) {
|
|
1465
|
-
return "[Axios v" +
|
|
1465
|
+
return "[Axios v" + en + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1466
1466
|
}
|
|
1467
1467
|
return (n, i, a) => {
|
|
1468
1468
|
if (e === !1) throw new R(r(i, " has been removed" + (t ? " in " + t : "")), R.ERR_DEPRECATED);
|
|
1469
|
-
return t && !
|
|
1469
|
+
return t && !_n[i] && (_n[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1470
1470
|
};
|
|
1471
|
-
},
|
|
1471
|
+
}, J.spelling = function(e) {
|
|
1472
1472
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1473
1473
|
};
|
|
1474
|
-
function
|
|
1474
|
+
function vn(e, t, n) {
|
|
1475
1475
|
if (typeof e != "object") throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
|
|
1476
1476
|
let r = Object.keys(e), i = r.length;
|
|
1477
1477
|
for (; i-- > 0;) {
|
|
@@ -1484,14 +1484,14 @@ function _n(e, t, n) {
|
|
|
1484
1484
|
if (n !== !0) throw new R("Unknown option " + a, R.ERR_BAD_OPTION);
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
var
|
|
1488
|
-
assertOptions:
|
|
1489
|
-
validators:
|
|
1490
|
-
},
|
|
1487
|
+
var Y = {
|
|
1488
|
+
assertOptions: vn,
|
|
1489
|
+
validators: J
|
|
1490
|
+
}, X = Y.validators, Z = class {
|
|
1491
1491
|
constructor(e) {
|
|
1492
1492
|
this.defaults = e || {}, this.interceptors = {
|
|
1493
|
-
request: new
|
|
1494
|
-
response: new
|
|
1493
|
+
request: new ht(),
|
|
1494
|
+
response: new ht()
|
|
1495
1495
|
};
|
|
1496
1496
|
}
|
|
1497
1497
|
async request(e, t) {
|
|
@@ -1518,20 +1518,20 @@ var X = {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
_request(e, t) {
|
|
1521
|
-
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t =
|
|
1521
|
+
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = K(this.defaults, t);
|
|
1522
1522
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1523
|
-
n !== void 0 &&
|
|
1524
|
-
silentJSONParsing:
|
|
1525
|
-
forcedJSONParsing:
|
|
1526
|
-
clarifyTimeoutError:
|
|
1527
|
-
legacyInterceptorReqResOrdering:
|
|
1528
|
-
advertiseZstdAcceptEncoding:
|
|
1529
|
-
}, !1), r != null && (P.isFunction(r) ? t.paramsSerializer = { serialize: r } :
|
|
1530
|
-
encode:
|
|
1531
|
-
serialize:
|
|
1532
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1533
|
-
baseUrl:
|
|
1534
|
-
withXsrfToken:
|
|
1523
|
+
n !== void 0 && Y.assertOptions(n, {
|
|
1524
|
+
silentJSONParsing: X.transitional(X.boolean),
|
|
1525
|
+
forcedJSONParsing: X.transitional(X.boolean),
|
|
1526
|
+
clarifyTimeoutError: X.transitional(X.boolean),
|
|
1527
|
+
legacyInterceptorReqResOrdering: X.transitional(X.boolean),
|
|
1528
|
+
advertiseZstdAcceptEncoding: X.transitional(X.boolean)
|
|
1529
|
+
}, !1), r != null && (P.isFunction(r) ? t.paramsSerializer = { serialize: r } : Y.assertOptions(r, {
|
|
1530
|
+
encode: X.function,
|
|
1531
|
+
serialize: X.function
|
|
1532
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Y.assertOptions(t, {
|
|
1533
|
+
baseUrl: X.spelling("baseURL"),
|
|
1534
|
+
withXsrfToken: X.spelling("withXSRFToken")
|
|
1535
1535
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1536
1536
|
let a = i && P.merge(i.common, i[t.method]);
|
|
1537
1537
|
i && P.forEach([
|
|
@@ -1550,7 +1550,7 @@ var X = {
|
|
|
1550
1550
|
this.interceptors.request.forEach(function(e) {
|
|
1551
1551
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1552
1552
|
s = s && e.synchronous;
|
|
1553
|
-
let n = t.transitional ||
|
|
1553
|
+
let n = t.transitional || gt;
|
|
1554
1554
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1555
1555
|
});
|
|
1556
1556
|
let c = [];
|
|
@@ -1559,7 +1559,7 @@ var X = {
|
|
|
1559
1559
|
});
|
|
1560
1560
|
let l, u = 0, d;
|
|
1561
1561
|
if (!s) {
|
|
1562
|
-
let e = [
|
|
1562
|
+
let e = [gn.bind(this), void 0];
|
|
1563
1563
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1564
1564
|
return l;
|
|
1565
1565
|
}
|
|
@@ -1575,7 +1575,7 @@ var X = {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
try {
|
|
1578
|
-
l =
|
|
1578
|
+
l = gn.call(this, f);
|
|
1579
1579
|
} catch (e) {
|
|
1580
1580
|
return Promise.reject(e);
|
|
1581
1581
|
}
|
|
@@ -1583,7 +1583,7 @@ var X = {
|
|
|
1583
1583
|
return l;
|
|
1584
1584
|
}
|
|
1585
1585
|
getUri(e) {
|
|
1586
|
-
return e =
|
|
1586
|
+
return e = K(this.defaults, e), mt(Vt(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1587
1587
|
}
|
|
1588
1588
|
};
|
|
1589
1589
|
P.forEach([
|
|
@@ -1592,8 +1592,8 @@ P.forEach([
|
|
|
1592
1592
|
"head",
|
|
1593
1593
|
"options"
|
|
1594
1594
|
], function(e) {
|
|
1595
|
-
|
|
1596
|
-
return this.request(
|
|
1595
|
+
Z.prototype[e] = function(t, n) {
|
|
1596
|
+
return this.request(K(n || {}, {
|
|
1597
1597
|
method: e,
|
|
1598
1598
|
url: t,
|
|
1599
1599
|
data: (n || {}).data
|
|
@@ -1607,7 +1607,7 @@ P.forEach([
|
|
|
1607
1607
|
], function(e) {
|
|
1608
1608
|
function t(t) {
|
|
1609
1609
|
return function(n, r, i) {
|
|
1610
|
-
return this.request(
|
|
1610
|
+
return this.request(K(i || {}, {
|
|
1611
1611
|
method: e,
|
|
1612
1612
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1613
1613
|
url: n,
|
|
@@ -1615,11 +1615,11 @@ P.forEach([
|
|
|
1615
1615
|
}));
|
|
1616
1616
|
};
|
|
1617
1617
|
}
|
|
1618
|
-
|
|
1618
|
+
Z.prototype[e] = t(), e !== "query" && (Z.prototype[e + "Form"] = t(!0));
|
|
1619
1619
|
});
|
|
1620
1620
|
//#endregion
|
|
1621
1621
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
1622
|
-
var
|
|
1622
|
+
var yn = class e {
|
|
1623
1623
|
constructor(e) {
|
|
1624
1624
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1625
1625
|
let t;
|
|
@@ -1640,7 +1640,7 @@ var vn = class e {
|
|
|
1640
1640
|
n.unsubscribe(t);
|
|
1641
1641
|
}, r;
|
|
1642
1642
|
}, e(function(e, r, i) {
|
|
1643
|
-
n.reason || (n.reason = new
|
|
1643
|
+
n.reason || (n.reason = new W(e, r, i), t(n.reason));
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
1646
|
throwIfRequested() {
|
|
@@ -1676,19 +1676,19 @@ var vn = class e {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
//#endregion
|
|
1678
1678
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/spread.js
|
|
1679
|
-
function
|
|
1679
|
+
function bn(e) {
|
|
1680
1680
|
return function(t) {
|
|
1681
1681
|
return e.apply(null, t);
|
|
1682
1682
|
};
|
|
1683
1683
|
}
|
|
1684
1684
|
//#endregion
|
|
1685
1685
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1686
|
-
function
|
|
1686
|
+
function xn(e) {
|
|
1687
1687
|
return P.isObject(e) && e.isAxiosError === !0;
|
|
1688
1688
|
}
|
|
1689
1689
|
//#endregion
|
|
1690
1690
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1691
|
-
var
|
|
1691
|
+
var Sn = {
|
|
1692
1692
|
Continue: 100,
|
|
1693
1693
|
SwitchingProtocols: 101,
|
|
1694
1694
|
Processing: 102,
|
|
@@ -1759,39 +1759,39 @@ var xn = {
|
|
|
1759
1759
|
SslHandshakeFailed: 525,
|
|
1760
1760
|
InvalidSslCertificate: 526
|
|
1761
1761
|
};
|
|
1762
|
-
Object.entries(
|
|
1763
|
-
|
|
1762
|
+
Object.entries(Sn).forEach(([e, t]) => {
|
|
1763
|
+
Sn[t] = e;
|
|
1764
1764
|
});
|
|
1765
1765
|
//#endregion
|
|
1766
1766
|
//#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/axios.js
|
|
1767
|
-
function
|
|
1768
|
-
let t = new
|
|
1769
|
-
return P.extend(n,
|
|
1770
|
-
return
|
|
1767
|
+
function Cn(e) {
|
|
1768
|
+
let t = new Z(e), n = u(Z.prototype.request, t);
|
|
1769
|
+
return P.extend(n, Z.prototype, t, { allOwnKeys: !0 }), P.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1770
|
+
return Cn(K(e, t));
|
|
1771
1771
|
}, n;
|
|
1772
1772
|
}
|
|
1773
|
-
var
|
|
1774
|
-
|
|
1773
|
+
var Q = Cn(U);
|
|
1774
|
+
Q.Axios = Z, Q.CanceledError = W, Q.CancelToken = yn, Q.isCancel = At, Q.VERSION = en, Q.toFormData = B, Q.AxiosError = R, Q.Cancel = Q.CanceledError, Q.all = function(e) {
|
|
1775
1775
|
return Promise.all(e);
|
|
1776
|
-
},
|
|
1776
|
+
}, Q.spread = bn, Q.isAxiosError = xn, Q.mergeConfig = K, Q.AxiosHeaders = L, Q.formToJSON = (e) => Dt(P.isHTMLForm(e) ? new FormData(e) : e), Q.getAdapter = mn.getAdapter, Q.HttpStatusCode = Sn, Q.default = Q;
|
|
1777
1777
|
//#endregion
|
|
1778
1778
|
//#region src/api/constants.ts
|
|
1779
|
-
var
|
|
1779
|
+
var wn = "ph-app-id", Tn = "apollographql-client-name", En = "fi-sapia", Dn = "apollographql-client-version", On = [
|
|
1780
1780
|
"local",
|
|
1781
1781
|
"dev",
|
|
1782
1782
|
"qa",
|
|
1783
1783
|
"sandbox",
|
|
1784
1784
|
"product"
|
|
1785
|
-
],
|
|
1785
|
+
], kn = [
|
|
1786
1786
|
"ap-southeast-2",
|
|
1787
1787
|
"eu-west-1",
|
|
1788
1788
|
"us-east-1"
|
|
1789
|
-
],
|
|
1789
|
+
], An = "chatbot", jn = {
|
|
1790
1790
|
dev: "https://fi-api.dev.predictivehire.com",
|
|
1791
1791
|
qa: "https://fi-api.qa.predictivehire.com",
|
|
1792
1792
|
sandbox: "https://fi-api.sandbox.predictivehire.com",
|
|
1793
1793
|
product: "https://fi-api.product.predictivehire.com"
|
|
1794
|
-
},
|
|
1794
|
+
}, Mn = "http://fi.localhost.com:5004", Nn = ({ env: e, apiOrigin: t }) => t ? t.replace(/\/$/, "") : e === "local" ? Mn : jn[e], Pn = (e) => `${Nn(e)}/api/${e.region}/${An}`, Fn = (e) => {
|
|
1795
1795
|
let t, n = [];
|
|
1796
1796
|
for (let r of e.split("\n")) {
|
|
1797
1797
|
if (r === "" || r.startsWith(":")) continue;
|
|
@@ -1803,7 +1803,7 @@ var Cn = "ph-app-id", wn = "apollographql-client-name", Tn = "fi-sapia", En = "a
|
|
|
1803
1803
|
data: n.join("\n")
|
|
1804
1804
|
};
|
|
1805
1805
|
};
|
|
1806
|
-
async function*
|
|
1806
|
+
async function* In(e) {
|
|
1807
1807
|
let t = e.getReader(), n = new TextDecoder(), r = "";
|
|
1808
1808
|
try {
|
|
1809
1809
|
for (;;) {
|
|
@@ -1814,7 +1814,7 @@ async function* Fn(e) {
|
|
|
1814
1814
|
for (; (a = r.indexOf("\n\n")) !== -1;) {
|
|
1815
1815
|
let e = r.slice(0, a);
|
|
1816
1816
|
r = r.slice(a + 2);
|
|
1817
|
-
let t =
|
|
1817
|
+
let t = Fn(e);
|
|
1818
1818
|
(t.event !== void 0 || t.data !== "") && (yield t);
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
@@ -1823,15 +1823,19 @@ async function* Fn(e) {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
1825
|
//#endregion
|
|
1826
|
-
//#region src/api/
|
|
1827
|
-
var
|
|
1826
|
+
//#region src/api/types/responses.ts
|
|
1827
|
+
var $ = /* @__PURE__ */ function(e) {
|
|
1828
|
+
return e.RUN_STARTED = "RUN_STARTED", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.ASSESSMENT_SUMMARY = "ASSESSMENT_SUMMARY", e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.CUSTOM = "CUSTOM", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e;
|
|
1829
|
+
}({}), Ln = /* @__PURE__ */ function(e) {
|
|
1830
|
+
return e.PENDING = "PENDING", e.CLICKED = "CLICKED", e;
|
|
1831
|
+
}({}), Rn = "next/stream error", zn = (...e) => globalThis.fetch(...e), Bn = class {
|
|
1828
1832
|
constructor(e) {
|
|
1829
1833
|
var t, n, r;
|
|
1830
|
-
this.baseUrl =
|
|
1831
|
-
[
|
|
1832
|
-
[
|
|
1833
|
-
[
|
|
1834
|
-
}, this.http = (t = e.httpClient) == null ?
|
|
1834
|
+
this.baseUrl = Pn(e), this.baseHeaders = {
|
|
1835
|
+
[wn]: e.appId,
|
|
1836
|
+
[Tn]: En,
|
|
1837
|
+
[Dn]: "1.0"
|
|
1838
|
+
}, this.http = (t = e.httpClient) == null ? Q.create({ headers: this.baseHeaders }) : t, this.putImpl = (n = e.putImpl) == null ? Q.put : n, this.fetchImpl = (r = e.fetchImpl) == null ? zn : r;
|
|
1835
1839
|
}
|
|
1836
1840
|
fiTokenHeaders() {
|
|
1837
1841
|
return this.fiToken ? { [this.fiToken.name]: this.fiToken.value } : {};
|
|
@@ -1843,8 +1847,8 @@ var In = (...e) => globalThis.fetch(...e), Ln = class {
|
|
|
1843
1847
|
let t = await this.http.post(`${this.baseUrl}/${e}/start/ats`);
|
|
1844
1848
|
return this.fiToken = t.data.fiToken, t.data;
|
|
1845
1849
|
}
|
|
1846
|
-
async nextStream(e, t, n) {
|
|
1847
|
-
let
|
|
1850
|
+
async nextStream(e, t, n, r) {
|
|
1851
|
+
let i = await this.fetchImpl(`${this.baseUrl}/${e}/next/stream`, {
|
|
1848
1852
|
method: "POST",
|
|
1849
1853
|
headers: {
|
|
1850
1854
|
...this.baseHeaders,
|
|
@@ -1852,33 +1856,40 @@ var In = (...e) => globalThis.fetch(...e), Ln = class {
|
|
|
1852
1856
|
"Content-Type": "application/json",
|
|
1853
1857
|
Accept: "text/event-stream"
|
|
1854
1858
|
},
|
|
1855
|
-
body: JSON.stringify({
|
|
1859
|
+
body: JSON.stringify({
|
|
1860
|
+
candidateResponse: t,
|
|
1861
|
+
summaryContinued: r == null ? void 0 : r.summaryContinued
|
|
1862
|
+
}),
|
|
1856
1863
|
signal: n.signal
|
|
1857
1864
|
});
|
|
1858
|
-
if (!
|
|
1859
|
-
let
|
|
1860
|
-
for await (let e of
|
|
1865
|
+
if (!i.ok || !i.body) throw Error(`next/stream failed: ${i.status}`);
|
|
1866
|
+
let a, o = !1;
|
|
1867
|
+
for await (let e of In(i.body)) {
|
|
1861
1868
|
let t = JSON.parse(e.data);
|
|
1862
1869
|
switch (t.type) {
|
|
1863
|
-
case
|
|
1864
|
-
var
|
|
1865
|
-
throw Error((
|
|
1866
|
-
case
|
|
1867
|
-
var
|
|
1868
|
-
(
|
|
1870
|
+
case $.RUN_ERROR:
|
|
1871
|
+
var s;
|
|
1872
|
+
throw Error((s = t.message) == null ? Rn : s);
|
|
1873
|
+
case $.STATE_SNAPSHOT:
|
|
1874
|
+
var c, l;
|
|
1875
|
+
(c = t.snapshot) != null && c.question && ((l = n.onMeta) == null || l.call(n, Vn(t.snapshot.question)));
|
|
1869
1876
|
break;
|
|
1870
|
-
case
|
|
1871
|
-
var
|
|
1872
|
-
t.
|
|
1877
|
+
case $.ASSESSMENT_SUMMARY:
|
|
1878
|
+
var u;
|
|
1879
|
+
t.summary && ((u = n.onSummary) == null || u.call(n, t.summary));
|
|
1873
1880
|
break;
|
|
1874
|
-
case
|
|
1875
|
-
|
|
1881
|
+
case $.TEXT_MESSAGE_CONTENT:
|
|
1882
|
+
var d;
|
|
1883
|
+
t.delta && n.onDelta(t.delta, (d = t.messageId) == null ? "" : d);
|
|
1884
|
+
break;
|
|
1885
|
+
case $.RUN_FINISHED:
|
|
1886
|
+
a = t.result, o = !0;
|
|
1876
1887
|
break;
|
|
1877
1888
|
}
|
|
1878
|
-
if (
|
|
1889
|
+
if (o) break;
|
|
1879
1890
|
}
|
|
1880
|
-
if (!
|
|
1881
|
-
return
|
|
1891
|
+
if (!o) throw Error("next/stream ended without a RUN_FINISHED frame");
|
|
1892
|
+
return a != null && a.fiToken && (this.fiToken = a.fiToken), a;
|
|
1882
1893
|
}
|
|
1883
1894
|
async editAnswer(e, t) {
|
|
1884
1895
|
return (await this.http.post(`${this.baseUrl}/${e}/edit-answer`, { editAnswerInput: t }, { headers: this.fiTokenHeaders() })).data;
|
|
@@ -1921,7 +1932,7 @@ var In = (...e) => globalThis.fetch(...e), Ln = class {
|
|
|
1921
1932
|
async getTranslation(e) {
|
|
1922
1933
|
return (await this.http.get(`${this.baseUrl}/translation/${e}`)).data;
|
|
1923
1934
|
}
|
|
1924
|
-
},
|
|
1935
|
+
}, Vn = (e) => {
|
|
1925
1936
|
var t;
|
|
1926
1937
|
return {
|
|
1927
1938
|
_id: e._id,
|
|
@@ -1938,26 +1949,30 @@ var In = (...e) => globalThis.fetch(...e), Ln = class {
|
|
|
1938
1949
|
component: e.component
|
|
1939
1950
|
}))
|
|
1940
1951
|
};
|
|
1941
|
-
},
|
|
1952
|
+
}, Hn = /* @__PURE__ */ function(e) {
|
|
1942
1953
|
return e.MAX_TEXT_LENGTH = "maxTextLength", e.MIN_TEXT_LENGTH = "minTextLength", e.RECOMMENDED_TEXT_LENGTH = "recommendedTextLength", e.MAX_VOICE_SECONDS = "maxVoiceSeconds", e.MIN_VOICE_SECONDS = "minVoiceSeconds", e.RECOMMENDED_VOICE_SECONDS = "recommendedVoiceSeconds", e;
|
|
1943
|
-
}({}),
|
|
1954
|
+
}({}), Un = /* @__PURE__ */ function(e) {
|
|
1944
1955
|
return e.AGENT = "AGENT", e.CANDIDATE = "CANDIDATE", e;
|
|
1945
|
-
}({}),
|
|
1956
|
+
}({}), Wn = /* @__PURE__ */ function(e) {
|
|
1946
1957
|
return e.HINT = "HINT", e.FTQ = "FTQ", e.MCQ = "MCQ", e.VOICE = "VOICE", e.VIDEO = "VIDEO", e.SLIDER = "SLIDER", e.DROPDOWN = "DROPDOWN", e.BGQ = "BUTTON_GROUP_QUESTION", e;
|
|
1947
|
-
}({}),
|
|
1958
|
+
}({}), Gn = /* @__PURE__ */ function(e) {
|
|
1948
1959
|
return e.TEXT = "TEXT", e.VOICE = "VOICE", e.VIDEO = "VIDEO", e.SLIDER = "SLIDER", e;
|
|
1949
|
-
}({}),
|
|
1960
|
+
}({}), Kn = /* @__PURE__ */ function(e) {
|
|
1950
1961
|
return e.GENERAL_PY = "GENERAL_PY", e.CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION", e.PII = "PII", e.SENSITIVE = "SENSITIVE", e.DISPLAY_IN_TI = "DISPLAY_IN_TI", e.HEXACO_PERSONALITY_TEST = "HEXACO_PERSONALITY_TEST", e;
|
|
1951
|
-
}({}),
|
|
1962
|
+
}({}), qn = /* @__PURE__ */ function(e) {
|
|
1952
1963
|
return e.FULL_NAME = "fullName", e.FIRST_NAME = "first_name", e.LAST_NAME = "last_name", e.EMAIL = "email", e.PHONE_NUMBER = "phoneNumber", e.LOCATION = "location", e;
|
|
1953
|
-
}({}),
|
|
1964
|
+
}({}), Jn = /* @__PURE__ */ function(e) {
|
|
1954
1965
|
return e.TEST_CAMERA = "test_camera", e;
|
|
1955
|
-
}({}),
|
|
1966
|
+
}({}), Yn = /* @__PURE__ */ function(e) {
|
|
1956
1967
|
return e.PRIMARY = "PRIMARY", e.SECONDARY = "SECONDARY", e.DEFAULT = "DEFAULT", e;
|
|
1957
|
-
}({}),
|
|
1968
|
+
}({}), Xn = /* @__PURE__ */ function(e) {
|
|
1958
1969
|
return e.FI_ATS_ASSESSMENT_ORDER_COMPLETED = "FI_ATS_ASSESSMENT_ORDER_COMPLETED", e.FI_ASSESSMENT_STARTED = "FI_ASSESSMENT_STARTED", e.FI_ASSESSMENT_PII_SAVED = "FI_ASSESSMENT_PII_SAVED", e.FI_ASSESSMENT_PII_COMPLETED = "FI_ASSESSMENT_PII_COMPLETED", e.FI_ASSESSMENT_INPROGRESS = "FI_ASSESSMENT_INPROGRESS", e.FI_ASSESSMENT_COMPLETED = "FI_ASSESSMENT_COMPLETED", e.FI_ASSESSMENT_ENDED = "FI_ASSESSMENT_ENDED", e.FI_ASSESSMENT_DROPPED_OUT = "FI_ASSESSMENT_DROPPED_OUT", e.FI_PREDICTION_STARTED = "FI_PREDICTION_STARTED", e.FI_PREDICTION_COMPLETED = "FI_PREDICTION_COMPLETED", e.FI_ASSESSMENT_DUPLICATED = "FI_ASSESSMENT_DUPLICATED", e;
|
|
1970
|
+
}({}), Zn = /* @__PURE__ */ function(e) {
|
|
1971
|
+
return e.TEXT = "Text", e.VOICE_PLAYER = "VoicePlayer", e.VIDEO_PLAYER = "VideoPlayer", e.SLIDER = "Slider", e;
|
|
1972
|
+
}({}), Qn = /* @__PURE__ */ function(e) {
|
|
1973
|
+
return e.HINT = "Hint", e.QUESTION = "Question", e;
|
|
1959
1974
|
}({});
|
|
1960
1975
|
//#endregion
|
|
1961
|
-
export { Mn as _,
|
|
1976
|
+
export { s as C, o as S, Mn as _, Qn as a, Pn as b, qn as c, Jn as d, Bn as f, An as g, jn as h, Gn as i, Wn as l, Ln as m, Yn as n, Un as o, $ as p, Zn as r, Kn as s, Xn as t, Hn as u, On as v, l as w, Nn as x, kn as y };
|
|
1962
1977
|
|
|
1963
|
-
//# sourceMappingURL=messages-
|
|
1978
|
+
//# sourceMappingURL=messages-DCvBcspv.js.map
|