diditui 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/diditui.cjs +1 -1
- package/dist/diditui.d.ts +39 -8
- package/dist/diditui.js +20 -22
- package/package.json +1 -1
package/dist/diditui.cjs
CHANGED
|
@@ -77,7 +77,7 @@ doc.body (`+f+`):
|
|
|
77
77
|
`+i:"")+`
|
|
78
78
|
|
|
79
79
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
80
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=Hr,t.componentWillReceiveProps=Br),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Wr;var a=t.componentDidUpdate;t.componentDidUpdate=function(f,u,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;a.call(this,f,u,p)}}return e}const fi=Object.freeze(Object.defineProperty({__proto__:null,polyfill:di},Symbol.toStringTag,{value:"Module"})),hi=je.getAugmentedNamespace(fi);var D1;function pi(){if(D1)return Se;D1=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.bodyOpenClassName=Se.portalClassName=void 0;var e=Object.assign||function(_){for(var y=1;y<arguments.length;y++){var T=arguments[y];for(var v in T)Object.prototype.hasOwnProperty.call(T,v)&&(_[v]=T[v])}return _},t=function(){function _(y,T){for(var v=0;v<T.length;v++){var N=T[v];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,T,v){return T&&_(y.prototype,T),v&&_(y,v),y}}(),n=w,r=x(n),i=mn,s=x(i),l=Or(),a=x(l),c=ui(),f=x(c),u=Pr(),h=m(u),p=Jt(),C=x(p),k=hi;function m(_){if(_&&_.__esModule)return _;var y={};if(_!=null)for(var T in _)Object.prototype.hasOwnProperty.call(_,T)&&(y[T]=_[T]);return y.default=_,y}function x(_){return _&&_.__esModule?_:{default:_}}function E(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function R(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function V(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var S=Se.portalClassName="ReactModalPortal",g=Se.bodyOpenClassName="ReactModal__Body--open",O=p.canUseDOM&&s.default.createPortal!==void 0,H=function(y){return document.createElement(y)},B=function(){return O?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function A(_){return _()}var Z=function(_){V(y,_);function y(){var T,v,N,I;E(this,y);for(var b=arguments.length,D=Array(b),te=0;te<b;te++)D[te]=arguments[te];return I=(v=(N=R(this,(T=y.__proto__||Object.getPrototypeOf(y)).call.apply(T,[this].concat(D))),N),N.removePortal=function(){!O&&s.default.unmountComponentAtNode(N.node);var L=A(N.props.parentSelector);L&&L.contains(N.node)?L.removeChild(N.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},N.portalRef=function(L){N.portal=L},N.renderPortal=function(L){var j=B(),q=j(N,r.default.createElement(f.default,e({defaultStyles:y.defaultStyles},L)),N.node);N.portalRef(q)},v),R(N,I)}return t(y,[{key:"componentDidMount",value:function(){if(p.canUseDOM){O||(this.node=H("div")),this.node.className=this.props.portalClassName;var v=A(this.props.parentSelector);v.appendChild(this.node),!O&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(v){var N=A(v.parentSelector),I=A(this.props.parentSelector);return{prevParent:N,nextParent:I}}},{key:"componentDidUpdate",value:function(v,N,I){if(p.canUseDOM){var b=this.props,D=b.isOpen,te=b.portalClassName;v.portalClassName!==te&&(this.node.className=te);var L=I.prevParent,j=I.nextParent;j!==L&&(L.removeChild(this.node),j.appendChild(this.node)),!(!v.isOpen&&!D)&&!O&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!p.canUseDOM||!this.node||!this.portal)){var v=this.portal.state,N=Date.now(),I=v.isOpen&&this.props.closeTimeoutMS&&(v.closesAt||N+this.props.closeTimeoutMS);I?(v.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,I-N)):this.removePortal()}}},{key:"render",value:function(){if(!p.canUseDOM||!O)return null;!this.node&&O&&(this.node=H("div"));var v=B();return v(r.default.createElement(f.default,e({ref:this.portalRef,defaultStyles:y.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(v){h.setElement(v)}}]),y}(n.Component);return Z.propTypes={isOpen:a.default.bool.isRequired,style:a.default.shape({content:a.default.object,overlay:a.default.object}),portalClassName:a.default.string,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,className:a.default.oneOfType([a.default.string,a.default.shape({base:a.default.string.isRequired,afterOpen:a.default.string.isRequired,beforeClose:a.default.string.isRequired})]),overlayClassName:a.default.oneOfType([a.default.string,a.default.shape({base:a.default.string.isRequired,afterOpen:a.default.string.isRequired,beforeClose:a.default.string.isRequired})]),appElement:a.default.oneOfType([a.default.instanceOf(C.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(C.default))]),onAfterOpen:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,ariaHideApp:a.default.bool,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,parentSelector:a.default.func,aria:a.default.object,data:a.default.object,role:a.default.string,contentLabel:a.default.string,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func},Z.defaultProps={isOpen:!1,portalClassName:S,bodyOpenClassName:g,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(y,T){return r.default.createElement("div",y,T)},contentElement:function(y,T){return r.default.createElement("div",y,T)}},Z.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,k.polyfill)(Z),process.env.NODE_ENV!=="production"&&(Z.setCreateHTMLElement=function(_){return H=_}),Se.default=Z,Se}var $1;function Ci(){return $1||($1=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=pi(),r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}t.default=r.default,e.exports=t.default}(et,et.exports)),et.exports}var mi=Ci();const I1=je.getDefaultExportFromCjs(mi);function gi({children:e,contentLabel:t="modal",className:n,overlayClassName:r,withBorder:i=!1,appElementId:s="#__next",onRequestClose:l,...a}){w.useEffect(()=>{typeof window<"u"&&I1.setAppElement(s)},[s]);const c=Y(["fixed right-0 left-0 bottom-0 z-[1000] h-screen overflow-y-auto","overflow-x-hidden md:inset-0 md:h-full bg-foreground/5 backdrop-blur-md",r]),f=Y(["font-inter size-full flex items-end justify-center md:items-center overflow-visible"]),u=Y(["relative max-h-[90%] overflow-hidden rounded-t-[32px]","bg-background animate-slide-in shadow-card opacity-0 pt-6","md:rounded-[32px] md:max-w-[90%]",{"border border-surface-lo":i},n]);return M.jsx(I1,{closeTimeoutMS:300,className:f,overlayClassName:c,contentLabel:t,onRequestClose:l,...a,children:M.jsxs("div",{className:u,children:[M.jsx(jr,{className:"absolute right-6 top-6",icon:"close",size:"xs",onClick:l}),e]})})}var Fe={},Et,q1;function vi(){return q1||(q1=1,Et=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Et}var xt={},_e={},U1;function Ne(){if(U1)return _e;U1=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return _e.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},_e.getSymbolTotalCodewords=function(r){return t[r]},_e.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},_e.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},_e.isKanjiModeEnabled=function(){return typeof e<"u"},_e.toSJIS=function(r){return e(r)},_e}var Lt={},z1;function Qt(){return z1||(z1=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,i){if(e.isValid(r))return r;try{return t(r)}catch{return i}}}(Lt)),Lt}var Mt,Y1;function wi(){if(Y1)return Mt;Y1=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Mt=e,Mt}var Rt,G1;function bi(){if(G1)return Rt;G1=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,i){const s=t*this.size+n;this.data[s]=r,i&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Rt=e,Rt}var St={},K1;function yi(){return K1||(K1=1,function(e){const t=Ne().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,s=t(r),l=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-l;return a.push(6),a.reverse()},e.getPositions=function(r){const i=[],s=e.getRowColCoords(r),l=s.length;for(let a=0;a<l;a++)for(let c=0;c<l;c++)a===0&&c===0||a===0&&c===l-1||a===l-1&&c===0||i.push([s[a],s[c]]);return i}}(St)),St}var _t={},J1;function ki(){if(J1)return _t;J1=1;const e=Ne().getSymbolSize,t=7;return _t.getPositions=function(r){const i=e(r);return[[0,0],[i-t,0],[0,i-t]]},_t}var jt={},Q1;function Ei(){return Q1||(Q1=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const s=i.size;let l=0,a=0,c=0,f=null,u=null;for(let h=0;h<s;h++){a=c=0,f=u=null;for(let p=0;p<s;p++){let C=i.get(h,p);C===f?a++:(a>=5&&(l+=t.N1+(a-5)),f=C,a=1),C=i.get(p,h),C===u?c++:(c>=5&&(l+=t.N1+(c-5)),u=C,c=1)}a>=5&&(l+=t.N1+(a-5)),c>=5&&(l+=t.N1+(c-5))}return l},e.getPenaltyN2=function(i){const s=i.size;let l=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const f=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(f===4||f===0)&&l++}return l*t.N2},e.getPenaltyN3=function(i){const s=i.size;let l=0,a=0,c=0;for(let f=0;f<s;f++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(f,u),u>=10&&(a===1488||a===93)&&l++,c=c<<1&2047|i.get(u,f),u>=10&&(c===1488||c===93)&&l++}return l*t.N3},e.getPenaltyN4=function(i){let s=0;const l=i.data.length;for(let c=0;c<l;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/l/5)-10)*t.N4};function n(r,i,s){switch(r){case e.Patterns.PATTERN000:return(i+s)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(i+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return i*s%2+i*s%3===0;case e.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case e.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(i,s){const l=s.size;for(let a=0;a<l;a++)for(let c=0;c<l;c++)s.isReserved(c,a)||s.xor(c,a,n(i,c,a))},e.getBestMask=function(i,s){const l=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let f=0;f<l;f++){s(f),e.applyMask(f,i);const u=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(f,i),u<c&&(c=u,a=f)}return a}}(jt)),jt}var it={},X1;function Fr(){if(X1)return it;X1=1;const e=Qt(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return it.getBlocksCount=function(i,s){switch(s){case e.L:return t[(i-1)*4+0];case e.M:return t[(i-1)*4+1];case e.Q:return t[(i-1)*4+2];case e.H:return t[(i-1)*4+3];default:return}},it.getTotalCodewordsCount=function(i,s){switch(s){case e.L:return n[(i-1)*4+0];case e.M:return n[(i-1)*4+1];case e.Q:return n[(i-1)*4+2];case e.H:return n[(i-1)*4+3];default:return}},it}var Tt={},Je={},er;function xi(){if(er)return Je;er=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let r=1;for(let i=0;i<255;i++)e[i]=r,t[r]=i,r<<=1,r&256&&(r^=285);for(let i=255;i<512;i++)e[i]=e[i-255]}(),Je.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Je.exp=function(r){return e[r]},Je.mul=function(r,i){return r===0||i===0?0:e[t[r]+t[i]]},Je}var tr;function Li(){return tr||(tr=1,function(e){const t=xi();e.mul=function(r,i){const s=new Uint8Array(r.length+i.length-1);for(let l=0;l<r.length;l++)for(let a=0;a<i.length;a++)s[l+a]^=t.mul(r[l],i[a]);return s},e.mod=function(r,i){let s=new Uint8Array(r);for(;s.length-i.length>=0;){const l=s[0];for(let c=0;c<i.length;c++)s[c]^=t.mul(i[c],l);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},e.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let s=0;s<r;s++)i=e.mul(i,new Uint8Array([1,t.exp(s)]));return i}}(Tt)),Tt}var Vt,rr;function Mi(){if(rr)return Vt;rr=1;const e=Li();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(r.length+this.degree);i.set(r);const s=e.mod(i,this.genPoly),l=this.degree-s.length;if(l>0){const a=new Uint8Array(this.degree);return a.set(s,l),a}return s},Vt=t,Vt}var Ot={},Nt={},Pt={},nr;function Zr(){return nr||(nr=1,Pt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Pt}var Ee={},or;function Dr(){if(or)return Ee;or=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
80
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=Hr,t.componentWillReceiveProps=Br),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Wr;var a=t.componentDidUpdate;t.componentDidUpdate=function(f,u,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;a.call(this,f,u,p)}}return e}const fi=Object.freeze(Object.defineProperty({__proto__:null,polyfill:di},Symbol.toStringTag,{value:"Module"})),hi=je.getAugmentedNamespace(fi);var D1;function pi(){if(D1)return Se;D1=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.bodyOpenClassName=Se.portalClassName=void 0;var e=Object.assign||function(_){for(var y=1;y<arguments.length;y++){var T=arguments[y];for(var v in T)Object.prototype.hasOwnProperty.call(T,v)&&(_[v]=T[v])}return _},t=function(){function _(y,T){for(var v=0;v<T.length;v++){var N=T[v];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,T,v){return T&&_(y.prototype,T),v&&_(y,v),y}}(),n=w,r=x(n),i=mn,s=x(i),l=Or(),a=x(l),c=ui(),f=x(c),u=Pr(),h=m(u),p=Jt(),C=x(p),k=hi;function m(_){if(_&&_.__esModule)return _;var y={};if(_!=null)for(var T in _)Object.prototype.hasOwnProperty.call(_,T)&&(y[T]=_[T]);return y.default=_,y}function x(_){return _&&_.__esModule?_:{default:_}}function E(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function R(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function V(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var S=Se.portalClassName="ReactModalPortal",g=Se.bodyOpenClassName="ReactModal__Body--open",O=p.canUseDOM&&s.default.createPortal!==void 0,H=function(y){return document.createElement(y)},B=function(){return O?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function A(_){return _()}var Z=function(_){V(y,_);function y(){var T,v,N,I;E(this,y);for(var b=arguments.length,D=Array(b),te=0;te<b;te++)D[te]=arguments[te];return I=(v=(N=R(this,(T=y.__proto__||Object.getPrototypeOf(y)).call.apply(T,[this].concat(D))),N),N.removePortal=function(){!O&&s.default.unmountComponentAtNode(N.node);var L=A(N.props.parentSelector);L&&L.contains(N.node)?L.removeChild(N.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},N.portalRef=function(L){N.portal=L},N.renderPortal=function(L){var j=B(),q=j(N,r.default.createElement(f.default,e({defaultStyles:y.defaultStyles},L)),N.node);N.portalRef(q)},v),R(N,I)}return t(y,[{key:"componentDidMount",value:function(){if(p.canUseDOM){O||(this.node=H("div")),this.node.className=this.props.portalClassName;var v=A(this.props.parentSelector);v.appendChild(this.node),!O&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(v){var N=A(v.parentSelector),I=A(this.props.parentSelector);return{prevParent:N,nextParent:I}}},{key:"componentDidUpdate",value:function(v,N,I){if(p.canUseDOM){var b=this.props,D=b.isOpen,te=b.portalClassName;v.portalClassName!==te&&(this.node.className=te);var L=I.prevParent,j=I.nextParent;j!==L&&(L.removeChild(this.node),j.appendChild(this.node)),!(!v.isOpen&&!D)&&!O&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!p.canUseDOM||!this.node||!this.portal)){var v=this.portal.state,N=Date.now(),I=v.isOpen&&this.props.closeTimeoutMS&&(v.closesAt||N+this.props.closeTimeoutMS);I?(v.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,I-N)):this.removePortal()}}},{key:"render",value:function(){if(!p.canUseDOM||!O)return null;!this.node&&O&&(this.node=H("div"));var v=B();return v(r.default.createElement(f.default,e({ref:this.portalRef,defaultStyles:y.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(v){h.setElement(v)}}]),y}(n.Component);return Z.propTypes={isOpen:a.default.bool.isRequired,style:a.default.shape({content:a.default.object,overlay:a.default.object}),portalClassName:a.default.string,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,className:a.default.oneOfType([a.default.string,a.default.shape({base:a.default.string.isRequired,afterOpen:a.default.string.isRequired,beforeClose:a.default.string.isRequired})]),overlayClassName:a.default.oneOfType([a.default.string,a.default.shape({base:a.default.string.isRequired,afterOpen:a.default.string.isRequired,beforeClose:a.default.string.isRequired})]),appElement:a.default.oneOfType([a.default.instanceOf(C.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(C.default))]),onAfterOpen:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,ariaHideApp:a.default.bool,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,parentSelector:a.default.func,aria:a.default.object,data:a.default.object,role:a.default.string,contentLabel:a.default.string,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func},Z.defaultProps={isOpen:!1,portalClassName:S,bodyOpenClassName:g,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(y,T){return r.default.createElement("div",y,T)},contentElement:function(y,T){return r.default.createElement("div",y,T)}},Z.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,k.polyfill)(Z),process.env.NODE_ENV!=="production"&&(Z.setCreateHTMLElement=function(_){return H=_}),Se.default=Z,Se}var $1;function Ci(){return $1||($1=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=pi(),r=i(n);function i(s){return s&&s.__esModule?s:{default:s}}t.default=r.default,e.exports=t.default}(et,et.exports)),et.exports}var mi=Ci();const I1=je.getDefaultExportFromCjs(mi);function gi({children:e,className:t,overlayClassName:n,withBorder:r=!1,appElementId:i="#__next",onRequestClose:s,...l}){w.useEffect(()=>{typeof window<"u"&&I1.setAppElement(i)},[i]);const a=Y(["fixed right-0 left-0 bottom-0 z-[1000] h-screen overflow-y-auto","overflow-x-hidden md:inset-0 md:h-full bg-foreground/5 backdrop-blur-md",n]),c=Y(["font-inter size-full flex items-end justify-center md:items-center overflow-visible"]),f=Y(["relative max-h-[90%] overflow-hidden rounded-t-[32px]","bg-background animate-slide-in shadow-card opacity-0 pt-6","md:rounded-[32px] md:max-w-[90%]",{"border border-surface-lo":r},t]);return M.jsx(I1,{closeTimeoutMS:300,className:c,overlayClassName:a,onRequestClose:s,...l,children:M.jsxs("div",{className:f,children:[M.jsx(jr,{className:"absolute right-6 top-6",icon:"close",size:"xs",onClick:s}),e]})})}var Fe={},Et,q1;function vi(){return q1||(q1=1,Et=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Et}var xt={},_e={},U1;function Ne(){if(U1)return _e;U1=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return _e.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},_e.getSymbolTotalCodewords=function(r){return t[r]},_e.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},_e.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},_e.isKanjiModeEnabled=function(){return typeof e<"u"},_e.toSJIS=function(r){return e(r)},_e}var Lt={},z1;function Qt(){return z1||(z1=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,i){if(e.isValid(r))return r;try{return t(r)}catch{return i}}}(Lt)),Lt}var Mt,Y1;function wi(){if(Y1)return Mt;Y1=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Mt=e,Mt}var Rt,G1;function bi(){if(G1)return Rt;G1=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,i){const s=t*this.size+n;this.data[s]=r,i&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Rt=e,Rt}var St={},K1;function yi(){return K1||(K1=1,function(e){const t=Ne().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,s=t(r),l=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-l;return a.push(6),a.reverse()},e.getPositions=function(r){const i=[],s=e.getRowColCoords(r),l=s.length;for(let a=0;a<l;a++)for(let c=0;c<l;c++)a===0&&c===0||a===0&&c===l-1||a===l-1&&c===0||i.push([s[a],s[c]]);return i}}(St)),St}var _t={},J1;function ki(){if(J1)return _t;J1=1;const e=Ne().getSymbolSize,t=7;return _t.getPositions=function(r){const i=e(r);return[[0,0],[i-t,0],[0,i-t]]},_t}var jt={},Q1;function Ei(){return Q1||(Q1=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const s=i.size;let l=0,a=0,c=0,f=null,u=null;for(let h=0;h<s;h++){a=c=0,f=u=null;for(let p=0;p<s;p++){let C=i.get(h,p);C===f?a++:(a>=5&&(l+=t.N1+(a-5)),f=C,a=1),C=i.get(p,h),C===u?c++:(c>=5&&(l+=t.N1+(c-5)),u=C,c=1)}a>=5&&(l+=t.N1+(a-5)),c>=5&&(l+=t.N1+(c-5))}return l},e.getPenaltyN2=function(i){const s=i.size;let l=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const f=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(f===4||f===0)&&l++}return l*t.N2},e.getPenaltyN3=function(i){const s=i.size;let l=0,a=0,c=0;for(let f=0;f<s;f++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(f,u),u>=10&&(a===1488||a===93)&&l++,c=c<<1&2047|i.get(u,f),u>=10&&(c===1488||c===93)&&l++}return l*t.N3},e.getPenaltyN4=function(i){let s=0;const l=i.data.length;for(let c=0;c<l;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/l/5)-10)*t.N4};function n(r,i,s){switch(r){case e.Patterns.PATTERN000:return(i+s)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(i+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return i*s%2+i*s%3===0;case e.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case e.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(i,s){const l=s.size;for(let a=0;a<l;a++)for(let c=0;c<l;c++)s.isReserved(c,a)||s.xor(c,a,n(i,c,a))},e.getBestMask=function(i,s){const l=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let f=0;f<l;f++){s(f),e.applyMask(f,i);const u=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(f,i),u<c&&(c=u,a=f)}return a}}(jt)),jt}var it={},X1;function Fr(){if(X1)return it;X1=1;const e=Qt(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return it.getBlocksCount=function(i,s){switch(s){case e.L:return t[(i-1)*4+0];case e.M:return t[(i-1)*4+1];case e.Q:return t[(i-1)*4+2];case e.H:return t[(i-1)*4+3];default:return}},it.getTotalCodewordsCount=function(i,s){switch(s){case e.L:return n[(i-1)*4+0];case e.M:return n[(i-1)*4+1];case e.Q:return n[(i-1)*4+2];case e.H:return n[(i-1)*4+3];default:return}},it}var Tt={},Je={},er;function xi(){if(er)return Je;er=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let r=1;for(let i=0;i<255;i++)e[i]=r,t[r]=i,r<<=1,r&256&&(r^=285);for(let i=255;i<512;i++)e[i]=e[i-255]}(),Je.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Je.exp=function(r){return e[r]},Je.mul=function(r,i){return r===0||i===0?0:e[t[r]+t[i]]},Je}var tr;function Li(){return tr||(tr=1,function(e){const t=xi();e.mul=function(r,i){const s=new Uint8Array(r.length+i.length-1);for(let l=0;l<r.length;l++)for(let a=0;a<i.length;a++)s[l+a]^=t.mul(r[l],i[a]);return s},e.mod=function(r,i){let s=new Uint8Array(r);for(;s.length-i.length>=0;){const l=s[0];for(let c=0;c<i.length;c++)s[c]^=t.mul(i[c],l);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},e.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let s=0;s<r;s++)i=e.mul(i,new Uint8Array([1,t.exp(s)]));return i}}(Tt)),Tt}var Vt,rr;function Mi(){if(rr)return Vt;rr=1;const e=Li();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(r.length+this.degree);i.set(r);const s=e.mod(i,this.genPoly),l=this.degree-s.length;if(l>0){const a=new Uint8Array(this.degree);return a.set(s,l),a}return s},Vt=t,Vt}var Ot={},Nt={},Pt={},nr;function Zr(){return nr||(nr=1,Pt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Pt}var Ee={},or;function Dr(){if(or)return Ee;or=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
81
81
|
]))+`;Ee.KANJI=new RegExp(n,"g"),Ee.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ee.BYTE=new RegExp(r,"g"),Ee.NUMERIC=new RegExp(e,"g"),Ee.ALPHANUMERIC=new RegExp(t,"g");const i=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ee.testKanji=function(c){return i.test(c)},Ee.testNumeric=function(c){return s.test(c)},Ee.testAlphanumeric=function(c){return l.test(c)},Ee}var ar;function Pe(){return ar||(ar=1,function(e){const t=Zr(),n=Dr();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,l){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?s.ccBits[0]:l<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return n.testNumeric(s)?e.NUMERIC:n.testAlphanumeric(s)?e.ALPHANUMERIC:n.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(s,l){if(e.isValid(s))return s;try{return r(s)}catch{return l}}}(Nt)),Nt}var ir;function Ri(){return ir||(ir=1,function(e){const t=Ne(),n=Fr(),r=Qt(),i=Pe(),s=Zr(),l=7973,a=t.getBCHDigit(l);function c(p,C,k){for(let m=1;m<=40;m++)if(C<=e.getCapacity(m,k,p))return m}function f(p,C){return i.getCharCountIndicator(p,C)+4}function u(p,C){let k=0;return p.forEach(function(m){const x=f(m.mode,C);k+=x+m.getBitsLength()}),k}function h(p,C){for(let k=1;k<=40;k++)if(u(p,k)<=e.getCapacity(k,C,i.MIXED))return k}e.from=function(C,k){return s.isValid(C)?parseInt(C,10):k},e.getCapacity=function(C,k,m){if(!s.isValid(C))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=i.BYTE);const x=t.getSymbolTotalCodewords(C),E=n.getTotalCodewordsCount(C,k),R=(x-E)*8;if(m===i.MIXED)return R;const V=R-f(m,C);switch(m){case i.NUMERIC:return Math.floor(V/10*3);case i.ALPHANUMERIC:return Math.floor(V/11*2);case i.KANJI:return Math.floor(V/13);case i.BYTE:default:return Math.floor(V/8)}},e.getBestVersionForData=function(C,k){let m;const x=r.from(k,r.M);if(Array.isArray(C)){if(C.length>1)return h(C,x);if(C.length===0)return 1;m=C[0]}else m=C;return c(m.mode,m.getLength(),x)},e.getEncodedBits=function(C){if(!s.isValid(C)||C<7)throw new Error("Invalid QR Code version");let k=C<<12;for(;t.getBCHDigit(k)-a>=0;)k^=l<<t.getBCHDigit(k)-a;return C<<12|k}}(Ot)),Ot}var At={},sr;function Si(){if(sr)return At;sr=1;const e=Ne(),t=1335,n=21522,r=e.getBCHDigit(t);return At.getEncodedBits=function(s,l){const a=s.bit<<3|l;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},At}var Ht={},Bt,lr;function _i(){if(lr)return Bt;lr=1;const e=Pe();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let i,s,l;for(i=0;i+3<=this.data.length;i+=3)s=this.data.substr(i,3),l=parseInt(s,10),r.put(l,10);const a=this.data.length-i;a>0&&(s=this.data.substr(i),l=parseInt(s,10),r.put(l,a*3+1))},Bt=t,Bt}var Wt,cr;function ji(){if(cr)return Wt;cr=1;const e=Pe(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let s;for(s=0;s+2<=this.data.length;s+=2){let l=t.indexOf(this.data[s])*45;l+=t.indexOf(this.data[s+1]),i.put(l,11)}this.data.length%2&&i.put(t.indexOf(this.data[s]),6)},Wt=n,Wt}var Ft,ur;function Ti(){if(ur)return Ft;ur=1;const e=Pe();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,i=this.data.length;r<i;r++)n.put(this.data[r],8)},Ft=t,Ft}var Zt,dr;function Vi(){if(dr)return Zt;dr=1;const e=Pe(),t=Ne();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(i){return i*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i<this.data.length;i++){let s=t.toSJIS(this.data[i]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
|
|
82
82
|
Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},Zt=n,Zt}var Dt={exports:{}},fr;function Oi(){return fr||(fr=1,function(e){var t={single_source_shortest_paths:function(n,r,i){var s={},l={};l[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,f,u,h,p,C,k,m,x;!a.empty();){c=a.pop(),f=c.value,h=c.cost,p=n[f]||{};for(u in p)p.hasOwnProperty(u)&&(C=p[u],k=h+C,m=l[u],x=typeof l[u]>"u",(x||m>k)&&(l[u]=k,a.push(u,k),s[u]=f))}if(typeof i<"u"&&typeof l[i]>"u"){var E=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(E)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],s=r;s;)i.push(s),n[s],s=n[s];return i.reverse(),i},find_path:function(n,r,i){var s=t.single_source_shortest_paths(n,r,i);return t.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,i={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(i[s]=r[s]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Dt)),Dt.exports}var hr;function Ni(){return hr||(hr=1,function(e){const t=Pe(),n=_i(),r=ji(),i=Ti(),s=Vi(),l=Dr(),a=Ne(),c=Oi();function f(E){return unescape(encodeURIComponent(E)).length}function u(E,R,V){const S=[];let g;for(;(g=E.exec(V))!==null;)S.push({data:g[0],index:g.index,mode:R,length:g[0].length});return S}function h(E){const R=u(l.NUMERIC,t.NUMERIC,E),V=u(l.ALPHANUMERIC,t.ALPHANUMERIC,E);let S,g;return a.isKanjiModeEnabled()?(S=u(l.BYTE,t.BYTE,E),g=u(l.KANJI,t.KANJI,E)):(S=u(l.BYTE_KANJI,t.BYTE,E),g=[]),R.concat(V,S,g).sort(function(H,B){return H.index-B.index}).map(function(H){return{data:H.data,mode:H.mode,length:H.length}})}function p(E,R){switch(R){case t.NUMERIC:return n.getBitsLength(E);case t.ALPHANUMERIC:return r.getBitsLength(E);case t.KANJI:return s.getBitsLength(E);case t.BYTE:return i.getBitsLength(E)}}function C(E){return E.reduce(function(R,V){const S=R.length-1>=0?R[R.length-1]:null;return S&&S.mode===V.mode?(R[R.length-1].data+=V.data,R):(R.push(V),R)},[])}function k(E){const R=[];for(let V=0;V<E.length;V++){const S=E[V];switch(S.mode){case t.NUMERIC:R.push([S,{data:S.data,mode:t.ALPHANUMERIC,length:S.length},{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.ALPHANUMERIC:R.push([S,{data:S.data,mode:t.BYTE,length:S.length}]);break;case t.KANJI:R.push([S,{data:S.data,mode:t.BYTE,length:f(S.data)}]);break;case t.BYTE:R.push([{data:S.data,mode:t.BYTE,length:f(S.data)}])}}return R}function m(E,R){const V={},S={start:{}};let g=["start"];for(let O=0;O<E.length;O++){const H=E[O],B=[];for(let A=0;A<H.length;A++){const Z=H[A],_=""+O+A;B.push(_),V[_]={node:Z,lastCount:0},S[_]={};for(let y=0;y<g.length;y++){const T=g[y];V[T]&&V[T].node.mode===Z.mode?(S[T][_]=p(V[T].lastCount+Z.length,Z.mode)-p(V[T].lastCount,Z.mode),V[T].lastCount+=Z.length):(V[T]&&(V[T].lastCount=Z.length),S[T][_]=p(Z.length,Z.mode)+4+t.getCharCountIndicator(Z.mode,R))}}g=B}for(let O=0;O<g.length;O++)S[g[O]].end=0;return{map:S,table:V}}function x(E,R){let V;const S=t.getBestModeForData(E);if(V=t.from(R,S),V!==t.BYTE&&V.bit<S.bit)throw new Error('"'+E+'" cannot be encoded with mode '+t.toString(V)+`.
|
|
83
83
|
Suggested mode is: `+t.toString(S));switch(V===t.KANJI&&!a.isKanjiModeEnabled()&&(V=t.BYTE),V){case t.NUMERIC:return new n(E);case t.ALPHANUMERIC:return new r(E);case t.KANJI:return new s(E);case t.BYTE:return new i(E)}}e.fromArray=function(R){return R.reduce(function(V,S){return typeof S=="string"?V.push(x(S,null)):S.data&&V.push(x(S.data,S.mode)),V},[])},e.fromString=function(R,V){const S=h(R,a.isKanjiModeEnabled()),g=k(S),O=m(g,V),H=c.find_path(O.map,"start","end"),B=[];for(let A=1;A<H.length-1;A++)B.push(O.table[H[A]].node);return e.fromArray(C(B))},e.rawSplit=function(R){return e.fromArray(h(R,a.isKanjiModeEnabled()))}}(Ht)),Ht}var pr;function Pi(){if(pr)return xt;pr=1;const e=Ne(),t=Qt(),n=wi(),r=bi(),i=yi(),s=ki(),l=Ei(),a=Fr(),c=Mi(),f=Ri(),u=Si(),h=Pe(),p=Ni();function C(O,H){const B=O.size,A=s.getPositions(H);for(let Z=0;Z<A.length;Z++){const _=A[Z][0],y=A[Z][1];for(let T=-1;T<=7;T++)if(!(_+T<=-1||B<=_+T))for(let v=-1;v<=7;v++)y+v<=-1||B<=y+v||(T>=0&&T<=6&&(v===0||v===6)||v>=0&&v<=6&&(T===0||T===6)||T>=2&&T<=4&&v>=2&&v<=4?O.set(_+T,y+v,!0,!0):O.set(_+T,y+v,!1,!0))}}function k(O){const H=O.size;for(let B=8;B<H-8;B++){const A=B%2===0;O.set(B,6,A,!0),O.set(6,B,A,!0)}}function m(O,H){const B=i.getPositions(H);for(let A=0;A<B.length;A++){const Z=B[A][0],_=B[A][1];for(let y=-2;y<=2;y++)for(let T=-2;T<=2;T++)y===-2||y===2||T===-2||T===2||y===0&&T===0?O.set(Z+y,_+T,!0,!0):O.set(Z+y,_+T,!1,!0)}}function x(O,H){const B=O.size,A=f.getEncodedBits(H);let Z,_,y;for(let T=0;T<18;T++)Z=Math.floor(T/3),_=T%3+B-8-3,y=(A>>T&1)===1,O.set(Z,_,y,!0),O.set(_,Z,y,!0)}function E(O,H,B){const A=O.size,Z=u.getEncodedBits(H,B);let _,y;for(_=0;_<15;_++)y=(Z>>_&1)===1,_<6?O.set(_,8,y,!0):_<8?O.set(_+1,8,y,!0):O.set(A-15+_,8,y,!0),_<8?O.set(8,A-_-1,y,!0):_<9?O.set(8,15-_-1+1,y,!0):O.set(8,15-_-1,y,!0);O.set(A-8,8,1,!0)}function R(O,H){const B=O.size;let A=-1,Z=B-1,_=7,y=0;for(let T=B-1;T>0;T-=2)for(T===6&&T--;;){for(let v=0;v<2;v++)if(!O.isReserved(Z,T-v)){let N=!1;y<H.length&&(N=(H[y]>>>_&1)===1),O.set(Z,T-v,N),_--,_===-1&&(y++,_=7)}if(Z+=A,Z<0||B<=Z){Z-=A,A=-A;break}}}function V(O,H,B){const A=new n;B.forEach(function(v){A.put(v.mode.bit,4),A.put(v.getLength(),h.getCharCountIndicator(v.mode,O)),v.write(A)});const Z=e.getSymbolTotalCodewords(O),_=a.getTotalCodewordsCount(O,H),y=(Z-_)*8;for(A.getLengthInBits()+4<=y&&A.put(0,4);A.getLengthInBits()%8!==0;)A.putBit(0);const T=(y-A.getLengthInBits())/8;for(let v=0;v<T;v++)A.put(v%2?17:236,8);return S(A,O,H)}function S(O,H,B){const A=e.getSymbolTotalCodewords(H),Z=a.getTotalCodewordsCount(H,B),_=A-Z,y=a.getBlocksCount(H,B),T=A%y,v=y-T,N=Math.floor(A/y),I=Math.floor(_/y),b=I+1,D=N-I,te=new c(D);let L=0;const j=new Array(y),q=new Array(y);let z=0;const G=new Uint8Array(O.buffer);for(let J=0;J<y;J++){const X=J<v?I:b;j[J]=G.slice(L,L+X),q[J]=te.encode(j[J]),L+=X,z=Math.max(z,X)}const ee=new Uint8Array(A);let K=0,W,U;for(W=0;W<z;W++)for(U=0;U<y;U++)W<j[U].length&&(ee[K++]=j[U][W]);for(W=0;W<D;W++)for(U=0;U<y;U++)ee[K++]=q[U][W];return ee}function g(O,H,B,A){let Z;if(Array.isArray(O))Z=p.fromArray(O);else if(typeof O=="string"){let N=H;if(!N){const I=p.rawSplit(O);N=f.getBestVersionForData(I,B)}Z=p.fromString(O,N||40)}else throw new Error("Invalid data");const _=f.getBestVersionForData(Z,B);if(!_)throw new Error("The amount of data is too big to be stored in a QR Code");if(!H)H=_;else if(H<_)throw new Error(`
|
package/dist/diditui.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import { Aria } from 'react-modal';
|
|
2
|
+
import { Classes } from 'react-modal';
|
|
1
3
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
4
|
import { ClassValue } from 'clsx';
|
|
3
5
|
import { ComponentProps } from 'react';
|
|
6
|
+
import { ComponentPropsWithRef } from 'react';
|
|
4
7
|
import { default as default_2 } from 'react';
|
|
5
8
|
import { FC } from 'react';
|
|
6
9
|
import { JSX } from 'react/jsx-runtime';
|
|
7
10
|
import { JSX as JSX_2 } from 'react';
|
|
11
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
12
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
8
13
|
import { MutableRefObject } from 'react';
|
|
9
|
-
import {
|
|
14
|
+
import { OnAfterOpenCallback } from 'react-modal';
|
|
15
|
+
import { ReactElement } from 'react';
|
|
16
|
+
import { ReactNode } from 'react';
|
|
10
17
|
import { SVGProps } from 'react';
|
|
11
18
|
import { VariantProps } from 'class-variance-authority';
|
|
12
19
|
|
|
@@ -164,7 +171,7 @@ export declare const MediaQuery: {
|
|
|
164
171
|
XXL: number;
|
|
165
172
|
};
|
|
166
173
|
|
|
167
|
-
export declare function Modal({ children,
|
|
174
|
+
export declare function Modal({ children, className, overlayClassName, withBorder, appElementId, onRequestClose, ...props }: Props): JSX.Element;
|
|
168
175
|
|
|
169
176
|
/**
|
|
170
177
|
* A more sophisticated version of `InheritableElementProps` where
|
|
@@ -178,14 +185,38 @@ declare type PolymorphicComponentPropsWithRef<C extends default_2.ElementType, P
|
|
|
178
185
|
|
|
179
186
|
declare type PolymorphicRef<C extends default_2.ElementType> = default_2.ComponentPropsWithRef<C>['ref'];
|
|
180
187
|
|
|
181
|
-
declare interface Props
|
|
188
|
+
declare interface Props {
|
|
182
189
|
withBorder?: boolean;
|
|
183
190
|
appElementId?: string;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
191
|
+
testId?: string | undefined;
|
|
192
|
+
id?: string | undefined;
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
isOpen: boolean;
|
|
195
|
+
portalClassName?: string | undefined;
|
|
196
|
+
bodyOpenClassName?: string | null | undefined;
|
|
197
|
+
htmlOpenClassName?: string | null | undefined;
|
|
198
|
+
className?: string | Classes | undefined;
|
|
199
|
+
overlayClassName?: string | Classes | undefined;
|
|
200
|
+
appElement?: HTMLElement | HTMLElement[] | HTMLCollection | NodeList | undefined;
|
|
201
|
+
onAfterOpen?: OnAfterOpenCallback | undefined;
|
|
202
|
+
onAfterClose?(): void;
|
|
203
|
+
onRequestClose?(event: MouseEvent_2 | KeyboardEvent_2): void;
|
|
204
|
+
closeTimeoutMS?: number | undefined;
|
|
205
|
+
ariaHideApp?: boolean | undefined;
|
|
206
|
+
shouldFocusAfterRender?: boolean | undefined;
|
|
207
|
+
shouldCloseOnOverlayClick?: boolean | undefined;
|
|
208
|
+
shouldCloseOnEsc?: boolean | undefined;
|
|
209
|
+
shouldReturnFocusAfterClose?: boolean | undefined;
|
|
210
|
+
preventScroll?: boolean | undefined;
|
|
211
|
+
parentSelector?(): HTMLElement;
|
|
212
|
+
aria?: Aria | undefined;
|
|
213
|
+
data?: unknown;
|
|
214
|
+
role?: string | null | undefined;
|
|
215
|
+
contentLabel?: string | undefined;
|
|
216
|
+
contentRef?: ((instance: HTMLDivElement) => void) | undefined;
|
|
217
|
+
overlayRef?: ((instance: HTMLDivElement) => void) | undefined;
|
|
218
|
+
overlayElement?: ((props: ComponentPropsWithRef<'div'>, contentEl: ReactElement) => ReactElement) | undefined;
|
|
219
|
+
contentElement?: ((props: ComponentPropsWithRef<'div'>, children: ReactNode) => ReactElement) | undefined;
|
|
189
220
|
}
|
|
190
221
|
|
|
191
222
|
declare type PropsOf<C extends keyof JSX_2.IntrinsicElements | default_2.JSXElementConstructor<unknown>> = JSX_2.LibraryManagedAttributes<C, default_2.ComponentPropsWithoutRef<C>>;
|
package/dist/diditui.js
CHANGED
|
@@ -5693,47 +5693,45 @@ var Ci = pi();
|
|
|
5693
5693
|
const J1 = /* @__PURE__ */ e1(Ci);
|
|
5694
5694
|
function ms({
|
|
5695
5695
|
children: e,
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
...a
|
|
5696
|
+
className: t,
|
|
5697
|
+
overlayClassName: n,
|
|
5698
|
+
withBorder: r = !1,
|
|
5699
|
+
appElementId: i = "#__next",
|
|
5700
|
+
onRequestClose: s,
|
|
5701
|
+
...l
|
|
5703
5702
|
}) {
|
|
5704
5703
|
Se(() => {
|
|
5705
|
-
typeof window < "u" && J1.setAppElement(
|
|
5706
|
-
}, [
|
|
5707
|
-
const
|
|
5704
|
+
typeof window < "u" && J1.setAppElement(i);
|
|
5705
|
+
}, [i]);
|
|
5706
|
+
const a = Y([
|
|
5708
5707
|
"fixed right-0 left-0 bottom-0 z-[1000] h-screen overflow-y-auto",
|
|
5709
5708
|
"overflow-x-hidden md:inset-0 md:h-full bg-foreground/5 backdrop-blur-md",
|
|
5710
|
-
|
|
5711
|
-
]),
|
|
5709
|
+
n
|
|
5710
|
+
]), c = Y([
|
|
5712
5711
|
"font-inter size-full flex items-end justify-center md:items-center overflow-visible"
|
|
5713
|
-
]),
|
|
5712
|
+
]), f = Y([
|
|
5714
5713
|
"relative max-h-[90%] overflow-hidden rounded-t-[32px]",
|
|
5715
5714
|
"bg-background animate-slide-in shadow-card opacity-0 pt-6",
|
|
5716
5715
|
"md:rounded-[32px] md:max-w-[90%]",
|
|
5717
|
-
{ "border border-surface-lo":
|
|
5718
|
-
|
|
5716
|
+
{ "border border-surface-lo": r },
|
|
5717
|
+
t
|
|
5719
5718
|
]);
|
|
5720
5719
|
return /* @__PURE__ */ L.jsx(
|
|
5721
5720
|
J1,
|
|
5722
5721
|
{
|
|
5723
5722
|
closeTimeoutMS: 300,
|
|
5724
|
-
className:
|
|
5725
|
-
overlayClassName:
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
children: /* @__PURE__ */ L.jsxs("div", { className: u, children: [
|
|
5723
|
+
className: c,
|
|
5724
|
+
overlayClassName: a,
|
|
5725
|
+
onRequestClose: s,
|
|
5726
|
+
...l,
|
|
5727
|
+
children: /* @__PURE__ */ L.jsxs("div", { className: f, children: [
|
|
5730
5728
|
/* @__PURE__ */ L.jsx(
|
|
5731
5729
|
Ka,
|
|
5732
5730
|
{
|
|
5733
5731
|
className: "absolute right-6 top-6",
|
|
5734
5732
|
icon: "close",
|
|
5735
5733
|
size: "xs",
|
|
5736
|
-
onClick:
|
|
5734
|
+
onClick: s
|
|
5737
5735
|
}
|
|
5738
5736
|
),
|
|
5739
5737
|
e
|