sprof 0.0.183 → 0.0.184
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/sprof.js +1 -1
- package/dist/sprof.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/sprof.js
CHANGED
|
@@ -4155,7 +4155,7 @@ class ue {
|
|
|
4155
4155
|
const i = e ?? this.item;
|
|
4156
4156
|
B.DeepTrim(i);
|
|
4157
4157
|
const n = { payload: i, query: this.getUrl() };
|
|
4158
|
-
return i.getFileInfos && (n.fileInfos = i.getFileInfos()
|
|
4158
|
+
return i.getFileInfos && (n.fileInfos = i.getFileInfos()), await de.Post(n);
|
|
4159
4159
|
}
|
|
4160
4160
|
async CreateAndSet(e) {
|
|
4161
4161
|
const i = await this.Create(e);
|
package/dist/sprof.umd.cjs
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Hr]=this[Hr]={accessors:{}}).accessors,s=this.prototype;function o(a){const d=Tt(a);r[d]||(Sc(s,a),r[d]=!0)}return b.isArray(e)?e.forEach(o):o(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(ye.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),b.freezeMethods(ye);function ci(t,e){const n=this||Vt,r=e||n,s=ye.from(r.headers);let o=r.data;return b.forEach(t,function(d){o=d.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function qr(t){return!!(t&&t.__CANCEL__)}function pt(t,e,n){T.call(this,t??"canceled",T.ERR_CANCELED,e,n),this.name="CanceledError"}b.inherits(pt,T,{__CANCEL__:!0});function Ur(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ec(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),h=r[o];a||(a=u),n[s]=c,r[s]=u;let f=o,m=0;for(;f!==s;)m+=n[f++],f=f%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),u-a<e)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function xc(t,e){let n=0,r=1e3/e,s,o;const a=(u,h=Date.now())=>{n=h,s=null,o&&(clearTimeout(o),o=null),t.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=r?a(u,h):(s=u,o||(o=setTimeout(()=>{o=null,a(s)},r-f)))},()=>s&&a(s)]}const mn=(t,e,n=3)=>{let r=0;const s=Ec(50,250);return xc(o=>{const a=o.loaded,d=o.lengthComputable?o.total:void 0,c=a-r,u=s(c),h=a<=d;r=a;const f={loaded:a,total:d,progress:d?a/d:void 0,bytes:c,rate:u||void 0,estimated:u&&d&&h?(d-a)/u:void 0,event:o,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(f)},n)},_r=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},jr=t=>(...e)=>b.asap(()=>t(...e)),Mc=he.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,he.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(he.origin),he.navigator&&/(msie|trident)/i.test(he.navigator.userAgent)):()=>!0,Bc=he.hasStandardBrowserEnv?{write(t,e,n,r,s,o){const a=[t+"="+encodeURIComponent(e)];b.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),b.isString(r)&&a.push("path="+r),b.isString(s)&&a.push("domain="+s),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $c(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ic(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Wr(t,e){return t&&!$c(e)?Ic(t,e):e}const Gr=t=>t instanceof ye?{...t}:t;function ot(t,e){e=e||{};const n={};function r(u,h,f,m){return b.isPlainObject(u)&&b.isPlainObject(h)?b.merge.call({caseless:m},u,h):b.isPlainObject(h)?b.merge({},h):b.isArray(h)?h.slice():h}function s(u,h,f,m){if(b.isUndefined(h)){if(!b.isUndefined(u))return r(void 0,u,f,m)}else return r(u,h,f,m)}function o(u,h){if(!b.isUndefined(h))return r(void 0,h)}function a(u,h){if(b.isUndefined(h)){if(!b.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function d(u,h,f){if(f in e)return r(u,h);if(f in t)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:d,headers:(u,h,f)=>s(Gr(u),Gr(h),f,!0)};return b.forEach(Object.keys(Object.assign({},t,e)),function(h){const f=c[h]||s,m=f(t[h],e[h],h);b.isUndefined(m)&&f!==d||(n[h]=m)}),n}const Zr=t=>{const e=ot({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:d}=e;e.headers=a=ye.from(a),e.url=Fr(Wr(e.baseURL,e.url),t.params,t.paramsSerializer),d&&a.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let c;if(b.isFormData(n)){if(he.hasStandardBrowserEnv||he.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...h]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...h].join("; "))}}if(he.hasStandardBrowserEnv&&(r&&b.isFunction(r)&&(r=r(e)),r||r!==!1&&Mc(e.url))){const u=s&&o&&Bc.read(o);u&&a.set(s,u)}return e},Rc=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const s=Zr(t);let o=s.data;const a=ye.from(s.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=s,h,f,m,g,C;function S(){g&&g(),C&&C(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function $(){if(!w)return;const O=ye.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),G={data:!d||d==="text"||d==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:O,config:t,request:w};Ur(function(Be){n(Be),S()},function(Be){r(Be),S()},G),w=null}"onloadend"in w?w.onloadend=$:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout($)},w.onabort=function(){w&&(r(new T("Request aborted",T.ECONNABORTED,t,w)),w=null)},w.onerror=function(){r(new T("Network Error",T.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const G=s.transitional||Dr;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new T(P,G.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,w)),w=null},o===void 0&&a.setContentType(null),"setRequestHeader"in w&&b.forEach(a.toJSON(),function(P,G){w.setRequestHeader(G,P)}),b.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),d&&d!=="json"&&(w.responseType=s.responseType),u&&([m,C]=mn(u,!0),w.addEventListener("progress",m)),c&&w.upload&&([f,g]=mn(c),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(h=O=>{w&&(r(!O||O.type?new pt(null,t,w):O),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const F=kc(s.url);if(F&&he.protocols.indexOf(F)===-1){r(new T("Unsupported protocol "+F+":",T.ERR_BAD_REQUEST,t));return}w.send(o||null)})},vc=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,d();const h=u instanceof Error?u:this.reason;r.abort(h instanceof T?h:new pt(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,o(new T(`timeout ${e} of ms exceeded`,T.ETIMEDOUT))},e);const d=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>b.asap(d),c}},Ac=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},Nc=async function*(t,e){for await(const n of Pc(t))yield*Ac(n,e)},Pc=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Xr=(t,e,n,r)=>{const s=Nc(t,e);let o=0,a,d=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:h}=await s.next();if(u){d(),c.close();return}let f=h.byteLength;if(n){let m=o+=f;n(m)}c.enqueue(new Uint8Array(h))}catch(u){throw d(u),u}},cancel(c){return d(c),s.return()}},{highWaterMark:2})},pn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Yr=pn&&typeof ReadableStream=="function",zc=pn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Jr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Vc=Yr&&Jr(()=>{let t=!1;const e=new Request(he.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Qr=64*1024,di=Yr&&Jr(()=>b.isReadableStream(new Response("").body)),gn={stream:di&&(t=>t.body)};pn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!gn[e]&&(gn[e]=b.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new T(`Response type '${e}' is not supported`,T.ERR_NOT_SUPPORT,r)})})})(new Response);const Tc=async t=>{if(t==null)return 0;if(b.isBlob(t))return t.size;if(b.isSpecCompliantForm(t))return(await new Request(he.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(b.isArrayBufferView(t)||b.isArrayBuffer(t))return t.byteLength;if(b.isURLSearchParams(t)&&(t=t+""),b.isString(t))return(await zc(t)).byteLength},Fc=async(t,e)=>{const n=b.toFiniteNumber(t.getContentLength());return n??Tc(e)},ui={http:rc,xhr:Rc,fetch:pn&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:o,timeout:a,onDownloadProgress:d,onUploadProgress:c,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:m}=Zr(t);u=u?(u+"").toLowerCase():"text";let g=vc([s,o&&o.toAbortSignal()],a),C;const S=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let w;try{if(c&&Vc&&n!=="get"&&n!=="head"&&(w=await Fc(h,r))!==0){let G=new Request(e,{method:"POST",body:r,duplex:"half"}),Me;if(b.isFormData(r)&&(Me=G.headers.get("content-type"))&&h.setContentType(Me),G.body){const[Be,tt]=_r(w,mn(jr(c)));r=Xr(G.body,Qr,Be,tt)}}b.isString(f)||(f=f?"include":"omit");const $="credentials"in Request.prototype;C=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:$?f:void 0});let F=await fetch(C);const O=di&&(u==="stream"||u==="response");if(di&&(d||O&&S)){const G={};["status","statusText","headers"].forEach($t=>{G[$t]=F[$t]});const Me=b.toFiniteNumber(F.headers.get("content-length")),[Be,tt]=d&&_r(Me,mn(jr(d),!0))||[];F=new Response(Xr(F.body,Qr,Be,()=>{tt&&tt(),S&&S()}),G)}u=u||"text";let P=await gn[b.findKey(gn,u)||"text"](F,t);return!O&&S&&S(),await new Promise((G,Me)=>{Ur(G,Me,{data:P,headers:ye.from(F.headers),status:F.status,statusText:F.statusText,config:t,request:C})})}catch($){throw S&&S(),$&&$.name==="TypeError"&&/fetch/i.test($.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,t,C),{cause:$.cause||$}):T.from($,$&&$.code,t,C)}})};b.forEach(ui,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Kr=t=>`- ${t}`,Oc=t=>b.isFunction(t)||t===null||t===!1,es={getAdapter:t=>{t=b.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let o=0;o<e;o++){n=t[o];let a;if(r=n,!Oc(n)&&(r=ui[(a=String(n)).toLowerCase()],r===void 0))throw new T(`Unknown adapter '${a}'`);if(r)break;s[a||"#"+o]=r}if(!r){const o=Object.entries(s).map(([d,c])=>`adapter ${d} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
|
|
17
17
|
`+o.map(Kr).join(`
|
|
18
18
|
`):" "+Kr(o[0]):"as no adapter specified";throw new T("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:ui};function hi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new pt(null,t)}function ts(t){return hi(t),t.headers=ye.from(t.headers),t.data=ci.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),es.getAdapter(t.adapter||Vt.adapter)(t).then(function(r){return hi(t),r.data=ci.call(t,t.transformResponse,r),r.headers=ye.from(r.headers),r},function(r){return qr(r)||(hi(t),r&&r.response&&(r.response.data=ci.call(t,t.transformResponse,r.response),r.response.headers=ye.from(r.response.headers))),Promise.reject(r)})}const ns="1.7.9",yn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{yn[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const is={};yn.transitional=function(e,n,r){function s(o,a){return"[Axios v"+ns+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,d)=>{if(e===!1)throw new T(s(a," has been removed"+(n?" in "+n:"")),T.ERR_DEPRECATED);return n&&!is[a]&&(is[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,d):!0}},yn.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Dc(t,e,n){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],a=e[o];if(a){const d=t[o],c=d===void 0||a(d,o,t);if(c!==!0)throw new T("option "+o+" must be "+c,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+o,T.ERR_BAD_OPTION)}}const wn={assertOptions:Dc,validators:yn},ze=wn.validators;class at{constructor(e){this.defaults=e,this.interceptors={request:new Or,response:new Or}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
19
|
-
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ot(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&wn.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),s!=null&&(b.isFunction(s)?n.paramsSerializer={serialize:s}:wn.assertOptions(s,{encode:ze.function,serialize:ze.function},!0)),wn.assertOptions(n,{baseUrl:ze.spelling("baseURL"),withXsrfToken:ze.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],C=>{delete o[C]}),n.headers=ye.concat(a,o);const d=[];let c=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(c=c&&S.synchronous,d.unshift(S.fulfilled,S.rejected))});const u=[];this.interceptors.response.forEach(function(S){u.push(S.fulfilled,S.rejected)});let h,f=0,m;if(!c){const C=[ts.bind(this),void 0];for(C.unshift.apply(C,d),C.push.apply(C,u),m=C.length,h=Promise.resolve(n);f<m;)h=h.then(C[f++],C[f++]);return h}m=d.length;let g=n;for(f=0;f<m;){const C=d[f++],S=d[f++];try{g=C(g)}catch(w){S.call(this,w);break}}try{h=ts.call(this,g)}catch(C){return Promise.reject(C)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=ot(this.defaults,e);const n=Wr(e.baseURL,e.url);return Fr(n,e.params,e.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(e){at.prototype[e]=function(n,r){return this.request(ot(r||{},{method:e,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(e){function n(r){return function(o,a,d){return this.request(ot(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}at.prototype[e]=n(),at.prototype[e+"Form"]=n(!0)});class fi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(d=>{r.subscribe(d),o=d}).then(s);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,d){r.reason||(r.reason=new pt(o,a,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new fi(function(s){e=s}),cancel:e}}}function Lc(t){return function(n){return t.apply(null,n)}}function Hc(t){return b.isObject(t)&&t.isAxiosError===!0}const mi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mi).forEach(([t,e])=>{mi[e]=t});function rs(t){const e=new at(t),n=Sr(at.prototype.request,e);return b.extend(n,at.prototype,e,{allOwnKeys:!0}),b.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return rs(ot(t,s))},n}const K=rs(Vt);K.Axios=at,K.CanceledError=pt,K.CancelToken=fi,K.isCancel=qr,K.VERSION=ns,K.toFormData=hn,K.AxiosError=T,K.Cancel=K.CanceledError,K.all=function(e){return Promise.all(e)},K.spread=Lc,K.isAxiosError=Hc,K.mergeConfig=ot,K.AxiosHeaders=ye,K.formToJSON=t=>Lr(b.isHTMLForm(t)?new FormData(t):t),K.getAdapter=es.getAdapter,K.HttpStatusCode=mi,K.default=K;var Ft=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(Ft||{});const Ot=(()=>{function t(){const c=s();return!(!c||c==="undefined")}function e(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function n(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function r(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function s(){return localStorage.getItem("access_token")}function o(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!t())return;const u=Ot.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:s,getRefreshToken:o,getUserId:n,clearTokens:a,getUser:r,updateHuman:d}})();class pi{constructor(e){l(this,"code",400);l(this,"err","");I.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,n.defaults.headers.common.token=Ot.getAccessToken(),e.config.headers.token=Ot.getAccessToken(),e.config.baseURL=void 0,n.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){ge.Error("Неверный логин или пароль");return}ge.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const s=new pi(e.response.data).getErr();s&&ge.Error(s)}return Promise.reject(e)}}}const gt=K.create();gt.interceptors.response.use(t=>t,async t=>await pi.Handle(t,gt));class Dt{static async Get(e,n,r){return await gt({method:Ft.GET,url:e,headers:n,responseType:r})}static async Post(e,n,r,s){return n["Content-Type"]="multipart/form-data",await gt({method:Ft.POST,url:e,headers:n,responseType:r,data:s})}static async Put(e,n,r){return n["Content-Type"]="multipart/form-data",await gt({method:Ft.PUT,url:e,headers:n,data:r})}static async Delete(e,n){return await gt({method:Ft.DELETE,url:e,headers:n})}}class bn{constructor(e){l(this,"name","");I.BuildClass(this,e)}static Set(){}static Get(e,n){const r=sessionStorage.getItem(e);if(r){const s=JSON.parse(r),o=new Date,a=new Date(s.time),d=o.getTime()-a.getTime();return Math.round(d/6e4)>(n||10)?null:s.data}else return null}static async TryGet(e,n,r){let s;return s=bn.Get(e,r),s||(s=await n()),s}}var gi=(t=>(t.ContentType="Content-Type",t.Token="token",t))(gi||{}),ss=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(ss||{});const Z=class Z{static Setup(e,n,r){this.baseUrl=e,this.apiVersion=n,this.apiHost=r}static newWebSocket(e){const n=this.apiHost.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const r=Z.getDownloadFileName(e,n.headers),s=URL.createObjectURL(n.data),o=document.createElement("a");o.href=s,o.setAttribute("download",r),o.setAttribute("target","_blank"),document.body.appendChild(o),o.click()}static getDownloadFileName(e,n){if(e)return e;const r=n["content-disposition"],s=r.indexOf('"')+1,o=r.lastIndexOf('"'),a=r.substring(s,o);return a||"file"}static getHeaders(e){const n=Ne.Get(Ie.AccessToken);return e||(e=Z.headers),n&&(e[gi.Token]=n),e??Z.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?Z.download(e.downloadFileName,n):n.data}static async Get(e){return Z.returnResponse(e,await Dt.Get(Z.buildUrl((e==null?void 0:e.query)??""),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return Z.returnResponse(e,await Dt.Post(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e.isBlob),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return Z.returnResponse(e,await Dt.Put(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return Z.returnResponse(e,await Dt.Delete(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(Z.buildUrl(n))}static buildUrl(e){const n=e??"";return this.baseUrl+this.apiVersion+n}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const r=new FormData;if(r.append("form",JSON.stringify(e)),n)for(const s of n)s.file&&r.append(s.id??"files",s.file,s.originalName);return r}};l(Z,"baseUrl",""),l(Z,"apiVersion",""),l(Z,"apiHost",""),l(Z,"headers",{[gi.ContentType]:ss.ApplicationJson});let J=Z;const E=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},qc={},Uc={style:{"text-align":"center"}};function _c(t,e){return i.openBlock(),i.createElementBlock("div",Uc,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const yi=E(qc,[["render",_c]]),jc=[{path:"/:pathMatch(.*)*",name:"NotFound",component:yi}],Oe=class Oe{static Set(e){this.router=e,this.AddRoutes(jc)}static Get(){return this.router}static AddRoutes(e){e.forEach(n=>{this.Get().addRoute(n)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Oe.GetStringParam("id")}static Slug(){return Oe.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Oe.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const n=this.Get().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=Oe.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await Oe.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var n;return(n=this.Route())==null?void 0:n.params[e]}static SetQueryParam(e,n){const r=new URL(window.location);r.searchParams.set(e,String(n)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};l(Oe,"router"),l(Oe,"ChangeDocumentTitle",(e="")=>{let n=Oe.Route().meta.title??e;n&&e&&(n=n+` | ${e}`),document.title=n});let Ze=Oe;class Y{constructor(e,n){l(this,"items",i.reactive([]));l(this,"item");l(this,"count",i.ref(0));l(this,"classConstructor");l(this,"url","");this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetAll(e){let n;const r=J.Get;e&&e.withCache?n=await bn.TryGet(this.getUrl(),r):n=await r({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=Ze.Id()),this.Set(await J.Get({query:this.getUrl(e)}))}async FTSP(e){var a;const r=((e==null?void 0:e.ftsp)??Nt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},o=await J.Post(s);if(!(!o||!o.ftsp))if(Array.isArray(o.data))this.SetAll(o.data);else{if(r.p.append){this.AppendToAll((a=o.data)==null?void 0:a.items);return}this.SetAllWithCount(o.data)}}async Create(e){const n=e??this.item;I.DeepTrim(n);const r={payload:n,query:this.getUrl()};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(s=>s.url="")),await J.Post(r)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Create(r)))}),Promise.all(n)}async Update(e){const n=e??this.item;I.DeepTrim(n);const r={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(s=>s.url="")),await J.Put(r)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await J.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Update(r)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(r=>r.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){I.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get Item(){return this.item}get Count(){return this.count}}function Wc(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const Gc=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Zc{static GetRandColor(e){return He.GetRandEL(e??Gc)}}function os(t,e){const n=[],r=e||ke.Asc,s=r===ke.Asc?ke.Desc:ke.Asc;return Object.values(t).forEach(o=>{n.push(o(r)),n.push(o(s))}),n.length>0&&!n.some(o=>o.default)&&(n[0].default=!0),e&&n.forEach(o=>{o.default&&(o.default=o.order===e)}),n}let Xc=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Rt.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",en[Rt.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=en[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}};const wi=t=>t===8||t===46,Yc=t=>t>46&&t<58,Jc=t=>t>34&&t<41,Qc=t=>t+".",Kc=(t,e,n)=>{wi(e)||Jc(e)||(!Yc(e)||n>9)&&t.preventDefault()};function ed(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let s=t.substring(6,10).replace(".","1");Number(s)>2100&&(s="2100"),t=n+"."+r+"."+s}return t}function td(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;Kc(t,e,r),!wi(e)&&(r===2||r===5)&&(n=Qc(n));const s=t.srcElement.value+String.fromCharCode(t.which);if(wi(e)){t.srcElement.value=n;return}n.length===0&&Number(s)>3&&(n="3",t.preventDefault()),n.length===1&&Number(s)>31&&(n="31",t.preventDefault()),s.length===5&&Number(s.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=ed(n,r),t.srcElement.value=n}const nd=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],id="ru-RU";class qe{constructor(){l(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(r.year=n.year||n.year===void 0?n.year:r.year,r.month=n.month||n.month===void 0?n.month:r.month,r.day=n.day||n.day===void 0?n.day:r.day,r.hour=n.hour??r.hour,r.minute=n.minute??r.minute),Intl.DateTimeFormat(id,r).format(new Date(e))}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetPeriod(e,n,r){return`${this.Format(e,r)}-${this.Format(n,r)}`}static GetShortDayName(e){return e?nd[e.getDay()]:""}static GetCurrentWeekPeriod(e){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-n.getDay()+1),s=new Date(n.getFullYear(),n.getMonth(),r.getDate()+7);return this.GetPeriod(r,s,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,n){const r=new Date,s=new Date,o=qe.SplitHourTime(e),a=qe.SplitHourTime(n);return r.setHours(o[0],o[1],0,0),s.setHours(a[0],a[1],0,0),(s.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const n=qe.SplitHourTime(e);return n[0]*60+n[1]}static SplitHourTime(e){const n=e.split(":");return[Number(n[0]),Number(n[1])]}static AddMinutesToHM(e,n){const r=new Date,s=qe.SplitHourTime(e);r.setHours(s[0],s[1],0,0);const o=new Date(r.getTime()+n*6e4),a=o.getHours(),d=o.getMinutes();return`${a}:${d}`}static GetMonthsDiff(e,n){return n.getMonth()-e.getMonth()+12*(n.getFullYear()-e.getFullYear())}static StringToDate(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,n,r){return new Date(e)>=new Date(n)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,n){const r=[new Date(e)];let s=e;for(;s<=n;)s=qe.AddDays(s,1),r.push(s);return r}static AddDays(e,n){const r=new Date(e);return r.setDate(r.getDate()+n),r}static Eq(e,n){return e.getTime()===n.getTime()}}class rd{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class as{static Get(e){const n=e.split(".");return n[n.length-1]}}const sd=(()=>{function t(o,a){localStorage.setItem(`${o}_favourite`,a.toString())}function e(o,a){const d=localStorage.getItem(`${o}_favourite`);return d?d.split(",").includes(a):!1}function n(o,a){const d=localStorage.getItem(`${o}_favourite`);if(!d){t(o,[a]);return}const c=d.split(",");c.push(a),t(o,c)}function r(o,a){const d=localStorage.getItem(`${o}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);t(o,c)}function s(){for(const o in localStorage)o.includes("_favourite")&&localStorage.removeItem(o)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:s}})();/*!
|
|
19
|
+
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ot(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&wn.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),s!=null&&(b.isFunction(s)?n.paramsSerializer={serialize:s}:wn.assertOptions(s,{encode:ze.function,serialize:ze.function},!0)),wn.assertOptions(n,{baseUrl:ze.spelling("baseURL"),withXsrfToken:ze.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],C=>{delete o[C]}),n.headers=ye.concat(a,o);const d=[];let c=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(c=c&&S.synchronous,d.unshift(S.fulfilled,S.rejected))});const u=[];this.interceptors.response.forEach(function(S){u.push(S.fulfilled,S.rejected)});let h,f=0,m;if(!c){const C=[ts.bind(this),void 0];for(C.unshift.apply(C,d),C.push.apply(C,u),m=C.length,h=Promise.resolve(n);f<m;)h=h.then(C[f++],C[f++]);return h}m=d.length;let g=n;for(f=0;f<m;){const C=d[f++],S=d[f++];try{g=C(g)}catch(w){S.call(this,w);break}}try{h=ts.call(this,g)}catch(C){return Promise.reject(C)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=ot(this.defaults,e);const n=Wr(e.baseURL,e.url);return Fr(n,e.params,e.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(e){at.prototype[e]=function(n,r){return this.request(ot(r||{},{method:e,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(e){function n(r){return function(o,a,d){return this.request(ot(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}at.prototype[e]=n(),at.prototype[e+"Form"]=n(!0)});class fi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(d=>{r.subscribe(d),o=d}).then(s);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,d){r.reason||(r.reason=new pt(o,a,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new fi(function(s){e=s}),cancel:e}}}function Lc(t){return function(n){return t.apply(null,n)}}function Hc(t){return b.isObject(t)&&t.isAxiosError===!0}const mi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mi).forEach(([t,e])=>{mi[e]=t});function rs(t){const e=new at(t),n=Sr(at.prototype.request,e);return b.extend(n,at.prototype,e,{allOwnKeys:!0}),b.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return rs(ot(t,s))},n}const K=rs(Vt);K.Axios=at,K.CanceledError=pt,K.CancelToken=fi,K.isCancel=qr,K.VERSION=ns,K.toFormData=hn,K.AxiosError=T,K.Cancel=K.CanceledError,K.all=function(e){return Promise.all(e)},K.spread=Lc,K.isAxiosError=Hc,K.mergeConfig=ot,K.AxiosHeaders=ye,K.formToJSON=t=>Lr(b.isHTMLForm(t)?new FormData(t):t),K.getAdapter=es.getAdapter,K.HttpStatusCode=mi,K.default=K;var Ft=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(Ft||{});const Ot=(()=>{function t(){const c=s();return!(!c||c==="undefined")}function e(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function n(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function r(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function s(){return localStorage.getItem("access_token")}function o(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!t())return;const u=Ot.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:s,getRefreshToken:o,getUserId:n,clearTokens:a,getUser:r,updateHuman:d}})();class pi{constructor(e){l(this,"code",400);l(this,"err","");I.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,n.defaults.headers.common.token=Ot.getAccessToken(),e.config.headers.token=Ot.getAccessToken(),e.config.baseURL=void 0,n.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){ge.Error("Неверный логин или пароль");return}ge.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const s=new pi(e.response.data).getErr();s&&ge.Error(s)}return Promise.reject(e)}}}const gt=K.create();gt.interceptors.response.use(t=>t,async t=>await pi.Handle(t,gt));class Dt{static async Get(e,n,r){return await gt({method:Ft.GET,url:e,headers:n,responseType:r})}static async Post(e,n,r,s){return n["Content-Type"]="multipart/form-data",await gt({method:Ft.POST,url:e,headers:n,responseType:r,data:s})}static async Put(e,n,r){return n["Content-Type"]="multipart/form-data",await gt({method:Ft.PUT,url:e,headers:n,data:r})}static async Delete(e,n){return await gt({method:Ft.DELETE,url:e,headers:n})}}class bn{constructor(e){l(this,"name","");I.BuildClass(this,e)}static Set(){}static Get(e,n){const r=sessionStorage.getItem(e);if(r){const s=JSON.parse(r),o=new Date,a=new Date(s.time),d=o.getTime()-a.getTime();return Math.round(d/6e4)>(n||10)?null:s.data}else return null}static async TryGet(e,n,r){let s;return s=bn.Get(e,r),s||(s=await n()),s}}var gi=(t=>(t.ContentType="Content-Type",t.Token="token",t))(gi||{}),ss=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(ss||{});const Z=class Z{static Setup(e,n,r){this.baseUrl=e,this.apiVersion=n,this.apiHost=r}static newWebSocket(e){const n=this.apiHost.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const r=Z.getDownloadFileName(e,n.headers),s=URL.createObjectURL(n.data),o=document.createElement("a");o.href=s,o.setAttribute("download",r),o.setAttribute("target","_blank"),document.body.appendChild(o),o.click()}static getDownloadFileName(e,n){if(e)return e;const r=n["content-disposition"],s=r.indexOf('"')+1,o=r.lastIndexOf('"'),a=r.substring(s,o);return a||"file"}static getHeaders(e){const n=Ne.Get(Ie.AccessToken);return e||(e=Z.headers),n&&(e[gi.Token]=n),e??Z.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?Z.download(e.downloadFileName,n):n.data}static async Get(e){return Z.returnResponse(e,await Dt.Get(Z.buildUrl((e==null?void 0:e.query)??""),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return Z.returnResponse(e,await Dt.Post(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e.isBlob),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return Z.returnResponse(e,await Dt.Put(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return Z.returnResponse(e,await Dt.Delete(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(Z.buildUrl(n))}static buildUrl(e){const n=e??"";return this.baseUrl+this.apiVersion+n}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const r=new FormData;if(r.append("form",JSON.stringify(e)),n)for(const s of n)s.file&&r.append(s.id??"files",s.file,s.originalName);return r}};l(Z,"baseUrl",""),l(Z,"apiVersion",""),l(Z,"apiHost",""),l(Z,"headers",{[gi.ContentType]:ss.ApplicationJson});let J=Z;const E=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},qc={},Uc={style:{"text-align":"center"}};function _c(t,e){return i.openBlock(),i.createElementBlock("div",Uc,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const yi=E(qc,[["render",_c]]),jc=[{path:"/:pathMatch(.*)*",name:"NotFound",component:yi}],Oe=class Oe{static Set(e){this.router=e,this.AddRoutes(jc)}static Get(){return this.router}static AddRoutes(e){e.forEach(n=>{this.Get().addRoute(n)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Oe.GetStringParam("id")}static Slug(){return Oe.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Oe.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const n=this.Get().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=Oe.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await Oe.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var n;return(n=this.Route())==null?void 0:n.params[e]}static SetQueryParam(e,n){const r=new URL(window.location);r.searchParams.set(e,String(n)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};l(Oe,"router"),l(Oe,"ChangeDocumentTitle",(e="")=>{let n=Oe.Route().meta.title??e;n&&e&&(n=n+` | ${e}`),document.title=n});let Ze=Oe;class Y{constructor(e,n){l(this,"items",i.reactive([]));l(this,"item");l(this,"count",i.ref(0));l(this,"classConstructor");l(this,"url","");this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetAll(e){let n;const r=J.Get;e&&e.withCache?n=await bn.TryGet(this.getUrl(),r):n=await r({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=Ze.Id()),this.Set(await J.Get({query:this.getUrl(e)}))}async FTSP(e){var a;const r=((e==null?void 0:e.ftsp)??Nt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},o=await J.Post(s);if(!(!o||!o.ftsp))if(Array.isArray(o.data))this.SetAll(o.data);else{if(r.p.append){this.AppendToAll((a=o.data)==null?void 0:a.items);return}this.SetAllWithCount(o.data)}}async Create(e){const n=e??this.item;I.DeepTrim(n);const r={payload:n,query:this.getUrl()};return n.getFileInfos&&(r.fileInfos=n.getFileInfos()),await J.Post(r)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Create(r)))}),Promise.all(n)}async Update(e){const n=e??this.item;I.DeepTrim(n);const r={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(s=>s.url="")),await J.Put(r)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await J.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Update(r)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(r=>r.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){I.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get Item(){return this.item}get Count(){return this.count}}function Wc(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const Gc=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Zc{static GetRandColor(e){return He.GetRandEL(e??Gc)}}function os(t,e){const n=[],r=e||ke.Asc,s=r===ke.Asc?ke.Desc:ke.Asc;return Object.values(t).forEach(o=>{n.push(o(r)),n.push(o(s))}),n.length>0&&!n.some(o=>o.default)&&(n[0].default=!0),e&&n.forEach(o=>{o.default&&(o.default=o.order===e)}),n}let Xc=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Rt.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",en[Rt.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=en[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}};const wi=t=>t===8||t===46,Yc=t=>t>46&&t<58,Jc=t=>t>34&&t<41,Qc=t=>t+".",Kc=(t,e,n)=>{wi(e)||Jc(e)||(!Yc(e)||n>9)&&t.preventDefault()};function ed(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let s=t.substring(6,10).replace(".","1");Number(s)>2100&&(s="2100"),t=n+"."+r+"."+s}return t}function td(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;Kc(t,e,r),!wi(e)&&(r===2||r===5)&&(n=Qc(n));const s=t.srcElement.value+String.fromCharCode(t.which);if(wi(e)){t.srcElement.value=n;return}n.length===0&&Number(s)>3&&(n="3",t.preventDefault()),n.length===1&&Number(s)>31&&(n="31",t.preventDefault()),s.length===5&&Number(s.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=ed(n,r),t.srcElement.value=n}const nd=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],id="ru-RU";class qe{constructor(){l(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(r.year=n.year||n.year===void 0?n.year:r.year,r.month=n.month||n.month===void 0?n.month:r.month,r.day=n.day||n.day===void 0?n.day:r.day,r.hour=n.hour??r.hour,r.minute=n.minute??r.minute),Intl.DateTimeFormat(id,r).format(new Date(e))}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetPeriod(e,n,r){return`${this.Format(e,r)}-${this.Format(n,r)}`}static GetShortDayName(e){return e?nd[e.getDay()]:""}static GetCurrentWeekPeriod(e){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-n.getDay()+1),s=new Date(n.getFullYear(),n.getMonth(),r.getDate()+7);return this.GetPeriod(r,s,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,n){const r=new Date,s=new Date,o=qe.SplitHourTime(e),a=qe.SplitHourTime(n);return r.setHours(o[0],o[1],0,0),s.setHours(a[0],a[1],0,0),(s.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const n=qe.SplitHourTime(e);return n[0]*60+n[1]}static SplitHourTime(e){const n=e.split(":");return[Number(n[0]),Number(n[1])]}static AddMinutesToHM(e,n){const r=new Date,s=qe.SplitHourTime(e);r.setHours(s[0],s[1],0,0);const o=new Date(r.getTime()+n*6e4),a=o.getHours(),d=o.getMinutes();return`${a}:${d}`}static GetMonthsDiff(e,n){return n.getMonth()-e.getMonth()+12*(n.getFullYear()-e.getFullYear())}static StringToDate(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,n,r){return new Date(e)>=new Date(n)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,n){const r=[new Date(e)];let s=e;for(;s<=n;)s=qe.AddDays(s,1),r.push(s);return r}static AddDays(e,n){const r=new Date(e);return r.setDate(r.getDate()+n),r}static Eq(e,n){return e.getTime()===n.getTime()}}class rd{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class as{static Get(e){const n=e.split(".");return n[n.length-1]}}const sd=(()=>{function t(o,a){localStorage.setItem(`${o}_favourite`,a.toString())}function e(o,a){const d=localStorage.getItem(`${o}_favourite`);return d?d.split(",").includes(a):!1}function n(o,a){const d=localStorage.getItem(`${o}_favourite`);if(!d){t(o,[a]);return}const c=d.split(",");c.push(a),t(o,c)}function r(o,a){const d=localStorage.getItem(`${o}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);t(o,c)}function s(){for(const o in localStorage)o.includes("_favourite")&&localStorage.removeItem(o)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:s}})();/*!
|
|
20
20
|
* vue-router v4.5.0
|
|
21
21
|
* (c) 2024 Eduardo San Martin Morote
|
|
22
22
|
* @license MIT
|
package/package.json
CHANGED