adpro-react 0.0.21 → 0.0.22
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/adpro-react.cjs.js
CHANGED
@@ -326,7 +326,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
326
326
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[k9]=this[k9]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=on(s);n[l]||(hg(o,s),n[l]=!0)}return G.isArray(t)?t.forEach(i):i(t),this}};t2.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(t2.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});G.freezeMethods(t2);function b3(e,t){const r=this||qn,n=t||r,o=t2.from(n.headers);let i=n.data;return G.forEach(e,function(l){i=l.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function K4(e){return!!(e&&e.__CANCEL__)}function zr(e,t,r){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(zr,Ve,{__CANCEL__:!0});function G4(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ve("Request failed with status code "+r.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function gg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yg(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[i];s||(s=u),r[o]=c,n[o]=u;let p=i,h=0;for(;p!==o;)h+=r[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const v=d&&u-d;return v?Math.round(h*1e3/v):void 0}}function bg(e,t){let r=0,n=1e3/t,o,i;const s=(u,d=Date.now())=>{r=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-r;p>=n?s(u,d):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-p)))},()=>o&&s(o)]}const zo=(e,t,r=3)=>{let n=0;const o=yg(50,250);return bg(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),d=s<=l;n=s;const p={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},r)},V9=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},D9=e=>(...t)=>G.asap(()=>e(...t)),vg=qt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,qt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(qt.origin),qt.navigator&&/(msie|trident)/i.test(qt.navigator.userAgent)):()=>!0,xg=qt.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),G.isString(n)&&s.push("path="+n),G.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Eg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function X4(e,t){return e&&!Eg(t)?wg(e,t):t}const A9=e=>e instanceof t2?{...e}:e;function q1(e,t){t=t||{};const r={};function n(u,d,p,h){return G.isPlainObject(u)&&G.isPlainObject(d)?G.merge.call({caseless:h},u,d):G.isPlainObject(d)?G.merge({},d):G.isArray(d)?d.slice():d}function o(u,d,p,h){if(G.isUndefined(d)){if(!G.isUndefined(u))return n(void 0,u,p,h)}else return n(u,d,p,h)}function i(u,d){if(!G.isUndefined(d))return n(void 0,d)}function s(u,d){if(G.isUndefined(d)){if(!G.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,p){if(p in t)return n(u,d);if(p in e)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,d,p)=>o(A9(u),A9(d),p,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=c[d]||o,h=p(e[d],t[d],d);G.isUndefined(h)&&p!==l||(r[d]=h)}),r}const J4=e=>{const t=q1({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=t;t.headers=s=t2.from(s),t.url=W4(X4(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(G.isFormData(r)){if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(qt.hasStandardBrowserEnv&&(n&&G.isFunction(n)&&(n=n(t)),n||n!==!1&&vg(t.url))){const u=o&&i&&xg.read(i);u&&s.set(o,u)}return t},Sg=typeof XMLHttpRequest<"u",Tg=Sg&&function(e){return new Promise(function(r,n){const o=J4(e);let i=o.data;const s=t2.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,d,p,h,v,y;function m(){v&&v(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function S(){if(!x)return;const w=t2.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),b={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:e,request:x};G4(function(L){r(L),m()},function(L){n(L),m()},b),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(S)},x.onabort=function(){x&&(n(new Ve("Request aborted",Ve.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const b=o.transitional||q4;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),n(new Ve(E,b.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&G.forEach(s.toJSON(),function(E,b){x.setRequestHeader(b,E)}),G.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),u&&([h,y]=zo(u,!0),x.addEventListener("progress",h)),c&&x.upload&&([p,v]=zo(c),x.upload.addEventListener("progress",p),x.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(d=w=>{x&&(n(!w||w.type?new zr(null,e,x):w),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const O=gg(o.url);if(O&&qt.protocols.indexOf(O)===-1){n(new Ve("Unsupported protocol "+O+":",Ve.ERR_BAD_REQUEST,e));return}x.send(i||null)})},Rg=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,l();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Ve?d:new zr(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,i(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>G.asap(l),c}},Og=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},Lg=async function*(e,t){for await(const r of Mg(e))yield*Og(r,t)},Mg=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},B9=(e,t,r,n)=>{const o=Lg(e,t);let i=0,s,l=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){l(),c.close();return}let p=d.byteLength;if(r){let h=i+=p;r(h)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Vi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Q4=Vi&&typeof ReadableStream=="function",$g=Vi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),e8=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Pg=Q4&&e8(()=>{let e=!1;const t=new Request(qt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),I9=64*1024,aa=Q4&&e8(()=>G.isReadableStream(new Response("").body)),Zo={stream:aa&&(e=>e.body)};Vi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Zo[t]&&(Zo[t]=G.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,n)})})})(new Response);const kg=async e=>{if(e==null)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e))return(await new Request(qt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(G.isArrayBufferView(e)||G.isArrayBuffer(e))return e.byteLength;if(G.isURLSearchParams(e)&&(e=e+""),G.isString(e))return(await $g(e)).byteLength},Vg=async(e,t)=>{const r=G.toFiniteNumber(e.getContentLength());return r??kg(t)},Dg=Vi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:h}=J4(e);u=u?(u+"").toLowerCase():"text";let v=Rg([o,i&&i.toAbortSignal()],s),y;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let x;try{if(c&&Pg&&r!=="get"&&r!=="head"&&(x=await Vg(d,n))!==0){let b=new Request(t,{method:"POST",body:n,duplex:"half"}),R;if(G.isFormData(n)&&(R=b.headers.get("content-type"))&&d.setContentType(R),b.body){const[L,D]=V9(x,zo(D9(c)));n=B9(b.body,I9,L,D)}}G.isString(p)||(p=p?"include":"omit");const S="credentials"in Request.prototype;y=new Request(t,{...h,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:S?p:void 0});let O=await fetch(y);const w=aa&&(u==="stream"||u==="response");if(aa&&(l||w&&m)){const b={};["status","statusText","headers"].forEach(I=>{b[I]=O[I]});const R=G.toFiniteNumber(O.headers.get("content-length")),[L,D]=l&&V9(R,zo(D9(l),!0))||[];O=new Response(B9(O.body,I9,L,()=>{D&&D(),m&&m()}),b)}u=u||"text";let E=await Zo[G.findKey(Zo,u)||"text"](O,e);return!w&&m&&m(),await new Promise((b,R)=>{G4(b,R,{data:E,headers:t2.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:y})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,y),{cause:S.cause||S}):Ve.from(S,S&&S.code,e,y)}}),sa={http:Kh,xhr:Tg,fetch:Dg};G.forEach(sa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const H9=e=>`- ${e}`,Ag=e=>G.isFunction(e)||e===null||e===!1,t8={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!Ag(r)&&(n=sa[(s=String(r)).toLowerCase()],n===void 0))throw new Ve(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
327
327
|
`+i.map(H9).join(`
|
328
328
|
`):" "+H9(i[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:sa};function v3(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zr(null,e)}function N9(e){return v3(e),e.headers=t2.from(e.headers),e.data=b3.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),t8.getAdapter(e.adapter||qn.adapter)(e).then(function(n){return v3(e),n.data=b3.call(e,e.transformResponse,n),n.headers=t2.from(n.headers),n},function(n){return K4(n)||(v3(e),n&&n.response&&(n.response.data=b3.call(e,e.transformResponse,n.response),n.response.headers=t2.from(n.response.headers))),Promise.reject(n)})}const r8="1.7.9",Di={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Di[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const F9={};Di.transitional=function(t,r,n){function o(i,s){return"[Axios v"+r8+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,l)=>{if(t===!1)throw new Ve(o(s," has been removed"+(r?" in "+r:"")),Ve.ERR_DEPRECATED);return r&&!F9[s]&&(F9[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,l):!0}};Di.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Bg(e,t,r){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new Ve("option "+i+" must be "+c,Ve.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ve("Unknown option "+i,Ve.ERR_BAD_OPTION)}}const Ro={assertOptions:Bg,validators:Di},j2=Ro.validators;let _1=class{constructor(t){this.defaults=t,this.interceptors={request:new P9,response:new P9}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
329
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=q1(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Ro.assertOptions(n,{silentJSONParsing:j2.transitional(j2.boolean),forcedJSONParsing:j2.transitional(j2.boolean),clarifyTimeoutError:j2.transitional(j2.boolean)},!1),o!=null&&(G.isFunction(o)?r.paramsSerializer={serialize:o}:Ro.assertOptions(o,{encode:j2.function,serialize:j2.function},!0)),Ro.assertOptions(r,{baseUrl:j2.spelling("baseURL"),withXsrfToken:j2.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[r.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=t2.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,p=0,h;if(!c){const y=[N9.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),h=y.length,d=Promise.resolve(r);p<h;)d=d.then(y[p++],y[p++]);return d}h=l.length;let v=r;for(p=0;p<h;){const y=l[p++],m=l[p++];try{v=y(v)}catch(x){m.call(this,x);break}}try{d=N9.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,h=u.length;p<h;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=q1(this.defaults,t);const r=X4(t.baseURL,t.url);return W4(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){_1.prototype[t]=function(r,n){return this.request(q1(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,l){return this.request(q1(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}_1.prototype[t]=r(),_1.prototype[t+"Form"]=r(!0)});let Ig=class n8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{n.subscribe(l),i=l}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,l){n.reason||(n.reason=new zr(i,s,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new n8(function(o){t=o}),cancel:t}}};function Hg(e){return function(r){return e.apply(null,r)}}function Ng(e){return G.isObject(e)&&e.isAxiosError===!0}const la={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(la).forEach(([e,t])=>{la[t]=e});function o8(e){const t=new _1(e),r=D4(_1.prototype.request,t);return G.extend(r,_1.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return o8(q1(e,o))},r}const Lt=o8(qn);Lt.Axios=_1;Lt.CanceledError=zr;Lt.CancelToken=Ig;Lt.isCancel=K4;Lt.VERSION=r8;Lt.toFormData=ki;Lt.AxiosError=Ve;Lt.Cancel=Lt.CanceledError;Lt.all=function(t){return Promise.all(t)};Lt.spread=Hg;Lt.isAxiosError=Ng;Lt.mergeConfig=q1;Lt.AxiosHeaders=t2;Lt.formToJSON=e=>Y4(G.isHTMLForm(e)?new FormData(e):e);Lt.getAdapter=t8.getAdapter;Lt.HttpStatusCode=la;Lt.default=Lt;const{Axios:tS,AxiosError:Fg,CanceledError:rS,isCancel:nS,CancelToken:oS,VERSION:iS,all:aS,Cancel:sS,isAxiosError:lS,spread:cS,toFormData:uS,AxiosHeaders:dS,HttpStatusCode:pS,formToJSON:fS,getAdapter:CS,mergeConfig:mS}=Lt;var pr={},j9;function jg(){if(j9)return pr;j9=1;var e=R2;if(process.env.NODE_ENV==="production")pr.createRoot=e.createRoot,pr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},pr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return pr}var _g=jg();let B1=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const zg={async Send(e){const{serviceUrl:t,body:r,method:n="get",defaultToken:o=!0,hideError:i=!1,srm:s,core:l}=e;let{headers:c}=e;window.parent.location.href.includes("localhost")&&(l?B1="http://localhost:3500/core/api":B1="http://localhost:3500");const u=Lt.create({baseURL:s?`${B1.toLowerCase().replace("/adpro/","/srm/")}`:l?`${B1.toLowerCase().replace("/adpro/api","/core/api")}`:B1});return c=c||{},o&&(c.Authorization=await i8(window)),await u[n](t,Zg(r,n,c),{headers:c,validateStatus:function(p){return p<400}}).then(function(p){const{data:h,status:v}=p;return h||{data:null,httpCode:v,message:"Transacción exitosa",success:!0}}).catch(p=>{var S,O,w,E;let h={primaryMessage:"Se han presentado errores en la solicitud",secondaryMessage:"Ha ocurrido un error en la petición",severity:"error",timeProgress:8},v={data:null,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1};const y="Se han presentado errores en la solicitud",m="No se ha encontrado el recurso solicitado";let x=[];if(p instanceof Fg){const b=p,R=(S=b.response)==null?void 0:S.data;if(R&&"data"in R&&"success"in R&&"httpCode"in R&&"message"in R&&"errors"in R){const L=R;v=L,h.secondaryMessage=L.message,L.errors&&Array.isArray(L.errors)?(h.details=L.errors.map(D=>`${D.property} - ${D.errorDescription}`),x=L.errors.map(D=>`${D.property} - ${D.errorDescription}`)):L.errors&&!Array.isArray(L.errors)&&(x=L.errors.stackTrace.map(D=>`${D.line} - ${D.method}`))}else((O=b.response)==null?void 0:O.status)==404?(h.secondaryMessage=m,v.message=m,x=[...x,`${(w=b.response)==null?void 0:w.status} - ${m}`]):(v.message=y,x=[...x,`${(E=b.response)==null?void 0:E.status} - ${y}`])}else h.secondaryMessage=y,v.message=y,x=[...x,`400 - ${y}`];throw i||Ug(h),console.error({title:"Error in requestADPRO",details:["Error in requestADPRO",e,h,...x]}),v}).finally(function(){})}},Zg=(e,t,r)=>{const n=e;for(var o in e)e[o]===""&&(e[o]=null);return t==="get"||t==="delete"?{params:n,headers:r,data:n}:n},Ug=e=>{let t=document.createElement("div");t.id=`alerts${Math.random()}`,document.body.appendChild(t);const r=_g.createRoot(t),n=$.jsx(zs,{elements:{...e,finishAction:()=>{t.remove()}}});r.render(n)},i8=async e=>{let t="";return window.parent.location.href.includes("localhost")?(B1="http://localhost:3500",`Bearer ${(await Lt.get(`${B1}/token`)).data}`):(e.getToken!=null&&e.getToken!=null?t=e.getToken():(e.parent.getToken!=null&&e.parent.getToken!=null&&(t=e.parent.getToken()),t=await i8(e)),t)},Wg=(e,t,r)=>e[t]!=="-1"&&e[t]!=="0"&&e[t]!==-1?e:r&&(r[t]==="-1"||r[t]===-1)?r:e;function a8(e){const{type:t,action:r="search",value:n,inputValue:o,handleValue:i,labelKey:s,labelText:l,optionAll:c}=e,u=t==="request"?e.request:null,d=t==="list"?e.list:null,[p,h]=C.useState(Wg(n,s,c)),[v,y]=C.useState(o||""),[m,x]=C.useState(d||[]),[S,O]=C.useState("input"),[w,E]=C.useState(!1),[b,R]=C.useState(!1),[L,D]=C.useState(!1);C.useEffect(()=>{t==="list"?I(m):r==="all"&&M(V=>I(V))},[]),C.useEffect(()=>{t==="list"||r==="all"?f(m):c?v!==""&&(S==="input"||S==="reset"||S==="selectOption")&&h(n):h(n)},[n]),C.useEffect(()=>{let V=null;return t=="request"&&(r==="search"&&v&&S==="input"||r==="all"&&!b)&&E(!0),r==="search"&&v&&S==="input"&&(V=setTimeout(()=>{M()},800)),()=>{E(!1),V&&clearInterval(V)}},[v]),C.useEffect(()=>{d&&d.length>0?x(d):x([])},[d]);const I=C.useCallback(V=>{if(n){const z=n||"",W=V.find(_=>_[s]==z);W&&(h(W),y(W[l]))}},[n,s,l]),f=C.useCallback(V=>{if(n){const z=n||"",W=V.find(_=>_[s]==z);W&&(h(W),y(W[l]))}else h(null),y("")},[n,s,l]),M=C.useCallback(V=>{if(u){t==="request"&&E(!0);let z=v.trim();if((z.trim()===""||z===" "||z===""||z==="-1"||z.trim()==="Todos")&&(z="_"),p&&p[l]===z){x([p]),E(!1);return}u.body={filter:z},zg.Send(u).then(W=>{if(W){let _=W;_=u!=null&&_.length>20?_.slice(0,20):_??[],_.length===void 0&&(_=[]),x(_),V&&V(_)}t==="request"&&E(!1)})}},[v,m,u,r,t,w]),B=C.useCallback(V=>{V&&(h(V),i&&i(V))},[]),j=C.useCallback(V=>{V?y(V):H()},[r,t]),F=C.useCallback(V=>{O(V)},[]);C.useEffect(()=>{if(t==="list"&&r==="search"&&S==="input"&&d)if(v.trim()==="")x(d);else{const V=d.filter(z=>String(z[l]).toLowerCase().includes(v.toLowerCase()));x(V)}},[v]);const H=C.useCallback(()=>{if(t==="request")c?i&&i(c):(h(null),i&&i(null)),y(""),x([]),M();else if(d)if(c){const V=d.find(z=>z[s]=="-1");V?(h(V),y(V[l]),i&&i(V)):(y(""),h(p||n),i&&i(p||n))}else{const V=n||"",z=d.find(W=>W[s]==V);z?(h(z),y(z[l]),i&&i(z)):(y(""),h(p),i&&i(p))}},[]);return C.useEffect(()=>{L?t==="request"&&M():(t==="list"&&r==="search"&&(h(p),y(p?p[l]:""),v===""&&x(d||[])),t==="request"&&(c?((S==="clear"||S==="blur")&&(n[s]==="-1"||n[s]===-1)&&(h(c),y(c[l]),i&&i(c)),S==="input"&&v===""&&(n[s]==="-1"||n[s]===-1)&&(h(c),y(c[l]),i&&i(c))):(h(p),y(p?p[l]:""))))},[L]),{dataList:m,loading:w,isFocused:L,autocompleteValue:p,textFieldValue:v,handleAutocompleteValue:B,handleTextFieldValue:j,handleReasonChangeTextField:F,setIsFocused:D,clearValues:H}}const qg=It($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),Yg=It($.jsx("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),Kg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.29 16.29 5.7 12.7a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0"}),"CheckCircleRounded"),Gg=It($.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),Xg=It($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),Jg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"ErrorRounded"),Qg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded"),ey=It($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),ty=It($.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded");function vs(e,t,r){return(t=ny(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function n1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_9(Object(r),!0).forEach(function(n){vs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ry(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ny(e){var t=ry(e,"string");return typeof t=="symbol"?t:t+""}function O1(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}var xs="$$material";function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uo.apply(null,arguments)}function s8(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var oy=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,iy=s8(function(e){return oy.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ca=typeof document<"u";function ay(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var l8=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||ca===!1&&t.compat!==void 0)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},sy=function(t,r,n){l8(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i="",s=r;do{var l=t.insert(r===s?"."+o:"",s,t.sheet,!0);!ca&&l!==void 0&&(i+=l),s=s.next}while(s!==void 0);if(!ca&&i.length!==0)return i}};function ly(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uy=/[A-Z]|^ms/g,dy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c8=function(t){return t.charCodeAt(1)===45},z9=function(t){return t!=null&&typeof t!="boolean"},x3=s8(function(e){return c8(e)?e:e.replace(uy,"-$&").toLowerCase()}),Z9=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(dy,function(n,o,i){return U2={name:o,styles:i,next:U2},o})}return cy[t]!==1&&!c8(t)&&typeof r=="number"&&r!==0?r+"px":r};function kn(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return U2={name:o.name,styles:o.styles,next:U2},o.name;var i=r;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)U2={name:s.name,styles:s.styles,next:U2},s=s.next;var l=i.styles+";";return l}return py(e,t,r)}case"function":{if(e!==void 0){var c=U2,u=r(e);return U2=c,kn(e,t,u)}break}}var d=r;if(t==null)return d;var p=t[d];return p!==void 0?p:d}function py(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=kn(e,t,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":z9(l)&&(n+=x3(i)+":"+Z9(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)z9(s[c])&&(n+=x3(i)+":"+Z9(i,s[c])+";");else{var u=kn(e,t,s);switch(i){case"animation":case"animationName":{n+=x3(i)+":"+u+";";break}default:n+=i+"{"+u+"}"}}}return n}var U9=/label:\s*([^\s;{]+)\s*(;|$)/g,U2;function u8(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";U2=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=kn(r,t,i);else{var s=i;o+=s[0]}for(var l=1;l<e.length;l++)if(o+=kn(r,t,e[l]),n){var c=i;o+=c[l]}U9.lastIndex=0;for(var u="",d;(d=U9.exec(o))!==null;)u+="-"+d[1];var p=ly(o)+u;return{name:p,styles:o,next:U2}}var fy=typeof document<"u",W9=function(t){return t()},Cy=T.useInsertionEffect?T.useInsertionEffect:!1,my=fy&&Cy||W9,hy=iy,gy=function(t){return t!=="theme"},q9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?hy:gy},Y9=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},K9=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
329
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=q1(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Ro.assertOptions(n,{silentJSONParsing:j2.transitional(j2.boolean),forcedJSONParsing:j2.transitional(j2.boolean),clarifyTimeoutError:j2.transitional(j2.boolean)},!1),o!=null&&(G.isFunction(o)?r.paramsSerializer={serialize:o}:Ro.assertOptions(o,{encode:j2.function,serialize:j2.function},!0)),Ro.assertOptions(r,{baseUrl:j2.spelling("baseURL"),withXsrfToken:j2.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&G.merge(i.common,i[r.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=t2.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,p=0,h;if(!c){const y=[N9.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),h=y.length,d=Promise.resolve(r);p<h;)d=d.then(y[p++],y[p++]);return d}h=l.length;let v=r;for(p=0;p<h;){const y=l[p++],m=l[p++];try{v=y(v)}catch(x){m.call(this,x);break}}try{d=N9.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,h=u.length;p<h;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=q1(this.defaults,t);const r=X4(t.baseURL,t.url);return W4(r,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){_1.prototype[t]=function(r,n){return this.request(q1(n||{},{method:t,url:r,data:(n||{}).data}))}});G.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,l){return this.request(q1(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}_1.prototype[t]=r(),_1.prototype[t+"Form"]=r(!0)});let Ig=class n8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{n.subscribe(l),i=l}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,l){n.reason||(n.reason=new zr(i,s,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new n8(function(o){t=o}),cancel:t}}};function Hg(e){return function(r){return e.apply(null,r)}}function Ng(e){return G.isObject(e)&&e.isAxiosError===!0}const la={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(la).forEach(([e,t])=>{la[t]=e});function o8(e){const t=new _1(e),r=D4(_1.prototype.request,t);return G.extend(r,_1.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return o8(q1(e,o))},r}const Lt=o8(qn);Lt.Axios=_1;Lt.CanceledError=zr;Lt.CancelToken=Ig;Lt.isCancel=K4;Lt.VERSION=r8;Lt.toFormData=ki;Lt.AxiosError=Ve;Lt.Cancel=Lt.CanceledError;Lt.all=function(t){return Promise.all(t)};Lt.spread=Hg;Lt.isAxiosError=Ng;Lt.mergeConfig=q1;Lt.AxiosHeaders=t2;Lt.formToJSON=e=>Y4(G.isHTMLForm(e)?new FormData(e):e);Lt.getAdapter=t8.getAdapter;Lt.HttpStatusCode=la;Lt.default=Lt;const{Axios:tS,AxiosError:Fg,CanceledError:rS,isCancel:nS,CancelToken:oS,VERSION:iS,all:aS,Cancel:sS,isAxiosError:lS,spread:cS,toFormData:uS,AxiosHeaders:dS,HttpStatusCode:pS,formToJSON:fS,getAdapter:CS,mergeConfig:mS}=Lt;var pr={},j9;function jg(){if(j9)return pr;j9=1;var e=R2;if(process.env.NODE_ENV==="production")pr.createRoot=e.createRoot,pr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},pr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return pr}var _g=jg();let B1=`${window.location.href.split("#")[0].toLowerCase().split("v3")[0]}v3/adpro/api`;const zg={async Send(e){const{serviceUrl:t,body:r,method:n="get",defaultToken:o=!0,hideError:i=!1,srm:s,core:l}=e;let{headers:c}=e;window.parent.location.href.includes("localhost")&&(l?B1="http://localhost:3500/core/api":B1="http://localhost:3500");const u=Lt.create({baseURL:s?`${B1.toLowerCase().replace("/adpro/","/srm/")}`:l?`${B1.toLowerCase().replace("/adpro/api","/adpro/core/api")}`:B1});return c=c||{},o&&(c.Authorization=await i8(window)),await u[n](t,Zg(r,n,c),{headers:c,validateStatus:function(p){return p<400}}).then(function(p){const{data:h,status:v}=p;return h||{data:null,httpCode:v,message:"Transacción exitosa",success:!0}}).catch(p=>{var S,O,w,E;let h={primaryMessage:"Se han presentado errores en la solicitud",secondaryMessage:"Ha ocurrido un error en la petición",severity:"error",timeProgress:8},v={data:null,httpCode:500,message:"Ha ocurrido un error en la petición",success:!1};const y="Se han presentado errores en la solicitud",m="No se ha encontrado el recurso solicitado";let x=[];if(p instanceof Fg){const b=p,R=(S=b.response)==null?void 0:S.data;if(R&&"data"in R&&"success"in R&&"httpCode"in R&&"message"in R&&"errors"in R){const L=R;v=L,h.secondaryMessage=L.message,L.errors&&Array.isArray(L.errors)?(h.details=L.errors.map(D=>`${D.property} - ${D.errorDescription}`),x=L.errors.map(D=>`${D.property} - ${D.errorDescription}`)):L.errors&&!Array.isArray(L.errors)&&(x=L.errors.stackTrace.map(D=>`${D.line} - ${D.method}`))}else((O=b.response)==null?void 0:O.status)==404?(h.secondaryMessage=m,v.message=m,x=[...x,`${(w=b.response)==null?void 0:w.status} - ${m}`]):(v.message=y,x=[...x,`${(E=b.response)==null?void 0:E.status} - ${y}`])}else h.secondaryMessage=y,v.message=y,x=[...x,`400 - ${y}`];throw i||Ug(h),console.error({title:"Error in requestADPRO",details:["Error in requestADPRO",e,h,...x]}),v}).finally(function(){})}},Zg=(e,t,r)=>{const n=e;for(var o in e)e[o]===""&&(e[o]=null);return t==="get"||t==="delete"?{params:n,headers:r,data:n}:n},Ug=e=>{let t=document.createElement("div");t.id=`alerts${Math.random()}`,document.body.appendChild(t);const r=_g.createRoot(t),n=$.jsx(zs,{elements:{...e,finishAction:()=>{t.remove()}}});r.render(n)},i8=async e=>{let t="";return window.parent.location.href.includes("localhost")?(B1="http://localhost:3500",`Bearer ${(await Lt.get(`${B1}/token`)).data}`):(e.getToken!=null&&e.getToken!=null?t=e.getToken():(e.parent.getToken!=null&&e.parent.getToken!=null&&(t=e.parent.getToken()),t=await i8(e)),t)},Wg=(e,t,r)=>e[t]!=="-1"&&e[t]!=="0"&&e[t]!==-1?e:r&&(r[t]==="-1"||r[t]===-1)?r:e;function a8(e){const{type:t,action:r="search",value:n,inputValue:o,handleValue:i,labelKey:s,labelText:l,optionAll:c}=e,u=t==="request"?e.request:null,d=t==="list"?e.list:null,[p,h]=C.useState(Wg(n,s,c)),[v,y]=C.useState(o||""),[m,x]=C.useState(d||[]),[S,O]=C.useState("input"),[w,E]=C.useState(!1),[b,R]=C.useState(!1),[L,D]=C.useState(!1);C.useEffect(()=>{t==="list"?I(m):r==="all"&&M(V=>I(V))},[]),C.useEffect(()=>{t==="list"||r==="all"?f(m):c?v!==""&&(S==="input"||S==="reset"||S==="selectOption")&&h(n):h(n)},[n]),C.useEffect(()=>{let V=null;return t=="request"&&(r==="search"&&v&&S==="input"||r==="all"&&!b)&&E(!0),r==="search"&&v&&S==="input"&&(V=setTimeout(()=>{M()},800)),()=>{E(!1),V&&clearInterval(V)}},[v]),C.useEffect(()=>{d&&d.length>0?x(d):x([])},[d]);const I=C.useCallback(V=>{if(n){const z=n||"",W=V.find(_=>_[s]==z);W&&(h(W),y(W[l]))}},[n,s,l]),f=C.useCallback(V=>{if(n){const z=n||"",W=V.find(_=>_[s]==z);W&&(h(W),y(W[l]))}else h(null),y("")},[n,s,l]),M=C.useCallback(V=>{if(u){t==="request"&&E(!0);let z=v.trim();if((z.trim()===""||z===" "||z===""||z==="-1"||z.trim()==="Todos")&&(z="_"),p&&p[l]===z){x([p]),E(!1);return}u.body={filter:z},zg.Send(u).then(W=>{if(W){let _=W;_=u!=null&&_.length>20?_.slice(0,20):_??[],_.length===void 0&&(_=[]),x(_),V&&V(_)}t==="request"&&E(!1)})}},[v,m,u,r,t,w]),B=C.useCallback(V=>{V&&(h(V),i&&i(V))},[]),j=C.useCallback(V=>{V?y(V):H()},[r,t]),F=C.useCallback(V=>{O(V)},[]);C.useEffect(()=>{if(t==="list"&&r==="search"&&S==="input"&&d)if(v.trim()==="")x(d);else{const V=d.filter(z=>String(z[l]).toLowerCase().includes(v.toLowerCase()));x(V)}},[v]);const H=C.useCallback(()=>{if(t==="request")c?i&&i(c):(h(null),i&&i(null)),y(""),x([]),M();else if(d)if(c){const V=d.find(z=>z[s]=="-1");V?(h(V),y(V[l]),i&&i(V)):(y(""),h(p||n),i&&i(p||n))}else{const V=n||"",z=d.find(W=>W[s]==V);z?(h(z),y(z[l]),i&&i(z)):(y(""),h(p),i&&i(p))}},[]);return C.useEffect(()=>{L?t==="request"&&M():(t==="list"&&r==="search"&&(h(p),y(p?p[l]:""),v===""&&x(d||[])),t==="request"&&(c?((S==="clear"||S==="blur")&&(n[s]==="-1"||n[s]===-1)&&(h(c),y(c[l]),i&&i(c)),S==="input"&&v===""&&(n[s]==="-1"||n[s]===-1)&&(h(c),y(c[l]),i&&i(c))):(h(p),y(p?p[l]:""))))},[L]),{dataList:m,loading:w,isFocused:L,autocompleteValue:p,textFieldValue:v,handleAutocompleteValue:B,handleTextFieldValue:j,handleReasonChangeTextField:F,setIsFocused:D,clearValues:H}}const qg=It($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),Yg=It($.jsx("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),Kg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.29 16.29 5.7 12.7a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0"}),"CheckCircleRounded"),Gg=It($.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),Xg=It($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),Jg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"ErrorRounded"),Qg=It($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded"),ey=It($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),ty=It($.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded");function vs(e,t,r){return(t=ny(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function n1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_9(Object(r),!0).forEach(function(n){vs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_9(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ry(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ny(e){var t=ry(e,"string");return typeof t=="symbol"?t:t+""}function O1(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}var xs="$$material";function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uo.apply(null,arguments)}function s8(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var oy=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,iy=s8(function(e){return oy.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ca=typeof document<"u";function ay(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var l8=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||ca===!1&&t.compat!==void 0)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},sy=function(t,r,n){l8(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i="",s=r;do{var l=t.insert(r===s?"."+o:"",s,t.sheet,!0);!ca&&l!==void 0&&(i+=l),s=s.next}while(s!==void 0);if(!ca&&i.length!==0)return i}};function ly(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uy=/[A-Z]|^ms/g,dy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c8=function(t){return t.charCodeAt(1)===45},z9=function(t){return t!=null&&typeof t!="boolean"},x3=s8(function(e){return c8(e)?e:e.replace(uy,"-$&").toLowerCase()}),Z9=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(dy,function(n,o,i){return U2={name:o,styles:i,next:U2},o})}return cy[t]!==1&&!c8(t)&&typeof r=="number"&&r!==0?r+"px":r};function kn(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return U2={name:o.name,styles:o.styles,next:U2},o.name;var i=r;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)U2={name:s.name,styles:s.styles,next:U2},s=s.next;var l=i.styles+";";return l}return py(e,t,r)}case"function":{if(e!==void 0){var c=U2,u=r(e);return U2=c,kn(e,t,u)}break}}var d=r;if(t==null)return d;var p=t[d];return p!==void 0?p:d}function py(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=kn(e,t,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":z9(l)&&(n+=x3(i)+":"+Z9(i,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)z9(s[c])&&(n+=x3(i)+":"+Z9(i,s[c])+";");else{var u=kn(e,t,s);switch(i){case"animation":case"animationName":{n+=x3(i)+":"+u+";";break}default:n+=i+"{"+u+"}"}}}return n}var U9=/label:\s*([^\s;{]+)\s*(;|$)/g,U2;function u8(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";U2=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=kn(r,t,i);else{var s=i;o+=s[0]}for(var l=1;l<e.length;l++)if(o+=kn(r,t,e[l]),n){var c=i;o+=c[l]}U9.lastIndex=0;for(var u="",d;(d=U9.exec(o))!==null;)u+="-"+d[1];var p=ly(o)+u;return{name:p,styles:o,next:U2}}var fy=typeof document<"u",W9=function(t){return t()},Cy=T.useInsertionEffect?T.useInsertionEffect:!1,my=fy&&Cy||W9,hy=iy,gy=function(t){return t!=="theme"},q9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?hy:gy},Y9=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},K9=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
330
330
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
331
331
|
You can read more about this here:
|
332
332
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,yy=typeof document<"u",by=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;l8(r,n,o);var i=my(function(){return sy(r,n,o)});if(!yy&&i!==void 0){for(var s,l=n.name,c=n.next;c!==void 0;)l+=" "+c.name,c=c.next;return T.createElement("style",(s={},s["data-emotion"]=r.key+" "+l,s.dangerouslySetInnerHTML={__html:i},s.nonce=r.sheet.nonce,s))}return null},vy=function e(t,r){if(process.env.NODE_ENV!=="production"&&t===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
|
package/dist/adpro-react.es.js
CHANGED
@@ -22684,7 +22684,7 @@ const Qg = {
|
|
22684
22684
|
let { headers: c } = e;
|
22685
22685
|
window.parent.location.href.includes("localhost") && (l ? j1 = "http://localhost:3500/core/api" : j1 = "http://localhost:3500");
|
22686
22686
|
const u = Ot.create({
|
22687
|
-
baseURL: s ? `${j1.toLowerCase().replace("/adpro/", "/srm/")}` : l ? `${j1.toLowerCase().replace("/adpro/api", "/core/api")}` : j1
|
22687
|
+
baseURL: s ? `${j1.toLowerCase().replace("/adpro/", "/srm/")}` : l ? `${j1.toLowerCase().replace("/adpro/api", "/adpro/core/api")}` : j1
|
22688
22688
|
});
|
22689
22689
|
return c = c || {}, o && (c.Authorization = await c8(window)), await u[n](t, ey(r, n, c), {
|
22690
22690
|
headers: c,
|