jrs-react 1.2.23 → 1.2.25
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/build/index.es.js +56 -138
- package/build/index.js +39 -121
- package/package.json +1 -1
- package/src/components/JRFields/StyleJRFields.jsx +4 -1
- package/src/components/JRFrame/JRFrame.jsx +21 -4
- package/src/components/JRMask/JRMask.jsx +96 -59
- package/src/components/JRSubmit.jsx +8 -16
- package/src/components/JRTable/JRTable.jsx +1 -1
- package/src/components/JRTable/StyledJRTable.jsx +4 -4
- package/src/components/JRWindow/JRWindow.jsx +21 -15
- package/src/components/JRWindow/Slider.jsx +9 -7
- package/src/components/JRWindow/TitleBar.jsx +1 -1
- package/src/index.js +2 -2
- /package/src/components/JRAlert/{index.jsx → JRAlert.jsx} +0 -0
package/build/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import*as e from"react";import t,{useState as r}from"react";import n from"styled-components";import{createRoot as o}from"react-dom/client";function s(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,l=(c=Object.create(null),e=>{const t=i.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const h=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:p}=Array,u=d("undefined");const m=h("ArrayBuffer");const f=d("string"),g=d("function"),w=d("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==l(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},x=h("Date"),v=h("File"),E=h("Blob"),k=h("FileList"),S=h("URLSearchParams");function R(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function O(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=e=>!u(e)&&e!==C;const N=($="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>$&&e instanceof $);var $;const A=h("HTMLFormElement"),T=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),V=h("RegExp"),L=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};R(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)},_="abcdefghijklmnopqrstuvwxyz",B="0123456789",D={DIGIT:B,ALPHA:_,ALPHA_DIGIT:_+_.toUpperCase()+B};const P=h("AsyncFunction");var z={isArray:p,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=l(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:f,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isUndefined:u,isDate:x,isFile:v,isBlob:E,isRegExp:V,isFunction:g,isStream:e=>y(e)&&g(e.pipe),isURLSearchParams:S,isTypedArray:N,isFileList:k,forEach:R,merge:function e(){const{caseless:t}=j(this)&&this||{},r={},n=(n,o)=>{const s=t&&O(r,o)||o;b(r[s])&&b(n)?r[s]=e(r[s],n):b(n)?r[s]=e({},n):p(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&R(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(R(t,((t,n)=>{r&&g(t)?e[n]=s(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],n&&!n(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==r&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:h,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!w(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:A,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];g(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return p(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:C,isContextDefined:j,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=p(e)?[]:{};return R(e,((e,t)=>{const s=r(e,n+1);!u(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:P,isThenable:e=>e&&(y(e)||g(e))&&g(e.then)&&g(e.catch)};function F(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}z.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const M=F.prototype,U={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{U[e]={value:e}})),Object.defineProperties(F,U),Object.defineProperty(M,"isAxiosError",{value:!0}),F.from=(e,t,r,n,o,s)=>{const i=Object.create(M);return z.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),F.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function H(e){return z.isPlainObject(e)||z.isArray(e)}function I(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,r){return e?e.concat(t).map((function(e,t){return e=I(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const W=z.toFlatObject(z,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!z.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,s=r.dots,i=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(z.isDate(e))return e.toISOString();if(!a&&z.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(e)||z.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(z.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(z.isArray(e)&&function(e){return z.isArray(e)&&!e.some(H)}(e)||(z.isFileList(e)||z.endsWith(r,"[]"))&&(a=z.toArray(e)))return r=I(r),a.forEach((function(e,n){!z.isUndefined(e)&&null!==e&&t.append(!0===i?X([r],n,s):null===i?r:r+"[]",l(e))})),!1;return!!H(e)||(t.append(X(o,r,s),l(e)),!1)}const h=[],d=Object.assign(W,{defaultVisitor:c,convertValue:l,isVisitable:H});if(!z.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!z.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),z.forEach(r,(function(r,s){!0===(!(z.isUndefined(r)||null===r)&&o.call(t,r,z.isString(s)?s.trim():s,n,d))&&e(r,n?n.concat(s):[s])})),h.pop()}}(e),t}function J(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&q(e,this,t)}const G=K.prototype;function Y(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,r){if(!t)return e;const n=r&&r.encode||Y,o=r&&r.serialize;let s;if(s=o?o(t,r):z.isURLSearchParams(t)?t.toString():new K(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,J)}:J;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Z=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){z.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},te={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const re="undefined"!=typeof window&&"undefined"!=typeof document,ne=(oe="undefined"!=typeof navigator&&navigator.product,re&&["ReactNative","NativeScript","NS"].indexOf(oe)<0);var oe;const se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ie={...Object.freeze({__proto__:null,hasBrowserEnv:re,hasStandardBrowserWebWorkerEnv:se,hasStandardBrowserEnv:ne}),...te};function ae(e){function t(e,r,n,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&z.isArray(n)?n.length:s,a)return z.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i;n[s]&&z.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&z.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!i}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,((e,n)=>{t(function(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const le={transitional:ee,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=z.isObject(e);o&&z.isHTMLForm(e)&&(e=new FormData(e));if(z.isFormData(e))return n&&n?JSON.stringify(ae(e)):e;if(z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e))return e;if(z.isArrayBufferView(e))return e.buffer;if(z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return q(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ie.isNode&&z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=z.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return q(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||le.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&z.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],(e=>{le.headers[e]={}}));var ce=le;const he=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const de=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function ue(e){return!1===e||null==e?e:z.isArray(e)?e.map(ue):String(e)}function me(e,t,r,n,o){return z.isFunction(n)?n.call(this,t,r):(o&&(t=r),z.isString(t)?z.isString(n)?-1!==t.indexOf(n):z.isRegExp(n)?n.test(t):void 0:void 0)}class fe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=pe(t);if(!o)throw new Error("header name must be a non-empty string");const s=z.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=ue(e))}const s=(e,t)=>z.forEach(e,((e,r)=>o(e,r,t)));return z.isPlainObject(e)||e instanceof this.constructor?s(e,t):z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&he[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=pe(e)){const r=z.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(z.isFunction(t))return t.call(this,e,r);if(z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pe(e)){const r=z.findKey(this,e);return!(!r||void 0===this[r]||t&&!me(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=pe(e)){const o=z.findKey(r,e);!o||t&&!me(0,r[o],o,t)||(delete r[o],n=!0)}}return z.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!me(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return z.forEach(this,((n,o)=>{const s=z.findKey(r,o);if(s)return t[s]=ue(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ue(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return z.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&z.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[de]=this[de]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=pe(e);t[n]||(!function(e,t){const r=z.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return z.isArray(e)?e.forEach(n):n(e),this}}fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(fe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),z.freezeMethods(fe);var ge=fe;function we(e,t){const r=this||ce,n=t||r,o=ge.from(n.headers);let s=n.data;return z.forEach(e,(function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ye(e){return!(!e||!e.__CANCEL__)}function be(e,t,r){F.call(this,null==e?"canceled":e,F.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(be,F,{__CANCEL__:!0});var xe=ie.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),z.isString(n)&&i.push("path="+n),z.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.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:()=>null,remove(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ee=ie.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=z.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function ke(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[i];o||(o=l),r[s]=a,n[s]=l;let h=i,d=0;for(;h!==s;)d+=r[h++],h%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-r,l=n(a);r=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Se={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=ge.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(z.isFormData(n))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const d=ve(e.baseURL,e.url);function p(){if(!h)return;const n=ge.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new F("Request failed with status code "+r.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Q(d,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=p:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(p)},h.onabort=function(){h&&(r(new F("Request aborted",F.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new F("Network Error",F.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new F(t,n.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,h)),h=null},ie.hasStandardBrowserEnv&&(l&&z.isFunction(l)&&(l=l(e)),l||!1!==l&&Ee(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&xe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in h&&z.forEach(o.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),z.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),a&&"json"!==a&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",ke(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",ke(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{h&&(r(!t||t.type?new be(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const u=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);u&&-1===ie.protocols.indexOf(u)?r(new F("Unsupported protocol "+u+":",F.ERR_BAD_REQUEST,e)):h.send(n||null)}))}};z.forEach(Se,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Re=e=>`- ${e}`,Oe=e=>z.isFunction(e)||null===e||!1===e;var Ce=e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){let t;if(r=e[s],n=r,!Oe(r)&&(n=Se[(t=String(r)).toLowerCase()],void 0===n))throw new F(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+s]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new F("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Re).join("\n"):" "+Re(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function Ne(e){je(e),e.headers=ge.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ce(e.adapter||ce.adapter)(e).then((function(t){return je(e),t.data=we.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return ye(t)||(je(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const $e=e=>e instanceof ge?e.toJSON():e;function Ae(e,t){t=t||{};const r={};function n(e,t,r){return z.isPlainObject(e)&&z.isPlainObject(t)?z.merge.call({caseless:r},e,t):z.isPlainObject(t)?z.merge({},t):z.isArray(t)?t.slice():t}function o(e,t,r){return z.isUndefined(t)?z.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function s(e,t){if(!z.isUndefined(t))return n(void 0,t)}function i(e,t){return z.isUndefined(t)?z.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o($e(e),$e(t),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,i=s(e[n],t[n],n);z.isUndefined(i)&&s!==a||(r[n]=i)})),r}const Te="1.6.2",Ve={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Le={};Ve.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new F(n(o," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!Le[o]&&(Le[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}};var _e={assertOptions:function(e,t,r){if("object"!=typeof e)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new F("option "+s+" must be "+r,F.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}},validators:Ve};const Be=_e.validators;class De{constructor(e){this.defaults=e,this.interceptors={request:new Z,response:new Z}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ae(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&_e.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean)},!1),null!=n&&(z.isFunction(n)?t.paramsSerializer={serialize:n}:_e.assertOptions(n,{encode:Be.function,serialize:Be.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&z.merge(o.common,o[t.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ge.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let h,d=0;if(!a){const e=[Ne.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),h=e.length,c=Promise.resolve(t);d<h;)c=c.then(e[d++],e[d++]);return c}h=i.length;let p=t;for(d=0;d<h;){const e=i[d++],t=i[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=Ne.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,h=l.length;d<h;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Q(ve((e=Ae(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}z.forEach(["delete","get","head","options"],(function(e){De.prototype[e]=function(t,r){return this.request(Ae(r||{},{method:e,url:t,data:(r||{}).data}))}})),z.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Ae(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}De.prototype[e]=t(),De.prototype[e+"Form"]=t(!0)}));var Pe=De;class ze{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new be(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new ze((function(t){e=t})),cancel:e}}}var Fe=ze;const Me={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(Me).forEach((([e,t])=>{Me[t]=e}));var Ue=Me;const He=function e(t){const r=new Pe(t),n=s(Pe.prototype.request,r);return z.extend(n,Pe.prototype,r,{allOwnKeys:!0}),z.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ae(t,r))},n}(ce);He.Axios=Pe,He.CanceledError=be,He.CancelToken=Fe,He.isCancel=ye,He.VERSION=Te,He.toFormData=q,He.AxiosError=F,He.Cancel=He.CanceledError,He.all=function(e){return Promise.all(e)},He.spread=function(e){return function(t){return e.apply(null,t)}},He.isAxiosError=function(e){return z.isObject(e)&&!0===e.isAxiosError},He.mergeConfig=Ae,He.AxiosHeaders=ge,He.formToJSON=e=>ae(z.isHTMLForm(e)?new FormData(e):e),He.getAdapter=Ce,He.HttpStatusCode=Ue,He.default=He;var Ie=He;const Xe=console.debug,We=(e,t)=>{const r="function"==typeof t.get?(e,t)=>e?.get(t.slice(1))??t:(e,t)=>e?.[t.slice(1)]??t;return Array.from(e.match(/\:\w+/g)??[]).reduce(((e,n)=>e.replace(new RegExp(n,"g"),r(t,n))),e)},qe=(e,t,r,n)=>"function"==typeof e?e?.bind(t)(r):e??n;function Je(e=100,t=0){return Math.floor(Math.random()*(e+1-t))+t}class Ke{isJRHTML=!0;_hijos=[];_padre;_madre;_yo;constructor(e){var{yo:t,padre:r,madre:n,clases:o,personajes:s={},...e}=e;this.yo=t,r?(this.padre=r,this.madre=r.yo):n&&(this.madre=n),o&&(s.class=o.join(" ")),e.personajes=s,Object.assign(this,e),this._init()}_init(){}set style(e){Object.entries(e).forEach(((e,t)=>{this._yo.style[e[0]]=e[1]}))}set personajes(e){Object.entries(e).forEach((([e,t])=>{this._yo.setAttribute(e,t)}))}agregarHijo(e){return e.isJRHTML?(e.padre=this,e.madre=this.yo):e.yo?(e.padre=this,e=e.yo.name?new e.yo(e):new Ke(e)):this.yo.appendChild(document.createTextNode(e)),e}set html(e){this._yo.innerHTML=e}get html(){return this._yo.innerHTML}set hijos(e){e.forEach(((e,t)=>{this.agregarHijo(e)}))}get hijos(){return this._hijos}removeAllHijos(){this.hijos.forEach((e=>{e.yo.remove()})),delete this.hijos,this.hijos=[]}removeHijo(e){var t=this.hijos.indexOf(e);t>=0&&(this.yo.removeChild(this.yo.childNodes[t]),this.hijos.splice(t,1))}nacido(e){return document.createElement(e)}set yo(e){this._yo="string"==typeof e?this.nacido(e):e}get yo(){return this._yo}set padre(e){this._padre=e,this._padre&&this._padre._hijos.push(this)}get padre(){return this._padre}set madre(e){this._madre="string"==typeof e?document.getElementById(e):e,this._madre&&this._yo&&this._madre.appendChild(this._yo)}get madre(){return this._madre}set listeners(e){Object.entries(e).forEach((([e,t])=>{var r=this;"listeners"==e?this.listeners=t:this._yo.addEventListener(e,(function(e){t(e,r)}),!1)}))}get width(){return this._yo.clientWidth}set width(e){this._yo.style.width=e}get height(){return this._yo.clientHeight}set height(e){this._yo.style.height=e}set textContent(e){this._yo.textContent=e}set color(e){this.yo.style.color=e,this._color=e}get color(){return this._color}set visibility(e){this.yo.style.visibility=e}set tip(e){this.agregarHijo({yo:"span",clases:["tooltiptext"],textContent:e})}}const Ge=n.dialog`
|
|
2
|
-
|
|
1
|
+
import*as e from"react";import t,{useState as n}from"react";import r from"styled-components";import{createRoot as o}from"react-dom/client";function s(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,l=(c=Object.create(null),e=>{const t=i.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const h=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:p}=Array,u=d("undefined");const m=h("ArrayBuffer");const f=d("string"),g=d("function"),w=d("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==l(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},x=h("Date"),v=h("File"),E=h("Blob"),k=h("FileList"),S=h("URLSearchParams");function R(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),p(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function O(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=e=>!u(e)&&e!==C;const N=($="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>$&&e instanceof $);var $;const A=h("HTMLFormElement"),T=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),V=h("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};R(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},_="abcdefghijklmnopqrstuvwxyz",B="0123456789",D={DIGIT:B,ALPHA:_,ALPHA_DIGIT:_+_.toUpperCase()+B};const P=h("AsyncFunction");var z={isArray:p,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=l(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:f,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isUndefined:u,isDate:x,isFile:v,isBlob:E,isRegExp:V,isFunction:g,isStream:e=>y(e)&&g(e.pipe),isURLSearchParams:S,isTypedArray:N,isFileList:k,forEach:R,merge:function e(){const{caseless:t}=j(this)&&this||{},n={},r=(r,o)=>{const s=t&&O(n,o)||o;b(n[s])&&b(r)?n[s]=e(n[s],r):b(r)?n[s]=e({},r):p(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&R(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(R(t,((t,r)=>{n&&g(t)?e[r]=s(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:A,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];g(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return p(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:C,isContextDefined:j,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=p(e)?[]:{};return R(e,((e,t)=>{const s=n(e,r+1);!u(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:P,isThenable:e=>e&&(y(e)||g(e))&&g(e.then)&&g(e.catch)};function F(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}z.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const M=F.prototype,U={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{U[e]={value:e}})),Object.defineProperties(F,U),Object.defineProperty(M,"isAxiosError",{value:!0}),F.from=(e,t,n,r,o,s)=>{const i=Object.create(M);return z.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),F.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function I(e){return z.isPlainObject(e)||z.isArray(e)}function H(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=H(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const W=z.toFlatObject(z,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!z.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(z.isDate(e))return e.toISOString();if(!a&&z.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(e)||z.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(z.isArray(e)&&function(e){return z.isArray(e)&&!e.some(I)}(e)||(z.isFileList(e)||z.endsWith(n,"[]"))&&(a=z.toArray(e)))return n=H(n),a.forEach((function(e,r){!z.isUndefined(e)&&null!==e&&t.append(!0===i?X([n],r,s):null===i?n:n+"[]",l(e))})),!1;return!!I(e)||(t.append(X(o,n,s),l(e)),!1)}const h=[],d=Object.assign(W,{defaultVisitor:c,convertValue:l,isVisitable:I});if(!z.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!z.isUndefined(n)){if(-1!==h.indexOf(n))throw Error("Circular reference detected in "+r.join("."));h.push(n),z.forEach(n,(function(n,s){!0===(!(z.isUndefined(n)||null===n)&&o.call(t,n,z.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])})),h.pop()}}(e),t}function J(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&q(e,this,t)}const G=K.prototype;function Y(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,n){if(!t)return e;const r=n&&n.encode||Y,o=n&&n.serialize;let s;if(s=o?o(t,n):z.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,J)}:J;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Z=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){z.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},te={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ne="undefined"!=typeof window&&"undefined"!=typeof document,re=(oe="undefined"!=typeof navigator&&navigator.product,ne&&["ReactNative","NativeScript","NS"].indexOf(oe)<0);var oe;const se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ie={...Object.freeze({__proto__:null,hasBrowserEnv:ne,hasStandardBrowserWebWorkerEnv:se,hasStandardBrowserEnv:re}),...te};function ae(e){function t(e,n,r,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&z.isArray(r)?r.length:s,a)return z.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&z.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&z.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,((e,r)=>{t(function(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const le={transitional:ee,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=z.isObject(e);o&&z.isHTMLForm(e)&&(e=new FormData(e));if(z.isFormData(e))return r&&r?JSON.stringify(ae(e)):e;if(z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e))return e;if(z.isArrayBufferView(e))return e.buffer;if(z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return q(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ie.isNode&&z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return q(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||le.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&z.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],(e=>{le.headers[e]={}}));var ce=le;const he=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const de=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function ue(e){return!1===e||null==e?e:z.isArray(e)?e.map(ue):String(e)}function me(e,t,n,r,o){return z.isFunction(r)?r.call(this,t,n):(o&&(t=n),z.isString(t)?z.isString(r)?-1!==t.indexOf(r):z.isRegExp(r)?r.test(t):void 0:void 0)}class fe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pe(t);if(!o)throw new Error("header name must be a non-empty string");const s=z.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ue(e))}const s=(e,t)=>z.forEach(e,((e,n)=>o(e,n,t)));return z.isPlainObject(e)||e instanceof this.constructor?s(e,t):z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&he[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=pe(e)){const n=z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(z.isFunction(t))return t.call(this,e,n);if(z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pe(e)){const n=z.findKey(this,e);return!(!n||void 0===this[n]||t&&!me(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pe(e)){const o=z.findKey(n,e);!o||t&&!me(0,n[o],o,t)||(delete n[o],r=!0)}}return z.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!me(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return z.forEach(this,((r,o)=>{const s=z.findKey(n,o);if(s)return t[s]=ue(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ue(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&z.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[de]=this[de]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pe(e);t[r]||(!function(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return z.isArray(e)?e.forEach(r):r(e),this}}fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(fe.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),z.freezeMethods(fe);var ge=fe;function we(e,t){const n=this||ce,r=t||n,o=ge.from(r.headers);let s=r.data;return z.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ye(e){return!(!e||!e.__CANCEL__)}function be(e,t,n){F.call(this,null==e?"canceled":e,F.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(be,F,{__CANCEL__:!0});var xe=ie.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),z.isString(r)&&i.push("path="+r),z.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.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:()=>null,remove(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ee=ie.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=z.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ke(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[i];o||(o=l),n[s]=a,r[s]=l;let h=i,d=0;for(;h!==s;)d+=n[h++],h%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,l=r(a);n=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Se={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=ge.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(z.isFormData(r))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=ve(e.baseURL,e.url);function p(){if(!h)return;const r=ge.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F("Request failed with status code "+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}if(h.open(e.method.toUpperCase(),Q(d,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=p:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(p)},h.onabort=function(){h&&(n(new F("Request aborted",F.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new F("Network Error",F.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,h)),h=null},ie.hasStandardBrowserEnv&&(l&&z.isFunction(l)&&(l=l(e)),l||!1!==l&&Ee(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&xe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in h&&z.forEach(o.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),z.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),a&&"json"!==a&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",ke(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",ke(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{h&&(n(!t||t.type?new be(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const u=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);u&&-1===ie.protocols.indexOf(u)?n(new F("Unsupported protocol "+u+":",F.ERR_BAD_REQUEST,e)):h.send(r||null)}))}};z.forEach(Se,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Re=e=>`- ${e}`,Oe=e=>z.isFunction(e)||null===e||!1===e;var Ce=e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Oe(n)&&(r=Se[(t=String(n)).toLowerCase()],void 0===r))throw new F(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new F("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Re).join("\n"):" "+Re(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function Ne(e){je(e),e.headers=ge.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ce(e.adapter||ce.adapter)(e).then((function(t){return je(e),t.data=we.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return ye(t)||(je(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const $e=e=>e instanceof ge?e.toJSON():e;function Ae(e,t){t=t||{};const n={};function r(e,t,n){return z.isPlainObject(e)&&z.isPlainObject(t)?z.merge.call({caseless:n},e,t):z.isPlainObject(t)?z.merge({},t):z.isArray(t)?t.slice():t}function o(e,t,n){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!z.isUndefined(t))return r(void 0,t)}function i(e,t){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o($e(e),$e(t),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=l[r]||o,i=s(e[r],t[r],r);z.isUndefined(i)&&s!==a||(n[r]=i)})),n}const Te="1.6.2",Ve={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ve[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Le={};Ve.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new F(r(o," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!Le[o]&&(Le[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};var _e={assertOptions:function(e,t,n){if("object"!=typeof e)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new F("option "+s+" must be "+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}},validators:Ve};const Be=_e.validators;class De{constructor(e){this.defaults=e,this.interceptors={request:new Z,response:new Z}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ae(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&_e.assertOptions(n,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean)},!1),null!=r&&(z.isFunction(r)?t.paramsSerializer={serialize:r}:_e.assertOptions(r,{encode:Be.function,serialize:Be.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&z.merge(o.common,o[t.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ge.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let h,d=0;if(!a){const e=[Ne.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),h=e.length,c=Promise.resolve(t);d<h;)c=c.then(e[d++],e[d++]);return c}h=i.length;let p=t;for(d=0;d<h;){const e=i[d++],t=i[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=Ne.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,h=l.length;d<h;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Q(ve((e=Ae(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}z.forEach(["delete","get","head","options"],(function(e){De.prototype[e]=function(t,n){return this.request(Ae(n||{},{method:e,url:t,data:(n||{}).data}))}})),z.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ae(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}De.prototype[e]=t(),De.prototype[e+"Form"]=t(!0)}));var Pe=De;class ze{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new be(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new ze((function(t){e=t})),cancel:e}}}var Fe=ze;const Me={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(Me).forEach((([e,t])=>{Me[t]=e}));var Ue=Me;const Ie=function e(t){const n=new Pe(t),r=s(Pe.prototype.request,n);return z.extend(r,Pe.prototype,n,{allOwnKeys:!0}),z.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ae(t,n))},r}(ce);Ie.Axios=Pe,Ie.CanceledError=be,Ie.CancelToken=Fe,Ie.isCancel=ye,Ie.VERSION=Te,Ie.toFormData=q,Ie.AxiosError=F,Ie.Cancel=Ie.CanceledError,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return z.isObject(e)&&!0===e.isAxiosError},Ie.mergeConfig=Ae,Ie.AxiosHeaders=ge,Ie.formToJSON=e=>ae(z.isHTMLForm(e)?new FormData(e):e),Ie.getAdapter=Ce,Ie.HttpStatusCode=Ue,Ie.default=Ie;var He=Ie;const Xe=console.debug,We=(e,t)=>{const n="function"==typeof t.get?(e,t)=>e?.get(t.slice(1))??t:(e,t)=>e?.[t.slice(1)]??t;return Array.from(e.match(/\:\w+/g)??[]).reduce(((e,r)=>e.replace(new RegExp(r,"g"),n(t,r))),e)},qe=(e,t,n,r)=>"function"==typeof e?e?.bind(t)(n):e??r;function Je(e=100,t=0){return Math.floor(Math.random()*(e+1-t))+t}class Ke{isJRHTML=!0;_hijos=[];_padre;_madre;_yo;constructor(e){var{yo:t,padre:n,madre:r,clases:o,personajes:s={},...e}=e;this.yo=t,n?(this.padre=n,this.madre=n.yo):r&&(this.madre=r),o&&(s.class=o.join(" ")),e.personajes=s,Object.assign(this,e),this._init()}_init(){}set style(e){Object.entries(e).forEach(((e,t)=>{this._yo.style[e[0]]=e[1]}))}set personajes(e){Object.entries(e).forEach((([e,t])=>{this._yo.setAttribute(e,t)}))}agregarHijo(e){return e.isJRHTML?(e.padre=this,e.madre=this.yo):e.yo?(e.padre=this,e=e.yo.name?new e.yo(e):new Ke(e)):this.yo.appendChild(document.createTextNode(e)),e}set html(e){this._yo.innerHTML=e}get html(){return this._yo.innerHTML}set hijos(e){e.forEach(((e,t)=>{this.agregarHijo(e)}))}get hijos(){return this._hijos}removeAllHijos(){this.hijos.forEach((e=>{e.yo.remove()})),delete this.hijos,this.hijos=[]}removeHijo(e){var t=this.hijos.indexOf(e);t>=0&&(this.yo.removeChild(this.yo.childNodes[t]),this.hijos.splice(t,1))}nacido(e){return document.createElement(e)}set yo(e){this._yo="string"==typeof e?this.nacido(e):e}get yo(){return this._yo}set padre(e){this._padre=e,this._padre&&this._padre._hijos.push(this)}get padre(){return this._padre}set madre(e){this._madre="string"==typeof e?document.getElementById(e):e,this._madre&&this._yo&&this._madre.appendChild(this._yo)}get madre(){return this._madre}set listeners(e){Object.entries(e).forEach((([e,t])=>{var n=this;"listeners"==e?this.listeners=t:this._yo.addEventListener(e,(function(e){t(e,n)}),!1)}))}get width(){return this._yo.clientWidth}set width(e){this._yo.style.width=e}get height(){return this._yo.clientHeight}set height(e){this._yo.style.height=e}set textContent(e){this._yo.textContent=e}set color(e){this.yo.style.color=e,this._color=e}get color(){return this._color}set visibility(e){this.yo.style.visibility=e}set tip(e){this.agregarHijo({yo:"span",clases:["tooltiptext"],textContent:e})}}const Ge=`\n display:none;\n #jr-mask-msg{\n padding: 10px;\n }\n user-select: none;\n cursor: wait;\n background-color: #000000aa;\n color: ${({theme:e})=>e?.colorPrimary??"whilte"};\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n\n z-index: 20000;\n overflow: hidden;\n \n .cs-loader-inner {\n\t\ttransform: translateY(-30%);\n\t\twidth: calc(100% - 200xpx);\n \n\t}\n\n animation: opc .4s ;\n @keyframes opc {\n 0% {opacity: 0;background: transparent;visibility:hidden;}\n 20% {opacity: 1;background: #000000aa; visibility: visible;}\n }\n\n\t.cs-loader-inner label {\n\t\tfont-size: 20px;\n\t\topacity: 0;\n\t\tdisplay:inline-block;\n\t}\n\n @keyframes lol {\n 0% {\n opacity: 0;\n transform: translateX(-300px);\n }\n 33% {\n opacity: 1;\n transform: translateX(0px);\n }\n 66% {\n opacity: 1;\n transform: translateX(0px);\n }\n 100% {\n opacity: 0;\n transform: translateX(300px);\n }\n }\n\n @-webkit-keyframes lol {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(-300px);\n }\n 33% {\n opacity: 1;\n -webkit-transform: translateX(0px);\n }\n 66% {\n opacity: 1;\n -webkit-transform: translateX(0px);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(300px);\n }\n }\n\n .cs-loader-inner label:nth-child(6) {\n -webkit-animation: lol 3s infinite ease-in-out;\n animation: lol 3s infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(5) {\n -webkit-animation: lol 3s 100ms infinite ease-in-out;\n animation: lol 3s 100ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(4) {\n -webkit-animation: lol 3s 200ms infinite ease-in-out;\n animation: lol 3s 200ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(3) {\n -webkit-animation: lol 3s 300ms infinite ease-in-out;\n animation: lol 3s 300ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(2) {\n -webkit-animation: lol 3s 400ms infinite ease-in-out;\n animation: lol 3s 400ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(1) {\n -webkit-animation: lol 3s 500ms infinite ease-in-out;\n animation: lol 3s 500ms infinite ease-in-out;\n }\n`,Ye=r.dialog`
|
|
2
|
+
${Ge}
|
|
3
3
|
&:open{
|
|
4
4
|
display:flex;
|
|
5
5
|
}
|
|
@@ -9,112 +9,26 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
9
9
|
background-color: #000000aa;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
#jr-mask-msg{
|
|
13
|
-
padding: 10px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
max-width: 100vw;
|
|
17
13
|
max-height: 100vh;
|
|
18
|
-
|
|
19
14
|
width: 100vw;
|
|
20
15
|
height: 100vh;
|
|
21
|
-
|
|
22
16
|
border:0;
|
|
23
17
|
margin: 0;
|
|
24
18
|
top: 0;
|
|
25
19
|
left: 0;
|
|
26
|
-
color: ${({theme:e})=>e?.colorPrimary??"whilte"};
|
|
27
|
-
user-select: none;
|
|
28
|
-
cursor: wait;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
position: fixed;
|
|
33
|
-
|
|
34
|
-
z-index: 20000;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
|
|
37
|
-
.cs-loader-inner {
|
|
38
|
-
transform: translateY(-30%);
|
|
39
|
-
width: calc(100% - 200xpx);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.cs-loader-inner label {
|
|
43
|
-
font-size: 20px;
|
|
44
|
-
opacity: 0;
|
|
45
|
-
display:inline-block;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@keyframes lol {
|
|
49
|
-
0% {
|
|
50
|
-
opacity: 0;
|
|
51
|
-
transform: translateX(-300px);
|
|
52
|
-
}
|
|
53
|
-
33% {
|
|
54
|
-
opacity: 1;
|
|
55
|
-
transform: translateX(0px);
|
|
56
|
-
}
|
|
57
|
-
66% {
|
|
58
|
-
opacity: 1;
|
|
59
|
-
transform: translateX(0px);
|
|
60
|
-
}
|
|
61
|
-
100% {
|
|
62
|
-
opacity: 0;
|
|
63
|
-
transform: translateX(300px);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@-webkit-keyframes lol {
|
|
68
|
-
0% {
|
|
69
|
-
opacity: 0;
|
|
70
|
-
-webkit-transform: translateX(-300px);
|
|
71
|
-
}
|
|
72
|
-
33% {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
-webkit-transform: translateX(0px);
|
|
75
|
-
}
|
|
76
|
-
66% {
|
|
77
|
-
opacity: 1;
|
|
78
|
-
-webkit-transform: translateX(0px);
|
|
79
|
-
}
|
|
80
|
-
100% {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
-webkit-transform: translateX(300px);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
20
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.cs-loader-inner label:nth-child(4) {
|
|
97
|
-
-webkit-animation: lol 3s 200ms infinite ease-in-out;
|
|
98
|
-
animation: lol 3s 200ms infinite ease-in-out;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.cs-loader-inner label:nth-child(3) {
|
|
102
|
-
-webkit-animation: lol 3s 300ms infinite ease-in-out;
|
|
103
|
-
animation: lol 3s 300ms infinite ease-in-out;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.cs-loader-inner label:nth-child(2) {
|
|
107
|
-
-webkit-animation: lol 3s 400ms infinite ease-in-out;
|
|
108
|
-
animation: lol 3s 400ms infinite ease-in-out;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.cs-loader-inner label:nth-child(1) {
|
|
112
|
-
-webkit-animation: lol 3s 500ms infinite ease-in-out;
|
|
113
|
-
animation: lol 3s 500ms infinite ease-in-out;
|
|
114
|
-
}
|
|
115
|
-
`;function Ye({id:e="jr-mask"}){return t.createElement(Ge,{id:e,className:"jr-mask"},t.createElement("div",{id:"jr-mask-msg"}),t.createElement("div",{className:"cs-loader-inner"},t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●")))}class Qe extends Ke{msg=[];#e=0;#t;get msgIndex(){return this.#e++}addMsg(e){const t=this.msgIndex;return this.msg.push({i:t,msg:e}),this.renderMsg(),()=>{Xe("remove function",t),this.removeMsg(t)}}removeMsg(e){this.msg=this.msg.filter((t=>t.i!=e)),this.renderMsg()}renderMsg(){this.msgDiv.removeAllHijos(),this.msg.length?(this.msgDiv.agregarHijo(new Ke({yo:"div",textContent:this.msg[this.msg.length-1].msg})),this.yo.open||this.yo.showModal()):this.yo.close()}}function Ze(e,t,r){const n=document.getElementById("jr-mask"),o=document.getElementById("jr-mask-msg");return n.maskDiv||(n.maskDiv=new Qe({yo:n,msgDiv:new Ke({yo:o}),listeners:{keydown(e){"Escape"===e.key&&e.preventDefault()}}})),n.maskDiv.addMsg(e)}const et=Ie.create({authorization:`Bearer ${localStorage.getItem("accessToken")}`,timeout:12e4,maxBodyLength:104857600,maxContentLength:104857600}),tt=n.div`
|
|
21
|
+
`;function Qe({id:e="jr-mask"}){return t.createElement(Ye,{id:e,className:"jr-mask"},t.createElement("div",{id:`${e}-msg`}),t.createElement("div",{className:"cs-loader-inner"},t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●"),t.createElement("label",null,"●")))}r.div`
|
|
22
|
+
${Ge}
|
|
23
|
+
width:100%;
|
|
24
|
+
height:100%;
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
`;class Ze extends Ke{msg=[];#e=0;#t;get msgIndex(){return this.#e++}addMsg(e){const t=this.msgIndex;return this.msg.push({i:t,msg:!0!==e?e:null}),this.renderMsg(),()=>{this.removeMsg(t)}}removeMsg(e){this.msg=this.msg.filter((t=>t.i!=e)),this.renderMsg()}renderMsg(){this.msgDiv?.removeAllHijos(),this.msg.length?(this.msgDiv&&(this.msgDiv.html=this.msg[this.msg.length-1].msg),this.run()):this.stop()}run=()=>{this.yo.showModal?.()??this.display()};display(){this.yo.style.display="flex"}stop(){this.yo.close?.()??this.hide()}hide(){this.yo.style.display="none"}}function et(e,t="jr-mask"){const n=document.getElementById(t);if(n){const r=document.getElementById(`${t}-msg`);return n.maskDiv||(n.maskDiv=new Ze({yo:n,msgDiv:r?new Ke({yo:r}):null,listeners:{keydown(e){"Escape"===e.key&&e.preventDefault()}}})),n.maskDiv.addMsg(e)}}const tt=He.create({authorization:`Bearer ${localStorage.getItem("accessToken")}`,timeout:12e4,maxBodyLength:104857600,maxContentLength:104857600});r.div`
|
|
116
29
|
border:2px solid red;
|
|
117
|
-
|
|
30
|
+
`;class nt extends t.Component{#n=["get","post","put","patch","delete","download"];constructor(e){super(e),void 0===this.props.value&&void 0!==this.props.initValue&&void 0===this.props.onChange&&(this.state={value:e.initValue,rawValue:JSON.parse(JSON.stringify(e.initValue))})}componentDidMount(){this.#n.filter((e=>this[e]&&this.props[e]&&this.props[e].autoRun)).forEach((e=>{this[e]()}))}get(e={}){const t=Object.assign({method:"get",updateValue:!0},this.props.get,e);this.submit(t)}post(e={}){e=Object.assign({method:"post",updateValue:!1},this.props.post,e),this.submit(e)}put(e={}){e=Object.assign({method:"put",updateValue:!1},this.props.put,e),this.submit(e)}delete(e={}){e=Object.assign({method:"delete",updateValue:!1},this.props.delete,e),this.submit(e)}get from(){return void 0===this.props.value?"state":"props"}get isDirty(){return this.state?.isDirty}set isDirty(e){this.setState({isDirty:e})}get rawValue(){return this.state?.rawValue}setRawValue(e){this.setState({rawValue:null!=e?JSON.parse(JSON.stringify(e)):null})}reset(){this.setValue(this.rawValue,!0)}setValue(e,t=!1){this.props.onChange?this.props.onChange(e):this.setState({value:e}),t&&this.setRawValue(e),this.isDirty=!t}setRes(e,t,n){if(e&&n.updateValue){const e=n.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setValue(e,!0)}else n.updateValue&&this.setValue(null,!0)}#r(e,t){const n=e.shift();return 0==e.length?t?.[n]:null!=t?.[n]?this.#r(e,t[n]):void 0}getValue(e){if(e){const t=e.split(".");return this.#r(t,this[this.from]?.value)}return qe(this[this.from]?.value,this,null,null)}getSubmitValue(){return this.getValue()}getAxiosParams({url:e,method:t,value:n,extraValue:r,sendValue:o,transformValue:s,...i}){const a=r?.bind?.(this)()??r;let l=n?.bind?.(this)({...this.getSubmitValue(),...a})??null==n?{...this.getSubmitValue(),...a}:{...n,...a};s&&(l=s.bind(this)(l));const c={authorization:`Bearer ${localStorage.getItem("accessToken")}`};let h={};const d={};return"get"==t?((null==o||o)&&(h.params=l),h.headers=c):"delete"==t?((null==o||o)&&(h.data=l),h.headers=c):(h=null==o||o?l:null,d.headers=c),{url:We(e,l),method:t,params1:h,params2:d,payload:l}}reload(){Xe("reload 還沒有做 ")}submit(e){let t;e.mask&&(e.removeMaskFunction=et(e.mask,this.maskId??"jr-mask")),(()=>{if(Array.isArray(e.url))return t=[],Promise.allSettled(e.url.map((n=>{const r="object"==typeof n?n:{url:n},o=Object.assign(e,r),{url:s,method:i,params1:a,params2:l,payload:c}=this.getAxiosParams(o);return t.push(c),tt[i](s,a,l)})));{const{url:n,method:r,params1:o,params2:s,payload:i}=this.getAxiosParams(e);return t=i,tt[r](n,o,s)}})().then((n=>{this.handleResponse(n,t,e)})).catch((n=>{this.handleResponse(n,t,e)})).finally((()=>{e.removeMaskFunction?.()}))}handleResponse=(e,t,n)=>{Array.isArray(e)?e=e.map(((e,n)=>(e.value?e.value.payload=t[n]:e.reason&&(e.reason.payload=t[n]),e))):e.payload=t;const r=(e=n?.response?.bind(this)(e,t)??e).status>=200&&e.status<=299;this.setRes(r,e,n),this.showMessage(r,r?n.successMessage:n.failedMessage),n.callback?.bind(this)(r,e,t)};showMessage(e,t){Xe("success",e),Xe("message",t)}renderer(){}render(){return this.renderer()}}const rt=({tag:e,config:n,me:r,className:o})=>{if("function"==typeof n){let s;const i=function(e){s=e},a=n.bind(r)({setStyle:i});return t.createElement(e,{className:o,style:s},a)}if("string"==typeof n)return t.createElement(e,{className:o},n)},ot=r.div`
|
|
31
|
+
position:relative;
|
|
118
32
|
display:flex;
|
|
119
33
|
flex:1;
|
|
120
34
|
overflow:hidden;
|
|
@@ -142,8 +56,9 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
142
56
|
overflow:hidden;
|
|
143
57
|
|
|
144
58
|
>main{
|
|
145
|
-
|
|
146
|
-
flex
|
|
59
|
+
width:100%;
|
|
60
|
+
xdisplay:flex;
|
|
61
|
+
xflex:1;
|
|
147
62
|
overflow: overlay;
|
|
148
63
|
}
|
|
149
64
|
|
|
@@ -154,7 +69,7 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
154
69
|
}
|
|
155
70
|
|
|
156
71
|
}
|
|
157
|
-
`;class
|
|
72
|
+
`;class st extends nt{rid=Je(99999,1e4);mask=this.props.mask?()=>{const{type:e,props:n}=this.props.mask;return this.maskId=`mask-${this.rid}`,t.createElement(e,{...n,id:this.maskId})}:null;renderer(){return t.createElement(ot,{id:this.props.id,style:this.props.style,className:"jr-frame"},this.mask?.(),t.createElement(rt,{tag:"div",config:this.props.start,me:this,className:"start"}),t.createElement("main",null,t.createElement(rt,{tag:"header",config:this.props.top,me:this}),t.createElement("main",null,t.createElement(rt,{tag:"div",config:this.props.left,me:this,className:"left"}),t.createElement("main",{className:"body"},this.renderMe?.()??this.props.children),t.createElement(rt,{tag:"div",config:this.props.right,me:this,className:"right"})),t.createElement(rt,{tag:"footer",config:this.props.bottom,me:this})),t.createElement(rt,{tag:"div",config:this.props.end,me:this,className:"end"}))}}var it;function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at.apply(null,arguments)}var lt=function(t){return e.createElement("svg",at({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},t),it||(it=e.createElement("path",{d:"M18 6 6 18M6 6l12 12"})))};function ct({icon:e,children:n,...r}){return t.createElement("button",r,e,n)}const ht=r.div`
|
|
158
73
|
overflow: hidden;
|
|
159
74
|
display: flex;
|
|
160
75
|
border-radius: var(--jr-window-radius) var(--jr-window-radius) 0 0;
|
|
@@ -218,7 +133,7 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
218
133
|
}
|
|
219
134
|
}
|
|
220
135
|
}
|
|
221
|
-
`;class
|
|
136
|
+
`;class dt extends t.Component{pos1=0;pos2=0;pos3=0;pos4=0;x=0;y=0;remember=e=>{Xe("remember");const{clientX:t,clientY:n}=e,{x:r,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.window.orgWidth=s,this.props.window.orgTop=o,this.props.window.orgLeft=r,this.props.window.orgXd=t-r,this.props.window.orgBodyOverflow=document.body.style.overflow};adjustScreen=e=>{Xe("double click adjustScreen"),e.preventDefault();const{x:t,y:n,width:r,height:o}=this.props.windowRef.current.getBoundingClientRect();n>1-this.props.thick?(this.remember(e),this.fullScreen(e)):this.floatScreen(e)};floatScreen=e=>{this.props.windowRef.current,this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=`${this.props.window.orgLeft}px`,this.props.windowRef.current.style.top=`${this.props.window.orgTop}px`,this.props.windowRef.current.style.width=`${this.props.window.orgWidth}px`,this.props.windowRef.current.style.height=`${this.props.window.orgHeight}px`,document.body.style.overflow=this.props.window.orgBodyOverflow};fullScreen=e=>{this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=-this.props.thick+"px",this.props.windowRef.current.style.top=-this.props.thick+"px",this.props.windowRef.current.style.width=`calc(100vw + ${2*this.props.thick}px)`,this.props.windowRef.current.style.height=`calc(100vh + ${2*this.props.thick}px)`,setTimeout((()=>{document.body.style.overflow="hidden",this.props.windowRef.current.style.transition="unset"}),50)};stop=e=>{if(e.preventDefault(),this.moved){const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:n,y:r,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();r<1-this.props.thick&&this.fullScreen(e),r>window.innerHeight-t&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),n+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),n>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px")}document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop),window.removeEventListener("mousemove",this.preMove)};move=e=>{e.preventDefault(),this.moved=!0;const{clientX:t,clientY:n}=e,r=n<1?0:n;this.pos1=this.pos3-t,this.pos2=this.pos4-r,this.pos3=t,this.pos4=r;const o=this.props.windowRef.current;this.y=o.offsetTop-this.pos2,this.x=o.offsetLeft-this.pos1,this.y=this.y<-this.props.thick?-this.props.thick:this.y,o.style.transition="unset",o.style.top=`${this.y}px`,o.style.left=`${this.x}px`};preMove=e=>{const t=this.props.windowRef.current,{clientX:n,clientY:r,...o}=e,{x:s,y:i,width:a,height:l}=t.getBoundingClientRect();if(t.style.transition="left .05s ease-in, height .05s ease-in",i<=0){const e=n/(window.innerWidth-2*this.props.thick)*(this.props.window.orgWidth-32);t.style.left=n-e+"px",t.style.width=`${this.props.window.orgWidth}px`,t.style.height=`${this.props.window.orgHeight}px`}else this.remember(e);this.props.window.orgSHeight=null,document.body.style.cursor="grabbing",document.body.style.overflow=this.props.window.orgBodyOverflow,setTimeout((()=>{window.addEventListener("mousemove",this.move)}),50),window.removeEventListener("mousemove",this.preMove)};start(e){e.preventDefault(),this.moved=!1,this.pos3=e.clientX,this.pos4=e.clientY,this.props.windowRef.current.style.transition="var(--transition-x-y)",window.addEventListener("mousemove",this.preMove),window.addEventListener("mouseup",this.stop)}onDoubleClick(){Xe("onDoubleClick")}render(){return t.createElement(ht,{ref:this.props.titleBarRef,draggable:"false",onMouseDown:e=>{this.start(e)},onDoubleClick:this.adjustScreen},t.createElement(rt,{tag:"div",config:this.props.title??"",me:this.props.window,className:"title"}),t.createElement("nav",null,this.props.window.props.setOpen?t.createElement(ct,{icon:t.createElement(lt,null),className:"danger",onClick:e=>{e.stopPropagation(),null!=this.props.window.orgBodyOverflow&&(document.body.style.overflow=this.props.window.orgBodyOverflow),this.props.window.props.setOpen(!1)},onMouseDown:e=>{e.stopPropagation()}}):null))}}const pt=["n","e","s","w","nww","nnw","nne","nee","sse","see","sww","ssw"];class ut extends t.Component{render(){return pt.map(((e,n)=>t.createElement(ft,{direction:e,thick:this.props.thick,windowRef:this.props.windowRef,window:this.props.window,titleBarRef:this.props.titleBarRef,key:n})))}}const mt=r.div`
|
|
222
137
|
Xborder:1px solid ${({$direction:{color:e}})=>e};
|
|
223
138
|
Xbackground:${({$direction:{color:e}})=>e};
|
|
224
139
|
position: absolute;
|
|
@@ -236,7 +151,9 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
236
151
|
-o-user-select: none;
|
|
237
152
|
user-select: none;
|
|
238
153
|
|
|
239
|
-
`;class
|
|
154
|
+
`;class ft extends t.Component{width="3px";borderWidth="px";borderLong=5;constructor(e){super(e),this.sliderRef=t.createRef()}directions={n:{top:0,color:"red",width:"100%",height:`${this.props.thick}px`,cursor:"n-resize",resize:e=>{this.resizeN(e)}},e:{color:"yellow",right:0,width:`${this.props.thick}px`,height:"100%",cursor:"e-resize",resize:e=>{this.resizeE(e)}},s:{color:"blue",bottom:0,width:"100%",height:`${this.props.thick}px`,cursor:"s-resize",resize:e=>{this.resizeS(e)}},w:{color:"green",left:0,width:`${this.props.thick}px`,height:"100%",cursor:"w-resize",resize:e=>{this.resizeW(e)}},nw:{top:0,left:0,color:"blue",width:`${this.borderLong}px`,height:`${this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nww:{top:0,left:0,color:"blue",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nnw:{top:0,left:0,color:"blue",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nne:{top:0,right:0,color:"green",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},nee:{top:0,right:0,color:"green",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},sse:{color:"red",right:0,bottom:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},see:{color:"red",right:0,bottom:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},ssw:{color:"yellow",bottom:0,left:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}},sww:{color:"yellow",bottom:0,left:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}}};resizeN=({window:e,cursorY:t,startY:n,startHeight:r,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=r+(n-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=n+r-o-2*this.props.thick),e.style.top=`${s}px`,e.style.height=`${i}px`};resizeE=({window:e,clientX:t,left:n,titleBarHeight:r})=>{let o=t-n-this.props.thick;o<r&&(o=r),e.style.width=`${o+2*this.props.thick}px`};resizeS=({window:e,clientY:t,top:n,titleBarHeight:r})=>{let o=t-n-this.props.thick;o<r&&(o=r),e.style.height=`${o+2*this.props.thick}px`};resizeW=({window:e,cursorX:t,startX:n,startWidth:r,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=r+(n-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=n+r-o-2*this.props.thick),e.style.left=`${s}px`,e.style.width=`${i}px`};stop=e=>{e.preventDefault();const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:n,y:r,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();this.props.windowRef.current.style.transition="var(--transition-x-y)",0==r&&this.data.direction.indexOf("n")>-1&&(this.props.window.orgSHeight=s,this.props.windowRef.current.style.height=`${window.innerHeight}px`),r>window.innerHeight&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),n+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),n>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mousemove",this.preMove),window.removeEventListener("mouseup",this.stop)};move=e=>{e.preventDefault(),this.props.windowRef.current.style.transition="unset";const{clientX:t,clientY:n,x:r,y:o}=e,s=this.props.windowRef.current,{left:i,top:a}=s.getBoundingClientRect();let{x:l,width:c,y:h,height:d,titleBarHeight:p}=this.data;this.directions[this.props.direction].resize({window:s,titleBarHeight:p,clientX:t,cursorX:r,startX:l,startWidth:c,left:i,clientY:n,cursorY:o,startY:h,startHeight:d,top:a})};preMove=()=>{this.props.direction.indexOf("n")>-1&&(this.props.windowRef.current.style.height=`${this.props.window.orgSHeight}px`,this.data.height=this.props.window.orgSHeight,this.props.window.orgSHeight=null),window.removeEventListener("mousemove",this.preMove),setTimeout((()=>{window.addEventListener("mousemove",this.move)}),100)};start=(e,t)=>{e.preventDefault();const{height:n}=this.props.titleBarRef.current.getBoundingClientRect();let{x:r,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.direction.indexOf("s")>-1&&(this.props.window.orgSHeight=null),this.data={x:r,y:o,width:s,height:i,titleBarHeight:n,direction:t},document.body.style.cursor=this.directions[this.props.direction].cursor,this.props.window.orgSHeight?window.addEventListener("mousemove",this.preMove):window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)};render(){return t.createElement(mt,{$direction:this.directions[this.props.direction],$padding:this.props.padding,onMouseDown:e=>{this.start(e,this.props.direction)}})}}var gt={test:"Style-module_test__LrdEc",withMask:"Style-module_withMask__LPcai"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.Style-module_test__LrdEc{border:1px solid red;color:red}.Style-module_withMask__LPcai{overflow:hidden!important;position:relative;user-select:none;&:after{a:#868686cc;background:#868686cc;border-radius:inherit;bottom:0;content:"";height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}}mask{background:#868686cc;border-radius:inherit;bottom:0;height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}');const wt=r.div`
|
|
155
|
+
z-index:1;
|
|
156
|
+
|
|
240
157
|
--jr-window-radius:3px;
|
|
241
158
|
--padding-child:8px;
|
|
242
159
|
--transition-x-y:height .05s ease-in, width .05s ease-in;
|
|
@@ -244,36 +161,34 @@ import*as e from"react";import t,{useState as r}from"react";import n from"styled
|
|
|
244
161
|
position: fixed;
|
|
245
162
|
padding: ${({$thick:e})=>e}px;
|
|
246
163
|
border-radius: var(--jr-window-radius);
|
|
247
|
-
user-select: text;
|
|
164
|
+
user-select: text;
|
|
248
165
|
|
|
249
166
|
top: ${({$y:e})=>e}px;
|
|
250
167
|
left: ${({$x:e})=>e}px;
|
|
251
168
|
width: ${({$width:e=300})=>`${e}px`};
|
|
252
169
|
height: ${({$height:e=300})=>`${e}px`};
|
|
253
170
|
overflow: hidden;
|
|
254
|
-
z-index: 2;
|
|
255
171
|
|
|
256
172
|
display: flex;
|
|
257
173
|
flex-direction: column;
|
|
258
174
|
overflow: hidden;
|
|
175
|
+
color:#2e2e2e;
|
|
259
176
|
|
|
260
177
|
> main{
|
|
261
178
|
border-radius: var(--jr-window-radius);
|
|
179
|
+
background:#ffffff;;
|
|
262
180
|
box-shadow: 0px 0px 5px 1px gray;
|
|
263
181
|
display: flex;
|
|
264
182
|
flex-direction: column;
|
|
265
183
|
overflow: hidden;
|
|
266
184
|
flex:1;
|
|
267
185
|
> main {
|
|
268
|
-
Xpadding:var(--padding-child);
|
|
269
186
|
overflow: overlay;
|
|
270
187
|
flex:1;
|
|
271
188
|
display: flex;
|
|
272
|
-
min-height:32px;
|
|
273
189
|
}
|
|
274
190
|
}
|
|
275
|
-
|
|
276
|
-
`;class bt extends it{x=0;y=0;width=300;height=300;padding=1;thick=5;constructor(e){super(e),this.ref=t.createRef(),this.titleBarRef=t.createRef(),this.init()}addMaskToTarget=e=>{this.mask=document.createElement("div"),this.mask.style.background="#868686cc",this.mask.style.position="absolute",this.mask.style.top="0",this.mask.style.left="0",this.mask.style.right="0",this.mask.style.bottom="0",this.mask.style.borderRadius="inherit",this.mask.style.height="10000px",this.mask.style.width="10000px",e.appendChild(this.mask),Xe("style.mask",wt.mask),Xe("addMask+++++++++++++++++++++++++++")};removeMaskFromTarget=()=>{Xe("removeMask-----------------------"),this.mask.remove()};maskOnTarget(e){Xe("typeof this.props.maskOn",typeof this.props.maskOn);const t="object"==typeof this.props.maskOn?this.props.maskOn:"string"==typeof this.props.maskOn?document.getElementById(this.props.maskOn):document.body;t?.classList[e?"add":"remove"]("withMask")}componentDidMount(){super.componentDidMount(),this.props.maskOn&&this.props.open&&this.maskOnTarget(this.props.open),this.props.open&&this.open()}open(){this.props.onOpen?.bind(this)()}close(){this.props.onClose?.bind(this)()}componentDidUpdate(e,t,r){!0===this.props.popup&&(this.props.open&&!1===e.open?this.open():!1===this.props.open&&e.open&&this.close(),this.props.maskOn&&this.props.open!=e.open&&this.maskOnTarget(this.props.open))}init(){this.height=window.innerHeight>=(this.props.height??this.height)?this.props.height??this.height:window.innerHeight,this.width=window.innerWidth>=(this.props.width??this.width)?this.props.width??this.width:window.innerWidth,this.x=this.props.x??(window.innerWidth-(this.width??300))/2,this.y=this.props.y??(window.innerHeight-(this.height??300))/2}renderer(){return!0===this.props.popup?this.props.open?t.createElement(yt,{ref:this.ref,className:`jr-window ${this.props.className??""}`,$x:this.x,$y:this.y,$width:this.width,$height:this.height,$thick:this.thick},t.createElement("main",null,t.createElement(pt,{titleBarRef:this.titleBarRef,windowRef:this.ref,window:this,title:this.props.title,thick:this.thick}),t.createElement("main",null,super.renderer())),t.createElement(mt,{thick:this.thick,windowRef:this.ref,window:this,titleBarRef:this.titleBarRef})):"":super.renderer()}}const xt=n.div`
|
|
191
|
+
`;class yt extends st{x=0;y=0;width=300;height=300;padding=1;thick=5;constructor(e){super(e),this.ref=t.createRef(),this.titleBarRef=t.createRef(),this.init()}addMaskToTarget=e=>{this.mask=document.createElement("div"),this.mask.style.background="#868686cc",this.mask.style.position="absolute",this.mask.style.top="0",this.mask.style.left="0",this.mask.style.right="0",this.mask.style.bottom="0",this.mask.style.borderRadius="inherit",this.mask.style.height="10000px",this.mask.style.width="10000px",e.appendChild(this.mask),Xe("style.mask",gt.mask),Xe("addMask+++++++++++++++++++++++++++")};removeMaskFromTarget=()=>{Xe("removeMask-----------------------"),this.mask.remove()};backdropOn(e){const t="object"==typeof this.props.backdrop?this.props.backdrop:"string"==typeof this.props.backdrop?document.getElementById(this.props.backdrop):document.body;t?.classList[e?"add":"remove"]("withMask")}componentDidMount(){super.componentDidMount(),this.props.backdrop&&this.props.open&&this.backdropOn(this.props.open),this.props.open&&this.open()}open(){this.props.onOpen?.bind(this)()}close(){this.props.onClose?.bind(this)()}componentDidUpdate(e,t,n){!0===this.props.popup&&(this.props.open&&!1===e.open?this.open():!1===this.props.open&&e.open&&this.close(),this.props.backdrop&&this.props.open!=e.open&&this.backdropOn(this.props.open))}init(){this.height=window.innerHeight>=(this.props.height??this.height)?this.props.height??this.height:window.innerHeight,this.width=window.innerWidth>=(this.props.width??this.width)?this.props.width??this.width:window.innerWidth,this.x=this.props.x??(window.innerWidth-(this.width??300))/2,this.y=this.props.y??(window.innerHeight-(this.height??300))/2}renderer(){return!0===this.props.popup?this.props.open?t.createElement(wt,{rule:"dialog",ref:this.ref,className:`jr-window ${this.props.className??""}`,$x:this.x,$y:this.y,$width:this.width,$height:this.height,$thick:this.thick},t.createElement("main",null,t.createElement(dt,{titleBarRef:this.titleBarRef,windowRef:this.ref,window:this,title:this.props.title,thick:this.thick}),t.createElement("main",null,super.renderer())),t.createElement(ut,{thick:this.thick,windowRef:this.ref,window:this,titleBarRef:this.titleBarRef})):"":super.renderer()}}const bt=r.div`
|
|
277
192
|
position: absolute;
|
|
278
193
|
top: 0;
|
|
279
194
|
right: 0;
|
|
@@ -287,12 +202,12 @@ user-select: text;
|
|
|
287
202
|
cursor: col-resize;
|
|
288
203
|
border-right:1px dashed gray;
|
|
289
204
|
}
|
|
290
|
-
`;class
|
|
205
|
+
`;class xt extends t.Component{constructor(){super(),this.sliderRef=t.createRef()}stop=e=>{this.sliderRef.current.classList.remove("resizing"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop)};move=({clientX:e})=>{const{th:t,selectedCols:n,widthRates:r}=this.data,{left:o}=t.getBoundingClientRect(),s=o+10,i=(e>=s?e:s)-o;n.forEach(((e,t)=>{const n=Math.round(i/100*r[t]);e.style.width=n+"px"}))};start(e,t){const n=[...this.props.table.colGroupRef.current.children].slice(t.columnNo,t.columnNo+(t.colSpan??1)),r=n.reduce(((e,{offsetWidth:t})=>e+t),0),o=n.map((({offsetWidth:e})=>e/r*100));this.data={selectedCols:n,th:e.current,widthRates:o},this.sliderRef.current.classList.add("resizing"),document.body.style.cursor="col-resize",window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)}render(){const e=this.props.column;return t.createElement(bt,{ref:this.sliderRef,onMouseDown:t=>{this.start(this.props.thRef,e)}})}}const vt=({leafColumns:e,colGroupRef:n})=>t.createElement("colgroup",{ref:n},e?.map(((e,n)=>{const{width:r,...o}=e,s={width:r};return t.createElement("col",{style:s,key:n})}))),Et=({deep:e,rowColumn:n,rowIndex:r,table:o})=>n?.map(((n,s)=>{const i=t.createRef();return t.createElement("th",{key:s,ref:i,colSpan:n.colSpan,rowSpan:n.rowSpan??(n.isLeaf&&e>r?e-r+1:null)},qe(n.label,o),(void 0===o.props.resizableColumns||o.props.resizableColumns)&&t.createElement(xt,{table:o,thRef:i,column:n}))})),kt=({columns:e,trClassName:n,table:r})=>{const o=Array.isArray(e?.[0])?e:[e];return o?.map(((e,s)=>t.createElement("tr",{className:n,key:s},t.createElement(Et,{deep:o.length-1,rowColumn:e,rowIndex:s,table:r}))))},St=({columns:e,leafColumns:n,table:r})=>t.createElement(t.Fragment,null,t.createElement("thead",null,t.createElement(kt,{columns:e,table:r})),t.createElement(vt,{leafColumns:n,colGroupRef:r.colGroupRef})),Rt=({table:e,groupData:n,groupIndex:r,deep:o,columns:s,rowIndex:i})=>s?.map(((n,r)=>{let o=qe(n.style,e,{},{});const s=(({type:e,typeStyle:n,render:r,...o},s,i)=>{if(e){const r="function"==typeof n?n?.bind(s)():n;return t.createElement(e,{style:r})}return r?r.bind(s)():i})(n,e,n.label);return t.createElement("th",{style:o,colSpan:n.colSpan,rowSpan:n.rowSpan},s)})),Ot=({table:e,columns:n})=>{const r=n?.map(((n,r)=>t.createElement("tr",{key:r},t.createElement(Rt,{columns:n,table:e}))));return t.createElement(t.Fragment,null,t.createElement("tfoot",null,r))};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ct.apply(null,arguments)}r.tbody`
|
|
291
206
|
th{
|
|
292
207
|
height:4px;
|
|
293
208
|
background:#c6c6c6;
|
|
294
209
|
}
|
|
295
|
-
`;const
|
|
210
|
+
`;const jt=({table:e,groupData:n,groupIndex:r,deep:o,rowColumn:s,rowIndex:i})=>s?.map((({style:s,align:a,type:l,render:c,...h},d)=>{const p=qe(s,e,{},{});let u;return u=l?"type":c?c?.bind(e)({groupData:n,groupIndex:r,ths:111}):h.label,t.createElement("th",{key:d,style:{textAlign:a,...p},colSpan:h.colSpan,rowSpan:h.isLeaf&&o>i?o-i+1:null},u)})),Nt=({table:e,columns:n,trClassName:r,groupData:o,tbodyIndex:s})=>{const i=Array.isArray(n?.[0])?n:[n];return i?.map(((n,a)=>t.createElement("tr",{className:r,key:a},t.createElement(jt,{table:e,groupData:o,groupIndex:s,deep:i.length-1,rowColumn:n,rowIndex:a}))))};r.tr`
|
|
296
211
|
z-index: 1;
|
|
297
212
|
XXposition: sticky;
|
|
298
213
|
XXtop: 50px;
|
|
@@ -300,15 +215,15 @@ user-select: text;
|
|
|
300
215
|
text-align: left;
|
|
301
216
|
border:1px solid #222222;
|
|
302
217
|
}
|
|
303
|
-
`;const
|
|
218
|
+
`;const $t=e=>t.createElement(Nt,Ct({trClassName:"jr-group-header"},e));r.tr`
|
|
304
219
|
th{
|
|
305
220
|
border:1px solid #222222;
|
|
306
221
|
text-align: left;
|
|
307
222
|
}
|
|
308
|
-
`;const
|
|
223
|
+
`;const At=e=>t.createElement(Nt,Ct({trClassName:"jr-group-footer"},e)),Tt=({column:e,record:n,tbodyIndex:r,trIndex:o,tdIndex:s,table:i})=>{let a;const{style:l,align:c,vAlign:h="baseline",type:d,typeStyle:p,render:u,setValue:m,getValue:f,onChange:g,funcProps:w,...y}=e,b=e=>{m(n,e?.target?.value??e),i.setValue(i.getValue())},x=f(n);let v=u?{}:qe(l,i,{value:x,record:n},{});const E=e=>{v=e};if(E.bind(i),u?.bind(i),d){const e=qe(p,i,{record:n},{});a=t.createElement(d,{onChange:g?e=>{g?.bind(i)(e,{value:x,onChange:b,me:a})}:b,value:x,style:e,render:u,...y,...w?.bind(i)({value:x})})}else a=u?u({index:o,groupIndex:r,value:x,record:n,onChange:b,setStyle:E}):x;return t.createElement("td",{colSpan:v.colSpan,rowSpan:v.rowSpan,style:{textAlign:c,verticalAlign:h,...v},key:s},a)},Vt=({leafColumns:e,record:n,table:r,tbodyIndex:o,trIndex:s})=>e?.map(((e,i)=>t.createElement(Tt,{column:e,key:i,record:n,table:r,tbodyIndex:o,trIndex:s,tdIndex:i}))),Lt=({groupData:e,groupHeader:n,leafColumns:r,groupFooter:o,table:s,tbodyIndex:i})=>{const a={table:s,tbodyIndex:i};return t.createElement(t.Fragment,null,t.createElement("tbody",{key:`tbody${i}`},e?.length>0&&t.createElement($t,Ct({groupData:e,columns:n},a)),e?.map?.(((e,n)=>{const o=s.props.onRowClick?.bind(s);return t.createElement("tr",{key:n,onClick:()=>{o?.({record:e,index:n,groupIndex:i})}},t.createElement(Vt,Ct({record:e,trIndex:n},a,{leafColumns:r})))})),e?.length>0&&t.createElement(At,Ct({groupData:e,columns:o},a))))},_t=({groupHeader:e,leafColumns:n,groupFooter:r,dataSource:o,table:s})=>{const i=Array.isArray(o?.[0])?o:[o];return i?.map(((o,i,a)=>t.createElement(Lt,{key:`tbody${i}`,table:s,groupData:o,tbodyIndex:i,groupHeader:e,leafColumns:n,groupFooter:r})))},Bt=r.div`
|
|
309
224
|
--column-bd-color:#cccccc;
|
|
310
|
-
--column-b-color:#
|
|
311
|
-
--column-b-hover-color:#
|
|
225
|
+
--column-b-color:#ffffff;
|
|
226
|
+
--column-b-hover-color:#eeeeee;
|
|
312
227
|
|
|
313
228
|
position: relative;
|
|
314
229
|
background: var(--column-b-color);
|
|
@@ -318,7 +233,7 @@ user-select: text;
|
|
|
318
233
|
flex-direction: column;
|
|
319
234
|
flex:1;
|
|
320
235
|
overflow: overlay;
|
|
321
|
-
|
|
236
|
+
height:100%;
|
|
322
237
|
|
|
323
238
|
|
|
324
239
|
|
|
@@ -348,7 +263,7 @@ user-select: text;
|
|
|
348
263
|
top: 0;
|
|
349
264
|
|
|
350
265
|
th{
|
|
351
|
-
|
|
266
|
+
xposition: relative;
|
|
352
267
|
padding: 2px 6px;
|
|
353
268
|
background: linear-gradient(180deg, rgba(227, 227, 226, 1) 0%, rgba(255, 255, 255, 1) 25%, rgba(210, 210, 210, 1) 100%);
|
|
354
269
|
box-shadow: 2px 2px 2px 0 #ffffffd6 inset, -1px -1px 2px 0px #8a847dbf inset;
|
|
@@ -444,7 +359,7 @@ user-select: text;
|
|
|
444
359
|
position: block;
|
|
445
360
|
}
|
|
446
361
|
|
|
447
|
-
`;
|
|
362
|
+
`;r.div`
|
|
448
363
|
display:flex;
|
|
449
364
|
flex:1;
|
|
450
365
|
overflow:hidden;
|
|
@@ -478,7 +393,9 @@ user-select: text;
|
|
|
478
393
|
|
|
479
394
|
}
|
|
480
395
|
|
|
481
|
-
`;const
|
|
396
|
+
`;const Dt=r.main`
|
|
397
|
+
|
|
398
|
+
|
|
482
399
|
--column-bd-color:#cccccc;
|
|
483
400
|
--column-b-color:unset;
|
|
484
401
|
--column-b-hover-color:#ffffff;
|
|
@@ -488,12 +405,13 @@ user-select: text;
|
|
|
488
405
|
overflow: overlay;
|
|
489
406
|
|
|
490
407
|
color:#525252;
|
|
408
|
+
height: 100%;
|
|
491
409
|
|
|
492
410
|
>.jr-grid{
|
|
493
411
|
padding: 10px;
|
|
494
412
|
.jr-column{
|
|
495
413
|
> .label{
|
|
496
|
-
color:#
|
|
414
|
+
color:#2e2e2e;
|
|
497
415
|
text-wrap: nowrap;
|
|
498
416
|
font-weight: bold;
|
|
499
417
|
}
|
|
@@ -501,23 +419,23 @@ user-select: text;
|
|
|
501
419
|
}
|
|
502
420
|
}
|
|
503
421
|
}
|
|
504
|
-
`;function
|
|
422
|
+
`;function Pt(e){return null!=e&&""!=e&&""!=e.trim?.()||"This is required"}function zt(e,t){return null==e||("string"==typeof e&&e.length>t.max||Array.isArray(e)&&e.length>t.max?`Length can not more than ${t.max}`:!("number"==typeof e&&e>t.max)||`Length can not more than ${t.max}`)}function Ft(e,t){return"string"==typeof e&&t.min>e.length||Array.isArray(e)&&t.min>e.length?`Length can not less than ${t.min}`:!("number"==typeof e&&t.min>e)||`Can not less than ${t.min}`}function Mt(e,t,n,r){if(r.length){const o=r.shift();"object"!=typeof n[o]&&(n[o]={}),Mt(e,t,n[o],r)}else n[e]=t}r.div`
|
|
505
423
|
overflow: auto;
|
|
506
424
|
flex:1;
|
|
507
|
-
`;const
|
|
425
|
+
`;const Ut=r.div`
|
|
508
426
|
display: grid;
|
|
509
427
|
gap:10px;
|
|
510
|
-
grid: ${({grid:e,cols:t,children:
|
|
428
|
+
grid: ${({grid:e,cols:t,children:n})=>e||`auto / ${Array(t??1).fill().map((()=>"1fr")).join(" ")}`};
|
|
511
429
|
|
|
512
430
|
gap: ${({$gap:e})=>e};
|
|
513
|
-
`;
|
|
514
|
-
`;const It=
|
|
431
|
+
`;r.div`
|
|
432
|
+
`;const It=r.div`
|
|
515
433
|
flex:1;
|
|
516
434
|
display: grid;
|
|
517
435
|
|
|
518
436
|
|
|
519
|
-
${({$layout:e,$labelWidth:t,$hasLabel:
|
|
520
|
-
`,
|
|
437
|
+
${({$layout:e,$labelWidth:t,$hasLabel:n,$valueWidth:r})=>"v"==e?"grid: auto 1fr / 1fr;":`grid: 1fr / ${n?t:""} ${r};`}
|
|
438
|
+
`,Ht=r.div`
|
|
521
439
|
min-height:24px;
|
|
522
440
|
${({$layout:e})=>"v"==e?"text-align: start;":"text-align: end;\n padding-right:10px;\n "}
|
|
523
441
|
|
|
@@ -525,14 +443,14 @@ user-select: text;
|
|
|
525
443
|
|
|
526
444
|
${({$colon:e})=>{if(e)return`\n &:not(:empty)::after{\n content:'${e}';\n }\n `}}
|
|
527
445
|
|
|
528
|
-
`,
|
|
446
|
+
`,Xt=r.main`
|
|
529
447
|
flex:1;
|
|
530
448
|
flex-direction: column;
|
|
531
449
|
overflow: hidden;
|
|
532
450
|
|
|
533
451
|
text-align: start;
|
|
534
452
|
${({$validateValue:e})=>{if(null!=e)return"\n > * {\n xborder:1px solid red;\n }\n "}}
|
|
535
|
-
`,
|
|
453
|
+
`,Wt=r.div`
|
|
536
454
|
&:has(.left:empty):has(.right:empty)
|
|
537
455
|
{
|
|
538
456
|
border:1px solid blue;
|
|
@@ -553,7 +471,7 @@ user-select: text;
|
|
|
553
471
|
color:gray;
|
|
554
472
|
xflex:1;
|
|
555
473
|
}
|
|
556
|
-
`;class
|
|
474
|
+
`;class qt extends yt{UNSAFE_componentWillMount(){this.#o()}reset(){this.clearTestValue(),super.reset()}setValue(e,t){super.setValue(e,t),t&&this.clearTestValue()}#o(){"state"==this.validateValueFrom&&this.setState({validatorValue:{}})}get testValueFrom(){return void 0===this.props.testValue?"state":"props"}clearTestValue(){this.setTestValue({})}setTestValue(e,t){if("state"==this.testValueFrom)if(t){this.getTestValue()[t]=e,this.setState({testValue:{...this.getTestValue(),...e}})}else this.setState({testValue:e})}getTestValue(e){return e?this.state?.testValue?.[e]:this.state?.testValue}#s(e,t,n,r){const{name:o,validators:s,columns:i,type:a}=e,l=t.join("."),c=s?[...s]:[];if(e.required&&c.push(Pt),e.max&&c.push(zt),e.min&&c.push(Ft),c.length){n[l]={isValid:null,msg:[]};const t=[];for(let n=0;n<c.length;n++){const o=c[n].bind(this)(r,e);if(o?.then)t.push(o);else if("string"==typeof o){t.push(Promise.reject(o));break}}return Promise.all(t).then((e=>(n[l].isValid=!0,Promise.resolve(e)))).catch((e=>(n[l].msg.push(e),n[l].isValid=!1,Promise.reject(e))))}}#i(e,t,n,r,o){return e?.reduce(((e,t)=>{const{name:s,validators:i,columns:a,type:l}=t,c=s?[...n,s]:n;c.join(".");{const n=this.#s(t,c,r,s?o?.[s]:o);n&&e.push(n)}return a&&null==l&&this.#i(a,e,c,r,s?o?.[s]:o),e}),t)}validate(e){console.clear();const t=[],n=this.getTestValue()??{};return this.#i(this.getColumns(),t,[],n,void 0!==e?e:this.getValue()),Promise.all(t).then((e=>(this.setTestValue(n),Promise.resolve()))).catch((e=>(this.setTestValue(n),Promise.reject())))}get columnsFrom(){return void 0!==this.props.initColumns?"state":"props"}getColumns(){return this[this.columnsFrom]?.columns}createColumn(e,{type:n,name:r,colSpan:o,rowSpan:s,style:i,typeStyle:a,columnStyle:l,...c},h,d,p,u){const m=r?e?.[r]:e,f=c.gap??this.props.gap,g=c.label,w=qe(i,this,{},{}),y=qe(l,this,{},{});let b;o&&(w.gridColumn=`span ${o}`),s&&(w.gridRow=`span ${s}`);const x=t=>{const n=t?.target?.value??t;try{e[r]=n,this.setValue({...this.getValue()})}catch(e){const t=this.getValue()??{};Mt(r,n,t,[...d]),this.setValue(t)}const o=this.getTestValue()??{};this.#s(c,p,o,n)?.then((()=>{this.setTestValue(o)})).catch((()=>{this.setTestValue(o)}))},v=[...d];if(void 0!==r&&v.push(r),n){const r=qe(a,this,null);b=t.createElement(Xt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,...y}},t.createElement(n,{value:m,onChange:x,record:e,style:{width:"100%",...r},...c}))}else c.columns?b=t.createElement(Ut,{cols:c.cols,className:"jr-grid",$gap:f,style:y},this.createColumns(m,c.columns,v,p,c.labelProps??this.props.labelProps)):(r||c.render)&&(b=t.createElement(Xt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,padding:c.render?"4px 0":null}},c.render?c.render.bind(this)({onChange:x,value:m,record:this.getValue()}):"object"==typeof m?JSON.stringify(m):m));const E=u?.layout,k=void 0===u?.colon?":":u.colon,S=c.labelProps?.style??this.props.labelProps?.style??{};return t.createElement(It,{$layout:E,$hasLabel:null!=g,key:`f${h}`,style:w,className:"jr-column",$labelWidth:c.labelProps?.width??this.props.labelProps?.width??"120px",$valueWidth:c.valueProps?.width??this.props.valueProps?.width??"1fr"},null!=g&&t.createElement(Ht,{style:S,$required:c.required,className:"label",$layout:E,$colon:k},g),b,t.createElement(Wt,{$layout:E},t.createElement("div",{className:"left"},this.getTestValue(v.join("."))?.msg?.map((e=>e))),t.createElement("div",{className:"right"})))}createColumns(e,t,n,r,o){return t?.map(((t,s)=>this.createColumn(e,t,s,n,t.name?[...r,t.name]:r,o)))}renderMe(){return t.createElement(Dt,{className:"jr-fields",style:this.props.typeStyle},t.createElement(Ut,{cols:this.props.cols,style:this.props.gridStyle,className:"jr-grid",$gap:this.props.gap},this.createColumns(this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue(),this.props.columns,this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.labelProps)))}}r.div`
|
|
557
475
|
--jr-window-radius:3px;
|
|
558
476
|
--padding-child:8px;
|
|
559
477
|
--transition-x-y:height .05s ease-in, width .05s ease-in;
|
|
@@ -594,9 +512,9 @@ user-select: text;
|
|
|
594
512
|
border: 1px solid red;
|
|
595
513
|
}
|
|
596
514
|
}
|
|
597
|
-
`;const
|
|
515
|
+
`;const Jt=(e,t)=>{const n=t.shift(t);return t.length?Jt(e?.[n],t):e},Kt=(e,t,n)=>{const r=t.shift(t);t?.length?("object"!=typeof e[r]&&(e[r]={}),Kt(e[r],t,n)):e[r]=n};class Gt extends yt{constructor(e){super(e),this.colGroupRef=t.createRef()}UNSAFE_componentWillMount(){this.setColumns(this.props.columns??[])}checkableColumn(e){return{render:({value:e,onChange:n})=>t.createElement("checkbox",{checked:e,onChange:e=>{n(e.target.checked)}}),align:"center",name:"checked",...e}}deletableColumn({name:e="deletable",sendValue:n,sendName:r,valueName:o,...s}){return{render:({value:e,onChange:n})=>t.createElement("checkbox",{checked:e,onChange:e=>{n(e.target.checked)}}),align:"center",name:e,label(){return t.createElement("button",{onClick:()=>{const t=this.props.delete.value??this.getDataSource()?.filter((t=>t[e])).map((e=>n?e[n]:e)),o=this.props.delete.callback??function(e,t,n){this.reload()};this.delete({value:r?{[r]:t}:t,callback:o,...s})}},"刪除")},...s}}initColumn(e,t,n,r,o,s){const i=void 0===e.type&&e?.columns&&e?.columns.length,a=e.name?[...o,e.name]:o;if(i){null!==e.label&&n[t].push(e);const o=this.initColumns(e.columns,t+(null!==e.label?1:0)+(null!=e.rowSpan?e.rowSpan-1:0),n,r,a,s);return e.colSpan=o.colSpan,e.columnNo=s,{colSpan:e.colSpan}}return e.columnNo=s,n[t].push({...e,isLeaf:!0}),r.push(e),e.names=a,a?.length>1?(e.setValue=function(t,n){try{Jt(t,[...a])[e.name]=n}catch{Kt(t,[...a],n)}},e.getValue=function(e){return a.reduce(((e,t)=>e?.[t]),e)}):(e.setValue=function(t,n){t[e.name]=n},e.getValue=function(t){return t[e.name]}),{colSpan:1}}initColumns(e,t,n,r,o,s){for(let e=n.length;e<=t;e++)n[e]||n.push([]);let i=s;const a=e?.reduce(((e,s)=>{const a=this.initColumn(s,t,n,r,o,i);return e.colSpan+=a.colSpan,i+=a.colSpan,e}),{colSpan:0});return a}setColumns([...e]){this.props.checkable&&e.unshift(this.checkableColumn(this.props.checkable)),this.props.deletable&&e.unshift(this.deletableColumn(this.props.deletable));const t=[],n=[];this.initColumns(e,0,t,n,[],0),this.setState({columns:t,leafColumns:n})}setDataSource(e){}getDataSource(){return this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue()}add(e,t=this.getDataSource()?.length??0,n){this.getDataSource()?(void 0===n?this.getDataSource().splice(t,0,e):this.getDataSource()[n].splice(t,0,e),this.setValue(this.getValue())):this.setValue(this.props.dataSourceName?{[this.props.dataSourceName]:[e]}:[e])}noData(){const e=this.getDataSource();return null==e||0==e.length}renderMe(){return t.createElement(Bt,{className:"jr-table "+(this.props.onRowClick?"row-highlightable":"")},t.createElement("table",{className:"jr-table-table"},t.createElement(_t,{table:this,leafColumns:this.state.leafColumns,groupHeader:this.props.groupHeader,groupFooter:this.props.groupFooter,dataSource:this.getDataSource(),onRowClick:this.props.onRowClick}),t.createElement(Ot,{columns:this.props.footColumns,table:this}),t.createElement(St,{columns:this.state.columns,leafColumns:this.state.leafColumns,table:this})),this.noData()&&t.createElement("div",{className:"empty"}))}}const Yt=r.div`
|
|
598
516
|
|
|
599
|
-
`;class
|
|
517
|
+
`;class Qt extends nt{renderer(){return t.createElement(Yt,{style:this.props.style,className:`${this.props.className} jr-frame`})}renderMe(){return t.createElement("div",{style:{flex:1}},"Render me")}}const Zt=r(class extends yt{renderMe(){return this.getValue()?.message}})`
|
|
600
518
|
.body{
|
|
601
519
|
display: flex;
|
|
602
520
|
align-items: center;
|
|
@@ -608,13 +526,13 @@ user-select: text;
|
|
|
608
526
|
justify-content: end;
|
|
609
527
|
padding: 8px;
|
|
610
528
|
}
|
|
611
|
-
`;function
|
|
529
|
+
`;function en({title:e,message:r,container:o,...s}){const[i,a]=n(!0);return t.createElement(Zt,Ct({initValue:{message:r},width:440,height:180,maskOn:"play"},s,{open:i,setOpen:a,popup:!0,title:e??"",onClose:()=>{o.remove()},bottom:function(){return t.createElement("button",{onClick:()=>{a(!1)}},"OK")}}),r)}function tn(e){const n=document.body,r="jr-alert-div";let s=document.getElementById(r);null==s&&(s=document.createElement("div"),s.id=r,n.appendChild(s));const i=document.createElement("div");s.appendChild(i),o(i).render(t.createElement(en,Ct({},e,{container:i})))}const nn=r.div`
|
|
612
530
|
display:flex;
|
|
613
531
|
input:focus{
|
|
614
532
|
outline: none;
|
|
615
533
|
}
|
|
616
|
-
`;class
|
|
617
|
-
`,
|
|
534
|
+
`;class rn extends t.Component{setValue(e){this.props?.onChange?.(e)}render(){return t.createElement(nn,null,this.input())}}class on extends nt{get optionsFrom(){return void 0===this.props.options?"state":"props"}setOptions(e){this.props.setOptions?this.props.setOptions(e):this.setState({options:e})}getOptions(){return this[this.optionsFrom]?.options}setRes(e,t,n){if(e){const e=n.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setOptions(e)}}}const sn=r.option`
|
|
535
|
+
`,an=r.select`
|
|
618
536
|
${({size:e,multiple:t})=>""+(1==e||null==e&&1!=t?"height:24px;":"")}
|
|
619
537
|
width: 100%;
|
|
620
538
|
min-height: 24px;
|
|
@@ -626,7 +544,7 @@ user-select: text;
|
|
|
626
544
|
display: flex;
|
|
627
545
|
align-items: center;
|
|
628
546
|
}
|
|
629
|
-
`;class
|
|
547
|
+
`;class ln extends on{renderer(){const{showBlank:e,valueName:n="value",labelName:r="label",multiple:o,size:s}=this.props,i=[...this.getOptions()??[]];return 1!=o&&0!=e&&i.unshift({[n]:"",[r]:""}),t.createElement(an,{value:this.getValue()??(o?[]:""),className:"jr-select",onChange:e=>{if(o){const t=[...e.target.selectedOptions].map((e=>e.index));this.setValue(t.length?t.map((e=>i[e][n])):null)}else{const t=e.target.selectedOptions[0].index;this.setValue(t?i[t][n]:null)}},size:s,multiple:o},i.map(((e,s)=>{const i={value:e[n],key:s};return(o&&this.getValue()?.indexOf(e[n])>-1||this.getValue()==e[n])&&(i.className="selected"),t.createElement(sn,i,e[r])})))}}const cn=r.div`
|
|
630
548
|
>label{
|
|
631
549
|
white-space: nowrap;
|
|
632
550
|
display: inline-flex;
|
|
@@ -634,7 +552,7 @@ user-select: text;
|
|
|
634
552
|
height: 24px;
|
|
635
553
|
padding-right: 12px;
|
|
636
554
|
}
|
|
637
|
-
`;class
|
|
555
|
+
`;class hn extends on{renderer(){const{valueName:e="value",labelName:n="label",onChange:r,...o}=this.props,s=this.getOptions();return t.createElement(cn,{className:"jr-radio"},s?.map(((r,o)=>{const s=r[e];return t.createElement("label",{key:o},t.createElement("input",{type:"radio",name:"radio",checked:this.getValue()==s,onClick:e=>{this.getValue()==s?(this.setValue(null),e.target.checked=!1):this.setValue(s)}}),r[n])})))}}class dn extends on{renderer(){const{valueName:e="value",labelName:n="label"}=this.props,r=Array.isArray(this.getOptions()??[]),o=r?this.getOptions():[this.getOptions()],s=r?[...this.getValue()??[]]:this.getValue(),i=r?e=>s.indexOf(e)>-1:e=>e==s;return t.createElement(cn,{className:"jr-checkbox"},o?.map(((o,a)=>{const l=o[e];return t.createElement("label",{key:a},t.createElement("input",{type:"checkbox",multiple:r,value:l,checked:i(l),onChange:r?e=>{e.target.checked?s.push(l):s.splice(s.indexOf(l),1),this.setValue(s.length?s:null)}:e=>{this.setValue(e.target.checked?l:null)}}),o[n])})))}}const pn=r.input`
|
|
638
556
|
min-height: 24px;
|
|
639
557
|
width: 100%;
|
|
640
|
-
`;class
|
|
558
|
+
`;class un extends rn{input(){return t.createElement(pn,{value:this.props.value??"",onChange:e=>{this.setValue(e.target.value)}})}}export{tn as JRAlert,ct as JRButton,dn as JRCheckbox,qt as JRFields,st as JRFrame,Qe as JRMask,hn as JRRadio,ln as JRSelect,nt as JRSubmit,Gt as JRTable,Qt as JRTestReact,un as JRText,yt as JRWindow,Je as random,et as showMask};
|