designer-system-agroe 0.0.5 → 0.0.7
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/index.cjs +13 -18
- package/dist/index.js +961 -1248
- package/package.json +3 -10
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),Ot=require("react-dom");function Dt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Dt(j),_n=Dt(Ot);var Ne={exports:{}},Se={};var ot;function Cn(){if(ot)return Se;ot=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var i in a)i!=="key"&&(o[i]=a[i])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:o}}return Se.Fragment=t,Se.jsx=n,Se.jsxs=n,Se}var we={};var it;function xn(){return it||(it=1,process.env.NODE_ENV!=="production"&&(function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===Y?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case y:return"Fragment";case x:return"Profiler";case p:return"StrictMode";case U:return"Suspense";case O:return"SuspenseList";case K: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 f:return"Portal";case T:return c.displayName||"Context";case R:return(c._context.displayName||"Context")+".Consumer";case A:var S=c.render;return c=c.displayName,c||(c=S.displayName||S.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case P:return S=c.displayName||null,S!==null?S:e(c.type)||"Memo";case V:S=c._payload,c=c._init;try{return e(c(S))}catch{}}return null}function t(c){return""+c}function n(c){try{t(c);var S=!1}catch{S=!0}if(S){S=console;var I=S.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return I.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(c)}}function r(c){if(c===y)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===V)return"<...>";try{var S=e(c);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function a(){var c=G.A;return c===null?null:c.getOwner()}function o(){return Error("react-stack-top-frame")}function s(c){if(X.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function i(c,S){function I(){N||(N=!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)",S))}I.isReactWarning=!0,Object.defineProperty(c,"key",{get:I,configurable:!0})}function m(){var c=e(this.type);return C[c]||(C[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 l(c,S,I,B,Z,ie){var W=I.ref;return c={$$typeof:b,type:c,key:S,props:I,_owner:B},(W!==void 0?W:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:m}):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:Z}),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,S,I,B,Z,ie){var W=S.children;if(W!==void 0)if(B)if(oe(W)){for(B=0;B<W.length;B++)d(W[B]);Object.freeze&&Object.freeze(W)}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 d(W);if(X.call(S,"key")){W=e(c);var Q=Object.keys(S).filter(function(Be){return Be!=="key"});B=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",z[W+B]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
-
let props = %s;
|
|
3
|
-
<%s {...props} />
|
|
4
|
-
React keys must be passed directly to JSX without using spread:
|
|
5
|
-
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,B,W,Q,W),z[W+B]=!0)}if(W=null,I!==void 0&&(n(I),W=""+I),s(S)&&(n(S.key),W=""+S.key),"key"in S){I={};for(var Ee in S)Ee!=="key"&&(I[Ee]=S[Ee])}else I=S;return W&&i(I,typeof c=="function"?c.displayName||c.name||"Unknown":c),l(c,W,I,a(),Z,ie)}function d(c){g(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===V&&(c._payload.status==="fulfilled"?g(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function g(c){return typeof c=="object"&&c!==null&&c.$$typeof===b}var h=j,b=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),G=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,oe=Array.isArray,te=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(c){return c()}};var N,C={},M=h.react_stack_bottom_frame.bind(h,o)(),$=te(r(o)),z={};we.Fragment=y,we.jsx=function(c,S,I){var B=1e4>G.recentlyCreatedOwnerStacks++;return v(c,S,I,!1,B?Error("react-stack-top-frame"):M,B?te(r(c)):$)},we.jsxs=function(c,S,I){var B=1e4>G.recentlyCreatedOwnerStacks++;return v(c,S,I,!0,B?Error("react-stack-top-frame"):M,B?te(r(c)):$)}})()),we}var st;function Rn(){return st||(st=1,process.env.NODE_ENV==="production"?Ne.exports=Cn():Ne.exports=xn()),Ne.exports}var _=Rn();function ee(...e){return e.filter(Boolean).join(" ")}const Nn="_badge_1p848_1",On="_success_1p848_21",Dn="_warning_1p848_33",Tn="_danger_1p848_45",Pn="_info_1p848_57",An="_details_1p848_69",In="_badgeStories_1p848_81",ut={badge:Nn,success:On,warning:Dn,danger:Tn,info:Pn,details:An,badgeStories:In};function Mn({className:e,variant:t="success",children:n,...r}){return _.jsx("span",{className:ee(ut.badge,ut[t],e),...r,children:n})}const kn="_button_rw0ck_1",jn="_primary_rw0ck_17",Fn="_secondary_rw0ck_27",ct={button:kn,primary:jn,secondary:Fn};function Ln({className:e,variant:t="primary",label:n,onClick:r}){return _.jsx("button",{className:ee(ct.button,ct[t],e),onClick:r,children:n})}function Tt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var _e;(function(e){e.event="event",e.props="prop"})(_e||(_e={}));function le(){}function Vn(e){var t,n=void 0;return function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(o,s){return o===t[s]})||(t=r,n=e.apply(void 0,r)),n}}function Ce(e){return!!(e||"").match(/\d/)}function ye(e){return e==null}function Bn(e){return typeof e=="number"&&isNaN(e)}function Pt(e){return ye(e)||Bn(e)||typeof e=="number"&&!isFinite(e)}function At(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Wn(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function $n(e,t,n){var r=Wn(n),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}function Un(e){var t=j.useRef(e);t.current=e;var n=j.useRef(function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t.current.apply(t,r)});return n.current}function et(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var a=e.split("."),o=a[0],s=a[1]||"";return{beforeDecimal:o,afterDecimal:s,hasNegation:n,addNegation:r}}function zn(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}function It(e,t,n){for(var r="",a=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||a;return r}function lt(e,t){return Array(t+1).join(e)}function Mt(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],o=r[1];if(o=Number(o),!o)return n+a;a=a.replace(".","");var s=1+o,i=a.length;return s<0?a="0."+lt("0",Math.abs(s))+a:s>=i?a=a+lt("0",s-i):a=(a.substring(0,s)||"0")+"."+a.substring(s),n+a}function ft(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,a=et(e),o=a.beforeDecimal,s=a.afterDecimal,i=a.hasNegation,m=parseFloat("0."+(s||"0")),l=s.length<=t?"0."+s:m.toFixed(t),v=l.split("."),d=o;o&&Number(v[0])&&(d=o.split("").reverse().reduce(function(f,y,p){return f.length>p?(Number(f[0])+Number(y)).toString()+f.substring(1,f.length):y+f},v[0]));var g=It(v[1]||"",t,n),h=i?"-":"",b=r?".":"";return""+h+d+b+g}function de(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var kt=Vn(function(e,t){for(var n=0,r=0,a=e.length,o=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[o-1-r]&&o-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:o-r}}}),Yn=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Kn(e,t,n){return Math.min(Math.max(e,t),n)}function $e(e){return Math.max(e.selectionStart,e.selectionEnd)}function Gn(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Hn(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Xn(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function qn(e,t,n,r,a,o,s){s===void 0&&(s=Xn);var i=a.findIndex(function(T){return T}),m=e.slice(0,i);!t&&!n.startsWith(m)&&(t=m,n=m+n,r=r+m.length);for(var l=n.length,v=e.length,d={},g=new Array(l),h=0;h<l;h++){g[h]=-1;for(var b=0,f=v;b<f;b++){var y=s({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:b});if(y&&d[b]!==!0){g[h]=b,d[b]=!0;break}}}for(var p=r;p<l&&(g[p]===-1||!o(n[p]));)p++;var x=p===l||g[p]===-1?v:g[p];for(p=r-1;p>0&&g[p]===-1;)p--;var R=p===-1||g[p]===-1?0:g[p]+1;return R>x?x:r-R<x-r?R:x}function dt(e,t,n,r){var a=e.length;if(t=Kn(t,0,a),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return t===-1&&(t=a),t}function Zn(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Ce(e[n])||Ce(e[n-1]));return t}function jt(e,t,n,r,a,o){o===void 0&&(o=le);var s=Un(function(b,f){var y,p;return Pt(b)?(p="",y=""):typeof b=="number"||f?(p=typeof b=="number"?Mt(b):b,y=r(p)):(p=a(b,void 0),y=r(p)),{formattedValue:y,numAsString:p}}),i=j.useState(function(){return s(ye(e)?t:e,n)}),m=i[0],l=i[1],v=function(b,f){b.formattedValue!==m.formattedValue&&l({formattedValue:b.formattedValue,numAsString:b.value}),o(b,f)},d=e,g=n;ye(e)&&(d=m.numAsString,g=!0);var h=s(d,g);return j.useMemo(function(){l(h)},[h.formattedValue]),[m,v]}function Qn(e){return e.replace(/[^0-9]/g,"")}function Jn(e){return e}function er(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,a=e.renderText,o=e.getInputRef,s=e.format;s===void 0&&(s=Jn);var i=e.removeFormatting;i===void 0&&(i=Qn);var m=e.defaultValue,l=e.valueIsNumericString,v=e.onValueChange,d=e.isAllowed,g=e.onChange;g===void 0&&(g=le);var h=e.onKeyDown;h===void 0&&(h=le);var b=e.onMouseUp;b===void 0&&(b=le);var f=e.onFocus;f===void 0&&(f=le);var y=e.onBlur;y===void 0&&(y=le);var p=e.value,x=e.getCaretBoundary;x===void 0&&(x=Zn);var R=e.isValidInputCharacter;R===void 0&&(R=Ce);var T=e.isCharacterSame,A=Tt(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),U=jt(p,m,!!l,s,i,v),O=U[0],P=O.formattedValue,V=O.numAsString,K=U[1],Y=j.useRef(),G=j.useRef({formattedValue:P,numAsString:V}),X=function(E,w){G.current={formattedValue:E.formattedValue,numAsString:E.value},K(E,w)},oe=j.useState(!1),te=oe[0],N=oe[1],C=j.useRef(null),M=j.useRef({setCaretTimeout:null,focusTimeout:null});j.useEffect(function(){return N(!0),function(){clearTimeout(M.current.setCaretTimeout),clearTimeout(M.current.focusTimeout)}},[]);var $=s,z=function(E,w){var D=parseFloat(w);return{formattedValue:E,value:w,floatValue:isNaN(D)?void 0:D}},c=function(E,w,D){E.selectionStart===0&&E.selectionEnd===E.value.length||(de(E,w),M.current.setCaretTimeout=setTimeout(function(){E.value===D&&E.selectionStart!==w&&de(E,w)},0))},S=function(E,w,D){return dt(E,w,x(E),D)},I=function(E,w,D){var F=x(w),H=qn(w,P,E,D,F,R,T);return H=dt(w,H,F),H},B=function(E){var w=E.formattedValue;w===void 0&&(w="");var D=E.input,F=E.source,H=E.event,L=E.numAsString,k;if(D){var ne=E.inputValue||D.value,se=$e(D);D.value=w,k=I(ne,w,se),k!==void 0&&c(D,k,w)}w!==P&&X(z(w,L),{event:H,source:F})};j.useEffect(function(){var E=G.current,w=E.formattedValue,D=E.numAsString;(P!==w||V!==D)&&X(z(P,V),{event:void 0,source:_e.props})},[P,V]);var Z=C.current?$e(C.current):void 0,ie=typeof window<"u"?j.useLayoutEffect:j.useEffect;ie(function(){var E=C.current;if(P!==G.current.formattedValue&&E){var w=I(G.current.formattedValue,P,Z);E.value=P,c(E,w,P)}},[P]);var W=function(E,w,D){var F=w.target,H=Y.current?Yn(Y.current,F.selectionEnd):kt(P,E),L=Object.assign(Object.assign({},H),{lastValue:P}),k=i(E,L),ne=$(k);if(k=i(ne,void 0),d&&!d(z(ne,k))){var se=w.target,ue=$e(se),We=I(E,P,ue);return se.value=P,c(se,We,P),!1}return B({formattedValue:ne,numAsString:k,inputValue:E,event:w,source:D,input:w.target}),!0},Q=function(E,w){w===void 0&&(w=0);var D=E.selectionStart,F=E.selectionEnd;Y.current={selectionStart:D,selectionEnd:F+w}},Ee=function(E){var w=E.target,D=w.value,F=W(D,E,_e.event);F&&g(E),Y.current=void 0},Be=function(E){var w=E.target,D=E.key,F=w.selectionStart,H=w.selectionEnd,L=w.value;L===void 0&&(L="");var k;D==="ArrowLeft"||D==="Backspace"?k=Math.max(F-1,0):D==="ArrowRight"?k=Math.min(F+1,L.length):D==="Delete"&&(k=F);var ne=0;D==="Delete"&&F===H&&(ne=1);var se=D==="ArrowLeft"||D==="ArrowRight";if(k===void 0||F!==H&&!se){h(E),Q(w,ne);return}var ue=k;if(se){var We=D==="ArrowLeft"?"left":"right";ue=S(L,k,We),ue!==k&&E.preventDefault()}else D==="Delete"&&!R(L[k])?ue=S(L,k,"right"):D==="Backspace"&&!R(L[k])&&(ue=S(L,k,"left"));ue!==k&&c(w,ue,L),h(E),Q(w,ne)},yn=function(E){var w=E.target,D=function(){var F=w.selectionStart,H=w.selectionEnd,L=w.value;if(L===void 0&&(L=""),F===H){var k=S(L,F);k!==F&&c(w,k,L)}};D(),requestAnimationFrame(function(){D()}),b(E),Q(w)},bn=function(E){E.persist&&E.persist();var w=E.target,D=E.currentTarget;C.current=w,M.current.focusTimeout=setTimeout(function(){var F=w.selectionStart,H=w.selectionEnd,L=w.value;L===void 0&&(L="");var k=S(L,F);k!==F&&!(F===0&&H===L.length)&&c(w,k,L),f(Object.assign(Object.assign({},E),{currentTarget:D}))},0)},En=function(E){C.current=null,clearTimeout(M.current.focusTimeout),clearTimeout(M.current.setCaretTimeout),y(E)},Sn=te&&Gn()?"numeric":void 0,at=Object.assign({inputMode:Sn},A,{type:t,value:P,onChange:Ee,onKeyDown:Be,onMouseUp:yn,onFocus:bn,onBlur:En});if(n==="text")return a?j.createElement(j.Fragment,null,a(P,A)||null):j.createElement("span",Object.assign({},A,{ref:o}),P);if(r){var wn=r;return j.createElement(wn,Object.assign({},at,{ref:o}))}return j.createElement("input",Object.assign({},at,{ref:o}))}function vt(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var s=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var m=je(t),l=m.thousandSeparator,v=m.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,g=et(e,s),h=g.beforeDecimal,b=g.afterDecimal,f=g.addNegation;return n!==void 0&&(b=It(b,n,!!r)),l&&(h=$n(h,l,i)),a&&(h=a+h),o&&(b=b+o),f&&(h="-"+h),e=h+(d&&v||"")+b,e}function je(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function tr(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function nr(e,t){return new RegExp("(^-)|[0-9]|"+At(e),"g")}function rr(e,t,n){return e===""?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function ar(e,t,n){var r;t===void 0&&(t=Hn(e));var a=n.allowNegative,o=n.prefix;o===void 0&&(o="");var s=n.suffix;s===void 0&&(s="");var i=n.decimalScale,m=t.from,l=t.to,v=l.start,d=l.end,g=je(n),h=g.allowedDecimalSeparators,b=g.decimalSeparator,f=e[d]===b;if(Ce(e)&&(e===o||e===s)&&t.lastValue==="")return e;if(d-v===1&&h.indexOf(e[v])!==-1){var y=i===0?"":b;e=e.substring(0,v)+y+e.substring(v+1,e.length)}var p=function(C,M,$){var z=!1,c=!1;o.startsWith("-")?z=!1:C.startsWith("--")?(z=!1,c=!0):s.startsWith("-")&&C.length===s.length?z=!1:C[0]==="-"&&(z=!0);var S=z?1:0;return c&&(S=2),S&&(C=C.substring(S),M-=S,$-=S),{value:C,start:M,end:$,hasNegation:z}},x=p(e,v,d),R=x.hasNegation;r=x,e=r.value,v=r.start,d=r.end;var T=p(t.lastValue,m.start,m.end),A=T.start,U=T.end,O=T.value,P=e.substring(v,d);e.length&&O.length&&(A>O.length-s.length||U<o.length)&&!(P&&s.startsWith(P))&&(e=O);var V=0;e.startsWith(o)?V+=o.length:v<o.length&&(V=v),e=e.substring(V),d-=V;var K=e.length,Y=e.length-s.length;e.endsWith(s)?K=Y:(d>Y||d>e.length-s.length)&&(K=d),e=e.substring(0,K),e=tr(R?"-"+e:e,a),e=(e.match(nr(b))||[]).join("");var G=e.indexOf(b);e=e.replace(new RegExp(At(b),"g"),function(C,M){return M===G?".":""});var X=et(e,a),oe=X.beforeDecimal,te=X.afterDecimal,N=X.addNegation;return l.end-l.start<m.end-m.start&&oe===""&&f&&!parseFloat(te)&&(e=N?"-":""),e}function or(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,n.length+(o?1:0));var s=e.length;return a.fill(!1,s-r.length+1,s+1),a}function ir(e){var t=je(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),F=require("react"),wt=require("react-dom");function Ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Ct(F),yn=Ct(wt);function X(...e){return e.filter(Boolean).join(" ")}const bn="_badge_1p848_1",En="_success_1p848_21",Sn="_warning_1p848_33",wn="_danger_1p848_45",Cn="_info_1p848_57",xn="_details_1p848_69",Nn="_badgeStories_1p848_81",nt={badge:bn,success:En,warning:Sn,danger:wn,info:Cn,details:xn,badgeStories:Nn};function _n({className:e,variant:t="success",children:n,...r}){return E.jsx("span",{className:X(nt.badge,nt[t],e),...r,children:n})}const Dn="_button_rw0ck_1",Rn="_primary_rw0ck_17",On="_secondary_rw0ck_27",rt={button:Dn,primary:Rn,secondary:On};function Pn({className:e,variant:t="primary",label:n,onClick:r}){return E.jsx("button",{className:X(rt.button,rt[t],e),onClick:r,children:n})}function xt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var pe;(function(e){e.event="event",e.props="prop"})(pe||(pe={}));function ne(){}function An(e){var t,n=void 0;return function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(o,s){return o===t[s]})||(t=r,n=e.apply(void 0,r)),n}}function ye(e){return!!(e||"").match(/\d/)}function ve(e){return e==null}function Tn(e){return typeof e=="number"&&isNaN(e)}function Nt(e){return ve(e)||Tn(e)||typeof e=="number"&&!isFinite(e)}function _t(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function In(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Mn(e,t,n){var r=In(n),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}function Fn(e){var t=F.useRef(e);t.current=e;var n=F.useRef(function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t.current.apply(t,r)});return n.current}function Ye(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var a=e.split("."),o=a[0],s=a[1]||"";return{beforeDecimal:o,afterDecimal:s,hasNegation:n,addNegation:r}}function jn(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}function Dt(e,t,n){for(var r="",a=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||a;return r}function at(e,t){return Array(t+1).join(e)}function Rt(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],o=r[1];if(o=Number(o),!o)return n+a;a=a.replace(".","");var s=1+o,i=a.length;return s<0?a="0."+at("0",Math.abs(s))+a:s>=i?a=a+at("0",s-i):a=(a.substring(0,s)||"0")+"."+a.substring(s),n+a}function ot(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,a=Ye(e),o=a.beforeDecimal,s=a.afterDecimal,i=a.hasNegation,d=parseFloat("0."+(s||"0")),l=s.length<=t?"0."+s:d.toFixed(t),v=l.split("."),f=o;o&&Number(v[0])&&(f=o.split("").reverse().reduce(function(c,p,g){return c.length>g?(Number(c[0])+Number(p)).toString()+c.substring(1,c.length):p+c},v[0]));var m=Dt(v[1]||"",t,n),h=i?"-":"",y=r?".":"";return""+h+f+y+m}function ae(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ot=An(function(e,t){for(var n=0,r=0,a=e.length,o=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[o-1-r]&&o-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:o-r}}}),Ln=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Vn(e,t,n){return Math.min(Math.max(e,t),n)}function je(e){return Math.max(e.selectionStart,e.selectionEnd)}function kn(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Bn(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Wn(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function Un(e,t,n,r,a,o,s){s===void 0&&(s=Wn);var i=a.findIndex(function(R){return R}),d=e.slice(0,i);!t&&!n.startsWith(d)&&(t=d,n=d+n,r=r+d.length);for(var l=n.length,v=e.length,f={},m=new Array(l),h=0;h<l;h++){m[h]=-1;for(var y=0,c=v;y<c;y++){var p=s({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:y});if(p&&f[y]!==!0){m[h]=y,f[y]=!0;break}}}for(var g=r;g<l&&(m[g]===-1||!o(n[g]));)g++;var w=g===l||m[g]===-1?v:m[g];for(g=r-1;g>0&&m[g]===-1;)g--;var x=g===-1||m[g]===-1?0:m[g]+1;return x>w?w:r-x<w-r?x:w}function it(e,t,n,r){var a=e.length;if(t=Vn(t,0,a),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return t===-1&&(t=a),t}function $n(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(ye(e[n])||ye(e[n-1]));return t}function Pt(e,t,n,r,a,o){o===void 0&&(o=ne);var s=Fn(function(y,c){var p,g;return Nt(y)?(g="",p=""):typeof y=="number"||c?(g=typeof y=="number"?Rt(y):y,p=r(g)):(g=a(y,void 0),p=r(g)),{formattedValue:p,numAsString:g}}),i=F.useState(function(){return s(ve(e)?t:e,n)}),d=i[0],l=i[1],v=function(y,c){y.formattedValue!==d.formattedValue&&l({formattedValue:y.formattedValue,numAsString:y.value}),o(y,c)},f=e,m=n;ve(e)&&(f=d.numAsString,m=!0);var h=s(f,m);return F.useMemo(function(){l(h)},[h.formattedValue]),[d,v]}function Kn(e){return e.replace(/[^0-9]/g,"")}function zn(e){return e}function Hn(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,a=e.renderText,o=e.getInputRef,s=e.format;s===void 0&&(s=zn);var i=e.removeFormatting;i===void 0&&(i=Kn);var d=e.defaultValue,l=e.valueIsNumericString,v=e.onValueChange,f=e.isAllowed,m=e.onChange;m===void 0&&(m=ne);var h=e.onKeyDown;h===void 0&&(h=ne);var y=e.onMouseUp;y===void 0&&(y=ne);var c=e.onFocus;c===void 0&&(c=ne);var p=e.onBlur;p===void 0&&(p=ne);var g=e.value,w=e.getCaretBoundary;w===void 0&&(w=$n);var x=e.isValidInputCharacter;x===void 0&&(x=ye);var R=e.isCharacterSame,P=xt(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),L=Pt(g,d,!!l,s,i,v),_=L[0],O=_.formattedValue,V=_.numAsString,$=L[1],U=F.useRef(),z=F.useRef({formattedValue:O,numAsString:V}),Q=function(b,S){z.current={formattedValue:b.formattedValue,numAsString:b.value},$(b,S)},ue=F.useState(!1),ge=ue[0],D=ue[1],C=F.useRef(null),T=F.useRef({setCaretTimeout:null,focusTimeout:null});F.useEffect(function(){return D(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}},[]);var k=s,B=function(b,S){var N=parseFloat(S);return{formattedValue:b,value:S,floatValue:isNaN(N)?void 0:N}},j=function(b,S,N){b.selectionStart===0&&b.selectionEnd===b.value.length||(ae(b,S),T.current.setCaretTimeout=setTimeout(function(){b.value===N&&b.selectionStart!==S&&ae(b,S)},0))},W=function(b,S,N){return it(b,S,w(b),N)},ce=function(b,S,N){var I=w(S),K=Un(S,O,b,N,I,x,R);return K=it(S,K,I),K},Te=function(b){var S=b.formattedValue;S===void 0&&(S="");var N=b.input,I=b.source,K=b.event,M=b.numAsString,A;if(N){var Y=b.inputValue||N.value,J=je(N);N.value=S,A=ce(Y,S,J),A!==void 0&&j(N,A,S)}S!==O&&Q(B(S,M),{event:K,source:I})};F.useEffect(function(){var b=z.current,S=b.formattedValue,N=b.numAsString;(O!==S||V!==N)&&Q(B(O,V),{event:void 0,source:pe.props})},[O,V]);var he=C.current?je(C.current):void 0,be=typeof window<"u"?F.useLayoutEffect:F.useEffect;be(function(){var b=C.current;if(O!==z.current.formattedValue&&b){var S=ce(z.current.formattedValue,O,he);b.value=O,j(b,S,O)}},[O]);var Ie=function(b,S,N){var I=S.target,K=U.current?Ln(U.current,I.selectionEnd):Ot(O,b),M=Object.assign(Object.assign({},K),{lastValue:O}),A=i(b,M),Y=k(A);if(A=i(Y,void 0),f&&!f(B(Y,A))){var J=S.target,ee=je(J),Fe=ce(b,O,ee);return J.value=O,j(J,Fe,O),!1}return Te({formattedValue:Y,numAsString:A,inputValue:b,event:S,source:N,input:S.target}),!0},Me=function(b,S){S===void 0&&(S=0);var N=b.selectionStart,I=b.selectionEnd;U.current={selectionStart:N,selectionEnd:I+S}},fn=function(b){var S=b.target,N=S.value,I=Ie(N,b,pe.event);I&&m(b),U.current=void 0},dn=function(b){var S=b.target,N=b.key,I=S.selectionStart,K=S.selectionEnd,M=S.value;M===void 0&&(M="");var A;N==="ArrowLeft"||N==="Backspace"?A=Math.max(I-1,0):N==="ArrowRight"?A=Math.min(I+1,M.length):N==="Delete"&&(A=I);var Y=0;N==="Delete"&&I===K&&(Y=1);var J=N==="ArrowLeft"||N==="ArrowRight";if(A===void 0||I!==K&&!J){h(b),Me(S,Y);return}var ee=A;if(J){var Fe=N==="ArrowLeft"?"left":"right";ee=W(M,A,Fe),ee!==A&&b.preventDefault()}else N==="Delete"&&!x(M[A])?ee=W(M,A,"right"):N==="Backspace"&&!x(M[A])&&(ee=W(M,A,"left"));ee!==A&&j(S,ee,M),h(b),Me(S,Y)},vn=function(b){var S=b.target,N=function(){var I=S.selectionStart,K=S.selectionEnd,M=S.value;if(M===void 0&&(M=""),I===K){var A=W(M,I);A!==I&&j(S,A,M)}};N(),requestAnimationFrame(function(){N()}),y(b),Me(S)},mn=function(b){b.persist&&b.persist();var S=b.target,N=b.currentTarget;C.current=S,T.current.focusTimeout=setTimeout(function(){var I=S.selectionStart,K=S.selectionEnd,M=S.value;M===void 0&&(M="");var A=W(M,I);A!==I&&!(I===0&&K===M.length)&&j(S,A,M),c(Object.assign(Object.assign({},b),{currentTarget:N}))},0)},gn=function(b){C.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),p(b)},hn=ge&&kn()?"numeric":void 0,tt=Object.assign({inputMode:hn},P,{type:t,value:O,onChange:fn,onKeyDown:dn,onMouseUp:vn,onFocus:mn,onBlur:gn});if(n==="text")return a?F.createElement(F.Fragment,null,a(O,P)||null):F.createElement("span",Object.assign({},P,{ref:o}),O);if(r){var pn=r;return F.createElement(pn,Object.assign({},tt,{ref:o}))}return F.createElement("input",Object.assign({},tt,{ref:o}))}function st(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var s=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var d=Oe(t),l=d.thousandSeparator,v=d.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,m=Ye(e,s),h=m.beforeDecimal,y=m.afterDecimal,c=m.addNegation;return n!==void 0&&(y=Dt(y,n,!!r)),l&&(h=Mn(h,l,i)),a&&(h=a+h),o&&(y=y+o),c&&(h="-"+h),e=h+(f&&v||"")+y,e}function Oe(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function Gn(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function Xn(e,t){return new RegExp("(^-)|[0-9]|"+_t(e),"g")}function Yn(e,t,n){return e===""?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Zn(e,t,n){var r;t===void 0&&(t=Bn(e));var a=n.allowNegative,o=n.prefix;o===void 0&&(o="");var s=n.suffix;s===void 0&&(s="");var i=n.decimalScale,d=t.from,l=t.to,v=l.start,f=l.end,m=Oe(n),h=m.allowedDecimalSeparators,y=m.decimalSeparator,c=e[f]===y;if(ye(e)&&(e===o||e===s)&&t.lastValue==="")return e;if(f-v===1&&h.indexOf(e[v])!==-1){var p=i===0?"":y;e=e.substring(0,v)+p+e.substring(v+1,e.length)}var g=function(C,T,k){var B=!1,j=!1;o.startsWith("-")?B=!1:C.startsWith("--")?(B=!1,j=!0):s.startsWith("-")&&C.length===s.length?B=!1:C[0]==="-"&&(B=!0);var W=B?1:0;return j&&(W=2),W&&(C=C.substring(W),T-=W,k-=W),{value:C,start:T,end:k,hasNegation:B}},w=g(e,v,f),x=w.hasNegation;r=w,e=r.value,v=r.start,f=r.end;var R=g(t.lastValue,d.start,d.end),P=R.start,L=R.end,_=R.value,O=e.substring(v,f);e.length&&_.length&&(P>_.length-s.length||L<o.length)&&!(O&&s.startsWith(O))&&(e=_);var V=0;e.startsWith(o)?V+=o.length:v<o.length&&(V=v),e=e.substring(V),f-=V;var $=e.length,U=e.length-s.length;e.endsWith(s)?$=U:(f>U||f>e.length-s.length)&&($=f),e=e.substring(0,$),e=Gn(x?"-"+e:e,a),e=(e.match(Xn(y))||[]).join("");var z=e.indexOf(y);e=e.replace(new RegExp(_t(y),"g"),function(C,T){return T===z?".":""});var Q=Ye(e,a),ue=Q.beforeDecimal,ge=Q.afterDecimal,D=Q.addNegation;return l.end-l.start<d.end-d.start&&ue===""&&c&&!parseFloat(ge)&&(e=D?"-":""),e}function qn(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,n.length+(o?1:0));var s=e.length;return a.fill(!1,s-r.length+1,s+1),a}function Qn(e){var t=Oe(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
7
2
|
Decimal separator can't be same as thousand separator.
|
|
8
3
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
9
4
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
@@ -11,12 +6,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
11
6
|
Prefix can't start with '-' when allowNegative is true.
|
|
12
7
|
prefix: `+a+`
|
|
13
8
|
allowNegative: `+o+`
|
|
14
|
-
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function sr(e){e=ir(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=le);var o=e.onBlur;o===void 0&&(o=le);var s=e.thousandSeparator,i=e.decimalScale,m=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var v=e.defaultValue,d=e.value,g=e.valueIsNumericString,h=e.onValueChange,b=Tt(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),f=je(e),y=f.decimalSeparator,p=f.allowedDecimalSeparators,x=function(N){return vt(N,e)},R=function(N,C){return ar(N,C,e)},T=ye(d)?v:d,A=g??rr(T,l,t);ye(d)?ye(v)||(A=A||typeof v=="number"):A=A||typeof d=="number";var U=function(N){return Pt(N)?N:(typeof N=="number"&&(N=Mt(N)),A&&typeof i=="number"?ft(N,i,!!m):N)},O=jt(U(d),U(v),!!A,x,R,h),P=O[0],V=P.numAsString,K=P.formattedValue,Y=O[1],G=function(N){var C=N.target,M=N.key,$=C.selectionStart,z=C.selectionEnd,c=C.value;if(c===void 0&&(c=""),(M==="Backspace"||M==="Delete")&&z<l.length){N.preventDefault();return}if($!==z){a(N);return}M==="Backspace"&&c[0]==="-"&&$===l.length+1&&n&&de(C,1),i&&m&&(M==="Backspace"&&c[$-1]===y?(de(C,$-1),N.preventDefault()):M==="Delete"&&c[$]===y&&N.preventDefault()),p?.includes(M)&&c[$]===y&&de(C,$+1);var S=s===!0?",":s;M==="Backspace"&&c[$-1]===S&&de(C,$-1),M==="Delete"&&c[$]===S&&de(C,$+1),a(N)},X=function(N){var C=V;if(C.match(/\d/g)||(C=""),r||(C=zn(C)),m&&i&&(C=ft(C,i,m)),C!==V){var M=vt(C,e);Y({formattedValue:M,value:C,floatValue:parseFloat(C)},{event:N,source:_e.event})}o(N)},oe=function(N){return N===y?!0:Ce(N)},te=function(N){var C=N.currentValue,M=N.lastValue,$=N.formattedValue,z=N.currentValueIndex,c=N.formattedValueIndex,S=C[z],I=$[c],B=kt(M,C),Z=B.to,ie=function(W){return R(W).indexOf(".")+l.length};return d===0&&m&&i&&C[Z.start]===y&&ie(C)<z&&ie($)>c?!1:z>=Z.start&&z<Z.end&&p&&p.includes(S)&&I===y?!0:S===I};return Object.assign(Object.assign({},b),{value:K,valueIsNumericString:!1,isValidInputCharacter:oe,isCharacterSame:te,onValueChange:Y,format:x,removeFormatting:R,getCaretBoundary:function(N){return or(N,e)},onKeyDown:G,onBlur:X})}function ur(e){var t=sr(e);return j.createElement(er,Object.assign({},t))}const cr="_inputQuantity_a0ccy_1",lr="_input_a0ccy_1",mt={inputQuantity:cr,input:lr},fr=j.forwardRef(({id:e,field:t,unit:n,placeholder:r="Digite a quantidade"},a)=>{const[o,s]=j.useState(n);return j.useEffect(()=>{n!==o&&(s(n),t.onChange(""))},[n]),_.jsxs("div",{className:mt.inputQuantity,children:[_.jsx("span",{children:n}),_.jsx(ur,{id:e,className:mt.input,thousandSeparator:".",decimalSeparator:",",allowNegative:!1,decimalScale:n==="ton"?2:0,fixedDecimalScale:!0,onValueChange:i=>t.onChange(i.value),value:t.value,placeholder:r,getInputRef:a})]})});function gt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ft(...e){return t=>{let n=!1;const r=e.map(a=>{const o=gt(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():gt(e[a],null)}}}}function me(...e){return u.useCallback(Ft(...e),e)}function Lt(e){const t=dr(e),n=u.forwardRef((r,a)=>{const{children:o,...s}=r,i=u.Children.toArray(o),m=i.find(mr);if(m){const l=m.props.children,v=i.map(d=>d===m?u.Children.count(l)>1?u.Children.only(null):u.isValidElement(l)?l.props.children:null:d);return _.jsx(t,{...s,ref:a,children:u.isValidElement(l)?u.cloneElement(l,void 0,v):null})}return _.jsx(t,{...s,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function dr(e){const t=u.forwardRef((n,r)=>{const{children:a,...o}=n;if(u.isValidElement(a)){const s=hr(a),i=gr(o,a.props);return a.type!==u.Fragment&&(i.ref=r?Ft(r,s):s),u.cloneElement(a,i)}return u.Children.count(a)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vr=Symbol("radix.slottable");function mr(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vr}function gr(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...i)=>{const m=o(...i);return a(...i),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function hr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=pr.reduce((e,t)=>{const n=Lt(`Primitive.${t}`),r=u.forwardRef((a,o)=>{const{asChild:s,...i}=a,m=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(m,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yr(e,t){e&&_n.flushSync(()=>e.dispatchEvent(t))}function br(e,t){const n=u.createContext(t),r=o=>{const{children:s,...i}=o,m=u.useMemo(()=>i,Object.values(i));return _.jsx(n.Provider,{value:m,children:s})};r.displayName=e+"Provider";function a(o){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function Er(e,t=[]){let n=[];function r(o,s){const i=u.createContext(s),m=n.length;n=[...n,s];const l=d=>{const{scope:g,children:h,...b}=d,f=g?.[e]?.[m]||i,y=u.useMemo(()=>b,Object.values(b));return _.jsx(f.Provider,{value:y,children:h})};l.displayName=o+"Provider";function v(d,g){const h=g?.[e]?.[m]||i,b=u.useContext(h);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,v]}const a=()=>{const o=n.map(s=>u.createContext(s));return function(i){const m=i?.[e]||o;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:m}}),[i,m])}};return a.scopeName=e,[r,Sr(a,...t)]}function Sr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const s=r.reduce((i,{useScope:m,scopeName:l})=>{const d=m(o)[`__scope${l}`];return{...i,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}var xe=globalThis?.document?u.useLayoutEffect:()=>{},wr=u[" useInsertionEffect ".trim().toString()]||xe;function _r({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,s]=Cr({defaultProp:t,onChange:n}),i=e!==void 0,m=i?e:a;{const v=u.useRef(e!==void 0);u.useEffect(()=>{const d=v.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=i},[i,r])}const l=u.useCallback(v=>{if(i){const d=xr(v)?v(e):v;d!==e&&s.current?.(d)}else o(v)},[i,e,o,s]);return[m,l]}function Cr({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),a=u.useRef(n),o=u.useRef(t);return wr(()=>{o.current=t},[t]),u.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function xr(e){return typeof e=="function"}function Rr(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=Nr(t),a=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),o=me(r.ref,Or(a));return typeof n=="function"||r.isPresent?u.cloneElement(a,{ref:o}):null};Fe.displayName="Presence";function Nr(e){const[t,n]=u.useState(),r=u.useRef(null),a=u.useRef(e),o=u.useRef("none"),s=e?"mounted":"unmounted",[i,m]=Rr(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=Oe(r.current);o.current=i==="mounted"?l:"none"},[i]),xe(()=>{const l=r.current,v=a.current;if(v!==e){const g=o.current,h=Oe(l);e?m("MOUNT"):h==="none"||l?.display==="none"?m("UNMOUNT"):m(v&&g!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,m]),xe(()=>{if(t){let l;const v=t.ownerDocument.defaultView??window,d=h=>{const f=Oe(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&f&&(m("ANIMATION_END"),!a.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},g=h=>{h.target===t&&(o.current=Oe(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{v.clearTimeout(l),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Oe(e){return e?.animationName||"none"}function Or(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dr=u[" useId ".trim().toString()]||(()=>{}),Tr=0;function Ue(e){const[t,n]=u.useState(Dr());return xe(()=>{n(r=>r??String(Tr++))},[e]),e||(t?`radix-${t}`:"")}function Re(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function Pr(e,t=globalThis?.document){const n=Re(e);u.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ar="DismissableLayer",Qe="dismissableLayer.update",Ir="dismissableLayer.pointerDownOutside",Mr="dismissableLayer.focusOutside",ht,Vt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:i,...m}=e,l=u.useContext(Vt),[v,d]=u.useState(null),g=v?.ownerDocument??globalThis?.document,[,h]=u.useState({}),b=me(t,O=>d(O)),f=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),p=f.indexOf(y),x=v?f.indexOf(v):-1,R=l.layersWithOutsidePointerEventsDisabled.size>0,T=x>=p,A=Fr(O=>{const P=O.target,V=[...l.branches].some(K=>K.contains(P));!T||V||(a?.(O),s?.(O),O.defaultPrevented||i?.())},g),U=Lr(O=>{const P=O.target;[...l.branches].some(K=>K.contains(P))||(o?.(O),s?.(O),O.defaultPrevented||i?.())},g);return Pr(O=>{x===l.layers.size-1&&(r?.(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},g),u.useEffect(()=>{if(v)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ht=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(v)),l.layers.add(v),pt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ht)}},[v,g,n,l]),u.useEffect(()=>()=>{v&&(l.layers.delete(v),l.layersWithOutsidePointerEventsDisabled.delete(v),pt())},[v,l]),u.useEffect(()=>{const O=()=>h({});return document.addEventListener(Qe,O),()=>document.removeEventListener(Qe,O)},[]),_.jsx(ae.div,{...m,ref:b,style:{pointerEvents:R?T?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,U.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,A.onPointerDownCapture)})});Bt.displayName=Ar;var kr="DismissableLayerBranch",jr=u.forwardRef((e,t)=>{const n=u.useContext(Vt),r=u.useRef(null),a=me(t,r);return u.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),_.jsx(ae.div,{...e,ref:a})});jr.displayName=kr;function Fr(e,t=globalThis?.document){const n=Re(e),r=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const o=i=>{if(i.target&&!r.current){let m=function(){Wt(Ir,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=m,t.addEventListener("click",a.current,{once:!0})):m()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Lr(e,t=globalThis?.document){const n=Re(e),r=u.useRef(!1);return u.useEffect(()=>{const a=o=>{o.target&&!r.current&&Wt(Mr,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pt(){const e=new CustomEvent(Qe);document.dispatchEvent(e)}function Wt(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?yr(a,o):a.dispatchEvent(o)}var ze="focusScope.autoFocusOnMount",Ye="focusScope.autoFocusOnUnmount",yt={bubbles:!1,cancelable:!0},Vr="FocusScope",$t=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[i,m]=u.useState(null),l=Re(a),v=Re(o),d=u.useRef(null),g=me(t,f=>m(f)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let f=function(R){if(h.paused||!i)return;const T=R.target;i.contains(T)?d.current=T:ce(d.current,{select:!0})},y=function(R){if(h.paused||!i)return;const T=R.relatedTarget;T!==null&&(i.contains(T)||ce(d.current,{select:!0}))},p=function(R){if(document.activeElement===document.body)for(const A of R)A.removedNodes.length>0&&ce(i)};document.addEventListener("focusin",f),document.addEventListener("focusout",y);const x=new MutationObserver(p);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,h.paused]),u.useEffect(()=>{if(i){Et.add(h);const f=document.activeElement;if(!i.contains(f)){const p=new CustomEvent(ze,yt);i.addEventListener(ze,l),i.dispatchEvent(p),p.defaultPrevented||(Br(Yr(Ut(i)),{select:!0}),document.activeElement===f&&ce(i))}return()=>{i.removeEventListener(ze,l),setTimeout(()=>{const p=new CustomEvent(Ye,yt);i.addEventListener(Ye,v),i.dispatchEvent(p),p.defaultPrevented||ce(f??document.body,{select:!0}),i.removeEventListener(Ye,v),Et.remove(h)},0)}}},[i,l,v,h]);const b=u.useCallback(f=>{if(!n&&!r||h.paused)return;const y=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,p=document.activeElement;if(y&&p){const x=f.currentTarget,[R,T]=Wr(x);R&&T?!f.shiftKey&&p===T?(f.preventDefault(),n&&ce(R,{select:!0})):f.shiftKey&&p===R&&(f.preventDefault(),n&&ce(T,{select:!0})):p===x&&f.preventDefault()}},[n,r,h.paused]);return _.jsx(ae.div,{tabIndex:-1,...s,ref:g,onKeyDown:b})});$t.displayName=Vr;function Br(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ce(r,{select:t}),document.activeElement!==n)return}function Wr(e){const t=Ut(e),n=bt(t,e),r=bt(t.reverse(),e);return[n,r]}function Ut(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bt(e,t){for(const n of e)if(!$r(n,{upTo:t}))return n}function $r(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ur(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ur(e)&&t&&e.select()}}var Et=zr();function zr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=St(e,t),e.unshift(t)},remove(t){e=St(e,t),e[0]?.resume()}}}function St(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yr(e){return e.filter(t=>t.tagName!=="A")}var Kr="Portal",zt=u.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=u.useState(!1);xe(()=>o(!0),[]);const s=n||a&&globalThis?.document?.body;return s?Ot.createPortal(_.jsx(ae.div,{...r,ref:t}),s):null});zt.displayName=Kr;var Ke=0;function Gr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wt()),document.body.insertAdjacentElement("beforeend",e[1]??wt()),Ke++,()=>{Ke===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ke--}},[])}function wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J=function(){return J=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},J.apply(this,arguments)};function Yt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Hr(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Ie="right-scroll-bar-position",Me="width-before-scroll-bar",Xr="with-scroll-bars-hidden",qr="--removed-body-scroll-bar-size";function Ge(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zr(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Qr=typeof window<"u"?u.useLayoutEffect:u.useEffect,_t=new WeakMap;function Jr(e,t){var n=Zr(null,function(r){return e.forEach(function(a){return Ge(a,r)})});return Qr(function(){var r=_t.get(n);if(r){var a=new Set(r),o=new Set(e),s=n.current;a.forEach(function(i){o.has(i)||Ge(i,null)}),o.forEach(function(i){a.has(i)||Ge(i,s)})}_t.set(n,e)},[e]),n}function ea(e){return e}function ta(e,t){t===void 0&&(t=ea);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(o),s=n}var m=function(){var v=s;s=[],v.forEach(o)},l=function(){return Promise.resolve().then(m)};l(),n={push:function(v){s.push(v),l()},filter:function(v){return s=s.filter(v),n}}}};return a}function na(e){e===void 0&&(e={});var t=ta(null);return t.options=J({async:!0,ssr:!1},e),t}var Kt=function(e){var t=e.sideCar,n=Yt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,J({},n))};Kt.isSideCarExport=!0;function ra(e,t){return e.useMedium(t),Kt}var Gt=na(),He=function(){},Le=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:He,onWheelCapture:He,onTouchMoveCapture:He}),a=r[0],o=r[1],s=e.forwardProps,i=e.children,m=e.className,l=e.removeScrollBar,v=e.enabled,d=e.shards,g=e.sideCar,h=e.noRelative,b=e.noIsolation,f=e.inert,y=e.allowPinchZoom,p=e.as,x=p===void 0?"div":p,R=e.gapMode,T=Yt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=g,U=Jr([n,t]),O=J(J({},T),a);return u.createElement(u.Fragment,null,v&&u.createElement(A,{sideCar:Gt,removeScrollBar:l,shards:d,noRelative:h,noIsolation:b,inert:f,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:R}),s?u.cloneElement(u.Children.only(i),J(J({},O),{ref:U})):u.createElement(x,J({},O,{className:m,ref:U}),i))});Le.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Le.classNames={fullWidth:Me,zeroRight:Ie};var aa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function oa(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aa();return t&&e.setAttribute("nonce",t),e}function ia(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ua=function(){var e=0,t=null;return{add:function(n){e==0&&(t=oa())&&(ia(t,n),sa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ca=function(){var e=ua();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ht=function(){var e=ca(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},la={left:0,top:0,right:0,gap:0},Xe=function(e){return parseInt(e||"",10)||0},fa=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Xe(n),Xe(r),Xe(a)]},da=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return la;var t=fa(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},va=Ht(),be="data-scroll-locked",ma=function(e,t,n,r){var a=e.left,o=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
15
|
-
.`.concat(
|
|
9
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function Jn(e){e=Qn(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=ne);var o=e.onBlur;o===void 0&&(o=ne);var s=e.thousandSeparator,i=e.decimalScale,d=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var v=e.defaultValue,f=e.value,m=e.valueIsNumericString,h=e.onValueChange,y=xt(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),c=Oe(e),p=c.decimalSeparator,g=c.allowedDecimalSeparators,w=function(D){return st(D,e)},x=function(D,C){return Zn(D,C,e)},R=ve(f)?v:f,P=m??Yn(R,l,t);ve(f)?ve(v)||(P=P||typeof v=="number"):P=P||typeof f=="number";var L=function(D){return Nt(D)?D:(typeof D=="number"&&(D=Rt(D)),P&&typeof i=="number"?ot(D,i,!!d):D)},_=Pt(L(f),L(v),!!P,w,x,h),O=_[0],V=O.numAsString,$=O.formattedValue,U=_[1],z=function(D){var C=D.target,T=D.key,k=C.selectionStart,B=C.selectionEnd,j=C.value;if(j===void 0&&(j=""),(T==="Backspace"||T==="Delete")&&B<l.length){D.preventDefault();return}if(k!==B){a(D);return}T==="Backspace"&&j[0]==="-"&&k===l.length+1&&n&&ae(C,1),i&&d&&(T==="Backspace"&&j[k-1]===p?(ae(C,k-1),D.preventDefault()):T==="Delete"&&j[k]===p&&D.preventDefault()),g?.includes(T)&&j[k]===p&&ae(C,k+1);var W=s===!0?",":s;T==="Backspace"&&j[k-1]===W&&ae(C,k-1),T==="Delete"&&j[k]===W&&ae(C,k+1),a(D)},Q=function(D){var C=V;if(C.match(/\d/g)||(C=""),r||(C=jn(C)),d&&i&&(C=ot(C,i,d)),C!==V){var T=st(C,e);U({formattedValue:T,value:C,floatValue:parseFloat(C)},{event:D,source:pe.event})}o(D)},ue=function(D){return D===p?!0:ye(D)},ge=function(D){var C=D.currentValue,T=D.lastValue,k=D.formattedValue,B=D.currentValueIndex,j=D.formattedValueIndex,W=C[B],ce=k[j],Te=Ot(T,C),he=Te.to,be=function(Ie){return x(Ie).indexOf(".")+l.length};return f===0&&d&&i&&C[he.start]===p&&be(C)<B&&be(k)>j?!1:B>=he.start&&B<he.end&&g&&g.includes(W)&&ce===p?!0:W===ce};return Object.assign(Object.assign({},y),{value:$,valueIsNumericString:!1,isValidInputCharacter:ue,isCharacterSame:ge,onValueChange:U,format:w,removeFormatting:x,getCaretBoundary:function(D){return qn(D,e)},onKeyDown:z,onBlur:Q})}function er(e){var t=Jn(e);return F.createElement(Hn,Object.assign({},t))}const tr="_inputQuantity_a0ccy_1",nr="_input_a0ccy_1",ut={inputQuantity:tr,input:nr},rr=F.forwardRef(({id:e,field:t,unit:n,placeholder:r="Digite a quantidade"},a)=>{const[o,s]=F.useState(n);return F.useEffect(()=>{n!==o&&(s(n),t.onChange(""))},[n]),E.jsxs("div",{className:ut.inputQuantity,children:[E.jsx("span",{children:n}),E.jsx(er,{id:e,className:ut.input,thousandSeparator:".",decimalSeparator:",",allowNegative:!1,decimalScale:n==="ton"?2:0,fixedDecimalScale:!0,onValueChange:i=>t.onChange(i.value),value:t.value,placeholder:r,getInputRef:a})]})});function ct(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function At(...e){return t=>{let n=!1;const r=e.map(a=>{const o=ct(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():ct(e[a],null)}}}}function se(...e){return u.useCallback(At(...e),e)}var Ze=u.forwardRef((e,t)=>{const{children:n,...r}=e,a=u.Children.toArray(n),o=a.find(or);if(o){const s=o.props.children,i=a.map(d=>d===o?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:d);return E.jsx(He,{...r,ref:t,children:u.isValidElement(s)?u.cloneElement(s,void 0,i):null})}return E.jsx(He,{...r,ref:t,children:n})});Ze.displayName="Slot";var He=u.forwardRef((e,t)=>{const{children:n,...r}=e;if(u.isValidElement(n)){const a=sr(n),o=ir(r,n.props);return n.type!==u.Fragment&&(o.ref=t?At(t,a):a),u.cloneElement(n,o)}return u.Children.count(n)>1?u.Children.only(null):null});He.displayName="SlotClone";var ar=({children:e})=>E.jsx(E.Fragment,{children:e});function or(e){return u.isValidElement(e)&&e.type===ar}function ir(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...i)=>{o(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function sr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q=ur.reduce((e,t)=>{const n=u.forwardRef((r,a)=>{const{asChild:o,...s}=r,i=o?Ze:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(i,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cr(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function lr(e,t){const n=u.createContext(t),r=o=>{const{children:s,...i}=o,d=u.useMemo(()=>i,Object.values(i));return E.jsx(n.Provider,{value:d,children:s})};r.displayName=e+"Provider";function a(o){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function fr(e,t=[]){let n=[];function r(o,s){const i=u.createContext(s),d=n.length;n=[...n,s];const l=f=>{const{scope:m,children:h,...y}=f,c=m?.[e]?.[d]||i,p=u.useMemo(()=>y,Object.values(y));return E.jsx(c.Provider,{value:p,children:h})};l.displayName=o+"Provider";function v(f,m){const h=m?.[e]?.[d]||i,y=u.useContext(h);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,v]}const a=()=>{const o=n.map(s=>u.createContext(s));return function(i){const d=i?.[e]||o;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return a.scopeName=e,[r,dr(a,...t)]}function dr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const s=r.reduce((i,{useScope:d,scopeName:l})=>{const f=d(o)[`__scope${l}`];return{...i,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function oe(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function vr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=mr({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,i=oe(n),d=u.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&i(f)}else a(l)},[o,e,a,i]);return[s,d]}function mr({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,a=u.useRef(r),o=oe(t);return u.useEffect(()=>{a.current!==r&&(o(r),a.current=r)},[r,a,o]),n}var De=globalThis?.document?u.useLayoutEffect:()=>{};function gr(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Pe=e=>{const{present:t,children:n}=e,r=hr(t),a=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),o=se(r.ref,pr(a));return typeof n=="function"||r.isPresent?u.cloneElement(a,{ref:o}):null};Pe.displayName="Presence";function hr(e){const[t,n]=u.useState(),r=u.useRef({}),a=u.useRef(e),o=u.useRef("none"),s=e?"mounted":"unmounted",[i,d]=gr(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=Ee(r.current);o.current=i==="mounted"?l:"none"},[i]),De(()=>{const l=r.current,v=a.current;if(v!==e){const m=o.current,h=Ee(l);e?d("MOUNT"):h==="none"||l?.display==="none"?d("UNMOUNT"):d(v&&m!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),De(()=>{if(t){let l;const v=t.ownerDocument.defaultView??window,f=h=>{const c=Ee(r.current).includes(h.animationName);if(h.target===t&&c&&(d("ANIMATION_END"),!a.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",l=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},m=h=>{h.target===t&&(o.current=Ee(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{v.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Ee(e){return e?.animationName||"none"}function pr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yr=u.useId||(()=>{}),br=0;function Le(e){const[t,n]=u.useState(yr());return De(()=>{n(r=>r??String(br++))},[e]),e||(t?`radix-${t}`:"")}function Er(e,t=globalThis?.document){const n=oe(e);u.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Sr="DismissableLayer",Ge="dismissableLayer.update",wr="dismissableLayer.pointerDownOutside",Cr="dismissableLayer.focusOutside",lt,Tt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:i,...d}=e,l=u.useContext(Tt),[v,f]=u.useState(null),m=v?.ownerDocument??globalThis?.document,[,h]=u.useState({}),y=se(t,_=>f(_)),c=Array.from(l.layers),[p]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=c.indexOf(p),w=v?c.indexOf(v):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,R=w>=g,P=_r(_=>{const O=_.target,V=[...l.branches].some($=>$.contains(O));!R||V||(a?.(_),s?.(_),_.defaultPrevented||i?.())},m),L=Dr(_=>{const O=_.target;[...l.branches].some($=>$.contains(O))||(o?.(_),s?.(_),_.defaultPrevented||i?.())},m);return Er(_=>{w===l.layers.size-1&&(r?.(_),!_.defaultPrevented&&i&&(_.preventDefault(),i()))},m),u.useEffect(()=>{if(v)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(lt=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(v)),l.layers.add(v),ft(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=lt)}},[v,m,n,l]),u.useEffect(()=>()=>{v&&(l.layers.delete(v),l.layersWithOutsidePointerEventsDisabled.delete(v),ft())},[v,l]),u.useEffect(()=>{const _=()=>h({});return document.addEventListener(Ge,_),()=>document.removeEventListener(Ge,_)},[]),E.jsx(q.div,{...d,ref:y,style:{pointerEvents:x?R?"auto":"none":void 0,...e.style},onFocusCapture:re(e.onFocusCapture,L.onFocusCapture),onBlurCapture:re(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,P.onPointerDownCapture)})});It.displayName=Sr;var xr="DismissableLayerBranch",Nr=u.forwardRef((e,t)=>{const n=u.useContext(Tt),r=u.useRef(null),a=se(t,r);return u.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(q.div,{...e,ref:a})});Nr.displayName=xr;function _r(e,t=globalThis?.document){const n=oe(e),r=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const o=i=>{if(i.target&&!r.current){let d=function(){Mt(wr,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Dr(e,t=globalThis?.document){const n=oe(e),r=u.useRef(!1);return u.useEffect(()=>{const a=o=>{o.target&&!r.current&&Mt(Cr,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ft(){const e=new CustomEvent(Ge);document.dispatchEvent(e)}function Mt(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?cr(a,o):a.dispatchEvent(o)}var Ve="focusScope.autoFocusOnMount",ke="focusScope.autoFocusOnUnmount",dt={bubbles:!1,cancelable:!0},Rr="FocusScope",Ft=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[i,d]=u.useState(null),l=oe(a),v=oe(o),f=u.useRef(null),m=se(t,c=>d(c)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let c=function(x){if(h.paused||!i)return;const R=x.target;i.contains(R)?f.current=R:te(f.current,{select:!0})},p=function(x){if(h.paused||!i)return;const R=x.relatedTarget;R!==null&&(i.contains(R)||te(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&te(i)};document.addEventListener("focusin",c),document.addEventListener("focusout",p);const w=new MutationObserver(g);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",p),w.disconnect()}}},[r,i,h.paused]),u.useEffect(()=>{if(i){mt.add(h);const c=document.activeElement;if(!i.contains(c)){const g=new CustomEvent(Ve,dt);i.addEventListener(Ve,l),i.dispatchEvent(g),g.defaultPrevented||(Or(Mr(jt(i)),{select:!0}),document.activeElement===c&&te(i))}return()=>{i.removeEventListener(Ve,l),setTimeout(()=>{const g=new CustomEvent(ke,dt);i.addEventListener(ke,v),i.dispatchEvent(g),g.defaultPrevented||te(c??document.body,{select:!0}),i.removeEventListener(ke,v),mt.remove(h)},0)}}},[i,l,v,h]);const y=u.useCallback(c=>{if(!n&&!r||h.paused)return;const p=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,g=document.activeElement;if(p&&g){const w=c.currentTarget,[x,R]=Pr(w);x&&R?!c.shiftKey&&g===R?(c.preventDefault(),n&&te(x,{select:!0})):c.shiftKey&&g===x&&(c.preventDefault(),n&&te(R,{select:!0})):g===w&&c.preventDefault()}},[n,r,h.paused]);return E.jsx(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:y})});Ft.displayName=Rr;function Or(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(te(r,{select:t}),document.activeElement!==n)return}function Pr(e){const t=jt(e),n=vt(t,e),r=vt(t.reverse(),e);return[n,r]}function jt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vt(e,t){for(const n of e)if(!Ar(n,{upTo:t}))return n}function Ar(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tr(e){return e instanceof HTMLInputElement&&"select"in e}function te(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tr(e)&&t&&e.select()}}var mt=Ir();function Ir(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gt(e,t),e.unshift(t)},remove(t){e=gt(e,t),e[0]?.resume()}}}function gt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Mr(e){return e.filter(t=>t.tagName!=="A")}var Fr="Portal",Lt=u.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=u.useState(!1);De(()=>o(!0),[]);const s=n||a&&globalThis?.document?.body;return s?wt.createPortal(E.jsx(q.div,{...r,ref:t}),s):null});Lt.displayName=Fr;var Be=0;function jr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ht()),document.body.insertAdjacentElement("beforeend",e[1]??ht()),Be++,()=>{Be===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Be--}},[])}function ht(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G=function(){return G=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},G.apply(this,arguments)};function Vt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Lr(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Ne="right-scroll-bar-position",_e="width-before-scroll-bar",Vr="with-scroll-bars-hidden",kr="--removed-body-scroll-bar-size";function We(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Br(e,t){var n=F.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Wr=typeof window<"u"?u.useLayoutEffect:u.useEffect,pt=new WeakMap;function Ur(e,t){var n=Br(null,function(r){return e.forEach(function(a){return We(a,r)})});return Wr(function(){var r=pt.get(n);if(r){var a=new Set(r),o=new Set(e),s=n.current;a.forEach(function(i){o.has(i)||We(i,null)}),o.forEach(function(i){a.has(i)||We(i,s)})}pt.set(n,e)},[e]),n}function $r(e){return e}function Kr(e,t){t===void 0&&(t=$r);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(o),s=n}var d=function(){var v=s;s=[],v.forEach(o)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(v){s.push(v),l()},filter:function(v){return s=s.filter(v),n}}}};return a}function zr(e){e===void 0&&(e={});var t=Kr(null);return t.options=G({async:!0,ssr:!1},e),t}var kt=function(e){var t=e.sideCar,n=Vt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,G({},n))};kt.isSideCarExport=!0;function Hr(e,t){return e.useMedium(t),kt}var Bt=zr(),Ue=function(){},Ae=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Ue,onWheelCapture:Ue,onTouchMoveCapture:Ue}),a=r[0],o=r[1],s=e.forwardProps,i=e.children,d=e.className,l=e.removeScrollBar,v=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,y=e.noIsolation,c=e.inert,p=e.allowPinchZoom,g=e.as,w=g===void 0?"div":g,x=e.gapMode,R=Vt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=m,L=Ur([n,t]),_=G(G({},R),a);return u.createElement(u.Fragment,null,v&&u.createElement(P,{sideCar:Bt,removeScrollBar:l,shards:f,noRelative:h,noIsolation:y,inert:c,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:x}),s?u.cloneElement(u.Children.only(i),G(G({},_),{ref:L})):u.createElement(w,G({},_,{className:d,ref:L}),i))});Ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ae.classNames={fullWidth:_e,zeroRight:Ne};var Gr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gr();return t&&e.setAttribute("nonce",t),e}function Yr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xr())&&(Yr(t,n),Zr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qr=function(){var e=qr();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wt=function(){var e=Qr(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Jr={left:0,top:0,right:0,gap:0},$e=function(e){return parseInt(e||"",10)||0},ea=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[$e(n),$e(r),$e(a)]},ta=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jr;var t=ea(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},na=Wt(),me="data-scroll-locked",ra=function(e,t,n,r){var a=e.left,o=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
10
|
+
.`.concat(Vr,` {
|
|
16
11
|
overflow: hidden `).concat(r,`;
|
|
17
12
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
18
13
|
}
|
|
19
|
-
body[`).concat(
|
|
14
|
+
body[`).concat(me,`] {
|
|
20
15
|
overflow: hidden `).concat(r,`;
|
|
21
16
|
overscroll-behavior: contain;
|
|
22
17
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -29,30 +24,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
29
24
|
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
.`).concat(
|
|
27
|
+
.`).concat(Ne,` {
|
|
33
28
|
right: `).concat(i,"px ").concat(r,`;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
.`).concat(
|
|
31
|
+
.`).concat(_e,` {
|
|
37
32
|
margin-right: `).concat(i,"px ").concat(r,`;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
|
-
.`).concat(
|
|
35
|
+
.`).concat(Ne," .").concat(Ne,` {
|
|
41
36
|
right: 0 `).concat(r,`;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
.`).concat(
|
|
39
|
+
.`).concat(_e," .").concat(_e,` {
|
|
45
40
|
margin-right: 0 `).concat(r,`;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
|
-
body[`).concat(
|
|
49
|
-
`).concat(
|
|
43
|
+
body[`).concat(me,`] {
|
|
44
|
+
`).concat(kr,": ").concat(i,`px;
|
|
50
45
|
}
|
|
51
|
-
`)},
|
|
46
|
+
`)},yt=function(){var e=parseInt(document.body.getAttribute(me)||"0",10);return isFinite(e)?e:0},aa=function(){u.useEffect(function(){return document.body.setAttribute(me,(yt()+1).toString()),function(){var e=yt()-1;e<=0?document.body.removeAttribute(me):document.body.setAttribute(me,e.toString())}},[])},oa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;aa();var o=u.useMemo(function(){return ta(a)},[a]);return u.createElement(na,{styles:ra(o,!t,a,n?"":"!important")})},Xe=!1;if(typeof window<"u")try{var Se=Object.defineProperty({},"passive",{get:function(){return Xe=!0,!0}});window.addEventListener("test",Se,Se),window.removeEventListener("test",Se,Se)}catch{Xe=!1}var le=Xe?{passive:!1}:!1,ia=function(e){return e.tagName==="TEXTAREA"},Ut=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ia(e)&&n[t]==="visible")},sa=function(e){return Ut(e,"overflowY")},ua=function(e){return Ut(e,"overflowX")},bt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=$t(e,r);if(a){var o=Kt(e,r),s=o[1],i=o[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ca=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},la=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$t=function(e,t){return e==="v"?sa(t):ua(t)},Kt=function(e,t){return e==="v"?ca(t):la(t)},fa=function(e,t){return e==="h"&&t==="rtl"?-1:1},da=function(e,t,n,r,a){var o=fa(e,window.getComputedStyle(t).direction),s=o*r,i=n.target,d=t.contains(i),l=!1,v=s>0,f=0,m=0;do{if(!i)break;var h=Kt(e,i),y=h[0],c=h[1],p=h[2],g=c-p-o*y;(y||g)&&$t(e,i)&&(f+=g,m+=y);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(v&&Math.abs(f)<1||!v&&Math.abs(m)<1)&&(l=!0),l},we=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Et=function(e){return[e.deltaX,e.deltaY]},St=function(e){return e&&"current"in e?e.current:e},va=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ma=function(e){return`
|
|
52
47
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
53
48
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
54
|
-
`)},
|
|
49
|
+
`)},ga=0,fe=[];function ha(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),a=u.useState(ga++)[0],o=u.useState(Wt)[0],s=u.useRef(e);u.useEffect(function(){s.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var c=Lr([e.lockRef.current],(e.shards||[]).map(St),!0).filter(Boolean);return c.forEach(function(p){return p.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),c.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(c,p){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!s.current.allowPinchZoom;var g=we(c),w=n.current,x="deltaX"in c?c.deltaX:w[0]-g[0],R="deltaY"in c?c.deltaY:w[1]-g[1],P,L=c.target,_=Math.abs(x)>Math.abs(R)?"h":"v";if("touches"in c&&_==="h"&&L.type==="range")return!1;var O=window.getSelection(),V=O&&O.anchorNode,$=V?V===L||V.contains(L):!1;if($)return!1;var U=bt(_,L);if(!U)return!0;if(U?P=_:(P=_==="v"?"h":"v",U=bt(_,L)),!U)return!1;if(!r.current&&"changedTouches"in c&&(x||R)&&(r.current=P),!P)return!0;var z=r.current||P;return da(z,p,c,z==="h"?x:R)},[]),d=u.useCallback(function(c){var p=c;if(!(!fe.length||fe[fe.length-1]!==o)){var g="deltaY"in p?Et(p):we(p),w=t.current.filter(function(P){return P.name===p.type&&(P.target===p.target||p.target===P.shadowParent)&&va(P.delta,g)})[0];if(w&&w.should){p.cancelable&&p.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(St).filter(Boolean).filter(function(P){return P.contains(p.target)}),R=x.length>0?i(p,x[0]):!s.current.noIsolation;R&&p.cancelable&&p.preventDefault()}}},[]),l=u.useCallback(function(c,p,g,w){var x={name:c,delta:p,target:g,should:w,shadowParent:pa(g)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(R){return R!==x})},1)},[]),v=u.useCallback(function(c){n.current=we(c),r.current=void 0},[]),f=u.useCallback(function(c){l(c.type,Et(c),c.target,i(c,e.lockRef.current))},[]),m=u.useCallback(function(c){l(c.type,we(c),c.target,i(c,e.lockRef.current))},[]);u.useEffect(function(){return fe.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",d,le),document.addEventListener("touchmove",d,le),document.addEventListener("touchstart",v,le),function(){fe=fe.filter(function(c){return c!==o}),document.removeEventListener("wheel",d,le),document.removeEventListener("touchmove",d,le),document.removeEventListener("touchstart",v,le)}},[]);var h=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(o,{styles:ma(a)}):null,h?u.createElement(oa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ya=Hr(Bt,ha);var zt=u.forwardRef(function(e,t){return u.createElement(Ae,G({},e,{ref:t,sideCar:ya}))});zt.classNames=Ae.classNames;var ba=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},de=new WeakMap,Ce=new WeakMap,xe={},Ke=0,Ht=function(e){return e&&(e.host||Ht(e.parentNode))},Ea=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ht(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Sa=function(e,t,n,r){var a=Ea(t,Array.isArray(e)?e:[e]);xe[n]||(xe[n]=new WeakMap);var o=xe[n],s=[],i=new Set,d=new Set(a),l=function(f){!f||i.has(f)||(i.add(f),l(f.parentNode))};a.forEach(l);var v=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(m){if(i.has(m))v(m);else try{var h=m.getAttribute(r),y=h!==null&&h!=="false",c=(de.get(m)||0)+1,p=(o.get(m)||0)+1;de.set(m,c),o.set(m,p),s.push(m),c===1&&y&&Ce.set(m,!0),p===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return v(t),i.clear(),Ke++,function(){s.forEach(function(f){var m=de.get(f)-1,h=o.get(f)-1;de.set(f,m),o.set(f,h),m||(Ce.has(f)||f.removeAttribute(r),Ce.delete(f)),h||f.removeAttribute(n)}),Ke--,Ke||(de=new WeakMap,de=new WeakMap,Ce=new WeakMap,xe={})}},wa=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=ba(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Sa(r,a,n,"aria-hidden")):function(){return null}},qe="Dialog",[Gt]=fr(qe),[Ca,H]=Gt(qe),Xt=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,i=u.useRef(null),d=u.useRef(null),[l=!1,v]=vr({prop:r,defaultProp:a,onChange:o});return E.jsx(Ca,{scope:t,triggerRef:i,contentRef:d,contentId:Le(),titleId:Le(),descriptionId:Le(),open:l,onOpenChange:v,onOpenToggle:u.useCallback(()=>v(f=>!f),[v]),modal:s,children:n})};Xt.displayName=qe;var Yt="DialogTrigger",Zt=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=H(Yt,n),o=se(t,a.triggerRef);return E.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":et(a.open),...r,ref:o,onClick:re(e.onClick,a.onOpenToggle)})});Zt.displayName=Yt;var Qe="DialogPortal",[xa,qt]=Gt(Qe,{forceMount:void 0}),Qt=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=H(Qe,t);return E.jsx(xa,{scope:t,forceMount:n,children:u.Children.map(r,s=>E.jsx(Pe,{present:n||o.open,children:E.jsx(Lt,{asChild:!0,container:a,children:s})}))})};Qt.displayName=Qe;var Re="DialogOverlay",Jt=u.forwardRef((e,t)=>{const n=qt(Re,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=H(Re,e.__scopeDialog);return o.modal?E.jsx(Pe,{present:r||o.open,children:E.jsx(Na,{...a,ref:t})}):null});Jt.displayName=Re;var Na=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=H(Re,n);return E.jsx(zt,{as:Ze,allowPinchZoom:!0,shards:[a.contentRef],children:E.jsx(q.div,{"data-state":et(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ie="DialogContent",en=u.forwardRef((e,t)=>{const n=qt(ie,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=H(ie,e.__scopeDialog);return E.jsx(Pe,{present:r||o.open,children:o.modal?E.jsx(_a,{...a,ref:t}):E.jsx(Da,{...a,ref:t})})});en.displayName=ie;var _a=u.forwardRef((e,t)=>{const n=H(ie,e.__scopeDialog),r=u.useRef(null),a=se(t,n.contentRef,r);return u.useEffect(()=>{const o=r.current;if(o)return wa(o)},[]),E.jsx(tn,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&o.preventDefault()}),onFocusOutside:re(e.onFocusOutside,o=>o.preventDefault())})}),Da=u.forwardRef((e,t)=>{const n=H(ie,e.__scopeDialog),r=u.useRef(!1),a=u.useRef(!1);return E.jsx(tn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),tn=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,i=H(ie,n),d=u.useRef(null),l=se(t,d);return jr(),E.jsxs(E.Fragment,{children:[E.jsx(Ft,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:E.jsx(It,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":et(i.open),...s,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(Ra,{titleId:i.titleId}),E.jsx(Pa,{contentRef:d,descriptionId:i.descriptionId})]})]})}),Je="DialogTitle",nn=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=H(Je,n);return E.jsx(q.h2,{id:a.titleId,...r,ref:t})});nn.displayName=Je;var rn="DialogDescription",an=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=H(rn,n);return E.jsx(q.p,{id:a.descriptionId,...r,ref:t})});an.displayName=rn;var on="DialogClose",sn=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=H(on,n);return E.jsx(q.button,{type:"button",...r,ref:t,onClick:re(e.onClick,()=>a.onOpenChange(!1))})});sn.displayName=on;function et(e){return e?"open":"closed"}var un="DialogTitleWarning",[mo,cn]=lr(un,{contentName:ie,titleName:Je,docsSlug:"dialog"}),Ra=({titleId:e})=>{const t=cn(un),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
55
50
|
|
|
56
51
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
57
52
|
|
|
58
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
53
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oa="DialogDescriptionWarning",Pa=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cn(Oa).contentName}}.`;return u.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Aa=Xt,Ta=Zt,Ia=Qt,Ma=Jt,Fa=en,ja=nn,La=an,ln=sn;const Va="_overlay_exzuw_1",ka="_content_exzuw_17",Ba="_header_exzuw_57",Wa="_title_exzuw_71",Ua="_description_exzuw_87",$a="_body_exzuw_101",Ka="_footer_exzuw_119",za="_closeButton_exzuw_133",Ha="_iconButton_exzuw_135",Z={overlay:Va,content:ka,header:Ba,title:Wa,description:Ua,body:$a,footer:Ka,closeButton:za,iconButton:Ha};function Ga(e){return E.jsx(Aa,{...e})}function Xa({className:e,children:t,...n}){return E.jsx(Ta,{className:e,...n,children:t})}function Ya({children:e,className:t,showCloseButton:n=!0,...r}){return E.jsxs(Ia,{children:[E.jsx(Ma,{className:Z.overlay}),E.jsxs(Fa,{className:X(Z.content,t),...r,children:[e,n?E.jsx(ln,{className:Z.iconButton,"aria-label":"Fechar modal",children:"X"}):null]})]})}function Za({className:e,children:t,...n}){return E.jsx("div",{className:X(Z.header,e),...n,children:t})}function qa({className:e,children:t,...n}){return E.jsx("div",{className:X(Z.body,e),...n,children:t})}function Qa({className:e,children:t,...n}){return E.jsx("div",{className:X(Z.footer,e),...n,children:t})}function Ja({className:e,children:t,...n}){return E.jsx(ja,{className:X(Z.title,e),...n,children:t})}function eo({className:e,children:t,...n}){return E.jsx(La,{className:X(Z.description,e),...n,children:t})}function to({className:e,children:t="Fechar",...n}){return E.jsx(ln,{className:X(Z.closeButton,e),...n,children:t})}const no="_totalizador_569gu_1",ro="_selected_569gu_67",ao="_success_569gu_83",oo="_warning_569gu_101",io="_danger_569gu_119",so="_info_569gu_137",uo="_details_569gu_155",co="_loading_569gu_173",lo="_skeleton_569gu_183",fo="_minWidth_569gu_195",ze={totalizador:no,selected:ro,success:ao,warning:oo,danger:io,info:so,details:uo,loading:co,skeleton:lo,minWidth:fo};function vo({className:e,title:t,subtitle:n,description:r,variant:a="success",selected:o=!1,loading:s=!1,onClick:i}){return E.jsxs("div",{onClick:i,className:X(ze.totalizador,ze[a],e),title:r,children:[E.jsx("span",{children:t}),s&&E.jsx("div",{children:"Carregando..."}),!s&&E.jsx("strong",{className:o?ze.selected:"",children:n})]})}exports.Badge=_n;exports.Button=Pn;exports.InputQuantity=rr;exports.Modal=Ga;exports.ModalBody=qa;exports.ModalClose=to;exports.ModalContent=Ya;exports.ModalDescription=eo;exports.ModalFooter=Qa;exports.ModalHeader=Za;exports.ModalTitle=Ja;exports.ModalTrigger=Xa;exports.Totalizador=vo;
|