????

Your IP : 3.17.156.114


Current Path : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/
Upload File :
Current File : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/ButtonBase-9568d0b0.js

import{r as n,y as fe,F as ae}from"./index-727ccf4d.js";import{a as pe,c as Pe}from"./useTheme-41684c89.js";import{c as j,w as de}from"./capitalize-f7a57a5c.js";import{a as A,u as ne}from"./DialogCustomize-4c6977d9.js";import{T as Ie}from"./TransitionGroup-273fc20b.js";var q=!0,ie=!1,ce=null,Ke={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ue(r){var e=r.type,u=r.tagName;return!!(u==="INPUT"&&Ke[e]&&!r.readOnly||u==="TEXTAREA"&&!r.readOnly||r.isContentEditable)}function Xe(r){r.metaKey||r.altKey||r.ctrlKey||(q=!0)}function re(){q=!1}function ze(){this.visibilityState==="hidden"&&ie&&(q=!0)}function Ye(r){r.addEventListener("keydown",Xe,!0),r.addEventListener("mousedown",re,!0),r.addEventListener("pointerdown",re,!0),r.addEventListener("touchstart",re,!0),r.addEventListener("visibilitychange",ze,!0)}function Ae(r){var e=r.target;try{return e.matches(":focus-visible")}catch{}return q||Ue(e)}function Oe(){ie=!0,window.clearTimeout(ce),ce=window.setTimeout(function(){ie=!1},100)}function He(){var r=n.useCallback(function(e){var u=fe.findDOMNode(e);u!=null&&Ye(u.ownerDocument)},[]);return{isFocusVisible:Ae,onBlurVisible:Oe,ref:r}}var We=typeof window>"u"?n.useEffect:n.useLayoutEffect;function je(r){var e=r.classes,u=r.pulsate,S=u===void 0?!1:u,B=r.rippleX,b=r.rippleY,y=r.rippleSize,_=r.in,p=r.onExited,L=p===void 0?function(){}:p,g=r.timeout,d=n.useState(!1),c=d[0],s=d[1],h=j(e.ripple,e.rippleVisible,S&&e.ripplePulsate),i={width:y,height:y,top:-(y/2)+b,left:-(y/2)+B},V=j(e.child,c&&e.childLeaving,S&&e.childPulsate),R=A(L);return We(function(){if(!_){s(!0);var m=setTimeout(R,g);return function(){clearTimeout(m)}}},[R,_,g]),n.createElement("span",{className:h,style:i},n.createElement("span",{className:V}))}var oe=550,qe=80,Ge=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(oe,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(oe,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},Je=n.forwardRef(function(e,u){var S=e.center,B=S===void 0?!1:S,b=e.classes,y=e.className,_=pe(e,["center","classes","className"]),p=n.useState([]),L=p[0],g=p[1],d=n.useRef(0),c=n.useRef(null);n.useEffect(function(){c.current&&(c.current(),c.current=null)},[L]);var s=n.useRef(!1),h=n.useRef(null),i=n.useRef(null),V=n.useRef(null);n.useEffect(function(){return function(){clearTimeout(h.current)}},[]);var R=n.useCallback(function(a){var o=a.pulsate,l=a.rippleX,N=a.rippleY,x=a.rippleSize,$=a.cb;g(function(F){return[].concat(Pe(F),[n.createElement(je,{key:d.current,classes:b,timeout:oe,pulsate:o,rippleX:l,rippleY:N,rippleSize:x})])}),d.current+=1,c.current=$},[b]),m=n.useCallback(function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0,N=o.pulsate,x=N===void 0?!1:N,$=o.center,F=$===void 0?B||o.pulsate:$,I=o.fakeElement,G=I===void 0?!1:I;if(a.type==="mousedown"&&s.current){s.current=!1;return}a.type==="touchstart"&&(s.current=!0);var T=G?null:V.current,E=T?T.getBoundingClientRect():{width:0,height:0,left:0,top:0},w,M,v;if(F||a.clientX===0&&a.clientY===0||!a.clientX&&!a.touches)w=Math.round(E.width/2),M=Math.round(E.height/2);else{var O=a.touches?a.touches[0]:a,J=O.clientX,H=O.clientY;w=Math.round(J-E.left),M=Math.round(H-E.top)}if(F)v=Math.sqrt((2*Math.pow(E.width,2)+Math.pow(E.height,2))/3),v%2===0&&(v+=1);else{var Q=Math.max(Math.abs((T?T.clientWidth:0)-w),w)*2+2,K=Math.max(Math.abs((T?T.clientHeight:0)-M),M)*2+2;v=Math.sqrt(Math.pow(Q,2)+Math.pow(K,2))}a.touches?i.current===null&&(i.current=function(){R({pulsate:x,rippleX:w,rippleY:M,rippleSize:v,cb:l})},h.current=setTimeout(function(){i.current&&(i.current(),i.current=null)},qe)):R({pulsate:x,rippleX:w,rippleY:M,rippleSize:v,cb:l})},[B,R]),C=n.useCallback(function(){m({},{pulsate:!0})},[m]),P=n.useCallback(function(a,o){if(clearTimeout(h.current),a.type==="touchend"&&i.current){a.persist(),i.current(),i.current=null,h.current=setTimeout(function(){P(a,o)});return}i.current=null,g(function(l){return l.length>0?l.slice(1):l}),c.current=o},[]);return n.useImperativeHandle(u,function(){return{pulsate:C,start:m,stop:P}},[C,m,P]),n.createElement("span",ae({className:j(b.root,y),ref:V},_),n.createElement(Ie,{component:null,exit:!0},L))});const Qe=de(Ge,{flip:!1,name:"MuiTouchRipple"})(n.memo(Je));var Ze={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},et=n.forwardRef(function(e,u){var S=e.action,B=e.buttonRef,b=e.centerRipple,y=b===void 0?!1:b,_=e.children,p=e.classes,L=e.className,g=e.component,d=g===void 0?"button":g,c=e.disabled,s=c===void 0?!1:c,h=e.disableRipple,i=h===void 0?!1:h,V=e.disableTouchRipple,R=V===void 0?!1:V,m=e.focusRipple,C=m===void 0?!1:m,P=e.focusVisibleClassName,a=e.onBlur,o=e.onClick,l=e.onFocus,N=e.onFocusVisible,x=e.onKeyDown,$=e.onKeyUp,F=e.onMouseDown,I=e.onMouseLeave,G=e.onMouseUp,T=e.onTouchEnd,E=e.onTouchMove,w=e.onTouchStart,M=e.onDragLeave,v=e.tabIndex,O=v===void 0?0:v,J=e.TouchRippleProps,H=e.type,Q=H===void 0?"button":H,K=pe(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),U=n.useRef(null);function he(){return fe.findDOMNode(U.current)}var f=n.useRef(null),ue=n.useState(!1),k=ue[0],W=ue[1];s&&k&&W(!1);var Z=He(),me=Z.isFocusVisible,ve=Z.onBlurVisible,be=Z.ref;n.useImperativeHandle(S,function(){return{focusVisible:function(){W(!0),U.current.focus()}}},[]),n.useEffect(function(){k&&C&&!i&&f.current.pulsate()},[i,C,k]);function D(t,Y){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R;return A(function(le){Y&&Y(le);var Fe=Le;return!Fe&&f.current&&f.current[t](le),!0})}var ye=D("start",F),ge=D("stop",M),Re=D("stop",G),Te=D("stop",function(t){k&&t.preventDefault(),I&&I(t)}),Ee=D("start",w),we=D("stop",T),Me=D("stop",E),ke=D("stop",function(t){k&&(ve(t),W(!1)),a&&a(t)},!1),De=A(function(t){U.current||(U.current=t.currentTarget),me(t)&&(W(!0),N&&N(t)),l&&l(t)}),ee=function(){var Y=he();return d&&d!=="button"&&!(Y.tagName==="A"&&Y.href)},te=n.useRef(!1),Se=A(function(t){C&&!te.current&&k&&f.current&&t.key===" "&&(te.current=!0,t.persist(),f.current.stop(t,function(){f.current.start(t)})),t.target===t.currentTarget&&ee()&&t.key===" "&&t.preventDefault(),x&&x(t),t.target===t.currentTarget&&ee()&&t.key==="Enter"&&!s&&(t.preventDefault(),o&&o(t))}),Ve=A(function(t){C&&t.key===" "&&f.current&&k&&!t.defaultPrevented&&(te.current=!1,t.persist(),f.current.stop(t,function(){f.current.pulsate(t)})),$&&$(t),o&&t.target===t.currentTarget&&ee()&&t.key===" "&&!t.defaultPrevented&&o(t)}),X=d;X==="button"&&K.href&&(X="a");var z={};X==="button"?(z.type=Q,z.disabled=s):((X!=="a"||!K.href)&&(z.role="button"),z["aria-disabled"]=s);var Ce=ne(B,u),Ne=ne(be,U),xe=ne(Ce,Ne),se=n.useState(!1),$e=se[0],Be=se[1];n.useEffect(function(){Be(!0)},[]);var _e=$e&&!i&&!s;return n.createElement(X,ae({className:j(p.root,L,k&&[p.focusVisible,P],s&&p.disabled),onBlur:ke,onClick:o,onFocus:De,onKeyDown:Se,onKeyUp:Ve,onMouseDown:ye,onMouseLeave:Te,onMouseUp:Re,onDragLeave:ge,onTouchEnd:we,onTouchMove:Me,onTouchStart:Ee,ref:xe,tabIndex:s?-1:O},z,K),_,_e?n.createElement(Qe,ae({ref:f,center:y},J)):null)});const ot=de(Ze,{name:"MuiButtonBase"})(et);export{ot as B,He as u};