????
Current Path : C:/inetpub/vhost/yte.nextform.vn/wwwroot/assets/ |
Current File : C:/inetpub/vhost/yte.nextform.vn/wwwroot/assets/dialog.esm-2rsu1g73.js |
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import{b as reactExports,d2 as ObjectUtils,d3 as PrimeReactContext,d1 as UniqueComponentId,d6 as classNames,d5 as PrimeReact,d0 as DomHandler,d9 as ZIndexUtils,Y as React__default,db as localeOption,da as IconUtils}from"./index-D7FR_S6u.js";import{a3 as IconBase,M as ComponentBase,O as useMergeProps,a4 as useDisplayOrder,P as useHandleStyle,a5 as useGlobalOnEscapeKey,Q as useEventListener,R as useMountEffect,T as useUpdateEffect,X as useUnmountEffect,a6 as CSSTransition,a7 as Portal,a8 as ESC_KEY_HANDLING_PRIORITIES,a9 as useStyle,aa as TimesIcon,a2 as Ripple}from"./SelectCreatable-CfhNhJjR.js";function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$2.apply(this,arguments)}__name(_extends$2,"_extends$2");var WindowMaximizeIcon=reactExports.memo(reactExports.forwardRef(function(inProps,ref){var pti=IconBase.getPTI(inProps);return reactExports.createElement("svg",_extends$2({ref,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pti),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"}))}));WindowMaximizeIcon.displayName="WindowMaximizeIcon";function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$1.apply(this,arguments)}__name(_extends$1,"_extends$1");var WindowMinimizeIcon=reactExports.memo(reactExports.forwardRef(function(inProps,ref){var pti=IconBase.getPTI(inProps);return reactExports.createElement("svg",_extends$1({ref,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pti),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"}))}));WindowMinimizeIcon.displayName="WindowMinimizeIcon";function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}__name(_extends,"_extends");function _typeof(o){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o2){return typeof o2}:function(o2){return o2&&typeof Symbol=="function"&&o2.constructor===Symbol&&o2!==Symbol.prototype?"symbol":typeof o2},_typeof(o)}__name(_typeof,"_typeof");function _arrayLikeToArray(arr,len){(len==null||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}__name(_arrayLikeToArray,"_arrayLikeToArray");function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}__name(_arrayWithoutHoles,"_arrayWithoutHoles");function _iterableToArray(iter){if(typeof Symbol<"u"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}__name(_iterableToArray,"_iterableToArray");function _unsupportedIterableToArray(o,minLen){if(o){if(typeof o=="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor&&(n=o.constructor.name),n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}}__name(_unsupportedIterableToArray,"_unsupportedIterableToArray");function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}__name(_nonIterableSpread,"_nonIterableSpread");function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}__name(_toConsumableArray,"_toConsumableArray");function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}__name(_toPrimitive,"_toPrimitive");function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key)}__name(_toPropertyKey,"_toPropertyKey");function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__name(_defineProperty,"_defineProperty");function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}__name(_arrayWithHoles,"_arrayWithHoles");function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l!==0)for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r2){o=!0,n=r2}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}__name(_iterableToArrayLimit,"_iterableToArrayLimit");function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}__name(_nonIterableRest,"_nonIterableRest");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}__name(_slicedToArray,"_slicedToArray");var styles$1="",FocusTrapBase=ComponentBase.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:styles$1},getProps:__name(function(props){return ObjectUtils.getMergedProps(props,FocusTrapBase.defaultProps)},"getProps"),getOtherProps:__name(function(props){return ObjectUtils.getDiffProps(props,FocusTrapBase.defaultProps)},"getOtherProps")});function ownKeys$2(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}__name(ownKeys$2,"ownKeys$2");function _objectSpread$2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys$2(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$2(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}__name(_objectSpread$2,"_objectSpread$2");var FocusTrap=React__default.memo(React__default.forwardRef(function(inProps,ref){var targetRef=React__default.useRef(null),firstFocusableElementRef=React__default.useRef(null),lastFocusableElementRef=React__default.useRef(null),context=React__default.useContext(PrimeReactContext),props=FocusTrapBase.getProps(inProps,context),metaData={props};useStyle(FocusTrapBase.css.styles,{name:"focustrap"});var _FocusTrapBase$setMet=FocusTrapBase.setMetaData(_objectSpread$2({},metaData));_FocusTrapBase$setMet.ptm,React__default.useImperativeHandle(ref,function(){return{props,getInk:__name(function(){return firstFocusableElementRef.current},"getInk"),getTarget:__name(function(){return targetRef.current},"getTarget")}}),useMountEffect(function(){props.disabled||(targetRef.current=getTarget(),setAutoFocus(targetRef.current))});var getTarget=__name(function(){return firstFocusableElementRef.current&&firstFocusableElementRef.current.parentElement},"getTarget"),setAutoFocus=__name(function(target){var _ref=props||{},_ref$autoFocusSelecto=_ref.autoFocusSelector,autoFocusSelector=_ref$autoFocusSelecto===void 0?"":_ref$autoFocusSelecto,_ref$firstFocusableSe=_ref.firstFocusableSelector,firstFocusableSelector=_ref$firstFocusableSe===void 0?"":_ref$firstFocusableSe,_ref$autoFocus=_ref.autoFocus,autoFocus=_ref$autoFocus===void 0?!1:_ref$autoFocus,defaultAutoFocusSelector="".concat(getComputedSelector(autoFocusSelector)),computedAutoFocusSelector="[autofocus]".concat(defaultAutoFocusSelector,", [data-pc-autofocus='true']").concat(defaultAutoFocusSelector),focusableElement=DomHandler.getFirstFocusableElement(target,computedAutoFocusSelector);autoFocus&&!focusableElement&&(focusableElement=DomHandler.getFirstFocusableElement(target,getComputedSelector(firstFocusableSelector))),DomHandler.focus(focusableElement)},"setAutoFocus"),getComputedSelector=__name(function(selector){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(selector??"")},"getComputedSelector"),onFirstHiddenElementFocus=__name(function(event){var _targetRef$current,currentTarget=event.currentTarget,relatedTarget=event.relatedTarget,focusableElement=relatedTarget===currentTarget.$_pfocustrap_lasthiddenfocusableelement||!((_targetRef$current=targetRef.current)!==null&&_targetRef$current!==void 0&&_targetRef$current.contains(relatedTarget))?DomHandler.getFirstFocusableElement(currentTarget.parentElement,getComputedSelector(currentTarget.$_pfocustrap_focusableselector)):currentTarget.$_pfocustrap_lasthiddenfocusableelement;DomHandler.focus(focusableElement)},"onFirstHiddenElementFocus"),onLastHiddenElementFocus=__name(function(event){var _targetRef$current2,currentTarget=event.currentTarget,relatedTarget=event.relatedTarget,focusableElement=relatedTarget===currentTarget.$_pfocustrap_firsthiddenfocusableelement||!((_targetRef$current2=targetRef.current)!==null&&_targetRef$current2!==void 0&&_targetRef$current2.contains(relatedTarget))?DomHandler.getLastFocusableElement(currentTarget.parentElement,getComputedSelector(currentTarget.$_pfocustrap_focusableselector)):currentTarget.$_pfocustrap_firsthiddenfocusableelement;DomHandler.focus(focusableElement)},"onLastHiddenElementFocus"),createHiddenFocusableElements=__name(function(){var _ref2=props||{},_ref2$tabIndex=_ref2.tabIndex,tabIndex=_ref2$tabIndex===void 0?0:_ref2$tabIndex,createFocusableElement=__name(function(onFocus,section){return React__default.createElement("span",{ref:section==="firstfocusableelement"?firstFocusableElementRef:lastFocusableElementRef,className:"p-hidden-accessible p-hidden-focusable",tabIndex,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus,"data-pc-section":section})},"createFocusableElement"),firstFocusableElement=createFocusableElement(onFirstHiddenElementFocus,"firstfocusableelement"),lastFocusableElement=createFocusableElement(onLastHiddenElementFocus,"lastfocusableelement");return firstFocusableElement.ref.current&&lastFocusableElement.ref.current&&(firstFocusableElement.ref.current.$_pfocustrap_lasthiddenfocusableelement=lastFocusableElement.ref.current,lastFocusableElement.ref.current.$_pfocustrap_firsthiddenfocusableelement=firstFocusableElement.ref.current),React__default.createElement(React__default.Fragment,null,firstFocusableElement,props.children,lastFocusableElement)},"createHiddenFocusableElements");return createHiddenFocusableElements()})),FocusTrap$1=FocusTrap;function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}__name(ownKeys$1,"ownKeys$1");function _objectSpread$1(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys$1(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$1(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}__name(_objectSpread$1,"_objectSpread$1");var classes={closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:__name(function(_ref){var props=_ref.props;return classNames("p-dialog-header",props.headerClassName)},"header"),headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:__name(function(_ref2){var props=_ref2.props;return classNames("p-dialog-content",props.contentClassName)},"content"),footer:__name(function(_ref3){var props=_ref3.props;return classNames("p-dialog-footer",props.footerClassName)},"footer"),mask:__name(function(_ref4){var props=_ref4.props,maskVisibleState=_ref4.maskVisibleState,positions=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"],pos=positions.find(function(item){return item===props.position||item.replace("-","")===props.position});return classNames("p-dialog-mask",pos?"p-dialog-".concat(pos):"",{"p-component-overlay p-component-overlay-enter":props.modal,"p-dialog-visible":maskVisibleState,"p-dialog-draggable":props.draggable,"p-dialog-resizable":props.resizable},props.maskClassName)},"mask"),root:__name(function(_ref5){var props=_ref5.props,maximized=_ref5.maximized,context=_ref5.context;return classNames("p-dialog p-component",{"p-dialog-rtl":props.rtl,"p-dialog-maximized":maximized,"p-dialog-default":!maximized,"p-input-filled":context&&context.inputStyle==="filled"||PrimeReact.inputStyle==="filled","p-ripple-disabled":context&&context.ripple===!1||PrimeReact.ripple===!1})},"root"),transition:"p-dialog"},styles=` @layer primereact { .p-dialog-mask { background-color: transparent; transition-property: background-color; } .p-dialog-visible { display: flex; } .p-dialog-mask.p-component-overlay { pointer-events: auto; } .p-dialog { display: flex; flex-direction: column; pointer-events: auto; max-height: 90%; transform: scale(1); position: relative; } .p-dialog-content { overflow-y: auto; flex-grow: 1; } .p-dialog-header { display: flex; align-items: center; flex-shrink: 0; } .p-dialog-footer { flex-shrink: 0; } .p-dialog .p-dialog-header-icons { display: flex; align-items: center; align-self: flex-start; flex-shrink: 0; } .p-dialog .p-dialog-header-icon { display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; } .p-dialog .p-dialog-title { flex-grow: 1; } /* Fluid */ .p-fluid .p-dialog-footer .p-button { width: auto; } /* Animation */ /* Center */ .p-dialog-enter { opacity: 0; transform: scale(0.7); } .p-dialog-enter-active { opacity: 1; transform: scale(1); transition: all 150ms cubic-bezier(0, 0, 0.2, 1); } .p-dialog-enter-done { transform: none; } .p-dialog-exit-active { opacity: 0; transform: scale(0.7); transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); } /* Top, Bottom, Left, Right, Top* and Bottom* */ .p-dialog-top .p-dialog, .p-dialog-bottom .p-dialog, .p-dialog-left .p-dialog, .p-dialog-right .p-dialog, .p-dialog-top-left .p-dialog, .p-dialog-top-right .p-dialog, .p-dialog-bottom-left .p-dialog, .p-dialog-bottom-right .p-dialog { margin: 0.75em; } .p-dialog-top .p-dialog-enter, .p-dialog-top .p-dialog-exit-active { transform: translate3d(0px, -100%, 0px); } .p-dialog-bottom .p-dialog-enter, .p-dialog-bottom .p-dialog-exit-active { transform: translate3d(0px, 100%, 0px); } .p-dialog-left .p-dialog-enter, .p-dialog-left .p-dialog-exit-active, .p-dialog-top-left .p-dialog-enter, .p-dialog-top-left .p-dialog-exit-active, .p-dialog-bottom-left .p-dialog-enter, .p-dialog-bottom-left .p-dialog-exit-active { transform: translate3d(-100%, 0px, 0px); } .p-dialog-right .p-dialog-enter, .p-dialog-right .p-dialog-exit-active, .p-dialog-top-right .p-dialog-enter, .p-dialog-top-right .p-dialog-exit-active, .p-dialog-bottom-right .p-dialog-enter, .p-dialog-bottom-right .p-dialog-exit-active { transform: translate3d(100%, 0px, 0px); } .p-dialog-top .p-dialog-enter-active, .p-dialog-bottom .p-dialog-enter-active, .p-dialog-left .p-dialog-enter-active, .p-dialog-top-left .p-dialog-enter-active, .p-dialog-bottom-left .p-dialog-enter-active, .p-dialog-right .p-dialog-enter-active, .p-dialog-top-right .p-dialog-enter-active, .p-dialog-bottom-right .p-dialog-enter-active { transform: translate3d(0px, 0px, 0px); transition: all 0.3s ease-out; } .p-dialog-top .p-dialog-exit-active, .p-dialog-bottom .p-dialog-exit-active, .p-dialog-left .p-dialog-exit-active, .p-dialog-top-left .p-dialog-exit-active, .p-dialog-bottom-left .p-dialog-exit-active, .p-dialog-right .p-dialog-exit-active, .p-dialog-top-right .p-dialog-exit-active, .p-dialog-bottom-right .p-dialog-exit-active { transition: all 0.3s ease-out; } /* Maximize */ .p-dialog-maximized { transition: none; transform: none; margin: 0; width: 100vw !important; height: 100vh !important; max-height: 100%; top: 0px !important; left: 0px !important; } .p-dialog-maximized .p-dialog-content { flex-grow: 1; } .p-confirm-dialog .p-dialog-content { display: flex; align-items: center; } /* Resizable */ .p-dialog .p-resizable-handle { position: absolute; font-size: 0.1px; display: block; cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .p-dialog-draggable .p-dialog-header { cursor: move; } } `,inlineStyles={mask:__name(function(_ref6){var props=_ref6.props;return _objectSpread$1({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:props.position==="left"||props.position==="top-left"||props.position==="bottom-left"?"flex-start":props.position==="right"||props.position==="top-right"||props.position==="bottom-right"?"flex-end":"center",alignItems:props.position==="top"||props.position==="top-left"||props.position==="top-right"?"flex-start":props.position==="bottom"||props.position==="bottom-left"||props.position==="bottom-right"?"flex-end":"center",pointerEvents:!props.modal&&"none"},props.maskStyle)},"mask")},DialogBase=ComponentBase.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,content:null,contentClassName:null,contentStyle:null,dismissableMask:!1,draggable:!0,focusOnShow:!0,footer:null,footerClassName:null,header:null,headerClassName:null,headerStyle:null,icons:null,id:null,keepInViewport:!0,maskClassName:null,maskStyle:null,maximizable:!1,maximizeIcon:null,maximized:!1,minX:0,minY:0,minimizeIcon:null,modal:!0,onClick:null,onDrag:null,onDragEnd:null,onDragStart:null,onHide:null,onMaskClick:null,onMaximize:null,onResize:null,onResizeEnd:null,onResizeStart:null,onShow:null,position:"center",resizable:!0,rtl:!1,showHeader:!0,style:null,transitionOptions:null,visible:!1,children:void 0},css:{classes,styles,inlineStyles}});function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}__name(ownKeys,"ownKeys");function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}__name(_objectSpread,"_objectSpread");var Dialog=reactExports.forwardRef(function(inProps,ref){var mergeProps=useMergeProps(),context=reactExports.useContext(PrimeReactContext),props=DialogBase.getProps(inProps,context),uniqueId=props.id?props.id:UniqueComponentId(),_React$useState=reactExports.useState(uniqueId),_React$useState2=_slicedToArray(_React$useState,2),idState=_React$useState2[0];_React$useState2[1];var _React$useState3=reactExports.useState(!1),_React$useState4=_slicedToArray(_React$useState3,2),maskVisibleState=_React$useState4[0],setMaskVisibleState=_React$useState4[1],_React$useState5=reactExports.useState(!1),_React$useState6=_slicedToArray(_React$useState5,2),visibleState=_React$useState6[0],setVisibleState=_React$useState6[1],_React$useState7=reactExports.useState(props.maximized),_React$useState8=_slicedToArray(_React$useState7,2),maximizedState=_React$useState8[0],setMaximizedState=_React$useState8[1],dialogRef=reactExports.useRef(null),maskRef=reactExports.useRef(null),pointerRef=reactExports.useRef(null),contentRef=reactExports.useRef(null),headerRef=reactExports.useRef(null),footerRef=reactExports.useRef(null),closeRef=reactExports.useRef(null),dragging=reactExports.useRef(!1),resizing=reactExports.useRef(!1),lastPageX=reactExports.useRef(null),lastPageY=reactExports.useRef(null),styleElement=reactExports.useRef(null),attributeSelector=reactExports.useRef(uniqueId),focusElementOnHide=reactExports.useRef(null),maximized=props.onMaximize?props.maximized:maximizedState,shouldBlockScroll=visibleState&&(props.blockScroll||props.maximizable&&maximized),isCloseOnEscape=props.closable&&props.closeOnEscape&&visibleState,displayOrder=useDisplayOrder("dialog",isCloseOnEscape),_DialogBase$setMetaDa=DialogBase.setMetaData(_objectSpread(_objectSpread({props},props.__parentMetadata),{},{state:{id:idState,maximized,containerVisible:maskVisibleState}})),ptm=_DialogBase$setMetaDa.ptm,cx=_DialogBase$setMetaDa.cx,sx=_DialogBase$setMetaDa.sx,isUnstyled=_DialogBase$setMetaDa.isUnstyled;useHandleStyle(DialogBase.css.styles,isUnstyled,{name:"dialog"}),useGlobalOnEscapeKey({callback:__name(function(event){onClose(event)},"callback"),when:isCloseOnEscape&&displayOrder,priority:[ESC_KEY_HANDLING_PRIORITIES.DIALOG,displayOrder]});var _useEventListener=useEventListener({type:"mousemove",target:__name(function(){return window.document},"target"),listener:__name(function(event){return onResize(event)},"listener")}),_useEventListener2=_slicedToArray(_useEventListener,2),bindDocumentResizeListener=_useEventListener2[0],unbindDocumentResizeListener=_useEventListener2[1],_useEventListener3=useEventListener({type:"mouseup",target:__name(function(){return window.document},"target"),listener:__name(function(event){return onResizeEnd(event)},"listener")}),_useEventListener4=_slicedToArray(_useEventListener3,2),bindDocumentResizeEndListener=_useEventListener4[0],unbindDocumentResizEndListener=_useEventListener4[1],_useEventListener5=useEventListener({type:"mousemove",target:__name(function(){return window.document},"target"),listener:__name(function(event){return onDrag(event)},"listener")}),_useEventListener6=_slicedToArray(_useEventListener5,2),bindDocumentDragListener=_useEventListener6[0],unbindDocumentDragListener=_useEventListener6[1],_useEventListener7=useEventListener({type:"mouseup",target:__name(function(){return window.document},"target"),listener:__name(function(event){return onDragEnd(event)},"listener")}),_useEventListener8=_slicedToArray(_useEventListener7,2),bindDocumentDragEndListener=_useEventListener8[0],unbindDocumentDragEndListener=_useEventListener8[1],onClose=__name(function(event){props.onHide(),event.preventDefault()},"onClose"),focus=__name(function(){var activeElement=document.activeElement,isActiveElementInDialog=activeElement&&dialogRef.current&&dialogRef.current.contains(activeElement);!isActiveElementInDialog&&props.closable&&props.showHeader&&closeRef.current&&closeRef.current.focus()},"focus"),onDialogPointerDown=__name(function(event){pointerRef.current=event.target,props.onPointerDown&&props.onPointerDown(event)},"onDialogPointerDown"),onMaskPointerUp=__name(function(event){props.dismissableMask&&props.modal&&maskRef.current===event.target&&!pointerRef.current&&onClose(event),props.onMaskClick&&props.onMaskClick(event),pointerRef.current=null},"onMaskPointerUp"),toggleMaximize=__name(function(event){props.onMaximize?props.onMaximize({originalEvent:event,maximized:!maximized}):setMaximizedState(function(prevMaximized){return!prevMaximized}),event.preventDefault()},"toggleMaximize"),onDragStart=__name(function(event){DomHandler.hasClass(event.target,"p-dialog-header-icon")||DomHandler.hasClass(event.target.parentElement,"p-dialog-header-icon")||props.draggable&&(dragging.current=!0,lastPageX.current=event.pageX,lastPageY.current=event.pageY,dialogRef.current.style.margin="0",DomHandler.addClass(document.body,"p-unselectable-text"),props.onDragStart&&props.onDragStart(event))},"onDragStart"),onDrag=__name(function(event){if(dragging.current){var width=DomHandler.getOuterWidth(dialogRef.current),height=DomHandler.getOuterHeight(dialogRef.current),deltaX=event.pageX-lastPageX.current,deltaY=event.pageY-lastPageY.current,offset=dialogRef.current.getBoundingClientRect(),leftPos=offset.left+deltaX,topPos=offset.top+deltaY,viewport=DomHandler.getViewport(),computedStyle=getComputedStyle(dialogRef.current),leftMargin=parseFloat(computedStyle.marginLeft),topMargin=parseFloat(computedStyle.marginTop);dialogRef.current.style.position="fixed",props.keepInViewport?(leftPos>=props.minX&&leftPos+width<viewport.width&&(lastPageX.current=event.pageX,dialogRef.current.style.left=leftPos-leftMargin+"px"),topPos>=props.minY&&topPos+height<viewport.height&&(lastPageY.current=event.pageY,dialogRef.current.style.top=topPos-topMargin+"px")):(lastPageX.current=event.pageX,dialogRef.current.style.left=leftPos-leftMargin+"px",lastPageY.current=event.pageY,dialogRef.current.style.top=topPos-topMargin+"px"),props.onDrag&&props.onDrag(event)}},"onDrag"),onDragEnd=__name(function(event){dragging.current&&(dragging.current=!1,DomHandler.removeClass(document.body,"p-unselectable-text"),props.onDragEnd&&props.onDragEnd(event))},"onDragEnd"),onResizeStart=__name(function(event){props.resizable&&(resizing.current=!0,lastPageX.current=event.pageX,lastPageY.current=event.pageY,DomHandler.addClass(document.body,"p-unselectable-text"),props.onResizeStart&&props.onResizeStart(event))},"onResizeStart"),convertToPx=__name(function(value,property,viewport){!viewport&&(viewport=DomHandler.getViewport());var val=parseInt(value);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(value)?val*(viewport[property]/100):val},"convertToPx"),onResize=__name(function(event){if(resizing.current){var deltaX=event.pageX-lastPageX.current,deltaY=event.pageY-lastPageY.current,width=DomHandler.getOuterWidth(dialogRef.current),height=DomHandler.getOuterHeight(dialogRef.current),offset=dialogRef.current.getBoundingClientRect(),viewport=DomHandler.getViewport(),hasBeenDragged=!parseInt(dialogRef.current.style.top)||!parseInt(dialogRef.current.style.left),minWidth=convertToPx(dialogRef.current.style.minWidth,"width",viewport),minHeight=convertToPx(dialogRef.current.style.minHeight,"height",viewport),newWidth=width+deltaX,newHeight=height+deltaY;hasBeenDragged&&(newWidth=newWidth+deltaX,newHeight=newHeight+deltaY),(!minWidth||newWidth>minWidth)&&offset.left+newWidth<viewport.width&&(dialogRef.current.style.width=newWidth+"px"),(!minHeight||newHeight>minHeight)&&offset.top+newHeight<viewport.height&&(dialogRef.current.style.height=newHeight+"px"),lastPageX.current=event.pageX,lastPageY.current=event.pageY,props.onResize&&props.onResize(event)}},"onResize"),onResizeEnd=__name(function(event){resizing.current&&(resizing.current=!1,DomHandler.removeClass(document.body,"p-unselectable-text"),props.onResizeEnd&&props.onResizeEnd(event))},"onResizeEnd"),resetPosition=__name(function(){dialogRef.current.style.position="",dialogRef.current.style.left="",dialogRef.current.style.top="",dialogRef.current.style.margin=""},"resetPosition"),onEnter=__name(function(){dialogRef.current.setAttribute(attributeSelector.current,"")},"onEnter"),onEntered=__name(function(){props.onShow&&props.onShow(),props.focusOnShow&&focus(),enableDocumentSettings()},"onEntered"),onExiting=__name(function(){props.modal&&!isUnstyled()&&DomHandler.addClass(maskRef.current,"p-component-overlay-leave")},"onExiting"),onExited=__name(function(){dragging.current=!1,ZIndexUtils.clear(maskRef.current),setMaskVisibleState(!1),disableDocumentSettings(),DomHandler.focus(focusElementOnHide.current),focusElementOnHide.current=null},"onExited"),enableDocumentSettings=__name(function(){bindGlobalListeners()},"enableDocumentSettings"),disableDocumentSettings=__name(function(){unbindGlobalListeners()},"disableDocumentSettings"),updateScrollBlocker=__name(function(){var isThereAnyDialogThatBlocksScrolling=document.primeDialogParams&&document.primeDialogParams.some(function(i){return i.hasBlockScroll});isThereAnyDialogThatBlocksScrolling?DomHandler.blockBodyScroll():DomHandler.unblockBodyScroll()},"updateScrollBlocker"),updateGlobalDialogsRegistry=__name(function(isMounted){if(isMounted&&visibleState){var newParam={id:idState,hasBlockScroll:shouldBlockScroll};document.primeDialogParams||(document.primeDialogParams=[]);var currentDialogIndexInRegistry=document.primeDialogParams.findIndex(function(dialogInRegistry){return dialogInRegistry.id===idState});currentDialogIndexInRegistry===-1?document.primeDialogParams=[].concat(_toConsumableArray(document.primeDialogParams),[newParam]):document.primeDialogParams=document.primeDialogParams.toSpliced(currentDialogIndexInRegistry,1,newParam)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter(function(param){return param.id!==idState});updateScrollBlocker()},"updateGlobalDialogsRegistry"),bindGlobalListeners=__name(function(){props.draggable&&(bindDocumentDragListener(),bindDocumentDragEndListener()),props.resizable&&(bindDocumentResizeListener(),bindDocumentResizeEndListener())},"bindGlobalListeners"),unbindGlobalListeners=__name(function(){unbindDocumentDragListener(),unbindDocumentDragEndListener(),unbindDocumentResizeListener(),unbindDocumentResizEndListener()},"unbindGlobalListeners"),createStyle=__name(function(){styleElement.current=DomHandler.createInlineStyle(context&&context.nonce||PrimeReact.nonce,context&&context.styleContainer);var innerHTML="";for(var breakpoint in props.breakpoints)innerHTML=innerHTML+` @media screen and (max-width: `.concat(breakpoint,`) { [data-pc-name="dialog"][`).concat(attributeSelector.current,`] { width: `).concat(props.breakpoints[breakpoint],` !important; } } `);styleElement.current.innerHTML=innerHTML},"createStyle"),destroyStyle=__name(function(){styleElement.current=DomHandler.removeInlineStyle(styleElement.current)},"destroyStyle");useMountEffect(function(){updateGlobalDialogsRegistry(!0),props.visible&&setMaskVisibleState(!0)}),reactExports.useEffect(function(){return props.breakpoints&&createStyle(),function(){destroyStyle()}},[props.breakpoints]),useUpdateEffect(function(){props.visible&&!maskVisibleState&&setMaskVisibleState(!0),props.visible!==visibleState&&maskVisibleState&&setVisibleState(props.visible),props.visible&&(focusElementOnHide.current=document.activeElement)},[props.visible,maskVisibleState]),useUpdateEffect(function(){maskVisibleState&&(ZIndexUtils.set("modal",maskRef.current,context&&context.autoZIndex||PrimeReact.autoZIndex,props.baseZIndex||context&&context.zIndex.modal||PrimeReact.zIndex.modal),setVisibleState(!0))},[maskVisibleState]),useUpdateEffect(function(){updateGlobalDialogsRegistry(!0)},[shouldBlockScroll,visibleState]),useUnmountEffect(function(){disableDocumentSettings(),updateGlobalDialogsRegistry(!1),DomHandler.removeInlineStyle(styleElement.current),ZIndexUtils.clear(maskRef.current)}),reactExports.useImperativeHandle(ref,function(){return{props,resetPosition,getElement:__name(function(){return dialogRef.current},"getElement"),getMask:__name(function(){return maskRef.current},"getMask"),getContent:__name(function(){return contentRef.current},"getContent"),getHeader:__name(function(){return headerRef.current},"getHeader"),getFooter:__name(function(){return footerRef.current},"getFooter"),getCloseButton:__name(function(){return closeRef.current},"getCloseButton")}});var createCloseIcon=__name(function(){if(props.closable){var ariaLabel=props.ariaCloseIconLabel||localeOption("close"),closeButtonIconProps=mergeProps({className:cx("closeButtonIcon"),"aria-hidden":!0},ptm("closeButtonIcon")),icon=props.closeIcon||reactExports.createElement(TimesIcon,closeButtonIconProps),headerCloseIcon=IconUtils.getJSXIcon(icon,_objectSpread({},closeButtonIconProps),{props}),closeButtonProps=mergeProps({ref:closeRef,type:"button",className:cx("closeButton"),"aria-label":ariaLabel,onClick:onClose,onKeyDown:__name(function(ev){ev.key!=="Escape"&&ev.stopPropagation()},"onKeyDown")},ptm("closeButton"));return reactExports.createElement("button",closeButtonProps,headerCloseIcon,reactExports.createElement(Ripple,null))}return null},"createCloseIcon"),createMaximizeIcon=__name(function(){var icon,maximizableIconProps=mergeProps({className:cx("maximizableIcon")},ptm("maximizableIcon"));maximized?icon=props.minimizeIcon||reactExports.createElement(WindowMinimizeIcon,maximizableIconProps):icon=props.maximizeIcon||reactExports.createElement(WindowMaximizeIcon,maximizableIconProps);var toggleIcon=IconUtils.getJSXIcon(icon,maximizableIconProps,{props});if(props.maximizable){var maximizableButtonProps=mergeProps({type:"button",className:cx("maximizableButton"),onClick:toggleMaximize},ptm("maximizableButton"));return reactExports.createElement("button",maximizableButtonProps,toggleIcon,reactExports.createElement(Ripple,null))}return null},"createMaximizeIcon"),createHeader=__name(function(){if(props.showHeader){var closeIcon=createCloseIcon(),maximizeIcon=createMaximizeIcon(),icons=ObjectUtils.getJSXElement(props.icons,props),header2=ObjectUtils.getJSXElement(props.header,props),headerId=idState+"_header",headerProps=mergeProps({ref:headerRef,style:props.headerStyle,className:cx("header"),onMouseDown:onDragStart},ptm("header")),headerTitleProps=mergeProps({id:headerId,className:cx("headerTitle")},ptm("headerTitle")),headerIconsProps=mergeProps({className:cx("headerIcons")},ptm("headerIcons"));return reactExports.createElement("div",headerProps,reactExports.createElement("div",headerTitleProps,header2),reactExports.createElement("div",headerIconsProps,icons,maximizeIcon,closeIcon))}return null},"createHeader"),createContent=__name(function(){var contentId=idState+"_content",contentProps=mergeProps({id:contentId,ref:contentRef,style:props.contentStyle,className:cx("content")},ptm("content"));return reactExports.createElement("div",contentProps,props.children)},"createContent"),createFooter=__name(function(){var footer2=ObjectUtils.getJSXElement(props.footer,props),footerProps=mergeProps({ref:footerRef,className:cx("footer")},ptm("footer"));return footer2&&reactExports.createElement("div",footerProps,footer2)},"createFooter"),createResizer=__name(function(){return props.resizable?reactExports.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:onResizeStart}):null},"createResizer"),createTemplateElement=__name(function(){var _props$children,messageProps={header:props.header,content:props.message,message:props==null||(_props$children=props.children)===null||_props$children===void 0||(_props$children=_props$children[1])===null||_props$children===void 0||(_props$children=_props$children.props)===null||_props$children===void 0?void 0:_props$children.children},templateElementProps={headerRef,contentRef,footerRef,closeRef,hide:onClose,message:messageProps};return ObjectUtils.getJSXElement(inProps.content,templateElementProps)},"createTemplateElement"),createElement=__name(function(){var header2=createHeader(),content2=createContent(),footer2=createFooter(),resizer=createResizer();return reactExports.createElement(reactExports.Fragment,null,header2,content2,footer2,resizer)},"createElement"),createDialog=__name(function(){var headerId=idState+"_header",contentId=idState+"_content",transitionTimeout={enter:props.position==="center"?150:300,exit:props.position==="center"?150:300},maskProps=mergeProps({ref:maskRef,style:sx("mask"),className:cx("mask"),onPointerUp:onMaskPointerUp},ptm("mask")),rootProps=mergeProps({ref:dialogRef,id:idState,className:classNames(props.className,cx("root",{props,maximized,context})),style:props.style,onClick:props.onClick,role:"dialog","aria-labelledby":headerId,"aria-describedby":contentId,"aria-modal":props.modal,onPointerDown:onDialogPointerDown},DialogBase.getOtherProps(props),ptm("root")),transitionProps=mergeProps({classNames:cx("transition"),timeout:transitionTimeout,in:visibleState,options:props.transitionOptions,unmountOnExit:!0,onEnter,onEntered,onExiting,onExited},ptm("transition")),contentElement=null;inProps!=null&&inProps.content?contentElement=createTemplateElement():contentElement=createElement();var rootElement=reactExports.createElement("div",maskProps,reactExports.createElement(CSSTransition,_extends({nodeRef:dialogRef},transitionProps),reactExports.createElement("div",rootProps,reactExports.createElement(FocusTrap$1,{autoFocus:props.focusOnShow},contentElement))));return reactExports.createElement(Portal,{element:rootElement,appendTo:props.appendTo,visible:!0})},"createDialog");return maskVisibleState&&createDialog()});Dialog.displayName="Dialog";export{Dialog as D};