little-wheels 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/littleWheels.cjs.js +25 -0
- package/dist/littleWheels.es.d.ts +108 -0
- package/dist/littleWheels.es.js +2126 -0
- package/dist/littleWheels.iife.js +25 -0
- package/dist/littleWheels.umd.js +25 -0
- package/package.json +4 -4
- package/dist/ui.cjs.js +0 -22
- package/dist/ui.es.d.ts +0 -18
- package/dist/ui.es.js +0 -289
- package/dist/ui.iife.js +0 -22
- package/dist/ui.umd.js +0 -22
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";var yn=Object.defineProperty;var dn=(r,e,n)=>e in r?yn(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var Xr=(r,e,n)=>dn(r,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const vn=require("react");var Zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mn(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(o){var p=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(n,o,p.get?p:{enumerable:!0,get:function(){return r[o]}})}),n}var xe={exports:{}},Oe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var et;function gn(){if(et)return Oe;et=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(o,p,h){var I=null;if(h!==void 0&&(I=""+h),p.key!==void 0&&(I=""+p.key),"key"in p){h={};for(var d in p)d!=="key"&&(h[d]=p[d])}else h=p;return p=h.ref,{$$typeof:r,type:o,key:I,ref:p!==void 0?p:null,props:h}}return Oe.Fragment=e,Oe.jsx=n,Oe.jsxs=n,Oe}var Re={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var rt;function Sn(){return rt||(rt=1,process.env.NODE_ENV!=="production"&&function(){function r(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===k?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case w:return"Fragment";case l:return"Profiler";case i:return"StrictMode";case A:return"Suspense";case P:return"SuspenseList";case q:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case s:return"Portal";case S:return(c.displayName||"Context")+".Provider";case u:return(c._context.displayName||"Context")+".Consumer";case y:var _=c.render;return c=c.displayName,c||(c=_.displayName||_.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case E:return _=c.displayName||null,_!==null?_:r(c.type)||"Memo";case T:_=c._payload,c=c._init;try{return r(c(_))}catch{}}return null}function e(c){return""+c}function n(c){try{e(c);var _=!1}catch{_=!0}if(_){_=console;var N=_.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return N.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),e(c)}}function o(c){if(c===w)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===T)return"<...>";try{var _=r(c);return _?"<"+_+">":"<...>"}catch{return"<...>"}}function p(){var c=C.A;return c===null?null:c.getOwner()}function h(){return Error("react-stack-top-frame")}function I(c){if(R.call(c,"key")){var _=Object.getOwnPropertyDescriptor(c,"key").get;if(_&&_.isReactWarning)return!1}return c.key!==void 0}function d(c,_){function N(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",_))}N.isReactWarning=!0,Object.defineProperty(c,"key",{get:N,configurable:!0})}function O(){var c=r(this.type);return ae[c]||(ae[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function b(c,_,N,j,Y,H,X,ie){return N=H.ref,c={$$typeof:f,type:c,key:_,props:H,_owner:Y},(N!==void 0?N:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:O}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function v(c,_,N,j,Y,H,X,ie){var B=_.children;if(B!==void 0)if(j)if(J(B)){for(j=0;j<B.length;j++)g(B[j]);Object.freeze&&Object.freeze(B)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(B);if(R.call(_,"key")){B=r(c);var G=Object.keys(_).filter(function(z){return z!=="key"});j=0<G.length?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}",Q[B+j]||(G=0<G.length?"{"+G.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,j,B,G,B),Q[B+j]=!0)}if(B=null,N!==void 0&&(n(N),B=""+N),I(_)&&(n(_.key),B=""+_.key),"key"in _){N={};for(var $ in _)$!=="key"&&(N[$]=_[$])}else N=_;return B&&d(N,typeof c=="function"?c.displayName||c.name||"Unknown":c),b(c,B,H,Y,p(),N,X,ie)}function g(c){typeof c=="object"&&c!==null&&c.$$typeof===f&&c._store&&(c._store.validated=1)}var m=vn,f=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),S=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),C=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,J=Array.isArray,W=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(c){return c()}};var K,ae={},oe=m["react-stack-bottom-frame"].bind(m,h)(),x=W(o(h)),Q={};Re.Fragment=w,Re.jsx=function(c,_,N,j,Y){var H=1e4>C.recentlyCreatedOwnerStacks++;return v(c,_,N,!1,j,Y,H?Error("react-stack-top-frame"):oe,H?W(o(c)):x)},Re.jsxs=function(c,_,N,j,Y){var H=1e4>C.recentlyCreatedOwnerStacks++;return v(c,_,N,!0,j,Y,H?Error("react-stack-top-frame"):oe,H?W(o(c)):x)}}()),Re}var tt;function bn(){return tt||(tt=1,process.env.NODE_ENV==="production"?xe.exports=gn():xe.exports=Sn()),xe.exports}var De=bn();const Yt=({data:r,onChange:e})=>De.jsx("div",{children:r.map(n=>De.jsxs("div",{className:"tree-node",children:[De.jsx("input",{type:"checkbox",checked:n.selected,disabled:n.disabled,onChange:()=>e==null?void 0:e(n)}),n.name,n.children&&De.jsx(Yt,{data:n.children,onChange:e})]},n.id))});class ne{static setItem(e,n){const o=localStorage.getItem("APPID");typeof n=="object"?localStorage.setItem(o+"-"+e,JSON.stringify(n)):localStorage.setItem(o+"-"+e,n)}static getItem(e){const n=localStorage.getItem("APPID"),o=localStorage.getItem(n+"-"+e);if(o)try{return JSON.parse(o)}catch{return o}return null}static removeItem(e){const n=localStorage.getItem("APPID");localStorage.removeItem(n+"-"+e)}static clear(){const e=localStorage.getItem("APPID");Object.keys(localStorage).forEach(n=>{n.startsWith(e+"-")&&localStorage.removeItem(n)})}static clearAll(){localStorage.clear()}}var Je,nt;function Ae(){return nt||(nt=1,Je=TypeError),Je}const wn={},An=Object.freeze(Object.defineProperty({__proto__:null,default:wn},Symbol.toStringTag,{value:"Module"})),Pn=mn(An);var Ye,at;function Ce(){if(at)return Ye;at=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=r&&e&&typeof e.get=="function"?e.get:null,o=r&&Map.prototype.forEach,p=typeof Set=="function"&&Set.prototype,h=Object.getOwnPropertyDescriptor&&p?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,I=p&&h&&typeof h.get=="function"?h.get:null,d=p&&Set.prototype.forEach,O=typeof WeakMap=="function"&&WeakMap.prototype,b=O?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,g=v?WeakSet.prototype.has:null,m=typeof WeakRef=="function"&&WeakRef.prototype,f=m?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,w=Object.prototype.toString,i=Function.prototype.toString,l=String.prototype.match,u=String.prototype.slice,S=String.prototype.replace,y=String.prototype.toUpperCase,A=String.prototype.toLowerCase,P=RegExp.prototype.test,E=Array.prototype.concat,T=Array.prototype.join,q=Array.prototype.slice,k=Math.floor,C=typeof BigInt=="function"?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,W=typeof Symbol=="function"&&typeof Symbol.iterator=="object",K=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===W||!0)?Symbol.toStringTag:null,ae=Object.prototype.propertyIsEnumerable,oe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function x(t,a){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||P.call(/e/,a))return a;var F=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var U=t<0?-k(-t):k(t);if(U!==t){var L=String(U),D=u.call(a,L.length+1);return S.call(L,F,"$&_")+"."+S.call(S.call(D,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(a,F,"$&_")}var Q=Pn,c=Q.custom,_=Z(c)?c:null,N={__proto__:null,double:'"',single:"'"},j={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ye=function t(a,F,U,L){var D=F||{};if(re(D,"quoteStyle")&&!re(N,D.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re(D,"maxStringLength")&&(typeof D.maxStringLength=="number"?D.maxStringLength<0&&D.maxStringLength!==1/0:D.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ye=re(D,"customInspect")?D.customInspect:!0;if(typeof ye!="boolean"&&ye!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re(D,"indent")&&D.indent!==null&&D.indent!==" "&&!(parseInt(D.indent,10)===D.indent&&D.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re(D,"numericSeparator")&&typeof D.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ve=D.numericSeparator;if(typeof a>"u")return"undefined";if(a===null)return"null";if(typeof a=="boolean")return a?"true":"false";if(typeof a=="string")return Lr(a,D);if(typeof a=="number"){if(a===0)return 1/0/a>0?"0":"-0";var te=String(a);return ve?x(a,te):te}if(typeof a=="bigint"){var de=String(a)+"n";return ve?x(a,de):de}var Be=typeof D.depth>"u"?5:D.depth;if(typeof U>"u"&&(U=0),U>=Be&&Be>0&&typeof a=="object")return ie(a)?"[Array]":"[Object]";var be=cn(D,U);if(typeof L>"u")L=[];else if(pe(L,a)>=0)return"[Circular]";function se(we,ke,pn){if(ke&&(L=q.call(L),L.push(ke)),pn){var Qr={depth:D.depth};return re(D,"quoteStyle")&&(Qr.quoteStyle=D.quoteStyle),t(we,Qr,U+1,L)}return t(we,D,U+1,L)}if(typeof a=="function"&&!G(a)){var Gr=he(a),zr=_e(a,se);return"[Function"+(Gr?": "+Gr:" (anonymous)")+"]"+(zr.length>0?" { "+T.call(zr,", ")+" }":"")}if(Z(a)){var Hr=W?S.call(String(a),/^(Symbol\(.*\))_[^)]*$/,"$1"):J.call(a);return typeof a=="object"&&!W?Pe(Hr):Hr}if(ln(a)){for(var Ee="<"+A.call(String(a.nodeName)),Le=a.attributes||[],Te=0;Te<Le.length;Te++)Ee+=" "+Le[Te].name+"="+Y(H(Le[Te].value),"double",D);return Ee+=">",a.childNodes&&a.childNodes.length&&(Ee+="..."),Ee+="</"+A.call(String(a.nodeName))+">",Ee}if(ie(a)){if(a.length===0)return"[]";var We=_e(a,se);return be&&!fn(We)?"["+je(We,be)+"]":"[ "+T.call(We,", ")+" ]"}if($(a)){var Ge=_e(a,se);return!("cause"in Error.prototype)&&"cause"in a&&!ae.call(a,"cause")?"{ ["+String(a)+"] "+T.call(E.call("[cause]: "+se(a.cause),Ge),", ")+" }":Ge.length===0?"["+String(a)+"]":"{ ["+String(a)+"] "+T.call(Ge,", ")+" }"}if(typeof a=="object"&&ye){if(_&&typeof a[_]=="function"&&Q)return Q(a,{depth:Be-U});if(ye!=="symbol"&&typeof a.inspect=="function")return a.inspect()}if(ce(a)){var Vr=[];return o&&o.call(a,function(we,ke){Vr.push(se(ke,a,!0)+" => "+se(we,a))}),Wr("Map",n.call(a),Vr,be)}if(Se(a)){var Jr=[];return d&&d.call(a,function(we){Jr.push(se(we,a))}),Wr("Set",I.call(a),Jr,be)}if(me(a))return Ue("WeakMap");if(on(a))return Ue("WeakSet");if(ge(a))return Ue("WeakRef");if(M(a))return Pe(se(Number(a)));if(le(a))return Pe(se(C.call(a)));if(V(a))return Pe(s.call(a));if(z(a))return Pe(se(String(a)));if(typeof window<"u"&&a===window)return"{ [object Window] }";if(typeof globalThis<"u"&&a===globalThis||typeof Zr<"u"&&a===Zr)return"{ [object globalThis] }";if(!B(a)&&!G(a)){var ze=_e(a,se),Yr=oe?oe(a)===Object.prototype:a instanceof Object||a.constructor===Object,He=a instanceof Object?"":"null prototype",Kr=!Yr&&K&&Object(a)===a&&K in a?u.call(ue(a),8,-1):He?"Object":"",sn=Yr||typeof a.constructor!="function"?"":a.constructor.name?a.constructor.name+" ":"",Ve=sn+(Kr||He?"["+T.call(E.call([],Kr||[],He||[]),": ")+"] ":"");return ze.length===0?Ve+"{}":be?Ve+"{"+je(ze,be)+"}":Ve+"{ "+T.call(ze,", ")+" }"}return String(a)};function Y(t,a,F){var U=F.quoteStyle||a,L=N[U];return L+t+L}function H(t){return S.call(String(t),/"/g,""")}function X(t){return!K||!(typeof t=="object"&&(K in t||typeof t[K]<"u"))}function ie(t){return ue(t)==="[object Array]"&&X(t)}function B(t){return ue(t)==="[object Date]"&&X(t)}function G(t){return ue(t)==="[object RegExp]"&&X(t)}function $(t){return ue(t)==="[object Error]"&&X(t)}function z(t){return ue(t)==="[object String]"&&X(t)}function M(t){return ue(t)==="[object Number]"&&X(t)}function V(t){return ue(t)==="[object Boolean]"&&X(t)}function Z(t){if(W)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!J)return!1;try{return J.call(t),!0}catch{}return!1}function le(t){if(!t||typeof t!="object"||!C)return!1;try{return C.call(t),!0}catch{}return!1}var ee=Object.prototype.hasOwnProperty||function(t){return t in this};function re(t,a){return ee.call(t,a)}function ue(t){return w.call(t)}function he(t){if(t.name)return t.name;var a=l.call(i.call(t),/^function\s*([\w$]+)/);return a?a[1]:null}function pe(t,a){if(t.indexOf)return t.indexOf(a);for(var F=0,U=t.length;F<U;F++)if(t[F]===a)return F;return-1}function ce(t){if(!n||!t||typeof t!="object")return!1;try{n.call(t);try{I.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function me(t){if(!b||!t||typeof t!="object")return!1;try{b.call(t,b);try{g.call(t,g)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function ge(t){if(!f||!t||typeof t!="object")return!1;try{return f.call(t),!0}catch{}return!1}function Se(t){if(!I||!t||typeof t!="object")return!1;try{I.call(t);try{n.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function on(t){if(!g||!t||typeof t!="object")return!1;try{g.call(t,g);try{b.call(t,b)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function ln(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Lr(t,a){if(t.length>a.maxStringLength){var F=t.length-a.maxStringLength,U="... "+F+" more character"+(F>1?"s":"");return Lr(u.call(t,0,a.maxStringLength),a)+U}var L=j[a.quoteStyle||"single"];L.lastIndex=0;var D=S.call(S.call(t,L,"\\$1"),/[\x00-\x1f]/g,un);return Y(D,"single",a)}function un(t){var a=t.charCodeAt(0),F={8:"b",9:"t",10:"n",12:"f",13:"r"}[a];return F?"\\"+F:"\\x"+(a<16?"0":"")+y.call(a.toString(16))}function Pe(t){return"Object("+t+")"}function Ue(t){return t+" { ? }"}function Wr(t,a,F,U){var L=U?je(F,U):T.call(F,", ");return t+" ("+a+") {"+L+"}"}function fn(t){for(var a=0;a<t.length;a++)if(pe(t[a],`
|
|
23
|
+
`)>=0)return!1;return!0}function cn(t,a){var F;if(t.indent===" ")F=" ";else if(typeof t.indent=="number"&&t.indent>0)F=T.call(Array(t.indent+1)," ");else return null;return{base:F,prev:T.call(Array(a+1),F)}}function je(t,a){if(t.length===0)return"";var F=`
|
|
24
|
+
`+a.prev+a.base;return F+T.call(t,","+F)+`
|
|
25
|
+
`+a.prev}function _e(t,a){var F=ie(t),U=[];if(F){U.length=t.length;for(var L=0;L<t.length;L++)U[L]=re(t,L)?a(t[L],t):""}var D=typeof R=="function"?R(t):[],ye;if(W){ye={};for(var ve=0;ve<D.length;ve++)ye["$"+D[ve]]=D[ve]}for(var te in t)re(t,te)&&(F&&String(Number(te))===te&&te<t.length||W&&ye["$"+te]instanceof Symbol||(P.call(/[^\w$]/,te)?U.push(a(te,t)+": "+a(t[te],t)):U.push(te+": "+a(t[te],t))));if(typeof R=="function")for(var de=0;de<D.length;de++)ae.call(t,D[de])&&U.push("["+a(D[de])+"]: "+a(t[D[de]],t));return U}return Ye}var Ke,ot;function En(){if(ot)return Ke;ot=1;var r=Ce(),e=Ae(),n=function(d,O,b){for(var v=d,g;(g=v.next)!=null;v=g)if(g.key===O)return v.next=g.next,b||(g.next=d.next,d.next=g),g},o=function(d,O){if(d){var b=n(d,O);return b&&b.value}},p=function(d,O,b){var v=n(d,O);v?v.value=b:d.next={key:O,next:d.next,value:b}},h=function(d,O){return d?!!n(d,O):!1},I=function(d,O){if(d)return n(d,O,!0)};return Ke=function(){var O,b={assert:function(v){if(!b.has(v))throw new e("Side channel does not contain "+r(v))},delete:function(v){var g=O&&O.next,m=I(O,v);return m&&g&&g===m&&(O=void 0),!!m},get:function(v){return o(O,v)},has:function(v){return h(O,v)},set:function(v,g){O||(O={next:void 0}),p(O,v,g)}};return b},Ke}var Qe,it;function Kt(){return it||(it=1,Qe=Object),Qe}var Xe,lt;function On(){return lt||(lt=1,Xe=Error),Xe}var Ze,ut;function Rn(){return ut||(ut=1,Ze=EvalError),Ze}var er,ft;function In(){return ft||(ft=1,er=RangeError),er}var rr,ct;function _n(){return ct||(ct=1,rr=ReferenceError),rr}var tr,st;function Tn(){return st||(st=1,tr=SyntaxError),tr}var nr,pt;function kn(){return pt||(pt=1,nr=URIError),nr}var ar,yt;function xn(){return yt||(yt=1,ar=Math.abs),ar}var or,dt;function Dn(){return dt||(dt=1,or=Math.floor),or}var ir,vt;function $n(){return vt||(vt=1,ir=Math.max),ir}var lr,ht;function qn(){return ht||(ht=1,lr=Math.min),lr}var ur,mt;function Nn(){return mt||(mt=1,ur=Math.pow),ur}var fr,gt;function Fn(){return gt||(gt=1,fr=Math.round),fr}var cr,St;function Cn(){return St||(St=1,cr=Number.isNaN||function(e){return e!==e}),cr}var sr,bt;function Mn(){if(bt)return sr;bt=1;var r=Cn();return sr=function(n){return r(n)||n===0?n:n<0?-1:1},sr}var pr,wt;function Un(){return wt||(wt=1,pr=Object.getOwnPropertyDescriptor),pr}var yr,At;function Qt(){if(At)return yr;At=1;var r=Un();if(r)try{r([],"length")}catch{r=null}return yr=r,yr}var dr,Pt;function jn(){if(Pt)return dr;Pt=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return dr=r,dr}var vr,Et;function Bn(){return Et||(Et=1,vr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var p=42;e[n]=p;for(var h in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var I=Object.getOwnPropertySymbols(e);if(I.length!==1||I[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(e,n);if(d.value!==p||d.enumerable!==!0)return!1}return!0}),vr}var hr,Ot;function Ln(){if(Ot)return hr;Ot=1;var r=typeof Symbol<"u"&&Symbol,e=Bn();return hr=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},hr}var mr,Rt;function Xt(){return Rt||(Rt=1,mr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),mr}var gr,It;function Zt(){if(It)return gr;It=1;var r=Kt();return gr=r.getPrototypeOf||null,gr}var Sr,_t;function Wn(){if(_t)return Sr;_t=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,o="[object Function]",p=function(O,b){for(var v=[],g=0;g<O.length;g+=1)v[g]=O[g];for(var m=0;m<b.length;m+=1)v[m+O.length]=b[m];return v},h=function(O,b){for(var v=[],g=b,m=0;g<O.length;g+=1,m+=1)v[m]=O[g];return v},I=function(d,O){for(var b="",v=0;v<d.length;v+=1)b+=d[v],v+1<d.length&&(b+=O);return b};return Sr=function(O){var b=this;if(typeof b!="function"||e.apply(b)!==o)throw new TypeError(r+b);for(var v=h(arguments,1),g,m=function(){if(this instanceof g){var l=b.apply(this,p(v,arguments));return Object(l)===l?l:this}return b.apply(O,p(v,arguments))},f=n(0,b.length-v.length),s=[],w=0;w<f;w++)s[w]="$"+w;if(g=Function("binder","return function ("+I(s,",")+"){ return binder.apply(this,arguments); }")(m),b.prototype){var i=function(){};i.prototype=b.prototype,g.prototype=new i,i.prototype=null}return g},Sr}var br,Tt;function Me(){if(Tt)return br;Tt=1;var r=Wn();return br=Function.prototype.bind||r,br}var wr,kt;function Ur(){return kt||(kt=1,wr=Function.prototype.call),wr}var Ar,xt;function en(){return xt||(xt=1,Ar=Function.prototype.apply),Ar}var Pr,Dt;function Gn(){return Dt||(Dt=1,Pr=typeof Reflect<"u"&&Reflect&&Reflect.apply),Pr}var Er,$t;function zn(){if($t)return Er;$t=1;var r=Me(),e=en(),n=Ur(),o=Gn();return Er=o||r.call(n,e),Er}var Or,qt;function rn(){if(qt)return Or;qt=1;var r=Me(),e=Ae(),n=Ur(),o=zn();return Or=function(h){if(h.length<1||typeof h[0]!="function")throw new e("a function is required");return o(r,n,h)},Or}var Rr,Nt;function Hn(){if(Nt)return Rr;Nt=1;var r=rn(),e=Qt(),n;try{n=[].__proto__===Array.prototype}catch(I){if(!I||typeof I!="object"||!("code"in I)||I.code!=="ERR_PROTO_ACCESS")throw I}var o=!!n&&e&&e(Object.prototype,"__proto__"),p=Object,h=p.getPrototypeOf;return Rr=o&&typeof o.get=="function"?r([o.get]):typeof h=="function"?function(d){return h(d==null?d:p(d))}:!1,Rr}var Ir,Ft;function Vn(){if(Ft)return Ir;Ft=1;var r=Xt(),e=Zt(),n=Hn();return Ir=r?function(p){return r(p)}:e?function(p){if(!p||typeof p!="object"&&typeof p!="function")throw new TypeError("getProto: not an object");return e(p)}:n?function(p){return n(p)}:null,Ir}var _r,Ct;function Jn(){if(Ct)return _r;Ct=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Me();return _r=n.call(r,e),_r}var Tr,Mt;function jr(){if(Mt)return Tr;Mt=1;var r,e=Kt(),n=On(),o=Rn(),p=In(),h=_n(),I=Tn(),d=Ae(),O=kn(),b=xn(),v=Dn(),g=$n(),m=qn(),f=Nn(),s=Fn(),w=Mn(),i=Function,l=function(G){try{return i('"use strict"; return ('+G+").constructor;")()}catch{}},u=Qt(),S=jn(),y=function(){throw new d},A=u?function(){try{return arguments.callee,y}catch{try{return u(arguments,"callee").get}catch{return y}}}():y,P=Ln()(),E=Vn(),T=Zt(),q=Xt(),k=en(),C=Ur(),R={},J=typeof Uint8Array>"u"||!E?r:E(Uint8Array),W={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":P&&E?E([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":P&&E?E(E([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!P||!E?r:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":u,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":p,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!P||!E?r:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":P&&E?E(""[Symbol.iterator]()):r,"%Symbol%":P?Symbol:r,"%SyntaxError%":I,"%ThrowTypeError%":A,"%TypedArray%":J,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":O,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":k,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":T,"%Math.abs%":b,"%Math.floor%":v,"%Math.max%":g,"%Math.min%":m,"%Math.pow%":f,"%Math.round%":s,"%Math.sign%":w,"%Reflect.getPrototypeOf%":q};if(E)try{null.error}catch(G){var K=E(E(G));W["%Error.prototype%"]=K}var ae=function G($){var z;if($==="%AsyncFunction%")z=l("async function () {}");else if($==="%GeneratorFunction%")z=l("function* () {}");else if($==="%AsyncGeneratorFunction%")z=l("async function* () {}");else if($==="%AsyncGenerator%"){var M=G("%AsyncGeneratorFunction%");M&&(z=M.prototype)}else if($==="%AsyncIteratorPrototype%"){var V=G("%AsyncGenerator%");V&&E&&(z=E(V.prototype))}return W[$]=z,z},oe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=Me(),Q=Jn(),c=x.call(C,Array.prototype.concat),_=x.call(k,Array.prototype.splice),N=x.call(C,String.prototype.replace),j=x.call(C,String.prototype.slice),Y=x.call(C,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,X=/\\(\\)?/g,ie=function($){var z=j($,0,1),M=j($,-1);if(z==="%"&&M!=="%")throw new I("invalid intrinsic syntax, expected closing `%`");if(M==="%"&&z!=="%")throw new I("invalid intrinsic syntax, expected opening `%`");var V=[];return N($,H,function(Z,le,ee,re){V[V.length]=ee?N(re,X,"$1"):le||Z}),V},B=function($,z){var M=$,V;if(Q(oe,M)&&(V=oe[M],M="%"+V[0]+"%"),Q(W,M)){var Z=W[M];if(Z===R&&(Z=ae(M)),typeof Z>"u"&&!z)throw new d("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:V,name:M,value:Z}}throw new I("intrinsic "+$+" does not exist!")};return Tr=function($,z){if(typeof $!="string"||$.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof z!="boolean")throw new d('"allowMissing" argument must be a boolean');if(Y(/^%?[^%]*%?$/,$)===null)throw new I("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var M=ie($),V=M.length>0?M[0]:"",Z=B("%"+V+"%",z),le=Z.name,ee=Z.value,re=!1,ue=Z.alias;ue&&(V=ue[0],_(M,c([0,1],ue)));for(var he=1,pe=!0;he<M.length;he+=1){var ce=M[he],me=j(ce,0,1),ge=j(ce,-1);if((me==='"'||me==="'"||me==="`"||ge==='"'||ge==="'"||ge==="`")&&me!==ge)throw new I("property names with quotes must have matching quotes");if((ce==="constructor"||!pe)&&(re=!0),V+="."+ce,le="%"+V+"%",Q(W,le))ee=W[le];else if(ee!=null){if(!(ce in ee)){if(!z)throw new d("base intrinsic for "+$+" exists, but the property is not available.");return}if(u&&he+1>=M.length){var Se=u(ee,ce);pe=!!Se,pe&&"get"in Se&&!("originalValue"in Se.get)?ee=Se.get:ee=ee[ce]}else pe=Q(ee,ce),ee=ee[ce];pe&&!re&&(W[le]=ee)}}return ee},Tr}var kr,Ut;function tn(){if(Ut)return kr;Ut=1;var r=jr(),e=rn(),n=e([r("%String.prototype.indexOf%")]);return kr=function(p,h){var I=r(p,!!h);return typeof I=="function"&&n(p,".prototype.")>-1?e([I]):I},kr}var xr,jt;function nn(){if(jt)return xr;jt=1;var r=jr(),e=tn(),n=Ce(),o=Ae(),p=r("%Map%",!0),h=e("Map.prototype.get",!0),I=e("Map.prototype.set",!0),d=e("Map.prototype.has",!0),O=e("Map.prototype.delete",!0),b=e("Map.prototype.size",!0);return xr=!!p&&function(){var g,m={assert:function(f){if(!m.has(f))throw new o("Side channel does not contain "+n(f))},delete:function(f){if(g){var s=O(g,f);return b(g)===0&&(g=void 0),s}return!1},get:function(f){if(g)return h(g,f)},has:function(f){return g?d(g,f):!1},set:function(f,s){g||(g=new p),I(g,f,s)}};return m},xr}var Dr,Bt;function Yn(){if(Bt)return Dr;Bt=1;var r=jr(),e=tn(),n=Ce(),o=nn(),p=Ae(),h=r("%WeakMap%",!0),I=e("WeakMap.prototype.get",!0),d=e("WeakMap.prototype.set",!0),O=e("WeakMap.prototype.has",!0),b=e("WeakMap.prototype.delete",!0);return Dr=h?function(){var g,m,f={assert:function(s){if(!f.has(s))throw new p("Side channel does not contain "+n(s))},delete:function(s){if(h&&s&&(typeof s=="object"||typeof s=="function")){if(g)return b(g,s)}else if(o&&m)return m.delete(s);return!1},get:function(s){return h&&s&&(typeof s=="object"||typeof s=="function")&&g?I(g,s):m&&m.get(s)},has:function(s){return h&&s&&(typeof s=="object"||typeof s=="function")&&g?O(g,s):!!m&&m.has(s)},set:function(s,w){h&&s&&(typeof s=="object"||typeof s=="function")?(g||(g=new h),d(g,s,w)):o&&(m||(m=o()),m.set(s,w))}};return f}:o,Dr}var $r,Lt;function Kn(){if(Lt)return $r;Lt=1;var r=Ae(),e=Ce(),n=En(),o=nn(),p=Yn(),h=p||o||n;return $r=function(){var d,O={assert:function(b){if(!O.has(b))throw new r("Side channel does not contain "+e(b))},delete:function(b){return!!d&&d.delete(b)},get:function(b){return d&&d.get(b)},has:function(b){return!!d&&d.has(b)},set:function(b,v){d||(d=h()),d.set(b,v)}};return O},$r}var qr,Wt;function Br(){if(Wt)return qr;Wt=1;var r=String.prototype.replace,e=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return qr={default:n.RFC3986,formatters:{RFC1738:function(o){return r.call(o,e,"+")},RFC3986:function(o){return String(o)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},qr}var Nr,Gt;function an(){if(Gt)return Nr;Gt=1;var r=Br(),e=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var i=[],l=0;l<256;++l)i.push("%"+((l<16?"0":"")+l.toString(16)).toUpperCase());return i}(),p=function(l){for(;l.length>1;){var u=l.pop(),S=u.obj[u.prop];if(n(S)){for(var y=[],A=0;A<S.length;++A)typeof S[A]<"u"&&y.push(S[A]);u.obj[u.prop]=y}}},h=function(l,u){for(var S=u&&u.plainObjects?{__proto__:null}:{},y=0;y<l.length;++y)typeof l[y]<"u"&&(S[y]=l[y]);return S},I=function i(l,u,S){if(!u)return l;if(typeof u!="object"&&typeof u!="function"){if(n(l))l.push(u);else if(l&&typeof l=="object")(S&&(S.plainObjects||S.allowPrototypes)||!e.call(Object.prototype,u))&&(l[u]=!0);else return[l,u];return l}if(!l||typeof l!="object")return[l].concat(u);var y=l;return n(l)&&!n(u)&&(y=h(l,S)),n(l)&&n(u)?(u.forEach(function(A,P){if(e.call(l,P)){var E=l[P];E&&typeof E=="object"&&A&&typeof A=="object"?l[P]=i(E,A,S):l.push(A)}else l[P]=A}),l):Object.keys(u).reduce(function(A,P){var E=u[P];return e.call(A,P)?A[P]=i(A[P],E,S):A[P]=E,A},y)},d=function(l,u){return Object.keys(u).reduce(function(S,y){return S[y]=u[y],S},l)},O=function(i,l,u){var S=i.replace(/\+/g," ");if(u==="iso-8859-1")return S.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(S)}catch{return S}},b=1024,v=function(l,u,S,y,A){if(l.length===0)return l;var P=l;if(typeof l=="symbol"?P=Symbol.prototype.toString.call(l):typeof l!="string"&&(P=String(l)),S==="iso-8859-1")return escape(P).replace(/%u[0-9a-f]{4}/gi,function(J){return"%26%23"+parseInt(J.slice(2),16)+"%3B"});for(var E="",T=0;T<P.length;T+=b){for(var q=P.length>=b?P.slice(T,T+b):P,k=[],C=0;C<q.length;++C){var R=q.charCodeAt(C);if(R===45||R===46||R===95||R===126||R>=48&&R<=57||R>=65&&R<=90||R>=97&&R<=122||A===r.RFC1738&&(R===40||R===41)){k[k.length]=q.charAt(C);continue}if(R<128){k[k.length]=o[R];continue}if(R<2048){k[k.length]=o[192|R>>6]+o[128|R&63];continue}if(R<55296||R>=57344){k[k.length]=o[224|R>>12]+o[128|R>>6&63]+o[128|R&63];continue}C+=1,R=65536+((R&1023)<<10|q.charCodeAt(C)&1023),k[k.length]=o[240|R>>18]+o[128|R>>12&63]+o[128|R>>6&63]+o[128|R&63]}E+=k.join("")}return E},g=function(l){for(var u=[{obj:{o:l},prop:"o"}],S=[],y=0;y<u.length;++y)for(var A=u[y],P=A.obj[A.prop],E=Object.keys(P),T=0;T<E.length;++T){var q=E[T],k=P[q];typeof k=="object"&&k!==null&&S.indexOf(k)===-1&&(u.push({obj:P,prop:q}),S.push(k))}return p(u),l},m=function(l){return Object.prototype.toString.call(l)==="[object RegExp]"},f=function(l){return!l||typeof l!="object"?!1:!!(l.constructor&&l.constructor.isBuffer&&l.constructor.isBuffer(l))},s=function(l,u){return[].concat(l,u)},w=function(l,u){if(n(l)){for(var S=[],y=0;y<l.length;y+=1)S.push(u(l[y]));return S}return u(l)};return Nr={arrayToObject:h,assign:d,combine:s,compact:g,decode:O,encode:v,isBuffer:f,isRegExp:m,maybeMap:w,merge:I},Nr}var Fr,zt;function Qn(){if(zt)return Fr;zt=1;var r=Kn(),e=an(),n=Br(),o=Object.prototype.hasOwnProperty,p={brackets:function(i){return i+"[]"},comma:"comma",indices:function(i,l){return i+"["+l+"]"},repeat:function(i){return i}},h=Array.isArray,I=Array.prototype.push,d=function(w,i){I.apply(w,h(i)?i:[i])},O=Date.prototype.toISOString,b=n.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:b,formatter:n.formatters[b],indices:!1,serializeDate:function(i){return O.call(i)},skipNulls:!1,strictNullHandling:!1},g=function(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i=="symbol"||typeof i=="bigint"},m={},f=function w(i,l,u,S,y,A,P,E,T,q,k,C,R,J,W,K,ae,oe){for(var x=i,Q=oe,c=0,_=!1;(Q=Q.get(m))!==void 0&&!_;){var N=Q.get(i);if(c+=1,typeof N<"u"){if(N===c)throw new RangeError("Cyclic object value");_=!0}typeof Q.get(m)>"u"&&(c=0)}if(typeof q=="function"?x=q(l,x):x instanceof Date?x=R(x):u==="comma"&&h(x)&&(x=e.maybeMap(x,function(le){return le instanceof Date?R(le):le})),x===null){if(A)return T&&!K?T(l,v.encoder,ae,"key",J):l;x=""}if(g(x)||e.isBuffer(x)){if(T){var j=K?l:T(l,v.encoder,ae,"key",J);return[W(j)+"="+W(T(x,v.encoder,ae,"value",J))]}return[W(l)+"="+W(String(x))]}var Y=[];if(typeof x>"u")return Y;var H;if(u==="comma"&&h(x))K&&T&&(x=e.maybeMap(x,T)),H=[{value:x.length>0?x.join(",")||null:void 0}];else if(h(q))H=q;else{var X=Object.keys(x);H=k?X.sort(k):X}var ie=E?String(l).replace(/\./g,"%2E"):String(l),B=S&&h(x)&&x.length===1?ie+"[]":ie;if(y&&h(x)&&x.length===0)return B+"[]";for(var G=0;G<H.length;++G){var $=H[G],z=typeof $=="object"&&$&&typeof $.value<"u"?$.value:x[$];if(!(P&&z===null)){var M=C&&E?String($).replace(/\./g,"%2E"):String($),V=h(x)?typeof u=="function"?u(B,M):B:B+(C?"."+M:"["+M+"]");oe.set(i,c);var Z=r();Z.set(m,oe),d(Y,w(z,V,u,S,y,A,P,E,u==="comma"&&K&&h(x)?null:T,q,k,C,R,J,W,K,ae,Z))}}return Y},s=function(i){if(!i)return v;if(typeof i.allowEmptyArrays<"u"&&typeof i.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof i.encodeDotInKeys<"u"&&typeof i.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(i.encoder!==null&&typeof i.encoder<"u"&&typeof i.encoder!="function")throw new TypeError("Encoder has to be a function.");var l=i.charset||v.charset;if(typeof i.charset<"u"&&i.charset!=="utf-8"&&i.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var u=n.default;if(typeof i.format<"u"){if(!o.call(n.formatters,i.format))throw new TypeError("Unknown format option provided.");u=i.format}var S=n.formatters[u],y=v.filter;(typeof i.filter=="function"||h(i.filter))&&(y=i.filter);var A;if(i.arrayFormat in p?A=i.arrayFormat:"indices"in i?A=i.indices?"indices":"repeat":A=v.arrayFormat,"commaRoundTrip"in i&&typeof i.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var P=typeof i.allowDots>"u"?i.encodeDotInKeys===!0?!0:v.allowDots:!!i.allowDots;return{addQueryPrefix:typeof i.addQueryPrefix=="boolean"?i.addQueryPrefix:v.addQueryPrefix,allowDots:P,allowEmptyArrays:typeof i.allowEmptyArrays=="boolean"?!!i.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:A,charset:l,charsetSentinel:typeof i.charsetSentinel=="boolean"?i.charsetSentinel:v.charsetSentinel,commaRoundTrip:!!i.commaRoundTrip,delimiter:typeof i.delimiter>"u"?v.delimiter:i.delimiter,encode:typeof i.encode=="boolean"?i.encode:v.encode,encodeDotInKeys:typeof i.encodeDotInKeys=="boolean"?i.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof i.encoder=="function"?i.encoder:v.encoder,encodeValuesOnly:typeof i.encodeValuesOnly=="boolean"?i.encodeValuesOnly:v.encodeValuesOnly,filter:y,format:u,formatter:S,serializeDate:typeof i.serializeDate=="function"?i.serializeDate:v.serializeDate,skipNulls:typeof i.skipNulls=="boolean"?i.skipNulls:v.skipNulls,sort:typeof i.sort=="function"?i.sort:null,strictNullHandling:typeof i.strictNullHandling=="boolean"?i.strictNullHandling:v.strictNullHandling}};return Fr=function(w,i){var l=w,u=s(i),S,y;typeof u.filter=="function"?(y=u.filter,l=y("",l)):h(u.filter)&&(y=u.filter,S=y);var A=[];if(typeof l!="object"||l===null)return"";var P=p[u.arrayFormat],E=P==="comma"&&u.commaRoundTrip;S||(S=Object.keys(l)),u.sort&&S.sort(u.sort);for(var T=r(),q=0;q<S.length;++q){var k=S[q],C=l[k];u.skipNulls&&C===null||d(A,f(C,k,P,E,u.allowEmptyArrays,u.strictNullHandling,u.skipNulls,u.encodeDotInKeys,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,T))}var R=A.join(u.delimiter),J=u.addQueryPrefix===!0?"?":"";return u.charsetSentinel&&(u.charset==="iso-8859-1"?J+="utf8=%26%2310003%3B&":J+="utf8=%E2%9C%93&"),R.length>0?J+R:""},Fr}var Cr,Ht;function Xn(){if(Ht)return Cr;Ht=1;var r=an(),e=Object.prototype.hasOwnProperty,n=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},p=function(m){return m.replace(/&#(\d+);/g,function(f,s){return String.fromCharCode(parseInt(s,10))})},h=function(m,f,s){if(m&&typeof m=="string"&&f.comma&&m.indexOf(",")>-1)return m.split(",");if(f.throwOnLimitExceeded&&s>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return m},I="utf8=%26%2310003%3B",d="utf8=%E2%9C%93",O=function(f,s){var w={__proto__:null},i=s.ignoreQueryPrefix?f.replace(/^\?/,""):f;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=s.parameterLimit===1/0?void 0:s.parameterLimit,u=i.split(s.delimiter,s.throwOnLimitExceeded?l+1:l);if(s.throwOnLimitExceeded&&u.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(l===1?"":"s")+" allowed.");var S=-1,y,A=s.charset;if(s.charsetSentinel)for(y=0;y<u.length;++y)u[y].indexOf("utf8=")===0&&(u[y]===d?A="utf-8":u[y]===I&&(A="iso-8859-1"),S=y,y=u.length);for(y=0;y<u.length;++y)if(y!==S){var P=u[y],E=P.indexOf("]="),T=E===-1?P.indexOf("="):E+1,q,k;T===-1?(q=s.decoder(P,o.decoder,A,"key"),k=s.strictNullHandling?null:""):(q=s.decoder(P.slice(0,T),o.decoder,A,"key"),k=r.maybeMap(h(P.slice(T+1),s,n(w[q])?w[q].length:0),function(R){return s.decoder(R,o.decoder,A,"value")})),k&&s.interpretNumericEntities&&A==="iso-8859-1"&&(k=p(String(k))),P.indexOf("[]=")>-1&&(k=n(k)?[k]:k);var C=e.call(w,q);C&&s.duplicates==="combine"?w[q]=r.combine(w[q],k):(!C||s.duplicates==="last")&&(w[q]=k)}return w},b=function(m,f,s,w){var i=0;if(m.length>0&&m[m.length-1]==="[]"){var l=m.slice(0,-1).join("");i=Array.isArray(f)&&f[l]?f[l].length:0}for(var u=w?f:h(f,s,i),S=m.length-1;S>=0;--S){var y,A=m[S];if(A==="[]"&&s.parseArrays)y=s.allowEmptyArrays&&(u===""||s.strictNullHandling&&u===null)?[]:r.combine([],u);else{y=s.plainObjects?{__proto__:null}:{};var P=A.charAt(0)==="["&&A.charAt(A.length-1)==="]"?A.slice(1,-1):A,E=s.decodeDotInKeys?P.replace(/%2E/g,"."):P,T=parseInt(E,10);!s.parseArrays&&E===""?y={0:u}:!isNaN(T)&&A!==E&&String(T)===E&&T>=0&&s.parseArrays&&T<=s.arrayLimit?(y=[],y[T]=u):E!=="__proto__"&&(y[E]=u)}u=y}return u},v=function(f,s,w,i){if(f){var l=w.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,u=/(\[[^[\]]*])/,S=/(\[[^[\]]*])/g,y=w.depth>0&&u.exec(l),A=y?l.slice(0,y.index):l,P=[];if(A){if(!w.plainObjects&&e.call(Object.prototype,A)&&!w.allowPrototypes)return;P.push(A)}for(var E=0;w.depth>0&&(y=S.exec(l))!==null&&E<w.depth;){if(E+=1,!w.plainObjects&&e.call(Object.prototype,y[1].slice(1,-1))&&!w.allowPrototypes)return;P.push(y[1])}if(y){if(w.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+w.depth+" and strictDepth is true");P.push("["+l.slice(y.index)+"]")}return b(P,s,w,i)}},g=function(f){if(!f)return o;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var s=typeof f.charset>"u"?o.charset:f.charset,w=typeof f.duplicates>"u"?o.duplicates:f.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:o.allowDots:!!f.allowDots;return{allowDots:i,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:o.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:o.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:o.arrayLimit,charset:s,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:o.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:o.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:o.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:o.decoder,delimiter:typeof f.delimiter=="string"||r.isRegExp(f.delimiter)?f.delimiter:o.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:o.depth,duplicates:w,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:o.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:o.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:o.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Cr=function(m,f){var s=g(f);if(m===""||m===null||typeof m>"u")return s.plainObjects?{__proto__:null}:{};for(var w=typeof m=="string"?O(m,s):m,i=s.plainObjects?{__proto__:null}:{},l=Object.keys(w),u=0;u<l.length;++u){var S=l[u],y=v(S,w[S],s,typeof m=="string");i=r.merge(i,y,s)}return s.allowSparse===!0?i:r.compact(i)},Cr}var Mr,Vt;function Zn(){if(Vt)return Mr;Vt=1;var r=Qn(),e=Xn(),n=Br();return Mr={formats:n,parse:e,stringify:r},Mr}var ea=Zn();const Fe=hn(ea),$e={token:"/lxwork/api/auth/token",permissionTicket:"/lxwork/api/auth/create-permission-ticket",authToken:"/sso/realms/myrealm/protocol/openid-connect/token",refreshToken:"/lxwork/api/auth/refresh"};async function qe(r,e){const n=await fetch(r,e);if(!n.ok){debugger;throw console.dir(n,await n.json()),new Error(`HTTP error! status: ${n.status}`)}return await n.json()}const Ne=()=>({getTokenInfo:r=>qe(`${$e.token}?${Fe.stringify(r)}`),createPermissionTicket:r=>qe(`${$e.permissionTicket}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json",Authorization:"Bearer "+fe.getToken()}}),getAuthTokenInfo:r=>{const e=new URLSearchParams;return e.append("grant_type",r.grant_type),e.append("ticket",r.ticket),qe(`${$e.authToken}`,{method:"POST",body:e,headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+fe.getToken()}})},refreshAuthToken:()=>qe(`${$e.refreshToken}`,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+fe.getRefreshToken()}})});function Jt(r){try{const n=new URL(r).hostname,o=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,p=/^\[?([a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}\]?$/;return!!(o.test(n)||p.test(n))}catch{return!1}}function ra(r){const e={};return new URL(r).searchParams.forEach((o,p)=>{e[p]=o}),e}function ta(r,e){const n=r.indexOf(e);return n!==-1?r.substring(0,n):r}class Ie extends Error{}Ie.prototype.name="InvalidTokenError";function na(r){return decodeURIComponent(atob(r).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function aa(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return na(e)}catch{return atob(e)}}function oa(r,e){if(typeof r!="string")throw new Ie("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=r.split(".")[n];if(typeof o!="string")throw new Ie(`Invalid token specified: missing part #${n+1}`);let p;try{p=aa(o)}catch(h){throw new Ie(`Invalid token specified: invalid base64 for part #${n+1} (${h.message})`)}try{return JSON.parse(p)}catch(h){throw new Ie(`Invalid token specified: invalid json for part #${n+1} (${h.message})`)}}class fe{constructor({APPID:e}){Xr(this,"APPID");this.APPID=e,localStorage.setItem("APPID",this.APPID)}async sso(){const e=ra(location.href),n=["state","code","iss","session_state"],o=n.length;if(Object.keys(e).length!==o){this.login();return}let p=[],h=0;for(;h<o;)Object.keys(e).includes(n[h])&&p.length<=o?p.push(n[h]):p=[],h++;if(p.length===o){fe.removeToken();let I;const d=ne.getItem("login_redirect_uri"),{code:O,state:b}=e;try{I=await Ne().getTokenInfo({code:O,client_id:this.APPID,state:b,redirect_uri:d}),this.setToken(I);const{ticket:v}=await Ne().createPermissionTicket({client_id:this.APPID}),g=await Ne().getAuthTokenInfo({grant_type:"urn:ietf:params:oauth:grant-type:uma-ticket",ticket:v});this.setToken(g,"auth"),Object.keys(e).forEach(f=>{n.includes(f)&&delete e[f]});const m=`${location.origin}${location.pathname}${ta(location.hash,"?")}${Object.keys(e).length?"?"+Fe.stringify(e):""}`;window.location.replace(m)}catch(v){console.log("err: ",v,d),fe.removeToken(),window.location.href=d}}else{this.login();return}}login(){const{href:e,origin:n}=window.location,o={redirect_uri:e,client_id:this.APPID,scope:"openid"};ne.setItem("login_redirect_uri",o.redirect_uri),Jt(n)&&window.location.hostname!=="localhost"&&(o.keycloak_host=n+"/sso/");let p=`/lxwork/api/auth/login?${Fe.stringify(o)}`;window.location.replace(p)}logout(){const{href:e,origin:n}=window.location,{id_token:o}=fe.getTokenInfo()||{};fe.removeToken(),ne.removeItem("login_redirect_uri");const p={id_token_hint:o,post_logout_redirect_uri:e};Jt(n)&&window.location.hostname!=="localhost"&&(p.keycloak_host=n+"/sso/");let h=`/lxwork/api/auth/endsession?${Fe.stringify(p)}`;window.location.href=h}setToken(e,n){if(n==="auth"){const o=ne.getItem(`${this.APPID}-SSO-tokenInfo`);!e.id_token&&o&&(e.id_token=o.id_token),ne.setItem(`${this.APPID}-tokenInfo`,e)}else ne.setItem(`${this.APPID}-SSO-tokenInfo`,e)}async refreshToken(e){const{exp:n}=fe.getDecodeToken(),o=Date.now()/1e3;if(e||o>n-200&&o<n){const p=await Ne().refreshAuthToken();this.setToken(p),this.setToken(p,"auth")}}static getTokenInfo(){const e=localStorage.getItem("APPID");if(!e)throw new Error("APPID is not found, Please instantiate AuthLogin first.");const n=ne.getItem(`${e}-SSO-tokenInfo`);return ne.getItem(`${e}-tokenInfo`)||n||null}static getToken(){const e=fe.getTokenInfo();return e==null?void 0:e.access_token}static getRefreshToken(){const e=localStorage.getItem("APPID");if(!e)throw new Error("APPID is not found, Please instantiate AuthLogin first.");const n=ne.getItem(`${e}-SSO-tokenInfo`),o=ne.getItem(`${e}-tokenInfo`);return(o==null?void 0:o.refresh_token)||(n==null?void 0:n.refresh_token)||""}static getDecodeToken(){const e=fe.getToken();return oa(e)}static removeToken(){const e=localStorage.getItem("APPID");if(!e)throw new Error("APPID is not found, Please instantiate AuthLogin first.");ne.removeItem(`${e}-tokenInfo`),ne.removeItem(`${e}-SSO-tokenInfo`)}}exports.AuthLogin=fe;exports.LocalStorageUtil=ne;exports.Tree=Yt;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare class AuthLogin {
|
|
4
|
+
APPID: string;
|
|
5
|
+
constructor({ APPID }: AuthLoginType);
|
|
6
|
+
sso(): Promise<void>;
|
|
7
|
+
login(): void;
|
|
8
|
+
logout(): void;
|
|
9
|
+
setToken(data: TokenInfoType<number>, type?: string): void;
|
|
10
|
+
refreshToken(forceRefresh?: boolean): Promise<void>;
|
|
11
|
+
static getTokenInfo(): TokenInfoType<number> | null;
|
|
12
|
+
static getToken(): string | undefined;
|
|
13
|
+
static getRefreshToken(): string;
|
|
14
|
+
static getDecodeToken(): DecodeTokenType;
|
|
15
|
+
static removeToken(): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare interface AuthLoginType {
|
|
19
|
+
APPID: string;
|
|
20
|
+
storage?: "localStorage";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare interface DecodeTokenType {
|
|
24
|
+
name: string;
|
|
25
|
+
preferred_username: string;
|
|
26
|
+
authorization: {
|
|
27
|
+
permissions: PermissionItem[];
|
|
28
|
+
};
|
|
29
|
+
realm_access: {
|
|
30
|
+
roles: string[];
|
|
31
|
+
};
|
|
32
|
+
resource_access: {
|
|
33
|
+
account: {
|
|
34
|
+
roles: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
acr: string;
|
|
38
|
+
"allowed-origins": string[];
|
|
39
|
+
aud: string;
|
|
40
|
+
auth_time: number;
|
|
41
|
+
azp: string;
|
|
42
|
+
email_verified: boolean;
|
|
43
|
+
exp: number;
|
|
44
|
+
iat: number;
|
|
45
|
+
iss: string;
|
|
46
|
+
jti: string;
|
|
47
|
+
scope: string;
|
|
48
|
+
session_state: string;
|
|
49
|
+
sid: string;
|
|
50
|
+
sub: string;
|
|
51
|
+
typ: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare class LocalStorageUtil {
|
|
55
|
+
static setItem(key: string, value: any): void;
|
|
56
|
+
static getItem<T>(key: string): T | null;
|
|
57
|
+
static removeItem(key: string): void;
|
|
58
|
+
static clear(): void;
|
|
59
|
+
static clearAll(): void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare interface PermissionItem {
|
|
63
|
+
rsid: string;
|
|
64
|
+
rsname: string;
|
|
65
|
+
scopes?: string[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare interface TokenInfoType<T> {
|
|
69
|
+
/** token */
|
|
70
|
+
access_token: string;
|
|
71
|
+
/** `access_token`的过期时间(时间戳) */
|
|
72
|
+
expires_in: T;
|
|
73
|
+
/** 用于调用刷新accessToken的接口时所需的token */
|
|
74
|
+
refresh_token: string;
|
|
75
|
+
/** 头像 */
|
|
76
|
+
avatar?: string;
|
|
77
|
+
/** 用户名 */
|
|
78
|
+
username?: string;
|
|
79
|
+
/** 昵称 */
|
|
80
|
+
nickname?: string;
|
|
81
|
+
/** 当前登录用户的角色 */
|
|
82
|
+
roles?: Array<string>;
|
|
83
|
+
/** 当前登录用户的按钮级别权限 */
|
|
84
|
+
permissions?: Array<string>;
|
|
85
|
+
id_token: string;
|
|
86
|
+
"not-before-policy": number;
|
|
87
|
+
refresh_expires_in: number;
|
|
88
|
+
scope: string;
|
|
89
|
+
session_state: string;
|
|
90
|
+
token_type: "Bearer";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare const Tree: default_2.FC<TreeProps>;
|
|
94
|
+
|
|
95
|
+
export declare interface TreeNode {
|
|
96
|
+
id: string | number;
|
|
97
|
+
name: string;
|
|
98
|
+
children?: TreeNode[];
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
selected?: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare interface TreeProps {
|
|
104
|
+
data: TreeNode[];
|
|
105
|
+
onChange?: (node: TreeNode) => void;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { }
|