@opencx/widget 3.0.53 → 3.0.56
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/designs.cjs +2 -2
- package/dist/designs.cjs.map +1 -1
- package/dist/designs.js +2 -2
- package/dist/designs.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/headless/core/__tests__/test-utils.d.ts +4 -10
- package/dist/src/headless/core/api/api-caller.d.ts +4 -10
- package/dist/src/headless/core/api/schema.d.ts +4 -56
- package/dist/src/headless/core/context/session.ctx.d.ts +1 -0
- package/dist/src/headless/core/types/widget-config.d.ts +1 -2
- package/dist/{useUploadFiles-DezH_NSW.cjs → useUploadFiles-B0ayL3Vk.cjs} +2 -2
- package/dist/{useUploadFiles-DezH_NSW.cjs.map → useUploadFiles-B0ayL3Vk.cjs.map} +1 -1
- package/dist/{useUploadFiles-Ddo3_Bdb.js → useUploadFiles-DGllx3jx.js} +3 -3
- package/dist/{useUploadFiles-Ddo3_Bdb.js.map → useUploadFiles-DGllx3jx.js.map} +1 -1
- package/dist/widget.ctx-CKRA-jh1.cjs +5 -0
- package/dist/widget.ctx-CKRA-jh1.cjs.map +1 -0
- package/dist/{widget.ctx-DXznvVMa.js → widget.ctx-DJ72-NkO.js} +67 -66
- package/dist/widget.ctx-DJ72-NkO.js.map +1 -0
- package/dist-embed/script.js +16 -16
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/widget.ctx-BxnHMoxD.cjs +0 -5
- package/dist/widget.ctx-BxnHMoxD.cjs.map +0 -1
- package/dist/widget.ctx-DXznvVMa.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-CKRA-jh1.cjs");exports.PrimitiveState=t.PrimitiveState;exports.WidgetCtx=t.WidgetCtx;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
package/dist/react.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-B0ayL3Vk.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>i.vote({action:o==="up"?"upvote":"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
|
|
2
2
|
//# sourceMappingURL=react.cjs.map
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as o, _ as i } from "./useUploadFiles-
|
|
2
|
-
import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-
|
|
1
|
+
import { u as o, _ as i } from "./useUploadFiles-DGllx3jx.js";
|
|
2
|
+
import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-DGllx3jx.js";
|
|
3
3
|
function n(e, s, t) {
|
|
4
4
|
const {
|
|
5
5
|
widgetCtx: { api: a }
|
|
@@ -80,7 +80,10 @@ export declare const TestUtils: {
|
|
|
80
80
|
};
|
|
81
81
|
body: {
|
|
82
82
|
email?: string;
|
|
83
|
-
|
|
83
|
+
non_verified_name?: string;
|
|
84
|
+
non_verified_custom_data?: {
|
|
85
|
+
[key: string]: string;
|
|
86
|
+
};
|
|
84
87
|
};
|
|
85
88
|
}, `${string}/${string}`>> | undefined): void;
|
|
86
89
|
getSessions(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
@@ -163,15 +166,6 @@ export declare const TestUtils: {
|
|
|
163
166
|
query_params?: {
|
|
164
167
|
[key: string]: string;
|
|
165
168
|
} | null;
|
|
166
|
-
user?: {
|
|
167
|
-
email?: string;
|
|
168
|
-
name?: string;
|
|
169
|
-
phone?: string;
|
|
170
|
-
avatar?: string;
|
|
171
|
-
customData?: {
|
|
172
|
-
[key: string]: string;
|
|
173
|
-
};
|
|
174
|
-
} | null;
|
|
175
169
|
language?: string | null;
|
|
176
170
|
attachments?: {
|
|
177
171
|
id: string;
|
|
@@ -123,15 +123,6 @@ export declare class ApiCaller {
|
|
|
123
123
|
query_params?: {
|
|
124
124
|
[key: string]: string;
|
|
125
125
|
} | null;
|
|
126
|
-
user?: {
|
|
127
|
-
email?: string;
|
|
128
|
-
name?: string;
|
|
129
|
-
phone?: string;
|
|
130
|
-
avatar?: string;
|
|
131
|
-
customData?: {
|
|
132
|
-
[key: string]: string;
|
|
133
|
-
};
|
|
134
|
-
} | null;
|
|
135
126
|
language?: string | null;
|
|
136
127
|
attachments?: {
|
|
137
128
|
id: string;
|
|
@@ -186,7 +177,10 @@ export declare class ApiCaller {
|
|
|
186
177
|
};
|
|
187
178
|
body: {
|
|
188
179
|
email?: string;
|
|
189
|
-
|
|
180
|
+
non_verified_name?: string;
|
|
181
|
+
non_verified_custom_data?: {
|
|
182
|
+
[key: string]: string;
|
|
183
|
+
};
|
|
190
184
|
};
|
|
191
185
|
}, `${string}/${string}`>>;
|
|
192
186
|
createSession: (body: Dto["CreateWidgetSessionDto"]) => Promise<import('openapi-fetch').FetchResponse<{
|
|
@@ -35,22 +35,6 @@ export interface paths {
|
|
|
35
35
|
patch?: never;
|
|
36
36
|
trace?: never;
|
|
37
37
|
};
|
|
38
|
-
"/backend/widget/v2/session/{sessionId}": {
|
|
39
|
-
parameters: {
|
|
40
|
-
query?: never;
|
|
41
|
-
header?: never;
|
|
42
|
-
path?: never;
|
|
43
|
-
cookie?: never;
|
|
44
|
-
};
|
|
45
|
-
get: operations["getSession"];
|
|
46
|
-
put?: never;
|
|
47
|
-
post?: never;
|
|
48
|
-
delete?: never;
|
|
49
|
-
options?: never;
|
|
50
|
-
head?: never;
|
|
51
|
-
patch?: never;
|
|
52
|
-
trace?: never;
|
|
53
|
-
};
|
|
54
38
|
"/backend/widget/v2/sessions": {
|
|
55
39
|
parameters: {
|
|
56
40
|
query?: never;
|
|
@@ -185,7 +169,10 @@ export interface components {
|
|
|
185
169
|
schemas: {
|
|
186
170
|
CreateUnverifiedContactDto: {
|
|
187
171
|
email?: string;
|
|
188
|
-
|
|
172
|
+
non_verified_name?: string;
|
|
173
|
+
non_verified_custom_data?: {
|
|
174
|
+
[key: string]: string;
|
|
175
|
+
};
|
|
189
176
|
};
|
|
190
177
|
CreateWidgetSessionDto: {
|
|
191
178
|
customData?: {
|
|
@@ -265,15 +252,6 @@ export interface components {
|
|
|
265
252
|
query_params?: {
|
|
266
253
|
[key: string]: string;
|
|
267
254
|
} | null;
|
|
268
|
-
user?: {
|
|
269
|
-
email?: string;
|
|
270
|
-
name?: string;
|
|
271
|
-
phone?: string;
|
|
272
|
-
avatar?: string;
|
|
273
|
-
customData?: {
|
|
274
|
-
[key: string]: string;
|
|
275
|
-
};
|
|
276
|
-
} | null;
|
|
277
255
|
language?: string | null;
|
|
278
256
|
attachments?: {
|
|
279
257
|
id: string;
|
|
@@ -518,36 +496,6 @@ export interface operations {
|
|
|
518
496
|
};
|
|
519
497
|
};
|
|
520
498
|
};
|
|
521
|
-
getSession: {
|
|
522
|
-
parameters: {
|
|
523
|
-
query?: never;
|
|
524
|
-
header?: never;
|
|
525
|
-
path: {
|
|
526
|
-
sessionId: string;
|
|
527
|
-
};
|
|
528
|
-
cookie?: never;
|
|
529
|
-
};
|
|
530
|
-
requestBody?: never;
|
|
531
|
-
responses: {
|
|
532
|
-
200: {
|
|
533
|
-
headers: {
|
|
534
|
-
[name: string]: unknown;
|
|
535
|
-
};
|
|
536
|
-
content: {
|
|
537
|
-
"application/json": components["schemas"]["WidgetSessionDto"];
|
|
538
|
-
};
|
|
539
|
-
};
|
|
540
|
-
/** @description Internal Server Error */
|
|
541
|
-
500: {
|
|
542
|
-
headers: {
|
|
543
|
-
[name: string]: unknown;
|
|
544
|
-
};
|
|
545
|
-
content: {
|
|
546
|
-
"application/json": components["schemas"]["ErrorDto"];
|
|
547
|
-
};
|
|
548
|
-
};
|
|
549
|
-
};
|
|
550
|
-
};
|
|
551
499
|
getSessions: {
|
|
552
500
|
parameters: {
|
|
553
501
|
query: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const g=require("react"),Wt=require("react/jsx-runtime"),qt=require("./widget.ctx-
|
|
1
|
+
"use strict";const g=require("react"),Wt=require("react/jsx-runtime"),qt=require("./widget.ctx-CKRA-jh1.cjs"),Bt=require("uuid");class Gt{constructor(t){this.components=[];const{components:n}=t;if(n&&n.forEach(r=>this.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key.toUpperCase()===t.toUpperCase());return n||null}getComponent(t){var n;return(n=this.get(t))==null?void 0:n.component}}function Ht(e){const t=g.createContext({});return[()=>{const r=g.useContext(t);if(r===void 0)throw new Error("useSafeContext must be used within a Provider");return r},t.Provider]}const $t="3.0.56",[K,Kt]=Ht();function zt({options:e,children:t,components:n,storage:r}){const o=g.useRef(!1),[s,i]=g.useState(null),d=g.useMemo(()=>new Gt({components:n}),[n]);return g.useEffect(()=>{o.current||(o.current=!0,qt.WidgetCtx.initialize({config:e,storage:r}).then(i))},[]),s?Wt.jsx(Kt,{value:{widgetCtx:s,components:n,componentStore:d,version:$t},children:t}):null}function kt(){const{widgetCtx:e}=K();return e.config}function ee(e){return g.useSyncExternalStore(e.subscribe,e.get,e.get)}function Yt(){const{widgetCtx:e}=K();return{contactState:ee(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function et(){const{widgetCtx:e}=K();return{messagesState:ee(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function tt(){const{widgetCtx:e}=K(),t=ee(e.sessionCtx.sessionState),n=ee(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function Jt(){var i;const{sessionState:e}=tt(),{messagesState:t}=et(),n=((i=e.session)==null?void 0:i.assignee.kind)==="ai",r=t.messages.length>0?t.messages[t.messages.length-1]:null,o=(r==null?void 0:r.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||o)}}var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Oe={exports:{}},ye={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*/var ke;function tn(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=g,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(R){{for(var v=arguments.length,w=new Array(v>1?v-1:0),S=1;S<v;S++)w[S-1]=arguments[S];r("error",R,w)}}function r(R,v,w){{var S=t.ReactDebugCurrentFrame,I=S.getStackAddendum();I!==""&&(v+="%s",w=w.concat([I]));var m=w.map(function(D){return String(D)});m.unshift("Warning: "+v),Function.prototype.apply.call(console[R],console,m)}}function o(R,v){return R===v&&(R!==0||1/R===1/v)||R!==R&&v!==v}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,d=e.useEffect,_=e.useLayoutEffect,f=e.useDebugValue,a=!1,u=!1;function l(R,v,w){a||e.startTransition!==void 0&&(a=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=v();if(!u){var I=v();s(S,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var m=i({inst:{value:S,getSnapshot:v}}),D=m[0].inst,P=m[1];return _(function(){D.value=S,D.getSnapshot=v,c(D)&&P({inst:D})},[R,S,v]),d(function(){c(D)&&P({inst:D});var B=function(){c(D)&&P({inst:D})};return R(B)},[R]),f(S),S}function c(R){var v=R.getSnapshot,w=R.value;try{var S=v();return!s(w,S)}catch{return!0}}function y(R,v,w){return v()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",T=!h,p=T?y:l,k=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p;ge.useSyncExternalStore=k,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ge}process.env.NODE_ENV==="production"?Oe.exports=en():Oe.exports=tn();var nn=Oe.exports;const H=()=>{},L=H(),Ee=Object,E=e=>e===L,N=e=>typeof e=="function",$=(e,t)=>({...e,...t}),rn=e=>N(e.then),ue=new WeakMap;let on=0;const oe=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,s;if(Ee(e)===e&&!r&&n!=RegExp){if(o=ue.get(e),o)return o;if(o=++on+"~",ue.set(e,o),n==Array){for(o="@",s=0;s<e.length;s++)o+=oe(e[s])+",";ue.set(e,o)}if(n==Ee){o="#";const i=Ee.keys(e).sort();for(;!E(s=i.pop());)E(e[s])||(o+=s+":"+oe(e[s])+",");ue.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},q=new WeakMap,ve={},ce={},Pe="undefined",de=typeof window!=Pe,Re=typeof document!=Pe,sn=()=>de&&typeof window.requestAnimationFrame!=Pe,nt=(e,t)=>{const n=q.get(e);return[()=>!E(t)&&e.get(t)||ve,r=>{if(!E(t)){const o=e.get(t);t in ce||(ce[t]=o),n[5](t,$(o,r),o||ve)}},n[6],()=>!E(t)&&t in ce?ce[t]:!E(t)&&e.get(t)||ve]};let Ce=!0;const an=()=>Ce,[Te,De]=de&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[H,H],un=()=>{const e=Re&&document.visibilityState;return E(e)||e!=="hidden"},cn=e=>(Re&&document.addEventListener("visibilitychange",e),Te("focus",e),()=>{Re&&document.removeEventListener("visibilitychange",e),De("focus",e)}),fn=e=>{const t=()=>{Ce=!0,e()},n=()=>{Ce=!1};return Te("online",t),Te("offline",n),()=>{De("online",t),De("offline",n)}},ln={isOnline:an,isVisible:un},dn={initFocus:cn,initReconnect:fn},Ye=!g.useId,se=!de||"Deno"in window,pn=e=>sn()?window.requestAnimationFrame(e):setTimeout(e,1),Se=se?g.useEffect:g.useLayoutEffect,we=typeof navigator<"u"&&navigator.connection,Je=!se&&we&&(["slow-2g","2g"].includes(we.effectiveType)||we.saveData),Le=e=>{if(N(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?oe(e):"",[e,t]};let _n=0;const Ae=()=>++_n,rt=0,ot=1,st=2,hn=3;var re={__proto__:null,ERROR_REVALIDATE_EVENT:hn,FOCUS_EVENT:rt,MUTATE_EVENT:st,RECONNECT_EVENT:ot};async function it(...e){const[t,n,r,o]=e,s=$({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let i=s.populateCache;const d=s.rollbackOnError;let _=s.optimisticData;const f=l=>typeof d=="function"?d(l):d!==!1,a=s.throwOnError;if(N(n)){const l=n,c=[],y=t.keys();for(const h of y)!/^\$(inf|sub)\$/.test(h)&&l(t.get(h)._k)&&c.push(h);return Promise.all(c.map(u))}return u(n);async function u(l){const[c]=Le(l);if(!c)return;const[y,h]=nt(t,c),[T,p,k,R]=q.get(t),v=()=>{const M=T[c];return(N(s.revalidate)?s.revalidate(y().data,l):s.revalidate!==!1)&&(delete k[c],delete R[c],M&&M[0])?M[0](st).then(()=>y().data):y().data};if(e.length<3)return v();let w=r,S;const I=Ae();p[c]=[I,0];const m=!E(_),D=y(),P=D.data,B=D._c,z=E(B)?P:B;if(m&&(_=N(_)?_(z,P):_,h({data:_,_c:z})),N(w))try{w=w(z)}catch(M){S=M}if(w&&rn(w))if(w=await w.catch(M=>{S=M}),I!==p[c][0]){if(S)throw S;return w}else S&&m&&f(S)&&(i=!0,h({data:z,_c:L}));if(i&&!S)if(N(i)){const M=i(w,z);h({data:M,error:L,_c:L})}else h({data:w,error:L,_c:L});if(p[c][1]=Ae(),Promise.resolve(v()).then(()=>{h({_c:L})}),S){if(a)throw S;return}return w}}const Xe=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},yn=(e,t)=>{if(!q.has(e)){const n=$(dn,t),r={},o=it.bind(L,e);let s=H;const i={},d=(a,u)=>{const l=i[a]||[];return i[a]=l,l.push(u),()=>l.splice(l.indexOf(u),1)},_=(a,u,l)=>{e.set(a,u);const c=i[a];if(c)for(const y of c)y(u,l)},f=()=>{if(!q.has(e)&&(q.set(e,[r,{},{},{},o,_,d]),!se)){const a=n.initFocus(setTimeout.bind(L,Xe.bind(L,r,rt))),u=n.initReconnect(setTimeout.bind(L,Xe.bind(L,r,ot)));s=()=>{a&&a(),u&&u(),q.delete(e)}}};return f(),[e,o,f,s]}return[e,q.get(e)[4]]},gn=(e,t,n,r,o)=>{const s=n.errorRetryCount,i=o.retryCount,d=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!E(s)&&i>s||setTimeout(r,d,o)},En=(e,t)=>oe(e)==oe(t),[at,vn]=yn(new Map),Sn=$({onLoadingSlow:H,onSuccess:H,onError:H,onErrorRetry:gn,onDiscarded:H,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Je?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Je?5e3:3e3,compare:En,isPaused:()=>!1,cache:at,mutate:vn,fallback:{}},ln),wn=(e,t)=>{const n=$(e,t);if(t){const{use:r,fallback:o}=e,{use:s,fallback:i}=t;r&&s&&(n.use=r.concat(s)),o&&i&&(n.fallback=$(o,i))}return n},mn=g.createContext({}),bn="$inf$",ut=de&&window.__SWR_DEVTOOLS_USE__,On=ut?window.__SWR_DEVTOOLS_USE__:[],Rn=()=>{ut&&(window.__SWR_DEVTOOLS_REACT__=g)},Cn=e=>N(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Tn=()=>$(Sn,g.useContext(mn)),Dn=e=>(t,n,r)=>e(t,n&&((...s)=>{const[i]=Le(t),[,,,d]=q.get(at);if(i.startsWith(bn))return n(...s);const _=d[i];return E(_)?n(...s):(delete d[i],_)}),r),An=On.concat(Dn),xn=e=>function(...n){const r=Tn(),[o,s,i]=Cn(n),d=wn(r,i);let _=e;const{use:f}=d,a=(f||[]).concat(An);for(let u=a.length;u--;)_=a[u](_);return _(o,s||d.fetcher||null,d)},jn=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Rn();const Qe=g.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),me={dedupe:!0},Pn=(e,t,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:i,revalidateOnMount:d,revalidateIfStale:_,refreshInterval:f,refreshWhenHidden:a,refreshWhenOffline:u,keepPreviousData:l}=n,[c,y,h,T]=q.get(r),[p,k]=Le(e),R=g.useRef(!1),v=g.useRef(!1),w=g.useRef(p),S=g.useRef(t),I=g.useRef(n),m=()=>I.current,D=()=>m().isVisible()&&m().isOnline(),[P,B,z,M]=nt(r,p),Y=g.useRef({}).current,Vt=E(i)?n.fallback[p]:i,Fe=(b,O)=>{for(const x in Y){const C=x;if(C==="data"){if(!o(b[C],O[C])&&(!E(b[C])||!o(ae,O[C])))return!1}else if(O[C]!==b[C])return!1}return!0},Ne=g.useMemo(()=>{const b=!p||!t?!1:E(d)?m().isPaused()||s?!1:E(_)?!0:_:d,O=j=>{const U=$(j);return delete U._k,b?{isValidating:!0,isLoading:!0,...U}:U},x=P(),C=M(),F=O(x),Z=x===C?F:O(C);let A=F;return[()=>{const j=O(P());return Fe(j,A)?(A.data=j.data,A.isLoading=j.isLoading,A.isValidating=j.isValidating,A.error=j.error,A):(A=j,j)},()=>Z]},[r,p]),J=nn.useSyncExternalStore(g.useCallback(b=>z(p,(O,x)=>{Fe(x,O)||b()}),[r,p]),Ne[0],Ne[1]),Ue=!R.current,Mt=c[p]&&c[p].length>0,X=J.data,Q=E(X)?Vt:X,ie=J.error,We=g.useRef(Q),ae=l?E(X)?We.current:X:Q,qe=Mt&&!E(ie)?!1:Ue&&!E(d)?d:m().isPaused()?!1:s?E(Q)?!1:_:E(Q)||_,Be=!!(p&&t&&Ue&&qe),Ft=E(J.isValidating)?Be:J.isValidating,Nt=E(J.isLoading)?Be:J.isLoading,ne=g.useCallback(async b=>{const O=S.current;if(!p||!O||v.current||m().isPaused())return!1;let x,C,F=!0;const Z=b||{},A=!h[p]||!Z.dedupe,j=()=>Ye?!v.current&&p===w.current&&R.current:p===w.current,U={isValidating:!1,isLoading:!1},He=()=>{B(U)},$e=()=>{const V=h[p];V&&V[1]===C&&delete h[p]},Ke={isValidating:!0};E(P().data)&&(Ke.isLoading=!0);try{if(A&&(B(Ke),n.loadingTimeout&&E(P().data)&&setTimeout(()=>{F&&j()&&m().onLoadingSlow(p,n)},n.loadingTimeout),h[p]=[O(k),Ae()]),[x,C]=h[p],x=await x,A&&setTimeout($e,n.dedupingInterval),!h[p]||h[p][1]!==C)return A&&j()&&m().onDiscarded(p),!1;U.error=L;const V=y[p];if(!E(V)&&(C<=V[0]||C<=V[1]||V[1]===0))return He(),A&&j()&&m().onDiscarded(p),!1;const W=P().data;U.data=o(W,x)?W:x,A&&j()&&m().onSuccess(x,p,n)}catch(V){$e();const W=m(),{shouldRetryOnError:_e}=W;W.isPaused()||(U.error=V,A&&j()&&(W.onError(V,p,W),(_e===!0||N(_e)&&_e(V))&&(!m().revalidateOnFocus||!m().revalidateOnReconnect||D())&&W.onErrorRetry(V,p,W,Ut=>{const he=c[p];he&&he[0]&&he[0](re.ERROR_REVALIDATE_EVENT,Ut)},{retryCount:(Z.retryCount||0)+1,dedupe:!0})))}return F=!1,He(),!0},[p,r]),Ge=g.useCallback((...b)=>it(r,w.current,...b),[]);if(Se(()=>{S.current=t,I.current=n,E(X)||(We.current=X)}),Se(()=>{if(!p)return;const b=ne.bind(L,me);let O=0;const C=jn(p,c,(F,Z={})=>{if(F==re.FOCUS_EVENT){const A=Date.now();m().revalidateOnFocus&&A>O&&D()&&(O=A+m().focusThrottleInterval,b())}else if(F==re.RECONNECT_EVENT)m().revalidateOnReconnect&&D()&&b();else{if(F==re.MUTATE_EVENT)return ne();if(F==re.ERROR_REVALIDATE_EVENT)return ne(Z)}});return v.current=!1,w.current=p,R.current=!0,B({_k:k}),qe&&(E(Q)||se?b():pn(b)),()=>{v.current=!0,C()}},[p]),Se(()=>{let b;function O(){const C=N(f)?f(P().data):f;C&&b!==-1&&(b=setTimeout(x,C))}function x(){!P().error&&(a||m().isVisible())&&(u||m().isOnline())?ne(me).then(O):O()}return O(),()=>{b&&(clearTimeout(b),b=-1)}},[f,a,u,p]),g.useDebugValue(ae),s&&E(Q)&&p){if(!Ye&&se)throw new Error("Fallback data is required when using suspense in SSR.");S.current=t,I.current=n,v.current=!1;const b=T[p];if(!E(b)){const O=Ge(b);Qe(O)}if(E(ie)){const O=ne(me);E(ae)||(O.status="fulfilled",O.value=!0),Qe(O)}else throw ie}return{mutate:Ge,get data(){return Y.data=!0,ae},get error(){return Y.error=!0,ie},get isValidating(){return Y.isValidating=!0,Ft},get isLoading(){return Y.isLoading=!0,Nt}}},Ln=xn(Pn);function In(){const{widgetCtx:e}=K();return Ln([e.config.token],e.api.widgetPrelude,{revalidateOnFocus:!1})}function Vn(){const{widgetCtx:e}=K();return{routerState:ee(e.routerCtx.state),toSessionsScreen:e.routerCtx.toSessionsScreen,toChatScreen:e.routerCtx.toChatScreen}}var ct={},xe=function(e,t){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},xe(e,t)};function ft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xe(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}exports.__assign=function(){return exports.__assign=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},exports.__assign.apply(this,arguments)};function Ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lt(e,t,n,r){var o=arguments.length,s=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function dt(e,t){return function(n,r){t(n,r,e)}}function pt(e,t,n,r,o,s){function i(p){if(p!==void 0&&typeof p!="function")throw new TypeError("Function expected");return p}for(var d=r.kind,_=d==="getter"?"get":d==="setter"?"set":"value",f=!t&&e?r.static?e:e.prototype:null,a=t||(f?Object.getOwnPropertyDescriptor(f,r.name):{}),u,l=!1,c=n.length-1;c>=0;c--){var y={};for(var h in r)y[h]=h==="access"?{}:r[h];for(var h in r.access)y.access[h]=r.access[h];y.addInitializer=function(p){if(l)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(p||null))};var T=(0,n[c])(d==="accessor"?{get:a.get,set:a.set}:a[_],y);if(d==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(u=i(T.get))&&(a.get=u),(u=i(T.set))&&(a.set=u),(u=i(T.init))&&o.unshift(u)}else(u=i(T))&&(d==="field"?o.unshift(u):a[_]=u)}f&&Object.defineProperty(f,r.name,a),l=!0}function _t(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function ht(e){return typeof e=="symbol"?e:"".concat(e)}function yt(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function gt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Et(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function d(a){try{f(r.next(a))}catch(u){i(u)}}function _(a){try{f(r.throw(a))}catch(u){i(u)}}function f(a){a.done?s(a.value):o(a.value).then(d,_)}f((r=r.apply(e,t||[])).next())})}function vt(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=d(0),i.throw=d(1),i.return=d(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function d(f){return function(a){return _([f,a])}}function _(f){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(s=f[0]&2?o.return:f[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,f[1])).done)return s;switch(o=0,s&&(f=[f[0]&2,s.value]),f[0]){case 0:case 1:s=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){n.label=f[1];break}if(f[0]===6&&n.label<s[1]){n.label=s[1],s=f;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(f);break}s[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(a){f=[6,a],o=0}finally{r=s=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}var pe=Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function St(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&pe(t,e,n)}function le(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ve(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(d){i={error:d}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function wt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ve(arguments[t]));return e}function mt(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var s=arguments[t],i=0,d=s.length;i<d;i++,o++)r[o]=s[i];return r}function Me(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function te(e){return this instanceof te?(this.v=e,this):new te(e)}function bt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,s=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),d("next"),d("throw"),d("return",i),o[Symbol.asyncIterator]=function(){return this},o;function i(c){return function(y){return Promise.resolve(y).then(c,u)}}function d(c,y){r[c]&&(o[c]=function(h){return new Promise(function(T,p){s.push([c,h,T,p])>1||_(c,h)})},y&&(o[c]=y(o[c])))}function _(c,y){try{f(r[c](y))}catch(h){l(s[0][3],h)}}function f(c){c.value instanceof te?Promise.resolve(c.value.v).then(a,u):l(s[0][2],c)}function a(c){_("next",c)}function u(c){_("throw",c)}function l(c,y){c(y),s.shift(),s.length&&_(s[0][0],s[0][1])}}function Ot(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,s){t[o]=e[o]?function(i){return(n=!n)?{value:te(e[o](i)),done:!1}:s?s(i):i}:s}}function Rt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof le=="function"?le(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(i){return new Promise(function(d,_){i=e[s](i),o(d,_,i.done,i.value)})}}function o(s,i,d,_){Promise.resolve(_).then(function(f){s({value:f,done:d})},i)}}function Ct(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Mn=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Tt(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&pe(t,e,n);return Mn(t,e),t}function Dt(e){return e&&e.__esModule?e:{default:e}}function At(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function xt(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function jt(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Pt(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Fn=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Lt(e){function t(s){e.error=e.hasError?new Fn(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(s).then(o,function(i){return t(i),o()})}else r|=1}catch(i){t(i)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function It(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,s,i){return r?t?".jsx":".js":o&&(!s||!i)?n:o+s+"."+i.toLowerCase()+"js"}):e}const Nn={__extends:ft,__assign:exports.__assign,__rest:Ie,__decorate:lt,__param:dt,__esDecorate:pt,__runInitializers:_t,__propKey:ht,__setFunctionName:yt,__metadata:gt,__awaiter:Et,__generator:vt,__createBinding:pe,__exportStar:St,__values:le,__read:Ve,__spread:wt,__spreadArrays:mt,__spreadArray:Me,__await:te,__asyncGenerator:bt,__asyncDelegator:Ot,__asyncValues:Rt,__makeTemplateObject:Ct,__importStar:Tt,__importDefault:Dt,__classPrivateFieldGet:At,__classPrivateFieldSet:xt,__classPrivateFieldIn:jt,__addDisposableResource:Pt,__disposeResources:Lt,__rewriteRelativeImportExtension:It},Un=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Pt,get __assign(){return exports.__assign},__asyncDelegator:Ot,__asyncGenerator:bt,__asyncValues:Rt,__await:te,__awaiter:Et,__classPrivateFieldGet:At,__classPrivateFieldIn:jt,__classPrivateFieldSet:xt,__createBinding:pe,__decorate:lt,__disposeResources:Lt,__esDecorate:pt,__exportStar:St,__extends:ft,__generator:vt,__importDefault:Dt,__importStar:Tt,__makeTemplateObject:Ct,__metadata:gt,__param:dt,__propKey:ht,__read:Ve,__rest:Ie,__rewriteRelativeImportExtension:It,__runInitializers:_t,__setFunctionName:yt,__spread:wt,__spreadArray:Me,__spreadArrays:mt,__values:le,default:Nn},Symbol.toStringTag,{value:"Module"})),Wn=Zt(Un);var fe={},Ze;function qn(){if(Ze)return fe;Ze=1,Object.defineProperty(fe,"__esModule",{value:!0});var e=g;function t(){var n=e.useRef(!1),r=e.useCallback(function(){return n.current},[]);return e.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),r}return fe.default=t,fe}Object.defineProperty(ct,"__esModule",{value:!0});var je=Wn,be=g,Bn=je.__importDefault(qn());function Gn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=be.useRef(0),o=Bn.default(),s=be.useState(n),i=s[0],d=s[1],_=be.useCallback(function(){for(var f=[],a=0;a<arguments.length;a++)f[a]=arguments[a];var u=++r.current;return i.loading||d(function(l){return je.__assign(je.__assign({},l),{loading:!0})}),e.apply(void 0,f).then(function(l){return o()&&u===r.current&&d({value:l,loading:!1}),l},function(l){return o()&&u===r.current&&d({error:l,loading:!1}),l})},t);return[i,_]}var Hn=ct.default=Gn;const G=new Map;function $n(){const[e,t]=g.useState([]),{widgetCtx:{api:n}}=K();function r(a){const u=a.map(l=>({file:l,id:Bt.v4(),status:"pending",progress:0}));t(l=>[...l,...u]),u.forEach(i)}function o(a,u){t(l=>l.map(c=>c.id===a?{...c,...u}:c))}function s(a){t(u=>u.filter(l=>l.id!==a))}const i=async a=>{const u=new AbortController;G.set(a.id,u);try{t(c=>c.map(y=>y.id===a.id?{...y,status:"uploading",progress:0}:y));const l=await n.uploadFile({file:a.file,abortSignal:u.signal,onProgress:c=>{o(a.id,{progress:c})}});o(a.id,{status:"success",fileUrl:l.fileUrl,progress:100})}catch(l){u.signal.aborted||o(a.id,{status:"error",error:l instanceof Error?l.message:"Upload failed",progress:0})}finally{G.delete(a.id)}},d=a=>{const u=G.get(a);u&&(u.abort(),G.delete(a)),s(a)},_=g.useMemo(()=>e.filter(a=>a.status==="success"&&a.fileUrl),[e]);function f(){G.forEach(a=>a.abort()),G.clear(),t([])}return g.useEffect(()=>()=>{G.forEach(a=>a.abort()),G.clear()},[]),{allFiles:e,appendFiles:r,handleCancelUpload:d,successFiles:_,emptyTheFiles:f,getFileById:a=>e.find(u=>u.id===a),getUploadProgress:a=>{var u;return((u=e.find(l=>l.id===a))==null?void 0:u.progress)??0},getUploadStatus:a=>{var u;return(u=e.find(l=>l.id===a))==null?void 0:u.status},hasErrors:e.some(a=>a.status==="error"),isUploading:e.some(a=>a.status==="uploading")}}exports.WidgetProvider=zt;exports.__rest=Ie;exports.__spreadArray=Me;exports._default=Hn;exports.commonjsGlobal=Xt;exports.getDefaultExportFromCjs=Qt;exports.useConfig=kt;exports.useContact=Yt;exports.useIsAwaitingBotReply=Jt;exports.useMessages=et;exports.usePreludeData=In;exports.usePrimitiveState=ee;exports.useSessions=tt;exports.useUploadFiles=$n;exports.useWidget=K;exports.useWidgetRouter=Vn;
|
|
18
|
-
//# sourceMappingURL=useUploadFiles-
|
|
18
|
+
//# sourceMappingURL=useUploadFiles-B0ayL3Vk.cjs.map
|