!function(e,t){if("object"==typeofexports&&"object"==typeofmodule)module.exports=t(require("react"));elseif("function"==typeofdefine&&define.amd)define(["react"],t);else{varn="object"==typeofexports?t(require("react")):t(e.React);for(varrinn)("object"==typeofexports?exports:e)[r]=n[r]}}(self,(function(e){return(()=>{"use strict";vart={261:(e,t,n)=>{n.r(t),n.d(t,{AllModals:()=>a,default:()=>g});varr=n(888),o=n.n(r);consta=o().createContext(),l=e=>(e.preventDefault&&e.preventDefault(),e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),!1),c=(e,t)=>function(){e(...arguments),t()},i=(e,t)=>o().Children.map(e,((e,n)=>o().isValidElement(e)&&"string"!=typeofe.type?o().cloneElement(e,{...t}):e)),s=()=>{const[,e]=(0,r.useReducer)((e=>[]),null);returne},u=(e=window,t,n,o={})=>{let{current:a}=(0,r.useRef)();a=n,(0,r.useEffect)((()=>{if(!e||!e.addEventListener)return;constn=e=>a(e);returne.addEventListener(t,n,{capture:!!o.capture,once:!!o.once,passive:!!o.passice}),()=>e.removeEventListener(t,n,{capture:!!o.capture})}),[e,t,o.capture,o.once,o.passice])},d=(e,t)=>{const{current:n}=(0,r.useRef)([]),{current:a}=(0,r.useRef)([]),l=(0,r.useCallback)(((t,r)=>{if(!e.hasOwnProperty(t))thrownewReferenceError("ModalRouter: In the map you provided, key didn't matched");a.push(t),n.push(r)}),[e]),c=(0,r.useCallback)(((e,t)=>l(e,t)),[e]),i=(0,r.useCallback)(t?e=>{lett=a.findIndex(((t,n)=>t===e));-1!==t?(a.splice(t,1),n.splice(t,1)):(a.pop(),n.pop())}:()=>u(),[t]),s=(0,r.useCallback)((e=>{i(e)}),[]),u=(0,r.useCallback)((()=>{a.length=0,n.length=0}),[]),d=(0,r.useCallback)(t?()=>a.map(((t,r)=>f(e[t],n[r],t+r))):()=>a.length?[f(e[a.slice(-1)[0]],n.slice(-1)[0],a.slice(-1)[0]+0)]:null,[t,e]);functionf(e,t,n){letr={modalData:t,openModal:c,closeModal:s,closeAllModal:u};return"object"!=typeoft||t[Symbol.iterator]||(r={...r,...t}),o().isValidElement(e)?o().cloneElement(e,{...r,key:n}):o().createElement(e,{...r,key:n})}return[a,n,{getModal:d,openModal:c,closeModal:s,closeAllModal:u}]};varf=n(379),p=n.n(f),m=n(528),v={insert:"head",singleton:!1};p()(m.Z,v);m.Z.locals;consth=({container:e,hidden:t,children:n,...a})=>{constc=(0,r.useRef)();if(u(c.current,"mousewheel",l),u(c.current,"touchmove",l),!t){if("function"==typeofe)returne.prototype.isReactComponent?o().createElement(e,a,n):o().cloneElement(e({children:n,funcs:a}));if(o().isValidElement(e))returno().cloneElement(e,a,n)}returno().createElement("div",{className:"HOC_modal",ref:c,style:{display:t?"none":"flex"}},n)},b=({contextMode:e,Provider:t,children:n,...a})=>e?o().createElement(t,{value:a},n):o().createElement(r.Fragment,null,n);consty=function({children:e,map:t,contextMode:n,container:l,...u}){constf=s(),[p,m,{getModal:v,openModal:y,closeModal:g,closeAllModal:M}]=d(t,!1),x={openModal:(0,r.useCallback)(c(y,f),[]),closeModal:(0,r.useCallback)(c(g,f),[]),closeAllModal:(0,r.useCallback)(c(M,f),[])},E=i(e,x);returno().createElement(r.Fragment,null,o().createElement(b,{contextMode:n,Provider:a.Provider,...x},E),o().createElement(h,{container:l,hidden:!p.length,...x},v()))};y.Multi=function({children:e,map:t,contextMode:n,container:l,...u}){constf=s(),[p,m,{getModal:v,openModal:y,closeModal:g,closeAllModal:M}]=d(t,!0),x={openModal:(0,r.useCallback)(c(y,f),[]),closeModal:(0,r.useCallback)(c(g,f),[]),closeAllModal:(0,r.useCallback)(c(M,f),[])},E=i(e,x);returno().createElement(r.Fragment,null,o().createElement(b,{contextMode:n,Provider:a.Provider,...x},E),o().createElement(h,{container:l,hidden:!p.length,...x},v()))};constg=y},528:(e,t,n)=>{n.d(t,{Z:()=>a});varr=n(645),o=n.n(r)()((function(e){returne[1]}));o.push([e.id,".HOC_modal {\r\n position: fixed;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n left: 0;\r\n background-color: rgba(0, 0, 0, 0.7);\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 2;\r\n}\r\n",""]);consta=o},645:e=>{e.exports=function(e){vart=[];returnt.toString=function(){returnthis.map((function(t){varn=e(t);returnt[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeofe&&(e=[[null,e,""]]);varo={};if(r)for(vara=0;a<this.length;a++){varl=this[a][0];null!=l&&(o[l]=!0)}for(varc=0;c<e.length;c++){vari=[].concat(e[c]);r&&o[i[0]]||(n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),t.push(i))}},t}},379:(e,t,n)=>{varr,o=function(){returnvoid0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){vare={};returnfunction(t){if(void0===e[t]){varn=document.querySelector(t);if(window.HTMLIFrameElement&&ninstanceofwindow.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}returne[t]}}(),l=[];functionc(e){for(vart=-1,n=0;n<l.length;n++)if(l[n].identifier===e){t=n;break}returnt}functioni(e,t){for(varn={},r=[],o=0;o<e.length;o++){vara=e[o],i=t.base?a[0]+t.base:a[0],s=n[i]||0,u="".concat(i," ").concat(s);n[i]=s+1;vard=c(u),f={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(l[d].references++,l[d].updater(f)):l.push({identifier:u,updater:h(f,t),references:1}),r.push(u)}returnr}functions(e){vart=document.createElement("style"),r=e.attributes||{};if(void0===r.nonce){varo=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeofe.insert)e.insert(t);else{varl=a(e.insert||"head");if(!l)thrownewError("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}returnt}varu,d=(u=[],function(e,t){returnu[e]=t,u.filter(Boolean).join("\n")});functionf(e,t,n,r){varo=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{vara=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}functionp(e,t,n){varr=n.css,o=n.media,a=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&"undefined"!=typeofbtoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}varm=null,v=0;functionh(e,t){varn,r,o;if(t.singleton){vara=v++;n=m||(m=s(t)),r=f.bind(null,n,a,!1),o=f.bind(null,n,a,!0)}elsen=s(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};returnr(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}elseo()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeoft.singleton||(t.singleton=o());varn=i(e=e||[],t);returnfunction(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(varr=0;r<n.length;r++){varo=c(n[r]);l[o].references--}for(vara=i(e,t),s=0;s<n.length;s++){varu=c(n[s]);0===l[u].references&&(l[u].updater(),l.splice(u,1))}n=a}}}},888:t=>{t.exports=e}},n={};functionr(e){if(n[e])returnn[e].exports;varo=n[e]={id:e,exports:{}};returnt[e](o,o.exports,r),o.exports}returnr.n=e=>{vart=e&&e.__esModule?()=>e.default:()=>e;returnr.d(t,{a:t}),t},r.d=(e,t)=>{for(varnint)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(261)})()}));