fansunited-widget-either-or 1.1.0 → 1.1.1
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/either-or-manager.umd.js
CHANGED
|
@@ -9,7 +9,7 @@ object-assign
|
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var yw=cn.default,ud=60103;if(Oi.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var cd=Symbol.for;ud=cd("react.element"),Oi.Fragment=cd("react.fragment")}var ww=yw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bw=Object.prototype.hasOwnProperty,_w={key:!0,ref:!0,__self:!0,__source:!0};function dd(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)bw.call(e,r)&&!_w.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:ud,type:t,key:s,ref:o,props:i,_owner:ww.current}}Oi.jsx=dd,Oi.jsxs=dd,function(t){t.exports=Oi}(La);const De=La.exports.Fragment,j=La.exports.jsx,ae=La.exports.jsxs,Ti=t=>typeof t=="number"&&!isNaN(t),dr=t=>typeof t=="string",St=t=>typeof t=="function",Ba=t=>dr(t)||St(t)?t:null,Ko=t=>K.isValidElement(t)||dr(t)||St(t)||Ti(t);function Ew(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=t;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,n)})})}function Ua(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:s=300}=t;return function(o){let{children:l,position:u,preventExitTransition:c,done:d,nodeRef:f,isIn:p}=o;const h=r?`${e}--${u}`:e,y=r?`${n}--${u}`:n,g=K.useRef(0);return K.useLayoutEffect(()=>{const v=f.current,b=h.split(" "),w=I=>{I.target===f.current&&(v.dispatchEvent(new Event("d")),v.removeEventListener("animationend",w),v.removeEventListener("animationcancel",w),g.current===0&&I.type!=="animationcancel"&&v.classList.remove(...b))};v.classList.add(...b),v.addEventListener("animationend",w),v.addEventListener("animationcancel",w)},[]),K.useEffect(()=>{const v=f.current,b=()=>{v.removeEventListener("animationend",b),i?Ew(v,d,s):d()};p||(c?b():(g.current=1,v.className+=` ${y}`,v.addEventListener("animationend",b)))},[p]),cn.default.createElement(cn.default.Fragment,null,l)}}function fd(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Gt={list:new Map,emitQueue:new Map,on(t,e){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(e),this},off(t,e){if(e){const n=this.list.get(t).filter(r=>r!==e);return this.list.set(t,n),this}return this.list.delete(t),this},cancelEmit(t){const e=this.emitQueue.get(t);return e&&(e.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit(t){this.list.has(t)&&this.list.get(t).forEach(e=>{const n=setTimeout(()=>{e(...[].slice.call(arguments,1))},0);this.emitQueue.has(t)||this.emitQueue.set(t,[]),this.emitQueue.get(t).push(n)})}},$a=t=>{let i=t,{theme:e,type:n}=i,r=Gn(i,["theme","type"]);return j("svg",Z({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`},r))},Jo={info:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"})}))},warning:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"})}))},success:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"})}))},error:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"})}))},spinner:function(){return j("div",{className:"Toastify__spinner"})}};function Iw(t){const[,e]=K.useReducer(h=>h+1,0),[n,r]=K.useState([]),i=K.useRef(null),s=K.useRef(new Map).current,o=h=>n.indexOf(h)!==-1,l=K.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:o,getToast:h=>s.get(h)}).current;function u(h){let{containerId:y}=h;const{limit:g}=l.props;!g||y&&l.containerId!==y||(l.count-=l.queue.length,l.queue=[])}function c(h){r(y=>h==null?[]:y.filter(g=>g!==h))}function d(){const{toastContent:h,toastProps:y,staleId:g}=l.queue.shift();p(h,y,g)}function f(h,y){let M=y,{delay:g,staleId:v}=M,b=Gn(M,["delay","staleId"]);if(!Ko(h)||function(D){return!i.current||l.props.enableMultiContainer&&D.containerId!==l.props.containerId||s.has(D.toastId)&&D.updateId==null}(b))return;const{toastId:w,updateId:I,data:m}=b,{props:A}=l,E=()=>c(w),O=I==null;O&&l.count++;const T=se(Z(se(Z({},A),{style:A.toastStyle,key:l.toastKey++}),Object.fromEntries(Object.entries(b).filter(D=>{let[L,F]=D;return F!=null}))),{toastId:w,updateId:I,data:m,closeToast:E,isIn:!1,className:Ba(b.className||A.toastClassName),bodyClassName:Ba(b.bodyClassName||A.bodyClassName),progressClassName:Ba(b.progressClassName||A.progressClassName),autoClose:!b.isLoading&&(x=b.autoClose,P=A.autoClose,x===!1||Ti(x)&&x>0?x:P),deleteToast(){const D=fd(s.get(w),"removed");s.delete(w),Gt.emit(4,D);const L=l.queue.length;if(l.count=w==null?l.count-l.displayedToast:l.count-1,l.count<0&&(l.count=0),L>0){const F=w==null?l.props.limit:1;if(L===1||F===1)l.displayedToast++,d();else{const H=F>L?L:F;l.displayedToast=H;for(let q=0;q<H;q++)d()}}else e()}});var x,P;T.iconOut=function(D){let{theme:L,type:F,isLoading:H,icon:q}=D,z=null;const U={theme:L,type:F};return q===!1||(St(q)?z=q(U):K.isValidElement(q)?z=K.cloneElement(q,U):dr(q)||Ti(q)?z=q:H?z=Jo.spinner():(N=>N in Jo)(F)&&(z=Jo[F](U))),z}(T),St(b.onOpen)&&(T.onOpen=b.onOpen),St(b.onClose)&&(T.onClose=b.onClose),T.closeButton=A.closeButton,b.closeButton===!1||Ko(b.closeButton)?T.closeButton=b.closeButton:b.closeButton===!0&&(T.closeButton=!Ko(A.closeButton)||A.closeButton);let S=h;K.isValidElement(h)&&!dr(h.type)?S=K.cloneElement(h,{closeToast:E,toastProps:T,data:m}):St(h)&&(S=h({closeToast:E,toastProps:T,data:m})),A.limit&&A.limit>0&&l.count>A.limit&&O?l.queue.push({toastContent:S,toastProps:T,staleId:v}):Ti(g)?setTimeout(()=>{p(S,T,v)},g):p(S,T,v)}function p(h,y,g){const{toastId:v}=y;g&&s.delete(g);const b={content:h,props:y};s.set(v,b),r(w=>[...w,v].filter(I=>I!==g)),Gt.emit(4,fd(b,b.props.updateId==null?"added":"updated"))}return K.useEffect(()=>(l.containerId=t.containerId,Gt.cancelEmit(3).on(0,f).on(1,h=>i.current&&c(h)).on(5,u).emit(2,l),()=>{s.clear(),Gt.emit(3,l)}),[]),K.useEffect(()=>{l.props=t,l.isToastActive=o,l.displayedToast=n.length}),{getToastToRender:function(h){const y=new Map,g=Array.from(s.values());return t.newestOnTop&&g.reverse(),g.forEach(v=>{const{position:b}=v.props;y.has(b)||y.set(b,[]),y.get(b).push(v)}),Array.from(y,v=>h(v[0],v[1]))},containerRef:i,isToastActive:o}}function hd(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}function pd(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}function Aw(t){const[e,n]=K.useState(!1),[r,i]=K.useState(!1),s=K.useRef(null),o=K.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=K.useRef(t),{autoClose:u,pauseOnHover:c,closeToast:d,onClick:f,closeOnClick:p}=t;function h(m){if(t.draggable){m.nativeEvent.type==="touchstart"&&m.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),document.addEventListener("touchmove",b),document.addEventListener("touchend",w);const A=s.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=A.getBoundingClientRect(),A.style.transition="",o.x=hd(m.nativeEvent),o.y=pd(m.nativeEvent),t.draggableDirection==="x"?(o.start=o.x,o.removalDistance=A.offsetWidth*(t.draggablePercent/100)):(o.start=o.y,o.removalDistance=A.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent/100))}}function y(m){if(o.boundingRect){const{top:A,bottom:E,left:O,right:T}=o.boundingRect;m.nativeEvent.type!=="touchend"&&t.pauseOnHover&&o.x>=O&&o.x<=T&&o.y>=A&&o.y<=E?v():g()}}function g(){n(!0)}function v(){n(!1)}function b(m){const A=s.current;o.canDrag&&A&&(o.didMove=!0,e&&v(),o.x=hd(m),o.y=pd(m),o.delta=t.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),A.style.transform=`translate${t.draggableDirection}(${o.delta}px)`,A.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function w(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",w);const m=s.current;if(o.canDrag&&o.didMove&&m){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),void t.closeToast();m.style.transition="transform 0.2s, opacity 0.2s",m.style.transform=`translate${t.draggableDirection}(0)`,m.style.opacity="1"}}K.useEffect(()=>{l.current=t}),K.useEffect(()=>(s.current&&s.current.addEventListener("d",g,{once:!0}),St(t.onOpen)&&t.onOpen(K.isValidElement(t.children)&&t.children.props),()=>{const m=l.current;St(m.onClose)&&m.onClose(K.isValidElement(m.children)&&m.children.props)}),[]),K.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||v(),window.addEventListener("focus",g),window.addEventListener("blur",v)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",v))}),[t.pauseOnFocusLoss]);const I={onMouseDown:h,onTouchStart:h,onMouseUp:y,onTouchEnd:y};return u&&c&&(I.onMouseEnter=v,I.onMouseLeave=g),p&&(I.onClick=m=>{f&&f(m),o.canCloseOnClick&&d()}),{playToast:g,pauseToast:v,isRunning:e,preventExitTransition:r,toastRef:s,eventHandlers:I}}function md(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return j("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:i=>{i.stopPropagation(),e(i)},"aria-label":r,children:j("svg",{"aria-hidden":"true",viewBox:"0 0 14 16",children:j("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})})})}function Ow(t){let{delay:e,isRunning:n,closeToast:r,type:i="default",hide:s,className:o,style:l,controlledProgress:u,progress:c,rtl:d,isIn:f,theme:p}=t;const h=s||u&&c===0,y=se(Z({},l),{animationDuration:`${e}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1});u&&(y.transform=`scaleX(${c})`);const g=Qn("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":d}),v=St(o)?o({rtl:d,type:i,defaultClassName:g}):Qn(g,o);return cn.default.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:v,style:y,[u&&c>=1?"onTransitionEnd":"onAnimationEnd"]:u&&c<1?null:()=>{f&&r()}})}const Tw=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:i}=Aw(t),{closeButton:s,children:o,autoClose:l,onClick:u,type:c,hideProgressBar:d,closeToast:f,transition:p,position:h,className:y,style:g,bodyClassName:v,bodyStyle:b,progressClassName:w,progressStyle:I,updateId:m,role:A,progress:E,rtl:O,toastId:T,deleteToast:x,isIn:P,isLoading:S,iconOut:M,closeOnClick:D,theme:L}=t,F=Qn("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":D}),H=St(y)?y({rtl:O,position:h,type:c,defaultClassName:F}):Qn(F,y),q=!!E||!l,z={closeToast:f,type:c,theme:L};let U=null;return s===!1||(U=St(s)?s(z):K.isValidElement(s)?K.cloneElement(s,z):md(z)),cn.default.createElement(p,{isIn:P,done:x,position:h,preventExitTransition:n,nodeRef:r},ae("div",se(Z({id:T,onClick:u,className:H},i),{style:g,ref:r,children:[ae("div",se(Z({},P&&{role:A}),{className:St(v)?v({type:c}):Qn("Toastify__toast-body",v),style:b,children:[M!=null&&j("div",{className:Qn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!S}),children:M}),j("div",{children:o})]})),U,j(Ow,se(Z({},m&&!q?{key:`pb-${m}`}:{}),{rtl:O,theme:L,delay:l,isRunning:e,isIn:P,closeToast:f,hide:d,type:c,style:I,className:w,controlledProgress:q,progress:E||0}))]})))},ja=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},Cw=Ua(ja("bounce",!0));Ua(ja("slide",!0)),Ua(ja("zoom")),Ua(ja("flip"));const Xo=K.forwardRef((t,e)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=Iw(t),{className:s,style:o,rtl:l,containerId:u}=t;function c(d){const f=Qn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":l});return St(s)?s({position:d,rtl:l,defaultClassName:f}):Qn(f,Ba(s))}return K.useEffect(()=>{e&&(e.current=r.current)},[]),j("div",{ref:r,className:"Toastify",id:u,children:n((d,f)=>{const p=f.length?Z({},o):se(Z({},o),{pointerEvents:"none"});return j("div",{className:c(d),style:p,children:f.map((h,y)=>{let{content:g,props:v}=h;return K.createElement(Tw,se(Z({},v),{isIn:i(v.toastId),style:se(Z({},v.style),{"--nth":y+1,"--len":f.length}),key:`toast-${v.key}`}),g)})},`container-${d}`)})})});Xo.displayName="ToastContainer",Xo.defaultProps={position:"top-right",transition:Cw,autoClose:5e3,closeButton:md,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Zo,fr=new Map,Ci=[],Sw=1;function gd(){return""+Sw++}function Pw(t){return t&&(dr(t.toastId)||Ti(t.toastId))?t.toastId:gd()}function Si(t,e){return fr.size>0?Gt.emit(0,t,e):Ci.push({content:t,options:e}),e.toastId}function Ha(t,e){return se(Z({},e),{type:e&&e.type||t,toastId:Pw(e)})}function Va(t){return(e,n)=>Si(e,Ha(t,n))}function Pe(t,e){return Si(t,Ha("default",e))}Pe.loading=(t,e)=>Si(t,Ha("default",Z({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},e))),Pe.promise=function(t,e,n){let r,{pending:i,error:s,success:o}=e;i&&(r=dr(i)?Pe.loading(i,n):Pe.loading(i.render,Z(Z({},n),i)));const l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(d,f,p)=>{if(f==null)return void Pe.dismiss(r);const h=se(Z(Z({type:d},l),n),{data:p}),y=dr(f)?{render:f}:f;return r?Pe.update(r,Z(Z({},h),y)):Pe(y.render,Z(Z({},h),y)),p},c=St(t)?t():t;return c.then(d=>u("success",o,d)).catch(d=>u("error",s,d)),c},Pe.success=Va("success"),Pe.info=Va("info"),Pe.error=Va("error"),Pe.warning=Va("warning"),Pe.warn=Pe.warning,Pe.dark=(t,e)=>Si(t,Ha("default",Z({theme:"dark"},e))),Pe.dismiss=t=>{fr.size>0?Gt.emit(1,t):Ci=Ci.filter(e=>t!=null&&e.options.toastId!==t)},Pe.clearWaitingQueue=function(t){return t===void 0&&(t={}),Gt.emit(5,t)},Pe.isActive=t=>{let e=!1;return fr.forEach(n=>{n.isToastActive&&n.isToastActive(t)&&(e=!0)}),e},Pe.update=function(t,e){e===void 0&&(e={}),setTimeout(()=>{const n=function(r,i){let{containerId:s}=i;const o=fr.get(s||Zo);return o&&o.getToast(r)}(t,e);if(n){const{props:r,content:i}=n,s=se(Z(Z({delay:100},r),e),{toastId:e.toastId||t,updateId:gd()});s.toastId!==t&&(s.staleId=t);const o=s.render||i;delete s.render,Si(o,s)}},0)},Pe.done=t=>{Pe.update(t,{progress:1})},Pe.onChange=t=>(Gt.on(4,t),()=>{Gt.off(4,t)}),Pe.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Pe.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gt.on(2,t=>{Zo=t.containerId||t,fr.set(Zo,t),Ci.forEach(e=>{Gt.emit(0,e.content,e.options)}),Ci=[]}).on(3,t=>{fr.delete(t.containerId||t),fr.size===0&&Gt.off(0).off(1).off(5)});function Ie(t){const e=K.useContext(t);if(e===void 0)throw new Error("Context was used outside of its Provider");return e}class Mw{constructor(e){a(this,"userNotFound");a(this,"signOut");a(this,"timeFormat");a(this,"getEitherOrsErrorMessage");a(this,"title");a(this,"titlePlaceholder");a(this,"noGamesFound");a(this,"status");a(this,"participants");a(this,"averageScore");a(this,"perfectScore");a(this,"creationDate");a(this,"actions");a(this,"create");a(this,"edit");a(this,"save");a(this,"preview");a(this,"close");a(this,"filterBy");a(this,"sortBy");a(this,"clearStatus");a(this,"contextEntityTag");a(this,"typeContextTagNamePlaceholder");a(this,"showMoreImages");a(this,"hideMoreImages");a(this,"uploadImage");a(this,"groupByStatus");a(this,"copyUrl");a(this,"copied");a(this,"add");a(this,"configuration");a(this,"description");a(this,"descriptionPlaceholder");a(this,"images");a(this,"rules");a(this,"rulesPlaceholder");a(this,"adContent");a(this,"adContentPlaceholder");a(this,"optionImages");a(this,"imagePlaceholder");a(this,"main");a(this,"cover");a(this,"mobile");a(this,"active");a(this,"inactive");a(this,"statusDescription");a(this,"winningCondition");a(this,"winningConditionDescription");a(this,"more");a(this,"less");a(this,"time");a(this,"timeDescription");a(this,"lives");a(this,"livesDescription");a(this,"points");a(this,"pointsDescription");a(this,"pointNumber");a(this,"pointsCorrectSteps");a(this,"pointsCorrectStepsPlaceholder");a(this,"pointsScore");a(this,"pointsScorePlaceholder");a(this,"optionsValue");a(this,"optionsValuePlaceholder");a(this,"repeatedValueMessage");a(this,"flags");a(this,"flagsPlaceholder");a(this,"labels");a(this,"customFields");a(this,"dynamicFieldsDescription");a(this,"keyDynamicFields");a(this,"valueDynamicFields");a(this,"options");a(this,"optionNumber");a(this,"optionsDescription");a(this,"context");a(this,"content");a(this,"tags");a(this,"entity");a(this,"campaign");a(this,"id");a(this,"idOptionPlaceholder");a(this,"labelOptionPlaceholder");a(this,"idContentPlaceholder");a(this,"idCampaignPlaceholder");a(this,"label");a(this,"labelContentPlaceholder");a(this,"labelCampaignPlaceholder");a(this,"type");a(this,"typeDescription");a(this,"noType");a(this,"deleteLabel");a(this,"cancelLabel");a(this,"confirmationQuestionLabel");a(this,"typeContentPlaceholder");a(this,"previewEitherOr");a(this,"searchImages");a(this,"clearFromToFilterSportal365ImagesMessage");a(this,"hideFilters");a(this,"showFilters");a(this,"dateFromTo");a(this,"dateFromToPlaceholder");a(this,"noImagesFound");a(this,"previous");a(this,"next");a(this,"clear");a(this,"getFootballEntitiesErrorMessage");a(this,"titleRequiredFieldValidationMessage");a(this,"livesFieldValidationMessage");a(this,"timeFieldValidationMessage");a(this,"pointsFieldValidationMessage");a(this,"optionsFieldValidationMessage");a(this,"tagsInvalidFieldValidationMessage");a(this,"getEitherOrErrorMessage");a(this,"deleteEitherOrMessage");a(this,"deleteEitherOrErrorMessage");a(this,"createEitherOrMessage");a(this,"createEitherOrErrorMessage");a(this,"updateEitherOrMessage");a(this,"updateEitherOrErrorMessage");a(this,"uploadingImageMessage");a(this,"generateSignedInUrlErrorMessage");a(this,"uploadingImageErrorMessage");a(this,"encryptingImageErrorMessage");a(this,"searchSportal365ImagesErrorMessage");this.userNotFound=e&&e.userNotFound?e.userNotFound:"User not found. Please try again",this.signOut=e&&e.signOut?e.signOut:"Sign out",this.noGamesFound=e&&e.noGamesFound?e.noGamesFound:"No Either/Or games were found. You can create one by clicking the button 'Create'",this.timeFormat=e&&e.timeFormat?e.timeFormat:"DD.MM.YYYY, HH:mm",this.getEitherOrsErrorMessage=e&&e.getEitherOrsErrorMessage?e.getEitherOrsErrorMessage:"There was a problem with fetching list of Either/Or games",this.title=e&&e.title?e.title:"Title",this.status=e&&e.status?e.status:"Status",this.creationDate=e&&e.creationDate?e.creationDate:"Created at",this.actions=e&&e.actions?e.actions:"Actions",this.titlePlaceholder=e&&e.titlePlaceholder?e.titlePlaceholder:"Provide a title for your Either/Or",this.create=e&&e.create?e.create:"Create",this.edit=e&&e.edit?e.edit:"Edit",this.save=e&&e.save?e.save:"Save",this.preview=e&&e.preview?e.preview:"Preview",this.close=e&&e.close?e.close:"Close",this.filterBy=(e==null?void 0:e.filterBy)||"Filter by:",this.sortBy=(e==null?void 0:e.sortBy)||"Sort by:",this.clearStatus=(e==null?void 0:e.clearStatus)||"Clear status",this.contextEntityTag=(e==null?void 0:e.contextEntityTag)||"Context entity tag",this.typeContextTagNamePlaceholder=(e==null?void 0:e.typeContextTagNamePlaceholder)||"Type context tag name...",this.showMoreImages=(e==null?void 0:e.showMoreImages)||"Show more images",this.hideMoreImages=(e==null?void 0:e.hideMoreImages)||"Hide more images",this.uploadImage=(e==null?void 0:e.uploadImage)||"Upload image",this.groupByStatus=(e==null?void 0:e.groupByStatus)||"Group by status",this.copyUrl=(e==null?void 0:e.copyUrl)||"Copy URL",this.copied=(e==null?void 0:e.copied)||"Copied",this.add=(e==null?void 0:e.add)||"Add",this.configuration=(e==null?void 0:e.configuration)||"Configuration",this.description=e&&e.description?e.description:"Description",this.descriptionPlaceholder=e&&e.descriptionPlaceholder?e.descriptionPlaceholder:"Describe your Either/Or",this.images=e&&e.images?e.images:"Images",this.rules=e&&e.rules?e.rules:"Rules",this.rulesPlaceholder=e&&e.rulesPlaceholder?e.rulesPlaceholder:"Describe your rules for participating in Either/Or",this.adContent=e&&e.adContent?e.adContent:"Ad content",this.adContentPlaceholder=e&&e.adContentPlaceholder?e.adContentPlaceholder:"Place your ad content in Either/Or",this.optionImages=e&&e.optionImages?e.optionImages:"Option images",this.main=e&&e.main?e.main:"Main",this.cover=e&&e.cover?e.cover:"Cover",this.mobile=e&&e.mobile?e.mobile:"Mobile",this.imagePlaceholder=e&&e.imagePlaceholder?e.imagePlaceholder:"Paste your image as valid URL or as relative path",this.active=e&&e.active?e.active:"Active",this.inactive=e&&e.inactive?e.inactive:"Inactive",this.statusDescription=e&&e.statusDescription?e.statusDescription:"When Either/Or is Inactive, then users are not allowed to participate",this.winningCondition=(e==null?void 0:e.winningCondition)||"Winning condition",this.winningConditionDescription=(e==null?void 0:e.winningConditionDescription)||"Winning condition determines the correct choice out of a pair of options presented to the user. When is set to 'More,' the user must select the option that has a greater value to win. Conversely, if is set to 'Less,' the winning choice is the one with the lesser value",this.more=(e==null?void 0:e.more)||"More",this.less=(e==null?void 0:e.less)||"Less",this.time=e&&e.time?e.time:"Time",this.timeDescription=e&&e.timeDescription?e.timeDescription:"Enter the time limit for answering questions by users. Time is in seconds",this.lives=(e==null?void 0:e.lives)||"Lives",this.livesDescription=(e==null?void 0:e.livesDescription)||"Enter how many lives the user will have during a game",this.points=(e==null?void 0:e.points)||"Points",this.pointsDescription=(e==null?void 0:e.pointsDescription)||"Set the threshold of consecutive correct answers after which points are awarded and define the amount of points received from this step onwards. Valid value for correct steps is between 0-50 and for score 1-100",this.pointNumber=(e==null?void 0:e.pointNumber)||"Point number",this.pointsCorrectSteps=(e==null?void 0:e.pointsCorrectSteps)||"Correct steps",this.pointsCorrectStepsPlaceholder=(e==null?void 0:e.pointsCorrectStepsPlaceholder)||"Set the number of correct steps needed in a row to earn points",this.pointsScore=(e==null?void 0:e.pointsScore)||"Score",this.pointsScorePlaceholder=(e==null?void 0:e.pointsScorePlaceholder)||"Set the points awarded per correct answer within the streak",this.optionsDescription=(e==null?void 0:e.optionsDescription)||"Describe the options that users will select from during the game. Ensure to provide a minimum of 5 and a maximum of 100 options",this.optionsValue=(e==null?void 0:e.optionsValue)||"Value",this.optionsValuePlaceholder=(e==null?void 0:e.optionsValuePlaceholder)||"Type the value of the option",this.repeatedValueMessage=e&&e.repeatedValueMessage?e.repeatedValueMessage:"You have entered a repeated value. Please enter a different one.",this.flags=e&&e.flags?e.flags:"Flags",this.flagsPlaceholder=e&&e.flagsPlaceholder?e.flagsPlaceholder:"Type your flag and hit enter",this.labels=e&&e.labels?e.labels:"Labels",this.customFields=e&&e.customFields?e.customFields:"Custom fields",this.dynamicFieldsDescription=e&&e.dynamicFieldsDescription?e.dynamicFieldsDescription:"You can create your custom attributes for easier way to connect or describe your Either/Or",this.keyDynamicFields=e&&e.keyDynamicFields?e.keyDynamicFields:"Key",this.valueDynamicFields=e&&e.valueDynamicFields?e.valueDynamicFields:"Value",this.options=e&&e.options?e.options:"Options",this.optionNumber=e&&e.optionNumber?e.optionNumber:"Option number",this.context=e&&e.context?e.context:"Context",this.content=e&&e.content?e.content:"Content",this.tags=e&&e.tags?e.tags:"Tags",this.entity=e&&e.entity?e.entity:"Entity",this.campaign=e&&e.campaign?e.campaign:"Campaign",this.id=e&&e.id?e.id:"ID",this.idOptionPlaceholder=(e==null?void 0:e.idOptionPlaceholder)||"Type the ID of the option",this.labelOptionPlaceholder=(e==null?void 0:e.labelOptionPlaceholder)||"Type the label of the option",this.idContentPlaceholder=e&&e.idContentPlaceholder?e.idContentPlaceholder:"Type the ID of your content",this.idCampaignPlaceholder=e&&e.idCampaignPlaceholder?e.idCampaignPlaceholder:"Type the ID of your campaign",this.label=e&&e.label?e.label:"Label",this.labelContentPlaceholder=e&&e.labelContentPlaceholder?e.labelContentPlaceholder:"Type the content's label",this.labelCampaignPlaceholder=e&&e.labelCampaignPlaceholder?e.labelCampaignPlaceholder:"Type the campaign's label",this.type=e&&e.type?e.type:"Type",this.typeDescription=e&&e.typeDescription?e.typeDescription:"Select the Either/Or type. You can set the types in our Management Portal by going to Features, then clicking on the Either/Or page",this.noType=e&&e.noType?e.noType:"No type",this.typeContentPlaceholder=e&&e.typeContentPlaceholder?e.typeContentPlaceholder:"Type the content's type",this.previewEitherOr=e&&e.previewEitherOr?e.previewEitherOr:"Preview Either/Or",this.deleteLabel=e&&e.deleteLabel?e.deleteLabel:"Delete",this.cancelLabel=e&&e.cancelLabel?e.cancelLabel:"Cancel",this.confirmationQuestionLabel=e&&e.confirmationQuestionLabel?e.confirmationQuestionLabel:"Are you sure you want to delete",this.searchImages=e&&e.searchImages?e.searchImages:"Search images",this.clearFromToFilterSportal365ImagesMessage=e&&e.clearFromToFilterSportal365ImagesMessage?e.clearFromToFilterSportal365ImagesMessage:"You have cleared from/to filter for Sportal365 search images",this.hideFilters=e&&e.hideFilters?e.hideFilters:"Hide filters",this.showFilters=e&&e.showFilters?e.showFilters:"Show filters",this.dateFromTo=e&&e.dateFromTo?e.dateFromTo:"Date from/to",this.dateFromToPlaceholder=e&&e.dateFromToPlaceholder?e.dateFromToPlaceholder:"Select Date...",this.noImagesFound=e&&e.noImagesFound?e.noImagesFound:"No images found",this.previous=e&&e.previous?e.previous:"Previous",this.next=e&&e.next?e.next:"Next",this.clear=e&&e.clear?e.clear:"Clear",this.getFootballEntitiesErrorMessage=e&&e.getFootballEntitiesErrorMessage?e.getFootballEntitiesErrorMessage:"There was a problem with fetching football's data",this.createEitherOrMessage=e&&e.createEitherOrMessage?e.createEitherOrMessage:"You have successfully created Either/Or",this.createEitherOrErrorMessage=e&&e.createEitherOrErrorMessage?e.createEitherOrErrorMessage:"There was a problem creating Either/Or. Please try again",this.titleRequiredFieldValidationMessage=e&&e.titleRequiredFieldValidationMessage?e.titleRequiredFieldValidationMessage:"Title field is required!",this.livesFieldValidationMessage=(e==null?void 0:e.livesFieldValidationMessage)||"The value for 'lives' field is invalid. The valid one is withing the range of 1-20",this.timeFieldValidationMessage=(e==null?void 0:e.timeFieldValidationMessage)||"The value for 'time' field is invalid. The valid one is withing the range of 1-20",this.pointsFieldValidationMessage=(e==null?void 0:e.pointsFieldValidationMessage)||"Points contain value where score or correct steps is an invalid one",this.optionsFieldValidationMessage=(e==null?void 0:e.optionsFieldValidationMessage)||"Options must not contain any repeated IDs",this.tagsInvalidFieldValidationMessage=e&&e.tagsInvalidFieldValidationMessage?e.tagsInvalidFieldValidationMessage:"Tag entity is required!",this.getEitherOrErrorMessage=e&&e.getEitherOrErrorMessage?e.getEitherOrErrorMessage:"There was a problem with fetching Either/Or data. Please try again",this.deleteEitherOrMessage=e&&e.deleteEitherOrMessage?e.deleteEitherOrMessage:"You have successfully deleted Either/Or",this.deleteEitherOrErrorMessage=e&&e.deleteEitherOrErrorMessage?e.deleteEitherOrErrorMessage:"There was a problem with deleting Either/Or. Please try again",this.updateEitherOrMessage=e&&e.updateEitherOrMessage?e.updateEitherOrMessage:"You have successfully updated Either/Or",this.updateEitherOrErrorMessage=e&&e.updateEitherOrErrorMessage?e.updateEitherOrErrorMessage:"There was a problem updating Either/Or. Please try again",this.uploadingImageMessage=e&&e.uploadingImageMessage?e.uploadingImageMessage:"You have successfully uploaded image",this.generateSignedInUrlErrorMessage=e&&e.generateSignedInUrlErrorMessage?e.generateSignedInUrlErrorMessage:"There was a problem generating signed in URL to store the image in bucket. Please try again",this.uploadingImageErrorMessage=e&&e.uploadingImageErrorMessage?e.uploadingImageErrorMessage:"There was a problem with uploading image to bucket. Please try again",this.encryptingImageErrorMessage=e&&e.encryptingImageErrorMessage?e.encryptingImageErrorMessage:"There was a problem with encrypting image before uploading it to bucket. Please try again",this.searchSportal365ImagesErrorMessage=e&&e.searchSportal365ImagesErrorMessage?e.searchSportal365ImagesErrorMessage:"There was a problem with searching images from Sportal 365 API. Please try again"}}const Me=K.createContext(null),Rw=({labels:t,children:e})=>{const n=new Mw(t);return j(Me.Provider,{value:n,children:e})};/**
|
|
12
|
+
*/var yw=cn.default,ud=60103;if(Oi.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var cd=Symbol.for;ud=cd("react.element"),Oi.Fragment=cd("react.fragment")}var ww=yw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bw=Object.prototype.hasOwnProperty,_w={key:!0,ref:!0,__self:!0,__source:!0};function dd(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)bw.call(e,r)&&!_w.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:ud,type:t,key:s,ref:o,props:i,_owner:ww.current}}Oi.jsx=dd,Oi.jsxs=dd,function(t){t.exports=Oi}(La);const De=La.exports.Fragment,j=La.exports.jsx,ae=La.exports.jsxs,Ti=t=>typeof t=="number"&&!isNaN(t),dr=t=>typeof t=="string",St=t=>typeof t=="function",Ba=t=>dr(t)||St(t)?t:null,Ko=t=>K.isValidElement(t)||dr(t)||St(t)||Ti(t);function Ew(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=t;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,n)})})}function Ua(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:s=300}=t;return function(o){let{children:l,position:u,preventExitTransition:c,done:d,nodeRef:f,isIn:p}=o;const h=r?`${e}--${u}`:e,y=r?`${n}--${u}`:n,g=K.useRef(0);return K.useLayoutEffect(()=>{const v=f.current,b=h.split(" "),w=I=>{I.target===f.current&&(v.dispatchEvent(new Event("d")),v.removeEventListener("animationend",w),v.removeEventListener("animationcancel",w),g.current===0&&I.type!=="animationcancel"&&v.classList.remove(...b))};v.classList.add(...b),v.addEventListener("animationend",w),v.addEventListener("animationcancel",w)},[]),K.useEffect(()=>{const v=f.current,b=()=>{v.removeEventListener("animationend",b),i?Ew(v,d,s):d()};p||(c?b():(g.current=1,v.className+=` ${y}`,v.addEventListener("animationend",b)))},[p]),cn.default.createElement(cn.default.Fragment,null,l)}}function fd(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Gt={list:new Map,emitQueue:new Map,on(t,e){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(e),this},off(t,e){if(e){const n=this.list.get(t).filter(r=>r!==e);return this.list.set(t,n),this}return this.list.delete(t),this},cancelEmit(t){const e=this.emitQueue.get(t);return e&&(e.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit(t){this.list.has(t)&&this.list.get(t).forEach(e=>{const n=setTimeout(()=>{e(...[].slice.call(arguments,1))},0);this.emitQueue.has(t)||this.emitQueue.set(t,[]),this.emitQueue.get(t).push(n)})}},$a=t=>{let i=t,{theme:e,type:n}=i,r=Gn(i,["theme","type"]);return j("svg",Z({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`},r))},Jo={info:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"})}))},warning:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"})}))},success:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"})}))},error:function(t){return j($a,se(Z({},t),{children:j("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"})}))},spinner:function(){return j("div",{className:"Toastify__spinner"})}};function Iw(t){const[,e]=K.useReducer(h=>h+1,0),[n,r]=K.useState([]),i=K.useRef(null),s=K.useRef(new Map).current,o=h=>n.indexOf(h)!==-1,l=K.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:o,getToast:h=>s.get(h)}).current;function u(h){let{containerId:y}=h;const{limit:g}=l.props;!g||y&&l.containerId!==y||(l.count-=l.queue.length,l.queue=[])}function c(h){r(y=>h==null?[]:y.filter(g=>g!==h))}function d(){const{toastContent:h,toastProps:y,staleId:g}=l.queue.shift();p(h,y,g)}function f(h,y){let R=y,{delay:g,staleId:v}=R,b=Gn(R,["delay","staleId"]);if(!Ko(h)||function(D){return!i.current||l.props.enableMultiContainer&&D.containerId!==l.props.containerId||s.has(D.toastId)&&D.updateId==null}(b))return;const{toastId:w,updateId:I,data:m}=b,{props:A}=l,E=()=>c(w),O=I==null;O&&l.count++;const T=se(Z(se(Z({},A),{style:A.toastStyle,key:l.toastKey++}),Object.fromEntries(Object.entries(b).filter(D=>{let[L,N]=D;return N!=null}))),{toastId:w,updateId:I,data:m,closeToast:E,isIn:!1,className:Ba(b.className||A.toastClassName),bodyClassName:Ba(b.bodyClassName||A.bodyClassName),progressClassName:Ba(b.progressClassName||A.progressClassName),autoClose:!b.isLoading&&(x=b.autoClose,P=A.autoClose,x===!1||Ti(x)&&x>0?x:P),deleteToast(){const D=fd(s.get(w),"removed");s.delete(w),Gt.emit(4,D);const L=l.queue.length;if(l.count=w==null?l.count-l.displayedToast:l.count-1,l.count<0&&(l.count=0),L>0){const N=w==null?l.props.limit:1;if(L===1||N===1)l.displayedToast++,d();else{const H=N>L?L:N;l.displayedToast=H;for(let q=0;q<H;q++)d()}}else e()}});var x,P;T.iconOut=function(D){let{theme:L,type:N,isLoading:H,icon:q}=D,z=null;const U={theme:L,type:N};return q===!1||(St(q)?z=q(U):K.isValidElement(q)?z=K.cloneElement(q,U):dr(q)||Ti(q)?z=q:H?z=Jo.spinner():(F=>F in Jo)(N)&&(z=Jo[N](U))),z}(T),St(b.onOpen)&&(T.onOpen=b.onOpen),St(b.onClose)&&(T.onClose=b.onClose),T.closeButton=A.closeButton,b.closeButton===!1||Ko(b.closeButton)?T.closeButton=b.closeButton:b.closeButton===!0&&(T.closeButton=!Ko(A.closeButton)||A.closeButton);let S=h;K.isValidElement(h)&&!dr(h.type)?S=K.cloneElement(h,{closeToast:E,toastProps:T,data:m}):St(h)&&(S=h({closeToast:E,toastProps:T,data:m})),A.limit&&A.limit>0&&l.count>A.limit&&O?l.queue.push({toastContent:S,toastProps:T,staleId:v}):Ti(g)?setTimeout(()=>{p(S,T,v)},g):p(S,T,v)}function p(h,y,g){const{toastId:v}=y;g&&s.delete(g);const b={content:h,props:y};s.set(v,b),r(w=>[...w,v].filter(I=>I!==g)),Gt.emit(4,fd(b,b.props.updateId==null?"added":"updated"))}return K.useEffect(()=>(l.containerId=t.containerId,Gt.cancelEmit(3).on(0,f).on(1,h=>i.current&&c(h)).on(5,u).emit(2,l),()=>{s.clear(),Gt.emit(3,l)}),[]),K.useEffect(()=>{l.props=t,l.isToastActive=o,l.displayedToast=n.length}),{getToastToRender:function(h){const y=new Map,g=Array.from(s.values());return t.newestOnTop&&g.reverse(),g.forEach(v=>{const{position:b}=v.props;y.has(b)||y.set(b,[]),y.get(b).push(v)}),Array.from(y,v=>h(v[0],v[1]))},containerRef:i,isToastActive:o}}function hd(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}function pd(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}function Aw(t){const[e,n]=K.useState(!1),[r,i]=K.useState(!1),s=K.useRef(null),o=K.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=K.useRef(t),{autoClose:u,pauseOnHover:c,closeToast:d,onClick:f,closeOnClick:p}=t;function h(m){if(t.draggable){m.nativeEvent.type==="touchstart"&&m.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),document.addEventListener("touchmove",b),document.addEventListener("touchend",w);const A=s.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=A.getBoundingClientRect(),A.style.transition="",o.x=hd(m.nativeEvent),o.y=pd(m.nativeEvent),t.draggableDirection==="x"?(o.start=o.x,o.removalDistance=A.offsetWidth*(t.draggablePercent/100)):(o.start=o.y,o.removalDistance=A.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent/100))}}function y(m){if(o.boundingRect){const{top:A,bottom:E,left:O,right:T}=o.boundingRect;m.nativeEvent.type!=="touchend"&&t.pauseOnHover&&o.x>=O&&o.x<=T&&o.y>=A&&o.y<=E?v():g()}}function g(){n(!0)}function v(){n(!1)}function b(m){const A=s.current;o.canDrag&&A&&(o.didMove=!0,e&&v(),o.x=hd(m),o.y=pd(m),o.delta=t.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),A.style.transform=`translate${t.draggableDirection}(${o.delta}px)`,A.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function w(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",w);const m=s.current;if(o.canDrag&&o.didMove&&m){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),void t.closeToast();m.style.transition="transform 0.2s, opacity 0.2s",m.style.transform=`translate${t.draggableDirection}(0)`,m.style.opacity="1"}}K.useEffect(()=>{l.current=t}),K.useEffect(()=>(s.current&&s.current.addEventListener("d",g,{once:!0}),St(t.onOpen)&&t.onOpen(K.isValidElement(t.children)&&t.children.props),()=>{const m=l.current;St(m.onClose)&&m.onClose(K.isValidElement(m.children)&&m.children.props)}),[]),K.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||v(),window.addEventListener("focus",g),window.addEventListener("blur",v)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",v))}),[t.pauseOnFocusLoss]);const I={onMouseDown:h,onTouchStart:h,onMouseUp:y,onTouchEnd:y};return u&&c&&(I.onMouseEnter=v,I.onMouseLeave=g),p&&(I.onClick=m=>{f&&f(m),o.canCloseOnClick&&d()}),{playToast:g,pauseToast:v,isRunning:e,preventExitTransition:r,toastRef:s,eventHandlers:I}}function md(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return j("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:i=>{i.stopPropagation(),e(i)},"aria-label":r,children:j("svg",{"aria-hidden":"true",viewBox:"0 0 14 16",children:j("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})})})}function Ow(t){let{delay:e,isRunning:n,closeToast:r,type:i="default",hide:s,className:o,style:l,controlledProgress:u,progress:c,rtl:d,isIn:f,theme:p}=t;const h=s||u&&c===0,y=se(Z({},l),{animationDuration:`${e}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1});u&&(y.transform=`scaleX(${c})`);const g=Qn("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":d}),v=St(o)?o({rtl:d,type:i,defaultClassName:g}):Qn(g,o);return cn.default.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:v,style:y,[u&&c>=1?"onTransitionEnd":"onAnimationEnd"]:u&&c<1?null:()=>{f&&r()}})}const Tw=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:i}=Aw(t),{closeButton:s,children:o,autoClose:l,onClick:u,type:c,hideProgressBar:d,closeToast:f,transition:p,position:h,className:y,style:g,bodyClassName:v,bodyStyle:b,progressClassName:w,progressStyle:I,updateId:m,role:A,progress:E,rtl:O,toastId:T,deleteToast:x,isIn:P,isLoading:S,iconOut:R,closeOnClick:D,theme:L}=t,N=Qn("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":D}),H=St(y)?y({rtl:O,position:h,type:c,defaultClassName:N}):Qn(N,y),q=!!E||!l,z={closeToast:f,type:c,theme:L};let U=null;return s===!1||(U=St(s)?s(z):K.isValidElement(s)?K.cloneElement(s,z):md(z)),cn.default.createElement(p,{isIn:P,done:x,position:h,preventExitTransition:n,nodeRef:r},ae("div",se(Z({id:T,onClick:u,className:H},i),{style:g,ref:r,children:[ae("div",se(Z({},P&&{role:A}),{className:St(v)?v({type:c}):Qn("Toastify__toast-body",v),style:b,children:[R!=null&&j("div",{className:Qn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!S}),children:R}),j("div",{children:o})]})),U,j(Ow,se(Z({},m&&!q?{key:`pb-${m}`}:{}),{rtl:O,theme:L,delay:l,isRunning:e,isIn:P,closeToast:f,hide:d,type:c,style:I,className:w,controlledProgress:q,progress:E||0}))]})))},ja=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},Cw=Ua(ja("bounce",!0));Ua(ja("slide",!0)),Ua(ja("zoom")),Ua(ja("flip"));const Xo=K.forwardRef((t,e)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=Iw(t),{className:s,style:o,rtl:l,containerId:u}=t;function c(d){const f=Qn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":l});return St(s)?s({position:d,rtl:l,defaultClassName:f}):Qn(f,Ba(s))}return K.useEffect(()=>{e&&(e.current=r.current)},[]),j("div",{ref:r,className:"Toastify",id:u,children:n((d,f)=>{const p=f.length?Z({},o):se(Z({},o),{pointerEvents:"none"});return j("div",{className:c(d),style:p,children:f.map((h,y)=>{let{content:g,props:v}=h;return K.createElement(Tw,se(Z({},v),{isIn:i(v.toastId),style:se(Z({},v.style),{"--nth":y+1,"--len":f.length}),key:`toast-${v.key}`}),g)})},`container-${d}`)})})});Xo.displayName="ToastContainer",Xo.defaultProps={position:"top-right",transition:Cw,autoClose:5e3,closeButton:md,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Zo,fr=new Map,Ci=[],Sw=1;function gd(){return""+Sw++}function Pw(t){return t&&(dr(t.toastId)||Ti(t.toastId))?t.toastId:gd()}function Si(t,e){return fr.size>0?Gt.emit(0,t,e):Ci.push({content:t,options:e}),e.toastId}function Ha(t,e){return se(Z({},e),{type:e&&e.type||t,toastId:Pw(e)})}function Va(t){return(e,n)=>Si(e,Ha(t,n))}function Pe(t,e){return Si(t,Ha("default",e))}Pe.loading=(t,e)=>Si(t,Ha("default",Z({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},e))),Pe.promise=function(t,e,n){let r,{pending:i,error:s,success:o}=e;i&&(r=dr(i)?Pe.loading(i,n):Pe.loading(i.render,Z(Z({},n),i)));const l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(d,f,p)=>{if(f==null)return void Pe.dismiss(r);const h=se(Z(Z({type:d},l),n),{data:p}),y=dr(f)?{render:f}:f;return r?Pe.update(r,Z(Z({},h),y)):Pe(y.render,Z(Z({},h),y)),p},c=St(t)?t():t;return c.then(d=>u("success",o,d)).catch(d=>u("error",s,d)),c},Pe.success=Va("success"),Pe.info=Va("info"),Pe.error=Va("error"),Pe.warning=Va("warning"),Pe.warn=Pe.warning,Pe.dark=(t,e)=>Si(t,Ha("default",Z({theme:"dark"},e))),Pe.dismiss=t=>{fr.size>0?Gt.emit(1,t):Ci=Ci.filter(e=>t!=null&&e.options.toastId!==t)},Pe.clearWaitingQueue=function(t){return t===void 0&&(t={}),Gt.emit(5,t)},Pe.isActive=t=>{let e=!1;return fr.forEach(n=>{n.isToastActive&&n.isToastActive(t)&&(e=!0)}),e},Pe.update=function(t,e){e===void 0&&(e={}),setTimeout(()=>{const n=function(r,i){let{containerId:s}=i;const o=fr.get(s||Zo);return o&&o.getToast(r)}(t,e);if(n){const{props:r,content:i}=n,s=se(Z(Z({delay:100},r),e),{toastId:e.toastId||t,updateId:gd()});s.toastId!==t&&(s.staleId=t);const o=s.render||i;delete s.render,Si(o,s)}},0)},Pe.done=t=>{Pe.update(t,{progress:1})},Pe.onChange=t=>(Gt.on(4,t),()=>{Gt.off(4,t)}),Pe.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Pe.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gt.on(2,t=>{Zo=t.containerId||t,fr.set(Zo,t),Ci.forEach(e=>{Gt.emit(0,e.content,e.options)}),Ci=[]}).on(3,t=>{fr.delete(t.containerId||t),fr.size===0&&Gt.off(0).off(1).off(5)});function Ie(t){const e=K.useContext(t);if(e===void 0)throw new Error("Context was used outside of its Provider");return e}class Mw{constructor(e){a(this,"userNotFound");a(this,"signOut");a(this,"timeFormat");a(this,"getEitherOrsErrorMessage");a(this,"title");a(this,"titlePlaceholder");a(this,"noGamesFound");a(this,"status");a(this,"participants");a(this,"averageScore");a(this,"perfectScore");a(this,"creationDate");a(this,"actions");a(this,"create");a(this,"edit");a(this,"save");a(this,"preview");a(this,"close");a(this,"filterBy");a(this,"sortBy");a(this,"clearStatus");a(this,"contextEntityTag");a(this,"typeContextTagNamePlaceholder");a(this,"showMoreImages");a(this,"hideMoreImages");a(this,"uploadImage");a(this,"groupByStatus");a(this,"copyUrl");a(this,"copied");a(this,"add");a(this,"configuration");a(this,"description");a(this,"descriptionPlaceholder");a(this,"images");a(this,"rules");a(this,"rulesPlaceholder");a(this,"adContent");a(this,"adContentPlaceholder");a(this,"optionImages");a(this,"imagePlaceholder");a(this,"main");a(this,"cover");a(this,"mobile");a(this,"active");a(this,"inactive");a(this,"statusDescription");a(this,"winningCondition");a(this,"winningConditionDescription");a(this,"more");a(this,"less");a(this,"time");a(this,"timeDescription");a(this,"lives");a(this,"livesDescription");a(this,"points");a(this,"pointsDescription");a(this,"pointNumber");a(this,"pointsCorrectSteps");a(this,"pointsCorrectStepsPlaceholder");a(this,"pointsScore");a(this,"pointsScorePlaceholder");a(this,"optionsValue");a(this,"optionsValuePlaceholder");a(this,"repeatedValueMessage");a(this,"flags");a(this,"flagsPlaceholder");a(this,"labels");a(this,"customFields");a(this,"dynamicFieldsDescription");a(this,"keyDynamicFields");a(this,"valueDynamicFields");a(this,"options");a(this,"optionNumber");a(this,"optionsDescription");a(this,"context");a(this,"content");a(this,"tags");a(this,"entity");a(this,"campaign");a(this,"id");a(this,"idOptionPlaceholder");a(this,"labelOptionPlaceholder");a(this,"idContentPlaceholder");a(this,"idCampaignPlaceholder");a(this,"label");a(this,"labelContentPlaceholder");a(this,"labelCampaignPlaceholder");a(this,"type");a(this,"typeDescription");a(this,"noType");a(this,"deleteLabel");a(this,"cancelLabel");a(this,"confirmationQuestionLabel");a(this,"typeContentPlaceholder");a(this,"previewEitherOr");a(this,"searchImages");a(this,"clearFromToFilterSportal365ImagesMessage");a(this,"hideFilters");a(this,"showFilters");a(this,"dateFromTo");a(this,"dateFromToPlaceholder");a(this,"noImagesFound");a(this,"previous");a(this,"next");a(this,"clear");a(this,"getFootballEntitiesErrorMessage");a(this,"titleRequiredFieldValidationMessage");a(this,"livesFieldValidationMessage");a(this,"timeFieldValidationMessage");a(this,"pointsFieldValidationMessage");a(this,"optionsFieldValidationMessage");a(this,"tagsInvalidFieldValidationMessage");a(this,"getEitherOrErrorMessage");a(this,"deleteEitherOrMessage");a(this,"deleteEitherOrErrorMessage");a(this,"createEitherOrMessage");a(this,"createEitherOrErrorMessage");a(this,"updateEitherOrMessage");a(this,"updateEitherOrErrorMessage");a(this,"uploadingImageMessage");a(this,"generateSignedInUrlErrorMessage");a(this,"uploadingImageErrorMessage");a(this,"encryptingImageErrorMessage");a(this,"searchSportal365ImagesErrorMessage");this.userNotFound=e&&e.userNotFound?e.userNotFound:"User not found. Please try again",this.signOut=e&&e.signOut?e.signOut:"Sign out",this.noGamesFound=e&&e.noGamesFound?e.noGamesFound:"No Either/Or games were found. You can create one by clicking the button 'Create'",this.timeFormat=e&&e.timeFormat?e.timeFormat:"DD.MM.YYYY, HH:mm",this.getEitherOrsErrorMessage=e&&e.getEitherOrsErrorMessage?e.getEitherOrsErrorMessage:"There was a problem with fetching list of Either/Or games",this.title=e&&e.title?e.title:"Title",this.status=e&&e.status?e.status:"Status",this.creationDate=e&&e.creationDate?e.creationDate:"Created at",this.actions=e&&e.actions?e.actions:"Actions",this.titlePlaceholder=e&&e.titlePlaceholder?e.titlePlaceholder:"Provide a title for your Either/Or",this.create=e&&e.create?e.create:"Create",this.edit=e&&e.edit?e.edit:"Edit",this.save=e&&e.save?e.save:"Save",this.preview=e&&e.preview?e.preview:"Preview",this.close=e&&e.close?e.close:"Close",this.filterBy=(e==null?void 0:e.filterBy)||"Filter by:",this.sortBy=(e==null?void 0:e.sortBy)||"Sort by:",this.clearStatus=(e==null?void 0:e.clearStatus)||"Clear status",this.contextEntityTag=(e==null?void 0:e.contextEntityTag)||"Context entity tag",this.typeContextTagNamePlaceholder=(e==null?void 0:e.typeContextTagNamePlaceholder)||"Type context tag name...",this.showMoreImages=(e==null?void 0:e.showMoreImages)||"Show more images",this.hideMoreImages=(e==null?void 0:e.hideMoreImages)||"Hide more images",this.uploadImage=(e==null?void 0:e.uploadImage)||"Upload image",this.groupByStatus=(e==null?void 0:e.groupByStatus)||"Group by status",this.copyUrl=(e==null?void 0:e.copyUrl)||"Copy URL",this.copied=(e==null?void 0:e.copied)||"Copied",this.add=(e==null?void 0:e.add)||"Add",this.configuration=(e==null?void 0:e.configuration)||"Configuration",this.description=e&&e.description?e.description:"Description",this.descriptionPlaceholder=e&&e.descriptionPlaceholder?e.descriptionPlaceholder:"Describe your Either/Or",this.images=e&&e.images?e.images:"Images",this.rules=e&&e.rules?e.rules:"Rules",this.rulesPlaceholder=e&&e.rulesPlaceholder?e.rulesPlaceholder:"Describe your rules for participating in Either/Or",this.adContent=e&&e.adContent?e.adContent:"Ad content",this.adContentPlaceholder=e&&e.adContentPlaceholder?e.adContentPlaceholder:"Place your ad content in Either/Or",this.optionImages=e&&e.optionImages?e.optionImages:"Option images",this.main=e&&e.main?e.main:"Main",this.cover=e&&e.cover?e.cover:"Cover",this.mobile=e&&e.mobile?e.mobile:"Mobile",this.imagePlaceholder=e&&e.imagePlaceholder?e.imagePlaceholder:"Paste your image as valid URL or as relative path",this.active=e&&e.active?e.active:"Active",this.inactive=e&&e.inactive?e.inactive:"Inactive",this.statusDescription=e&&e.statusDescription?e.statusDescription:"When Either/Or is Inactive, then users are not allowed to participate",this.winningCondition=(e==null?void 0:e.winningCondition)||"Winning condition",this.winningConditionDescription=(e==null?void 0:e.winningConditionDescription)||"Winning condition determines the correct choice out of a pair of options presented to the user. When is set to 'More,' the user must select the option that has a greater value to win. Conversely, if is set to 'Less,' the winning choice is the one with the lesser value",this.more=(e==null?void 0:e.more)||"More",this.less=(e==null?void 0:e.less)||"Less",this.time=e&&e.time?e.time:"Time",this.timeDescription=e&&e.timeDescription?e.timeDescription:"Enter the time limit for answering questions by users. Time is in seconds",this.lives=(e==null?void 0:e.lives)||"Lives",this.livesDescription=(e==null?void 0:e.livesDescription)||"Enter how many lives the user will have during a game",this.points=(e==null?void 0:e.points)||"Points",this.pointsDescription=(e==null?void 0:e.pointsDescription)||"Set the threshold of consecutive correct answers after which points are awarded and define the amount of points received from this step onwards. Valid value for correct steps is between 0-50 and for score 1-100",this.pointNumber=(e==null?void 0:e.pointNumber)||"Point number",this.pointsCorrectSteps=(e==null?void 0:e.pointsCorrectSteps)||"Correct steps",this.pointsCorrectStepsPlaceholder=(e==null?void 0:e.pointsCorrectStepsPlaceholder)||"Set the number of correct steps needed in a row to earn points",this.pointsScore=(e==null?void 0:e.pointsScore)||"Score",this.pointsScorePlaceholder=(e==null?void 0:e.pointsScorePlaceholder)||"Set the points awarded per correct answer within the streak",this.optionsDescription=(e==null?void 0:e.optionsDescription)||"Describe the options that users will select from during the game. Ensure to provide a minimum of 5 and a maximum of 100 options",this.optionsValue=(e==null?void 0:e.optionsValue)||"Value",this.optionsValuePlaceholder=(e==null?void 0:e.optionsValuePlaceholder)||"Type the value of the option",this.repeatedValueMessage=e&&e.repeatedValueMessage?e.repeatedValueMessage:"You have entered a repeated value. Please enter a different one.",this.flags=e&&e.flags?e.flags:"Flags",this.flagsPlaceholder=e&&e.flagsPlaceholder?e.flagsPlaceholder:"Type your flag and hit enter",this.labels=e&&e.labels?e.labels:"Labels",this.customFields=e&&e.customFields?e.customFields:"Custom fields",this.dynamicFieldsDescription=e&&e.dynamicFieldsDescription?e.dynamicFieldsDescription:"You can create your custom attributes for easier way to connect or describe your Either/Or",this.keyDynamicFields=e&&e.keyDynamicFields?e.keyDynamicFields:"Key",this.valueDynamicFields=e&&e.valueDynamicFields?e.valueDynamicFields:"Value",this.options=e&&e.options?e.options:"Options",this.optionNumber=e&&e.optionNumber?e.optionNumber:"Option number",this.context=e&&e.context?e.context:"Context",this.content=e&&e.content?e.content:"Content",this.tags=e&&e.tags?e.tags:"Tags",this.entity=e&&e.entity?e.entity:"Entity",this.campaign=e&&e.campaign?e.campaign:"Campaign",this.id=e&&e.id?e.id:"ID",this.idOptionPlaceholder=(e==null?void 0:e.idOptionPlaceholder)||"Type the ID of the option",this.labelOptionPlaceholder=(e==null?void 0:e.labelOptionPlaceholder)||"Type the label of the option",this.idContentPlaceholder=e&&e.idContentPlaceholder?e.idContentPlaceholder:"Type the ID of your content",this.idCampaignPlaceholder=e&&e.idCampaignPlaceholder?e.idCampaignPlaceholder:"Type the ID of your campaign",this.label=e&&e.label?e.label:"Label",this.labelContentPlaceholder=e&&e.labelContentPlaceholder?e.labelContentPlaceholder:"Type the content's label",this.labelCampaignPlaceholder=e&&e.labelCampaignPlaceholder?e.labelCampaignPlaceholder:"Type the campaign's label",this.type=e&&e.type?e.type:"Type",this.typeDescription=e&&e.typeDescription?e.typeDescription:"Select the Either/Or type. You can set the types in our Management Portal by going to Features, then clicking on the Either/Or page",this.noType=e&&e.noType?e.noType:"No type",this.typeContentPlaceholder=e&&e.typeContentPlaceholder?e.typeContentPlaceholder:"Type the content's type",this.previewEitherOr=e&&e.previewEitherOr?e.previewEitherOr:"Preview Either/Or",this.deleteLabel=e&&e.deleteLabel?e.deleteLabel:"Delete",this.cancelLabel=e&&e.cancelLabel?e.cancelLabel:"Cancel",this.confirmationQuestionLabel=e&&e.confirmationQuestionLabel?e.confirmationQuestionLabel:"Are you sure you want to delete",this.searchImages=e&&e.searchImages?e.searchImages:"Search images",this.clearFromToFilterSportal365ImagesMessage=e&&e.clearFromToFilterSportal365ImagesMessage?e.clearFromToFilterSportal365ImagesMessage:"You have cleared from/to filter for Sportal365 search images",this.hideFilters=e&&e.hideFilters?e.hideFilters:"Hide filters",this.showFilters=e&&e.showFilters?e.showFilters:"Show filters",this.dateFromTo=e&&e.dateFromTo?e.dateFromTo:"Date from/to",this.dateFromToPlaceholder=e&&e.dateFromToPlaceholder?e.dateFromToPlaceholder:"Select Date...",this.noImagesFound=e&&e.noImagesFound?e.noImagesFound:"No images found",this.previous=e&&e.previous?e.previous:"Previous",this.next=e&&e.next?e.next:"Next",this.clear=e&&e.clear?e.clear:"Clear",this.getFootballEntitiesErrorMessage=e&&e.getFootballEntitiesErrorMessage?e.getFootballEntitiesErrorMessage:"There was a problem with fetching football's data",this.createEitherOrMessage=e&&e.createEitherOrMessage?e.createEitherOrMessage:"You have successfully created Either/Or",this.createEitherOrErrorMessage=e&&e.createEitherOrErrorMessage?e.createEitherOrErrorMessage:"There was a problem creating Either/Or. Please try again",this.titleRequiredFieldValidationMessage=e&&e.titleRequiredFieldValidationMessage?e.titleRequiredFieldValidationMessage:"Title field is required!",this.livesFieldValidationMessage=(e==null?void 0:e.livesFieldValidationMessage)||"The value for 'lives' field is invalid. The valid one is withing the range of 1-20",this.timeFieldValidationMessage=(e==null?void 0:e.timeFieldValidationMessage)||"The value for 'time' field is invalid. The valid one is withing the range of 1-20",this.pointsFieldValidationMessage=(e==null?void 0:e.pointsFieldValidationMessage)||"Points contain value where score or correct steps is an invalid one",this.optionsFieldValidationMessage=(e==null?void 0:e.optionsFieldValidationMessage)||"Options must not contain any repeated IDs",this.tagsInvalidFieldValidationMessage=e&&e.tagsInvalidFieldValidationMessage?e.tagsInvalidFieldValidationMessage:"Tag entity is required!",this.getEitherOrErrorMessage=e&&e.getEitherOrErrorMessage?e.getEitherOrErrorMessage:"There was a problem with fetching Either/Or data. Please try again",this.deleteEitherOrMessage=e&&e.deleteEitherOrMessage?e.deleteEitherOrMessage:"You have successfully deleted Either/Or",this.deleteEitherOrErrorMessage=e&&e.deleteEitherOrErrorMessage?e.deleteEitherOrErrorMessage:"There was a problem with deleting Either/Or. Please try again",this.updateEitherOrMessage=e&&e.updateEitherOrMessage?e.updateEitherOrMessage:"You have successfully updated Either/Or",this.updateEitherOrErrorMessage=e&&e.updateEitherOrErrorMessage?e.updateEitherOrErrorMessage:"There was a problem updating Either/Or. Please try again",this.uploadingImageMessage=e&&e.uploadingImageMessage?e.uploadingImageMessage:"You have successfully uploaded image",this.generateSignedInUrlErrorMessage=e&&e.generateSignedInUrlErrorMessage?e.generateSignedInUrlErrorMessage:"There was a problem generating signed in URL to store the image in bucket. Please try again",this.uploadingImageErrorMessage=e&&e.uploadingImageErrorMessage?e.uploadingImageErrorMessage:"There was a problem with uploading image to bucket. Please try again",this.encryptingImageErrorMessage=e&&e.encryptingImageErrorMessage?e.encryptingImageErrorMessage:"There was a problem with encrypting image before uploading it to bucket. Please try again",this.searchSportal365ImagesErrorMessage=e&&e.searchSportal365ImagesErrorMessage?e.searchSportal365ImagesErrorMessage:"There was a problem with searching images from Sportal 365 API. Please try again"}}const Me=K.createContext(null),Rw=({labels:t,children:e})=>{const n=new Mw(t);return j(Me.Provider,{value:n,children:e})};/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
*
|
|
@@ -2273,7 +2273,7 @@ object-assign
|
|
|
2273
2273
|
*
|
|
2274
2274
|
* This source code is licensed under the MIT license found in the
|
|
2275
2275
|
* LICENSE file in the root directory of this source tree.
|
|
2276
|
-
*/var Jr=cn.default;function DI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var FI=typeof Object.is=="function"?Object.is:DI,NI=Jr.useState,LI=Jr.useEffect,BI=Jr.useLayoutEffect,UI=Jr.useDebugValue;function $I(t,e){var n=e(),r=NI({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return BI(function(){i.value=n,i.getSnapshot=e,ru(i)&&s({inst:i})},[t,n,e]),LI(function(){return ru(i)&&s({inst:i}),t(function(){ru(i)&&s({inst:i})})},[t]),UI(n),n}function ru(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!FI(t,n)}catch(r){return!0}}function jI(t,e){return e()}var HI=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?jI:$I;Dh.useSyncExternalStore=Jr.useSyncExternalStore!==void 0?Jr.useSyncExternalStore:HI,function(t){t.exports=Dh}(xh);const VI=xh.exports.useSyncExternalStore,Fh=nt.createContext(void 0),Nh=nt.createContext(!1);function Lh(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Fh),window.ReactQueryClientContext):Fh)}const qI=({context:t}={})=>{const e=nt.useContext(Lh(t,nt.useContext(Nh)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},WI=({client:t,children:e,context:n,contextSharing:r=!1})=>{nt.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const i=Lh(n,r);return j(Nh.Provider,{value:!n&&r,children:j(i.Provider,{value:t,children:e})})},Bh=nt.createContext(!1),GI=()=>nt.useContext(Bh);Bh.Provider;function zI(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const QI=nt.createContext(zI()),YI=()=>nt.useContext(QI);function KI(t,e){return typeof t=="function"?t(...e):!!t}const JI=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},XI=t=>{nt.useEffect(()=>{t.clearReset()},[t])},ZI=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&KI(n,[t.error,r]),eA=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},tA=(t,e)=>t.isLoading&&t.isFetching&&!e,nA=(t,e,n)=>(t==null?void 0:t.suspense)&&tA(e,n),rA=(t,e,n)=>e.fetchOptimistic(t).then(({data:r})=>{t.onSuccess==null||t.onSuccess(r),t.onSettled==null||t.onSettled(r,null)}).catch(r=>{n.clearReset(),t.onError==null||t.onError(r),t.onSettled==null||t.onSettled(void 0,r)});function iA(t,e){const n=qI({context:t.context}),r=GI(),i=YI(),s=n.defaultQueryOptions(t);s._optimisticResults=r?"isRestoring":"optimistic",s.onError&&(s.onError=ut.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ut.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ut.batchCalls(s.onSettled)),eA(s),JI(s,i),XI(i);const[o]=nt.useState(()=>new e(n,s)),l=o.getOptimisticResult(s);if(VI(nt.useCallback(u=>{const c=r?()=>{}:o.subscribe(ut.batchCalls(u));return o.updateResult(),c},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),nt.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),nA(s,l,r))throw rA(s,o,i);if(ZI({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:o.trackResult(l)}function iu(t,e,n){const r=Ji(t,e,n);return iA(r,RI)}var Uh={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(it,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",c="day",d="week",f="month",p="quarter",h="year",y="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var F=["th","st","nd","rd"],H=L%100;return"["+L+(F[(H-20)%10]||F[H]||F[0])+"]"}},I=function(L,F,H){var q=String(L);return!q||q.length>=F?L:""+Array(F+1-q.length).join(H)+L},m={s:I,z:function(L){var F=-L.utcOffset(),H=Math.abs(F),q=Math.floor(H/60),z=H%60;return(F<=0?"+":"-")+I(q,2,"0")+":"+I(z,2,"0")},m:function L(F,H){if(F.date()<H.date())return-L(H,F);var q=12*(H.year()-F.year())+(H.month()-F.month()),z=F.clone().add(q,f),U=H-z<0,N=F.clone().add(q+(U?-1:1),f);return+(-(q+(H-z)/(U?z-N:N-z))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:h,w:d,d:c,D:y,h:u,m:l,s:o,ms:s,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},A="en",E={};E[A]=w;var O="$isDayjsObject",T=function(L){return L instanceof M||!(!L||!L[O])},x=function L(F,H,q){var z;if(!F)return A;if(typeof F=="string"){var U=F.toLowerCase();E[U]&&(z=U),H&&(E[U]=H,z=U);var N=F.split("-");if(!z&&N.length>1)return L(N[0])}else{var C=F.name;E[C]=F,z=C}return!q&&z&&(A=z),z||!q&&A},P=function(L,F){if(T(L))return L.clone();var H=typeof F=="object"?F:{};return H.date=L,H.args=arguments,new M(H)},S=m;S.l=x,S.i=T,S.w=function(L,F){return P(L,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var M=function(){function L(H){this.$L=x(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[O]=!0}var F=L.prototype;return F.parse=function(H){this.$d=function(q){var z=q.date,U=q.utc;if(z===null)return new Date(NaN);if(S.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var N=z.match(v);if(N){var C=N[2]-1||0,R=(N[7]||"0").substring(0,3);return U?new Date(Date.UTC(N[1],C,N[3]||1,N[4]||0,N[5]||0,N[6]||0,R)):new Date(N[1],C,N[3]||1,N[4]||0,N[5]||0,N[6]||0,R)}}return new Date(z)}(H),this.init()},F.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},F.$utils=function(){return S},F.isValid=function(){return this.$d.toString()!==g},F.isSame=function(H,q){var z=P(H);return this.startOf(q)<=z&&z<=this.endOf(q)},F.isAfter=function(H,q){return P(H)<this.startOf(q)},F.isBefore=function(H,q){return this.endOf(q)<P(H)},F.$g=function(H,q,z){return S.u(H)?this[q]:this.set(z,H)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(H,q){var z=this,U=!!S.u(q)||q,N=S.p(H),C=function(X,ee){var le=S.w(z.$u?Date.UTC(z.$y,ee,X):new Date(z.$y,ee,X),z);return U?le:le.endOf(c)},R=function(X,ee){return S.w(z.toDate()[X].apply(z.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(ee)),z)},k=this.$W,B=this.$M,W=this.$D,$="set"+(this.$u?"UTC":"");switch(N){case h:return U?C(1,0):C(31,11);case f:return U?C(1,B):C(0,B+1);case d:var Q=this.$locale().weekStart||0,Y=(k<Q?k+7:k)-Q;return C(U?W-Y:W+(6-Y),B);case c:case y:return R($+"Hours",0);case u:return R($+"Minutes",1);case l:return R($+"Seconds",2);case o:return R($+"Milliseconds",3);default:return this.clone()}},F.endOf=function(H){return this.startOf(H,!1)},F.$set=function(H,q){var z,U=S.p(H),N="set"+(this.$u?"UTC":""),C=(z={},z[c]=N+"Date",z[y]=N+"Date",z[f]=N+"Month",z[h]=N+"FullYear",z[u]=N+"Hours",z[l]=N+"Minutes",z[o]=N+"Seconds",z[s]=N+"Milliseconds",z)[U],R=U===c?this.$D+(q-this.$W):q;if(U===f||U===h){var k=this.clone().set(y,1);k.$d[C](R),k.init(),this.$d=k.set(y,Math.min(this.$D,k.daysInMonth())).$d}else C&&this.$d[C](R);return this.init(),this},F.set=function(H,q){return this.clone().$set(H,q)},F.get=function(H){return this[S.p(H)]()},F.add=function(H,q){var z,U=this;H=Number(H);var N=S.p(q),C=function(B){var W=P(U);return S.w(W.date(W.date()+Math.round(B*H)),U)};if(N===f)return this.set(f,this.$M+H);if(N===h)return this.set(h,this.$y+H);if(N===c)return C(1);if(N===d)return C(7);var R=(z={},z[l]=r,z[u]=i,z[o]=n,z)[N]||1,k=this.$d.getTime()+H*R;return S.w(k,this)},F.subtract=function(H,q){return this.add(-1*H,q)},F.format=function(H){var q=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var U=H||"YYYY-MM-DDTHH:mm:ssZ",N=S.z(this),C=this.$H,R=this.$m,k=this.$M,B=z.weekdays,W=z.months,$=z.meridiem,Q=function(ee,le,me,ve){return ee&&(ee[le]||ee(q,U))||me[le].slice(0,ve)},Y=function(ee){return S.s(C%12||12,ee,"0")},X=$||function(ee,le,me){var ve=ee<12?"AM":"PM";return me?ve.toLowerCase():ve};return U.replace(b,function(ee,le){return le||function(me){switch(me){case"YY":return String(q.$y).slice(-2);case"YYYY":return S.s(q.$y,4,"0");case"M":return k+1;case"MM":return S.s(k+1,2,"0");case"MMM":return Q(z.monthsShort,k,W,3);case"MMMM":return Q(W,k);case"D":return q.$D;case"DD":return S.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Q(z.weekdaysMin,q.$W,B,2);case"ddd":return Q(z.weekdaysShort,q.$W,B,3);case"dddd":return B[q.$W];case"H":return String(C);case"HH":return S.s(C,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(C,R,!0);case"A":return X(C,R,!1);case"m":return String(R);case"mm":return S.s(R,2,"0");case"s":return String(q.$s);case"ss":return S.s(q.$s,2,"0");case"SSS":return S.s(q.$ms,3,"0");case"Z":return N}return null}(ee)||N.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(H,q,z){var U,N=this,C=S.p(q),R=P(H),k=(R.utcOffset()-this.utcOffset())*r,B=this-R,W=function(){return S.m(N,R)};switch(C){case h:U=W()/12;break;case f:U=W();break;case p:U=W()/3;break;case d:U=(B-k)/6048e5;break;case c:U=(B-k)/864e5;break;case u:U=B/i;break;case l:U=B/r;break;case o:U=B/n;break;default:U=B}return z?U:S.a(U)},F.daysInMonth=function(){return this.endOf(f).$D},F.$locale=function(){return E[this.$L]},F.locale=function(H,q){if(!H)return this.$L;var z=this.clone(),U=x(H,q,!0);return U&&(z.$L=U),z},F.clone=function(){return S.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},L}(),D=M.prototype;return P.prototype=D,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",c],["$M",f],["$y",h],["$D",y]].forEach(function(L){D[L[1]]=function(F){return this.$g(F,L[0],L[1])}}),P.extend=function(L,F){return L.$i||(L(F,M,P),L.$i=!0),P},P.locale=x,P.isDayjs=T,P.unix=function(L){return P(1e3*L)},P.en=E[A],P.Ls=E,P.p={},P})})(Uh);const Xi=Uh.exports,vn={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg=="},au="eow-rounded eow-p-1 eow-flex eow-items-center eow-mr-1",aA=({quizStatus:t,onClickEdit:e,onClickDelete:n})=>{const r=t==="ACTIVE";return ae(De,{children:[j("button",{className:`${au} eow-bg-yellow-400`,onClick:e,title:"Edit",children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-h-6 eow-w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),j("button",{className:`${au} ${r?"eow-bg-gray-200":"eow-bg-red-400"}`,onClick:n,title:"Delete",disabled:r,children:j("img",{className:"eow-h-6 eow-w-6",src:vn.bin})})]})};var sA={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,s=Object.defineProperty||function(U,N,C){U[N]=C.value},o,l=typeof Symbol=="function"?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function f(U,N,C){return Object.defineProperty(U,N,{value:C,enumerable:!0,configurable:!0,writable:!0}),U[N]}try{f({},"")}catch(U){f=function(N,C,R){return N[C]=R}}function p(U,N,C,R){var k=N&&N.prototype instanceof I?N:I,B=Object.create(k.prototype),W=new H(R||[]);return s(B,"_invoke",{value:M(U,C,W)}),B}n.wrap=p;function h(U,N,C){try{return{type:"normal",arg:U.call(N,C)}}catch(R){return{type:"throw",arg:R}}}var y="suspendedStart",g="suspendedYield",v="executing",b="completed",w={};function I(){}function m(){}function A(){}var E={};f(E,u,function(){return this});var O=Object.getPrototypeOf,T=O&&O(O(q([])));T&&T!==r&&i.call(T,u)&&(E=T);var x=A.prototype=I.prototype=Object.create(E);m.prototype=A,s(x,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:m,configurable:!0}),m.displayName=f(A,d,"GeneratorFunction");function P(U){["next","throw","return"].forEach(function(N){f(U,N,function(C){return this._invoke(N,C)})})}n.isGeneratorFunction=function(U){var N=typeof U=="function"&&U.constructor;return N?N===m||(N.displayName||N.name)==="GeneratorFunction":!1},n.mark=function(U){return Object.setPrototypeOf?Object.setPrototypeOf(U,A):(U.__proto__=A,f(U,d,"GeneratorFunction")),U.prototype=Object.create(x),U},n.awrap=function(U){return{__await:U}};function S(U,N){function C(B,W,$,Q){var Y=h(U[B],U,W);if(Y.type==="throw")Q(Y.arg);else{var X=Y.arg,ee=X.value;return ee&&typeof ee=="object"&&i.call(ee,"__await")?N.resolve(ee.__await).then(function(le){C("next",le,$,Q)},function(le){C("throw",le,$,Q)}):N.resolve(ee).then(function(le){X.value=le,$(X)},function(le){return C("throw",le,$,Q)})}}var R;function k(B,W){function $(){return new N(function(Q,Y){C(B,W,Q,Y)})}return R=R?R.then($,$):$()}s(this,"_invoke",{value:k})}P(S.prototype),f(S.prototype,c,function(){return this}),n.AsyncIterator=S,n.async=function(U,N,C,R,k){k===void 0&&(k=Promise);var B=new S(p(U,N,C,R),k);return n.isGeneratorFunction(N)?B:B.next().then(function(W){return W.done?W.value:B.next()})};function M(U,N,C){var R=y;return function(B,W){if(R===v)throw new Error("Generator is already running");if(R===b){if(B==="throw")throw W;return z()}for(C.method=B,C.arg=W;;){var $=C.delegate;if($){var Q=D($,C);if(Q){if(Q===w)continue;return Q}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(R===y)throw R=b,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);R=v;var Y=h(U,N,C);if(Y.type==="normal"){if(R=C.done?b:g,Y.arg===w)continue;return{value:Y.arg,done:C.done}}else Y.type==="throw"&&(R=b,C.method="throw",C.arg=Y.arg)}}}function D(U,N){var C=N.method,R=U.iterator[C];if(R===o)return N.delegate=null,C==="throw"&&U.iterator.return&&(N.method="return",N.arg=o,D(U,N),N.method==="throw")||C!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+C+"' method")),w;var k=h(R,U.iterator,N.arg);if(k.type==="throw")return N.method="throw",N.arg=k.arg,N.delegate=null,w;var B=k.arg;if(!B)return N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,w;if(B.done)N[U.resultName]=B.value,N.next=U.nextLoc,N.method!=="return"&&(N.method="next",N.arg=o);else return B;return N.delegate=null,w}P(x),f(x,d,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"});function L(U){var N={tryLoc:U[0]};1 in U&&(N.catchLoc=U[1]),2 in U&&(N.finallyLoc=U[2],N.afterLoc=U[3]),this.tryEntries.push(N)}function F(U){var N=U.completion||{};N.type="normal",delete N.arg,U.completion=N}function H(U){this.tryEntries=[{tryLoc:"root"}],U.forEach(L,this),this.reset(!0)}n.keys=function(U){var N=Object(U),C=[];for(var R in N)C.push(R);return C.reverse(),function k(){for(;C.length;){var B=C.pop();if(B in N)return k.value=B,k.done=!1,k}return k.done=!0,k}};function q(U){if(U){var N=U[u];if(N)return N.call(U);if(typeof U.next=="function")return U;if(!isNaN(U.length)){var C=-1,R=function k(){for(;++C<U.length;)if(i.call(U,C))return k.value=U[C],k.done=!1,k;return k.value=o,k.done=!0,k};return R.next=R}}return{next:z}}n.values=q;function z(){return{value:o,done:!0}}return H.prototype={constructor:H,reset:function(U){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(F),!U)for(var N in this)N.charAt(0)==="t"&&i.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=o)},stop:function(){this.done=!0;var U=this.tryEntries[0],N=U.completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(U){if(this.done)throw U;var N=this;function C(Q,Y){return B.type="throw",B.arg=U,N.next=Q,Y&&(N.method="next",N.arg=o),!!Y}for(var R=this.tryEntries.length-1;R>=0;--R){var k=this.tryEntries[R],B=k.completion;if(k.tryLoc==="root")return C("end");if(k.tryLoc<=this.prev){var W=i.call(k,"catchLoc"),$=i.call(k,"finallyLoc");if(W&&$){if(this.prev<k.catchLoc)return C(k.catchLoc,!0);if(this.prev<k.finallyLoc)return C(k.finallyLoc)}else if(W){if(this.prev<k.catchLoc)return C(k.catchLoc,!0)}else if($){if(this.prev<k.finallyLoc)return C(k.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(U,N){for(var C=this.tryEntries.length-1;C>=0;--C){var R=this.tryEntries[C];if(R.tryLoc<=this.prev&&i.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var k=R;break}}k&&(U==="break"||U==="continue")&&k.tryLoc<=N&&N<=k.finallyLoc&&(k=null);var B=k?k.completion:{};return B.type=U,B.arg=N,k?(this.method="next",this.next=k.finallyLoc,w):this.complete(B)},complete:function(U,N){if(U.type==="throw")throw U.arg;return U.type==="break"||U.type==="continue"?this.next=U.arg:U.type==="return"?(this.rval=this.arg=U.arg,this.method="return",this.next="end"):U.type==="normal"&&N&&(this.next=N),w},finish:function(U){for(var N=this.tryEntries.length-1;N>=0;--N){var C=this.tryEntries[N];if(C.finallyLoc===U)return this.complete(C.completion,C.afterLoc),F(C),w}},catch:function(U){for(var N=this.tryEntries.length-1;N>=0;--N){var C=this.tryEntries[N];if(C.tryLoc===U){var R=C.completion;if(R.type==="throw"){var k=R.arg;F(C)}return k}}throw new Error("illegal catch attempt")},delegateYield:function(U,N,C){return this.delegate={iterator:q(U),resultName:N,nextLoc:C},this.method==="next"&&(this.arg=o),w}},n}(t.exports);try{regeneratorRuntime=e}catch(n){typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(sA);const Zi=()=>_(this,null,function*(){const t=Dn.auth().currentUser;if(t)return yield t.getIdToken()}),oA=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",lA=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class uA{constructor(e,n){a(this,"miniGamesApiBaseUrl",null);a(this,"clientApiBaseUrl",null);a(this,"headers",null);a(this,"mainQueryParams",{key:"",client_id:""});a(this,"apiKey",null);a(this,"clientId",null);a(this,"environment",null);a(this,"sportal365Config",null);a(this,"sportal365Headers",null);a(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");a(this,"createEitherOr",e=>_(this,null,function*(){const n="/either-or?",r=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r}),method:"POST",body:JSON.stringify(e)})}));a(this,"updateEitherOr",(e,n)=>_(this,null,function*(){const r=`/either-or/${e}?`,i=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));a(this,"getEitherOrById",e=>_(this,null,function*(){const n=`/either-or/${e}/staff?`,r=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r})})}));a(this,"deleteEitherOr",e=>_(this,null,function*(){const n=`/either-or/${e}?`,r=yield Zi(),i="DELETE";return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r}),method:i})}));a(this,"getEitherOrTypes",()=>_(this,null,function*(){const e=yield this.getEitherOrFeatures();return e.ok?(yield e.json()).data.types:[]}));a(this,"generateSignedInUrl",e=>_(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield Zi();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:se(Z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));a(this,"storeInBucket",(e,n,r)=>_(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);this.throwErrorFromXmlResponse(i)}));a(this,"fetchImagesFromSportal365",(e,n,r)=>_(this,null,function*(){let i={query:e,page:r.toString()};return n&&(i=se(Z({},i),{from:n.from,to:n.to})),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(i),{headers:this.sportal365Headers})}));a(this,"getEitherOrFeatures",()=>_(this,null,function*(){const e=`/clients/${this.clientId}/features/either_or?`,n={key:this.apiKey,disable_cache:Date.now().toString()};return yield fetch(this.clientApiBaseUrl+e+new URLSearchParams(n),{headers:Z({},this.headers)})}));a(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);a(this,"throwErrorFromXmlResponse",e=>_(this,null,function*(){const n=yield e.text(),r=new window.DOMParser().parseFromString(n,"text/xml"),i=r.getElementsByTagName("Code")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Code")[0].textContent:"",s=r.getElementsByTagName("Message")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Message")[0].textContent:"",o=r.getElementsByTagName("Details")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Details")[0].textContent:"";throw{error:{code:400,status:i,message:s+" "+o}}}));this.miniGamesApiBaseUrl=oA(e.environment),this.clientApiBaseUrl=lA(e.environment),this.headers={"Content-Type":"application/json"},this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.sportal365Config=n,this.sportal365Headers={Project:n==null?void 0:n.project,Authorization:n==null?void 0:n.authorization}}}var cA=Object.create,su=Object.defineProperty,dA=Object.getOwnPropertyDescriptor,fA=Object.getOwnPropertyNames,hA=Object.getPrototypeOf,pA=Object.prototype.hasOwnProperty,mA=(t,e,n)=>e in t?su(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Es=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fA(e))!pA.call(t,i)&&i!==n&&su(t,i,{get:()=>e[i],enumerable:!(r=dA(e,i))||r.enumerable});return t},vA=(t,e,n)=>(n=t!=null?cA(hA(t)):{},gA(e||!t||!t.__esModule?su(n,"default",{value:t,enumerable:!0}):n,t)),ou=(t,e,n)=>(mA(t,typeof e!="symbol"?e+"":e,n),n),yA=Es((t,e)=>{var n=function(){function r(h,y){return y!=null&&h instanceof y}var i;try{i=Map}catch(h){i=function(){}}var s;try{s=Set}catch(h){s=function(){}}var o;try{o=Promise}catch(h){o=function(){}}function l(h,y,g,v,b){typeof y=="object"&&(g=y.depth,v=y.prototype,b=y.includeNonEnumerable,y=y.circular);var w=[],I=[],m=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof g>"u"&&(g=1/0);function A(E,O){if(E===null)return null;if(O===0)return E;var T,x;if(typeof E!="object")return E;if(r(E,i))T=new i;else if(r(E,s))T=new s;else if(r(E,o))T=new o(function(z,U){E.then(function(N){z(A(N,O-1))},function(N){U(A(N,O-1))})});else if(l.__isArray(E))T=[];else if(l.__isRegExp(E))T=new RegExp(E.source,p(E)),E.lastIndex&&(T.lastIndex=E.lastIndex);else if(l.__isDate(E))T=new Date(E.getTime());else{if(m&&Buffer.isBuffer(E))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(E.length):T=new Buffer(E.length),E.copy(T),T;r(E,Error)?T=Object.create(E):typeof v>"u"?(x=Object.getPrototypeOf(E),T=Object.create(x)):(T=Object.create(v),x=v)}if(y){var P=w.indexOf(E);if(P!=-1)return I[P];w.push(E),I.push(T)}r(E,i)&&E.forEach(function(z,U){var N=A(U,O-1),C=A(z,O-1);T.set(N,C)}),r(E,s)&&E.forEach(function(z){var U=A(z,O-1);T.add(U)});for(var S in E){var M;x&&(M=Object.getOwnPropertyDescriptor(x,S)),!(M&&M.set==null)&&(T[S]=A(E[S],O-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(E),S=0;S<D.length;S++){var L=D[S],F=Object.getOwnPropertyDescriptor(E,L);F&&!F.enumerable&&!b||(T[L]=A(E[L],O-1),F.enumerable||Object.defineProperty(T,L,{enumerable:!1}))}if(b)for(var H=Object.getOwnPropertyNames(E),S=0;S<H.length;S++){var q=H[S],F=Object.getOwnPropertyDescriptor(E,q);F&&F.enumerable||(T[q]=A(E[q],O-1),Object.defineProperty(T,q,{enumerable:!1}))}return T}return A(h,g)}l.clonePrototype=function(h){if(h===null)return null;var y=function(){};return y.prototype=h,new y};function u(h){return Object.prototype.toString.call(h)}l.__objToStr=u;function c(h){return typeof h=="object"&&u(h)==="[object Date]"}l.__isDate=c;function d(h){return typeof h=="object"&&u(h)==="[object Array]"}l.__isArray=d;function f(h){return typeof h=="object"&&u(h)==="[object RegExp]"}l.__isRegExp=f;function p(h){var y="";return h.global&&(y+="g"),h.ignoreCase&&(y+="i"),h.multiline&&(y+="m"),y}return l.__getRegExpFlags=p,l}();typeof e=="object"&&e.exports&&(e.exports=n)}),wA=Es((t,e)=>{var n=typeof Reflect=="object"?Reflect:null,r=n&&typeof n.apply=="function"?n.apply:function(E,O,T){return Function.prototype.apply.call(E,O,T)},i;n&&typeof n.ownKeys=="function"?i=n.ownKeys:Object.getOwnPropertySymbols?i=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:i=function(E){return Object.getOwnPropertyNames(E)};function s(E){console&&console.warn&&console.warn(E)}var o=Number.isNaN||function(E){return E!==E};function l(){l.init.call(this)}e.exports=l,e.exports.once=I,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var u=10;function c(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");u=E}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function d(E){return E._maxListeners===void 0?l.defaultMaxListeners:E._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(E){for(var O=[],T=1;T<arguments.length;T++)O.push(arguments[T]);var x=E==="error",P=this._events;if(P!==void 0)x=x&&P.error===void 0;else if(!x)return!1;if(x){var S;if(O.length>0&&(S=O[0]),S instanceof Error)throw S;var M=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw M.context=S,M}var D=P[E];if(D===void 0)return!1;if(typeof D=="function")r(D,this,O);else for(var L=D.length,F=v(D,L),T=0;T<L;++T)r(F[T],this,O);return!0};function f(E,O,T,x){var P,S,M;if(c(T),S=E._events,S===void 0?(S=E._events=Object.create(null),E._eventsCount=0):(S.newListener!==void 0&&(E.emit("newListener",O,T.listener?T.listener:T),S=E._events),M=S[O]),M===void 0)M=S[O]=T,++E._eventsCount;else if(typeof M=="function"?M=S[O]=x?[T,M]:[M,T]:x?M.unshift(T):M.push(T),P=d(E),P>0&&M.length>P&&!M.warned){M.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=E,D.type=O,D.count=M.length,s(D)}return E}l.prototype.addListener=function(E,O){return f(this,E,O,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(E,O){return f(this,E,O,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(E,O,T){var x={fired:!1,wrapFn:void 0,target:E,type:O,listener:T},P=p.bind(x);return P.listener=T,x.wrapFn=P,P}l.prototype.once=function(E,O){return c(O),this.on(E,h(this,E,O)),this},l.prototype.prependOnceListener=function(E,O){return c(O),this.prependListener(E,h(this,E,O)),this},l.prototype.removeListener=function(E,O){var T,x,P,S,M;if(c(O),x=this._events,x===void 0)return this;if(T=x[E],T===void 0)return this;if(T===O||T.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete x[E],x.removeListener&&this.emit("removeListener",E,T.listener||O));else if(typeof T!="function"){for(P=-1,S=T.length-1;S>=0;S--)if(T[S]===O||T[S].listener===O){M=T[S].listener,P=S;break}if(P<0)return this;P===0?T.shift():b(T,P),T.length===1&&(x[E]=T[0]),x.removeListener!==void 0&&this.emit("removeListener",E,M||O)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(E){var O,T,x;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[E]),this;if(arguments.length===0){var P=Object.keys(T),S;for(x=0;x<P.length;++x)S=P[x],S!=="removeListener"&&this.removeAllListeners(S);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=T[E],typeof O=="function")this.removeListener(E,O);else if(O!==void 0)for(x=O.length-1;x>=0;x--)this.removeListener(E,O[x]);return this};function y(E,O,T){var x=E._events;if(x===void 0)return[];var P=x[O];return P===void 0?[]:typeof P=="function"?T?[P.listener||P]:[P]:T?w(P):v(P,P.length)}l.prototype.listeners=function(E){return y(this,E,!0)},l.prototype.rawListeners=function(E){return y(this,E,!1)},l.listenerCount=function(E,O){return typeof E.listenerCount=="function"?E.listenerCount(O):g.call(E,O)},l.prototype.listenerCount=g;function g(E){var O=this._events;if(O!==void 0){var T=O[E];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function v(E,O){for(var T=new Array(O),x=0;x<O;++x)T[x]=E[x];return T}function b(E,O){for(;O+1<E.length;O++)E[O]=E[O+1];E.pop()}function w(E){for(var O=new Array(E.length),T=0;T<O.length;++T)O[T]=E[T].listener||E[T];return O}function I(E,O){return new Promise(function(T,x){function P(M){E.removeListener(O,S),x(M)}function S(){typeof E.removeListener=="function"&&E.removeListener("error",P),T([].slice.call(arguments))}A(E,O,S,{once:!0}),O!=="error"&&m(E,P,{once:!0})})}function m(E,O,T){typeof E.on=="function"&&A(E,"error",O,T)}function A(E,O,T,x){if(typeof E.on=="function")x.once?E.once(O,T):E.on(O,T);else if(typeof E.addEventListener=="function")E.addEventListener(O,function P(S){x.once&&E.removeEventListener(O,P),T(S)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}}),bA=Es((t,e)=>{(function(){var n,r,i=[].splice,s=function(l,u){if(!(l instanceof u))throw new Error("Bound instance method accessed before binding")},o=[].indexOf;r=yA(),n=wA().EventEmitter,e.exports=function(){class l extends n{constructor(c={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=c,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(d=>{var f;f=this[d],this[d]=function(...p){var h,y,g,v;if(g=p,[...p]=g,[h]=i.call(p,-1),typeof h=="function")try{v=f(...p),h(null,v)}catch(b){y=b,h(y)}else return f(...p,h)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(c){var d,f;if(s(this,l),(f=this._isInvalidKey(c))!=null)throw f;if(this.data[c]!=null&&this._check(c,this.data[c]))return this.stats.hits++,d=this._unwrap(this.data[c]),d;this.stats.misses++}mget(c){var d,f,p,h,y,g;if(s(this,l),!Array.isArray(c))throw d=this._error("EKEYSTYPE"),d;for(g={},p=0,y=c.length;p<y;p++){if(h=c[p],(f=this._isInvalidKey(h))!=null)throw f;this.data[h]!=null&&this._check(h,this.data[h])?(this.stats.hits++,g[h]=this._unwrap(this.data[h])):this.stats.misses++}return g}set(c,d,f){var p,h,y;if(s(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw p=this._error("ECACHEFULL"),p;if(this.options.forceString&&!typeof d==="string"&&(d=JSON.stringify(d)),f==null&&(f=this.options.stdTTL),(h=this._isInvalidKey(c))!=null)throw h;return y=!1,this.data[c]&&(y=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[c],!1))),this.data[c]=this._wrap(d,f),this.stats.vsize+=this._getValLength(d),y||(this.stats.ksize+=this._getKeyLength(c),this.stats.keys++),this.emit("set",c,d),!0}mset(c){var d,f,p,h,y,g,v,b,w,I;if(s(this,l),this.options.maxKeys>-1&&this.stats.keys+c.length>=this.options.maxKeys)throw d=this._error("ECACHEFULL"),d;for(p=0,v=c.length;p<v;p++){if(g=c[p],{key:y,val:I,ttl:w}=g,w&&typeof w!="number")throw d=this._error("ETTLTYPE"),d;if((f=this._isInvalidKey(y))!=null)throw f}for(h=0,b=c.length;h<b;h++)g=c[h],{key:y,val:I,ttl:w}=g,this.set(y,I,w);return!0}del(c){var d,f,p,h,y,g;for(s(this,l),Array.isArray(c)||(c=[c]),d=0,p=0,y=c.length;p<y;p++){if(h=c[p],(f=this._isInvalidKey(h))!=null)throw f;this.data[h]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[h],!1)),this.stats.ksize-=this._getKeyLength(h),this.stats.keys--,d++,g=this.data[h],delete this.data[h],this.emit("del",h,g.v))}return d}take(c){var d;return s(this,l),d=this.get(c),d!=null&&this.del(c),d}ttl(c,d){var f;if(s(this,l),d||(d=this.options.stdTTL),!c)return!1;if((f=this._isInvalidKey(c))!=null)throw f;return this.data[c]!=null&&this._check(c,this.data[c])?(d>=0?this.data[c]=this._wrap(this.data[c].v,d,!1):this.del(c),!0):!1}getTtl(c){var d,f;if(s(this,l),!!c){if((f=this._isInvalidKey(c))!=null)throw f;if(this.data[c]!=null&&this._check(c,this.data[c]))return d=this.data[c].t,d}}keys(){var c;return s(this,l),c=Object.keys(this.data),c}has(c){var d;return s(this,l),d=this.data[c]!=null&&this._check(c,this.data[c]),d}getStats(){return s(this,l),this.stats}flushAll(c=!0){s(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(c),this.emit("flush")}flushStats(){s(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){s(this,l),this._killCheckPeriod()}_checkData(c=!0){var d,f,p;s(this,l),f=this.data;for(d in f)p=f[d],this._check(d,p);c&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,c),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(c,d){var f;return s(this,l),f=!0,d.t!==0&&d.t<Date.now()&&(this.options.deleteOnExpire&&(f=!1,this.del(c)),this.emit("expired",c,this._unwrap(d))),f}_isInvalidKey(c){var d;if(s(this,l),d=typeof c,o.call(this.validKeyTypes,d)<0)return this._error("EKEYTYPE",{type:typeof c})}_wrap(c,d,f=!0){var p,h,y;return s(this,l),this.options.useClones||(f=!1),h=Date.now(),p=0,y=1e3,d===0?p=0:d?p=h+d*y:this.options.stdTTL===0?p=this.options.stdTTL:p=h+this.options.stdTTL*y,{t:p,v:f?r(c):c}}_unwrap(c,d=!0){return this.options.useClones||(d=!1),c.v!=null?d?r(c.v):c.v:null}_getKeyLength(c){return c.toString().length}_getValLength(c){return s(this,l),typeof c=="string"?c.length:this.options.forceString?JSON.stringify(c).length:Array.isArray(c)?this.options.arrayValueSize*c.length:typeof c=="number"?8:typeof(c==null?void 0:c.then)=="function"?this.options.promiseValueSize:typeof Buffer<"u"&&Buffer!==null&&Buffer.isBuffer(c)?c.length:c!=null&&typeof c=="object"?this.options.objectValueSize*Object.keys(c).length:typeof c=="boolean"?8:0}_error(c,d={}){var f;return s(this,l),f=new Error,f.name=c,f.errorcode=c,f.message=this.ERRORS[c]!=null?this.ERRORS[c](d):"-",f.data=d,f}_initErrors(){var c,d,f;s(this,l),this.ERRORS={},f=this._ERRORS;for(d in f)c=f[d],this.ERRORS[d]=this.createErrorMessage(c)}createErrorMessage(c){return function(d){return c.replace("__key",d.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(t)}),_A=Es((t,e)=>{(function(){var n;n=e.exports=bA(),n.version="5.1.2"}).call(t)}),$h=t=>{let e=200,n=[],r=0;return n[r]=[],t.forEach(i=>{n[r].length<=e-1?n[r].push(i):(r++,n[r]=[i])}),n},ea=(t,e)=>{let n=[];for(;t.length>e;){let r=t.splice(0,e);n.push(r)}return n.push(t),n},rn=(t,e)=>{let n="";return t==="prod"?n={profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1",miniGames:"https://mini-games.fansunitedapi.com/v1",discussions:"https://discussions.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.fansunitedapi.com/v1"}[e]:t==="dev"?n={profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1",miniGames:"http://localhost:9040/v1",discussions:"http://localhost:9020/v1",privateLeagues:"http://localhost:9010/v1"}[e]:t==="watg"?n={profile:"https://profile.watg.fansunitedapi.com/v1",football:"https://football.watg.fansunitedapi.com/v1",idMapping:"https://id-mapping.watg.fansunitedapi.com/v1",predictor:"https://prediction.watg.fansunitedapi.com/v1",client:"https://client.watg.fansunitedapi.com/v1",loyalty:"https://loyalty.watg.fansunitedapi.com/v1",miniGames:"https://mini-games.watg.fansunitedapi.com/v1",discussions:"https://discussions.watg.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.watg.fansunitedapi.com/v1"}[e]:n={profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1",miniGames:"https://mini-games.fansunitedstagingapi.com/v1",discussions:"https://discussions.fansunitedstagingapi.com/v1",privateLeagues:"https://private-leagues.fansunitedstagingapi.com/v1"}[e],n},Is=t=>t.filter((e,n,r)=>n===r.indexOf(e)),Xe=t=>t||!1,Ye=()=>`&disable_cache=${Date.now()}`,jh=t=>JSON.parse(JSON.stringify(t.sort((e,n)=>e.localeCompare(n)))),EA=class{constructor(){a(this,"id",null);a(this,"name",null);a(this,"nickname",null);a(this,"avatar",null);a(this,"gender",null);a(this,"country",null);a(this,"birthDate",null);a(this,"interests",[]);a(this,"followingCount",0);a(this,"followersCount",0)}},IA=class{constructor(){a(this,"profilesFromResponse",t=>t?t.map(e=>this.fullProfileFromResponse(e)):null);a(this,"fullProfileFromResponse",t=>{let e=new EA;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e})}},lu=class{constructor(){a(this,"nextPageStartsAfter",null);a(this,"itemsPerPage",null)}},ta=class{constructor(){a(this,"pagination",new lu)}},Ut=class{constructor(){a(this,"meta",new ta);a(this,"data",[])}},AA=class{constructor(){a(this,"avatar",null);a(this,"followingId",null);a(this,"name",null);a(this,"nickname",null);a(this,"profileId",null)}},OA=class{constructor(){a(this,"followResponse",t=>t.map(e=>this.remapResponse(e)));a(this,"followingFromResponse",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapResponse(n)),e});a(this,"remapResponse",t=>{let e=new AA;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e})}},TA=class{constructor(){a(this,"avatar",null);a(this,"followerId",null);a(this,"name",null);a(this,"nickname",null);a(this,"profileId",null)}},CA=class{constructor(){a(this,"followersFromResponse",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapResponse(n)),e});a(this,"remapResponse",t=>{let e=new TA;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e})}},Hh=class{constructor(){a(this,"profile_ids",[])}};function uu(t){this.message=t}uu.prototype=new Error,uu.prototype.name="InvalidCharacterError";var Vh=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new uu("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,s=0,o="";r=e.charAt(s++);~r&&(n=i%4?64*n+r:r,i++%4)?o+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function SA(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Vh(n).replace(/(.)/g,function(r,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}(e)}catch(n){return Vh(e)}}function As(t){this.message=t}function PA(t,e){if(typeof t!="string")throw new As("Invalid token specified");var n=(e=e||{}).header===!0?0:1;try{return JSON.parse(SA(t.split(".")[n]))}catch(r){throw new As("Invalid token specified: "+r.message)}}As.prototype=new Error,As.prototype.name="InvalidTokenError";var MA=PA,Rt={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id",api_football:"api_football_id"},qh={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},Wh=["matchId","matchType","market","prediction"],RA=new Map().set("FT_1X2","fullTimeOneXTwo").set("HT_1X2","halfTimeOneXTwo").set("BOTH_TEAMS_SCORE","bothTeamsScore").set("DOUBLE_CHANCE","doubleChance").set("HT_FT","halfTimeFullTime").set("PLAYER_SCORE","playerScore").set("PLAYER_YELLOW_CARD","playerYellowCard").set("PLAYER_RED_CARD","playerRedCard").set("RED_CARD_MATCH","redCardMatch").set("PENALTY_MATCH","penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL","playerScoreFirstGoal").set("CORNERS_MATCH","cornersMatch").set("CORRECT_SCORE","correctScore").set("CORRECT_SCORE_ADVANCED","correctScoreAdvanced").set("CORRECT_SCORE_HT","correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK","playerScoreHattrick").set("PLAYER_SCORE_TWICE","playerScoreTwice").set("OVER_GOALS_0_5","overZeroPointFiveGoals").set("OVER_GOALS_1_5","overOnePointFiveGoals").set("OVER_GOALS_2_5","overTwoPointFiveGoals").set("OVER_GOALS_3_5","overThreePointFiveGoals").set("OVER_GOALS_4_5","overFourPointFiveGoals").set("OVER_GOALS_5_5","overFivePointFiveGoals").set("OVER_GOALS_6_5","overSixPointFiveGoals").set("OVER_CORNERS_6_5","overSixPointFiveCorners").set("OVER_CORNERS_7_5","overSevenPointFiveCorners").set("OVER_CORNERS_8_5","overEightPointFiveCorners").set("OVER_CORNERS_9_5","overNinePointFiveCorners").set("OVER_CORNERS_10_5","overTenPointFiveCorners").set("OVER_CORNERS_11_5","overElevenPointFiveCorners").set("OVER_CORNERS_12_5","overTwelvePointFiveCorners").set("OVER_CORNERS_13_5","overThirteenPointFiveCorners"),Gh={UNEXPECTED_STATUS_PROP:`Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation:
|
|
2276
|
+
*/var Jr=cn.default;function DI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var FI=typeof Object.is=="function"?Object.is:DI,NI=Jr.useState,LI=Jr.useEffect,BI=Jr.useLayoutEffect,UI=Jr.useDebugValue;function $I(t,e){var n=e(),r=NI({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return BI(function(){i.value=n,i.getSnapshot=e,ru(i)&&s({inst:i})},[t,n,e]),LI(function(){return ru(i)&&s({inst:i}),t(function(){ru(i)&&s({inst:i})})},[t]),UI(n),n}function ru(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!FI(t,n)}catch(r){return!0}}function jI(t,e){return e()}var HI=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?jI:$I;Dh.useSyncExternalStore=Jr.useSyncExternalStore!==void 0?Jr.useSyncExternalStore:HI,function(t){t.exports=Dh}(xh);const VI=xh.exports.useSyncExternalStore,Fh=nt.createContext(void 0),Nh=nt.createContext(!1);function Lh(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Fh),window.ReactQueryClientContext):Fh)}const qI=({context:t}={})=>{const e=nt.useContext(Lh(t,nt.useContext(Nh)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},WI=({client:t,children:e,context:n,contextSharing:r=!1})=>{nt.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const i=Lh(n,r);return j(Nh.Provider,{value:!n&&r,children:j(i.Provider,{value:t,children:e})})},Bh=nt.createContext(!1),GI=()=>nt.useContext(Bh);Bh.Provider;function zI(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const QI=nt.createContext(zI()),YI=()=>nt.useContext(QI);function KI(t,e){return typeof t=="function"?t(...e):!!t}const JI=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},XI=t=>{nt.useEffect(()=>{t.clearReset()},[t])},ZI=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&KI(n,[t.error,r]),eA=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},tA=(t,e)=>t.isLoading&&t.isFetching&&!e,nA=(t,e,n)=>(t==null?void 0:t.suspense)&&tA(e,n),rA=(t,e,n)=>e.fetchOptimistic(t).then(({data:r})=>{t.onSuccess==null||t.onSuccess(r),t.onSettled==null||t.onSettled(r,null)}).catch(r=>{n.clearReset(),t.onError==null||t.onError(r),t.onSettled==null||t.onSettled(void 0,r)});function iA(t,e){const n=qI({context:t.context}),r=GI(),i=YI(),s=n.defaultQueryOptions(t);s._optimisticResults=r?"isRestoring":"optimistic",s.onError&&(s.onError=ut.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ut.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ut.batchCalls(s.onSettled)),eA(s),JI(s,i),XI(i);const[o]=nt.useState(()=>new e(n,s)),l=o.getOptimisticResult(s);if(VI(nt.useCallback(u=>{const c=r?()=>{}:o.subscribe(ut.batchCalls(u));return o.updateResult(),c},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),nt.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),nA(s,l,r))throw rA(s,o,i);if(ZI({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:o.trackResult(l)}function iu(t,e,n){const r=Ji(t,e,n);return iA(r,RI)}var Uh={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(it,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",c="day",d="week",f="month",p="quarter",h="year",y="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var N=["th","st","nd","rd"],H=L%100;return"["+L+(N[(H-20)%10]||N[H]||N[0])+"]"}},I=function(L,N,H){var q=String(L);return!q||q.length>=N?L:""+Array(N+1-q.length).join(H)+L},m={s:I,z:function(L){var N=-L.utcOffset(),H=Math.abs(N),q=Math.floor(H/60),z=H%60;return(N<=0?"+":"-")+I(q,2,"0")+":"+I(z,2,"0")},m:function L(N,H){if(N.date()<H.date())return-L(H,N);var q=12*(H.year()-N.year())+(H.month()-N.month()),z=N.clone().add(q,f),U=H-z<0,F=N.clone().add(q+(U?-1:1),f);return+(-(q+(H-z)/(U?z-F:F-z))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:h,w:d,d:c,D:y,h:u,m:l,s:o,ms:s,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},A="en",E={};E[A]=w;var O="$isDayjsObject",T=function(L){return L instanceof R||!(!L||!L[O])},x=function L(N,H,q){var z;if(!N)return A;if(typeof N=="string"){var U=N.toLowerCase();E[U]&&(z=U),H&&(E[U]=H,z=U);var F=N.split("-");if(!z&&F.length>1)return L(F[0])}else{var C=N.name;E[C]=N,z=C}return!q&&z&&(A=z),z||!q&&A},P=function(L,N){if(T(L))return L.clone();var H=typeof N=="object"?N:{};return H.date=L,H.args=arguments,new R(H)},S=m;S.l=x,S.i=T,S.w=function(L,N){return P(L,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var R=function(){function L(H){this.$L=x(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[O]=!0}var N=L.prototype;return N.parse=function(H){this.$d=function(q){var z=q.date,U=q.utc;if(z===null)return new Date(NaN);if(S.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var F=z.match(v);if(F){var C=F[2]-1||0,M=(F[7]||"0").substring(0,3);return U?new Date(Date.UTC(F[1],C,F[3]||1,F[4]||0,F[5]||0,F[6]||0,M)):new Date(F[1],C,F[3]||1,F[4]||0,F[5]||0,F[6]||0,M)}}return new Date(z)}(H),this.init()},N.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},N.$utils=function(){return S},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function(H,q){var z=P(H);return this.startOf(q)<=z&&z<=this.endOf(q)},N.isAfter=function(H,q){return P(H)<this.startOf(q)},N.isBefore=function(H,q){return this.endOf(q)<P(H)},N.$g=function(H,q,z){return S.u(H)?this[q]:this.set(z,H)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(H,q){var z=this,U=!!S.u(q)||q,F=S.p(H),C=function(X,ee){var le=S.w(z.$u?Date.UTC(z.$y,ee,X):new Date(z.$y,ee,X),z);return U?le:le.endOf(c)},M=function(X,ee){return S.w(z.toDate()[X].apply(z.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(ee)),z)},k=this.$W,B=this.$M,W=this.$D,$="set"+(this.$u?"UTC":"");switch(F){case h:return U?C(1,0):C(31,11);case f:return U?C(1,B):C(0,B+1);case d:var Q=this.$locale().weekStart||0,Y=(k<Q?k+7:k)-Q;return C(U?W-Y:W+(6-Y),B);case c:case y:return M($+"Hours",0);case u:return M($+"Minutes",1);case l:return M($+"Seconds",2);case o:return M($+"Milliseconds",3);default:return this.clone()}},N.endOf=function(H){return this.startOf(H,!1)},N.$set=function(H,q){var z,U=S.p(H),F="set"+(this.$u?"UTC":""),C=(z={},z[c]=F+"Date",z[y]=F+"Date",z[f]=F+"Month",z[h]=F+"FullYear",z[u]=F+"Hours",z[l]=F+"Minutes",z[o]=F+"Seconds",z[s]=F+"Milliseconds",z)[U],M=U===c?this.$D+(q-this.$W):q;if(U===f||U===h){var k=this.clone().set(y,1);k.$d[C](M),k.init(),this.$d=k.set(y,Math.min(this.$D,k.daysInMonth())).$d}else C&&this.$d[C](M);return this.init(),this},N.set=function(H,q){return this.clone().$set(H,q)},N.get=function(H){return this[S.p(H)]()},N.add=function(H,q){var z,U=this;H=Number(H);var F=S.p(q),C=function(B){var W=P(U);return S.w(W.date(W.date()+Math.round(B*H)),U)};if(F===f)return this.set(f,this.$M+H);if(F===h)return this.set(h,this.$y+H);if(F===c)return C(1);if(F===d)return C(7);var M=(z={},z[l]=r,z[u]=i,z[o]=n,z)[F]||1,k=this.$d.getTime()+H*M;return S.w(k,this)},N.subtract=function(H,q){return this.add(-1*H,q)},N.format=function(H){var q=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var U=H||"YYYY-MM-DDTHH:mm:ssZ",F=S.z(this),C=this.$H,M=this.$m,k=this.$M,B=z.weekdays,W=z.months,$=z.meridiem,Q=function(ee,le,me,ve){return ee&&(ee[le]||ee(q,U))||me[le].slice(0,ve)},Y=function(ee){return S.s(C%12||12,ee,"0")},X=$||function(ee,le,me){var ve=ee<12?"AM":"PM";return me?ve.toLowerCase():ve};return U.replace(b,function(ee,le){return le||function(me){switch(me){case"YY":return String(q.$y).slice(-2);case"YYYY":return S.s(q.$y,4,"0");case"M":return k+1;case"MM":return S.s(k+1,2,"0");case"MMM":return Q(z.monthsShort,k,W,3);case"MMMM":return Q(W,k);case"D":return q.$D;case"DD":return S.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Q(z.weekdaysMin,q.$W,B,2);case"ddd":return Q(z.weekdaysShort,q.$W,B,3);case"dddd":return B[q.$W];case"H":return String(C);case"HH":return S.s(C,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(C,M,!0);case"A":return X(C,M,!1);case"m":return String(M);case"mm":return S.s(M,2,"0");case"s":return String(q.$s);case"ss":return S.s(q.$s,2,"0");case"SSS":return S.s(q.$ms,3,"0");case"Z":return F}return null}(ee)||F.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(H,q,z){var U,F=this,C=S.p(q),M=P(H),k=(M.utcOffset()-this.utcOffset())*r,B=this-M,W=function(){return S.m(F,M)};switch(C){case h:U=W()/12;break;case f:U=W();break;case p:U=W()/3;break;case d:U=(B-k)/6048e5;break;case c:U=(B-k)/864e5;break;case u:U=B/i;break;case l:U=B/r;break;case o:U=B/n;break;default:U=B}return z?U:S.a(U)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return E[this.$L]},N.locale=function(H,q){if(!H)return this.$L;var z=this.clone(),U=x(H,q,!0);return U&&(z.$L=U),z},N.clone=function(){return S.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},L}(),D=R.prototype;return P.prototype=D,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",c],["$M",f],["$y",h],["$D",y]].forEach(function(L){D[L[1]]=function(N){return this.$g(N,L[0],L[1])}}),P.extend=function(L,N){return L.$i||(L(N,R,P),L.$i=!0),P},P.locale=x,P.isDayjs=T,P.unix=function(L){return P(1e3*L)},P.en=E[A],P.Ls=E,P.p={},P})})(Uh);const Xi=Uh.exports,vn={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg=="},au="eow-rounded eow-p-1 eow-flex eow-items-center eow-mr-1",aA=({quizStatus:t,onClickEdit:e,onClickDelete:n})=>{const r=t==="ACTIVE";return ae(De,{children:[j("button",{className:`${au} eow-bg-yellow-400`,onClick:e,title:"Edit",children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-h-6 eow-w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),j("button",{className:`${au} ${r?"eow-bg-gray-200":"eow-bg-red-400"}`,onClick:n,title:"Delete",disabled:r,children:j("img",{className:"eow-h-6 eow-w-6",src:vn.bin})})]})};var sA={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,s=Object.defineProperty||function(U,F,C){U[F]=C.value},o,l=typeof Symbol=="function"?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function f(U,F,C){return Object.defineProperty(U,F,{value:C,enumerable:!0,configurable:!0,writable:!0}),U[F]}try{f({},"")}catch(U){f=function(F,C,M){return F[C]=M}}function p(U,F,C,M){var k=F&&F.prototype instanceof I?F:I,B=Object.create(k.prototype),W=new H(M||[]);return s(B,"_invoke",{value:R(U,C,W)}),B}n.wrap=p;function h(U,F,C){try{return{type:"normal",arg:U.call(F,C)}}catch(M){return{type:"throw",arg:M}}}var y="suspendedStart",g="suspendedYield",v="executing",b="completed",w={};function I(){}function m(){}function A(){}var E={};f(E,u,function(){return this});var O=Object.getPrototypeOf,T=O&&O(O(q([])));T&&T!==r&&i.call(T,u)&&(E=T);var x=A.prototype=I.prototype=Object.create(E);m.prototype=A,s(x,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:m,configurable:!0}),m.displayName=f(A,d,"GeneratorFunction");function P(U){["next","throw","return"].forEach(function(F){f(U,F,function(C){return this._invoke(F,C)})})}n.isGeneratorFunction=function(U){var F=typeof U=="function"&&U.constructor;return F?F===m||(F.displayName||F.name)==="GeneratorFunction":!1},n.mark=function(U){return Object.setPrototypeOf?Object.setPrototypeOf(U,A):(U.__proto__=A,f(U,d,"GeneratorFunction")),U.prototype=Object.create(x),U},n.awrap=function(U){return{__await:U}};function S(U,F){function C(B,W,$,Q){var Y=h(U[B],U,W);if(Y.type==="throw")Q(Y.arg);else{var X=Y.arg,ee=X.value;return ee&&typeof ee=="object"&&i.call(ee,"__await")?F.resolve(ee.__await).then(function(le){C("next",le,$,Q)},function(le){C("throw",le,$,Q)}):F.resolve(ee).then(function(le){X.value=le,$(X)},function(le){return C("throw",le,$,Q)})}}var M;function k(B,W){function $(){return new F(function(Q,Y){C(B,W,Q,Y)})}return M=M?M.then($,$):$()}s(this,"_invoke",{value:k})}P(S.prototype),f(S.prototype,c,function(){return this}),n.AsyncIterator=S,n.async=function(U,F,C,M,k){k===void 0&&(k=Promise);var B=new S(p(U,F,C,M),k);return n.isGeneratorFunction(F)?B:B.next().then(function(W){return W.done?W.value:B.next()})};function R(U,F,C){var M=y;return function(B,W){if(M===v)throw new Error("Generator is already running");if(M===b){if(B==="throw")throw W;return z()}for(C.method=B,C.arg=W;;){var $=C.delegate;if($){var Q=D($,C);if(Q){if(Q===w)continue;return Q}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(M===y)throw M=b,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);M=v;var Y=h(U,F,C);if(Y.type==="normal"){if(M=C.done?b:g,Y.arg===w)continue;return{value:Y.arg,done:C.done}}else Y.type==="throw"&&(M=b,C.method="throw",C.arg=Y.arg)}}}function D(U,F){var C=F.method,M=U.iterator[C];if(M===o)return F.delegate=null,C==="throw"&&U.iterator.return&&(F.method="return",F.arg=o,D(U,F),F.method==="throw")||C!=="return"&&(F.method="throw",F.arg=new TypeError("The iterator does not provide a '"+C+"' method")),w;var k=h(M,U.iterator,F.arg);if(k.type==="throw")return F.method="throw",F.arg=k.arg,F.delegate=null,w;var B=k.arg;if(!B)return F.method="throw",F.arg=new TypeError("iterator result is not an object"),F.delegate=null,w;if(B.done)F[U.resultName]=B.value,F.next=U.nextLoc,F.method!=="return"&&(F.method="next",F.arg=o);else return B;return F.delegate=null,w}P(x),f(x,d,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"});function L(U){var F={tryLoc:U[0]};1 in U&&(F.catchLoc=U[1]),2 in U&&(F.finallyLoc=U[2],F.afterLoc=U[3]),this.tryEntries.push(F)}function N(U){var F=U.completion||{};F.type="normal",delete F.arg,U.completion=F}function H(U){this.tryEntries=[{tryLoc:"root"}],U.forEach(L,this),this.reset(!0)}n.keys=function(U){var F=Object(U),C=[];for(var M in F)C.push(M);return C.reverse(),function k(){for(;C.length;){var B=C.pop();if(B in F)return k.value=B,k.done=!1,k}return k.done=!0,k}};function q(U){if(U){var F=U[u];if(F)return F.call(U);if(typeof U.next=="function")return U;if(!isNaN(U.length)){var C=-1,M=function k(){for(;++C<U.length;)if(i.call(U,C))return k.value=U[C],k.done=!1,k;return k.value=o,k.done=!0,k};return M.next=M}}return{next:z}}n.values=q;function z(){return{value:o,done:!0}}return H.prototype={constructor:H,reset:function(U){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(N),!U)for(var F in this)F.charAt(0)==="t"&&i.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=o)},stop:function(){this.done=!0;var U=this.tryEntries[0],F=U.completion;if(F.type==="throw")throw F.arg;return this.rval},dispatchException:function(U){if(this.done)throw U;var F=this;function C(Q,Y){return B.type="throw",B.arg=U,F.next=Q,Y&&(F.method="next",F.arg=o),!!Y}for(var M=this.tryEntries.length-1;M>=0;--M){var k=this.tryEntries[M],B=k.completion;if(k.tryLoc==="root")return C("end");if(k.tryLoc<=this.prev){var W=i.call(k,"catchLoc"),$=i.call(k,"finallyLoc");if(W&&$){if(this.prev<k.catchLoc)return C(k.catchLoc,!0);if(this.prev<k.finallyLoc)return C(k.finallyLoc)}else if(W){if(this.prev<k.catchLoc)return C(k.catchLoc,!0)}else if($){if(this.prev<k.finallyLoc)return C(k.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(U,F){for(var C=this.tryEntries.length-1;C>=0;--C){var M=this.tryEntries[C];if(M.tryLoc<=this.prev&&i.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var k=M;break}}k&&(U==="break"||U==="continue")&&k.tryLoc<=F&&F<=k.finallyLoc&&(k=null);var B=k?k.completion:{};return B.type=U,B.arg=F,k?(this.method="next",this.next=k.finallyLoc,w):this.complete(B)},complete:function(U,F){if(U.type==="throw")throw U.arg;return U.type==="break"||U.type==="continue"?this.next=U.arg:U.type==="return"?(this.rval=this.arg=U.arg,this.method="return",this.next="end"):U.type==="normal"&&F&&(this.next=F),w},finish:function(U){for(var F=this.tryEntries.length-1;F>=0;--F){var C=this.tryEntries[F];if(C.finallyLoc===U)return this.complete(C.completion,C.afterLoc),N(C),w}},catch:function(U){for(var F=this.tryEntries.length-1;F>=0;--F){var C=this.tryEntries[F];if(C.tryLoc===U){var M=C.completion;if(M.type==="throw"){var k=M.arg;N(C)}return k}}throw new Error("illegal catch attempt")},delegateYield:function(U,F,C){return this.delegate={iterator:q(U),resultName:F,nextLoc:C},this.method==="next"&&(this.arg=o),w}},n}(t.exports);try{regeneratorRuntime=e}catch(n){typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(sA);const Zi=()=>_(this,null,function*(){const t=Dn.auth().currentUser;if(t)return yield t.getIdToken()}),oA=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",lA=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class uA{constructor(e,n){a(this,"miniGamesApiBaseUrl",null);a(this,"clientApiBaseUrl",null);a(this,"headers",null);a(this,"mainQueryParams",{key:"",client_id:""});a(this,"apiKey",null);a(this,"clientId",null);a(this,"environment",null);a(this,"sportal365Config",null);a(this,"sportal365Headers",null);a(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");a(this,"createEitherOr",e=>_(this,null,function*(){const n="/either-or?",r=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r}),method:"POST",body:JSON.stringify(e)})}));a(this,"updateEitherOr",(e,n)=>_(this,null,function*(){const r=`/either-or/${e}?`,i=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));a(this,"getEitherOrById",e=>_(this,null,function*(){const n=`/either-or/${e}/staff?`,r=yield Zi();return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r})})}));a(this,"deleteEitherOr",e=>_(this,null,function*(){const n=`/either-or/${e}?`,r=yield Zi(),i="DELETE";return yield fetch(this.miniGamesApiBaseUrl+n+new URLSearchParams(this.mainQueryParams),{headers:se(Z({},this.headers),{Authorization:"Bearer "+r}),method:i})}));a(this,"getEitherOrTypes",()=>_(this,null,function*(){const e=yield this.getEitherOrFeatures();return e.ok?(yield e.json()).data.types:[]}));a(this,"generateSignedInUrl",e=>_(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield Zi();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:se(Z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));a(this,"storeInBucket",(e,n,r)=>_(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);this.throwErrorFromXmlResponse(i)}));a(this,"fetchImagesFromSportal365",(e,n,r)=>_(this,null,function*(){let i={query:e,page:r.toString()};return n&&(i=se(Z({},i),{from:n.from,to:n.to})),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(i),{headers:this.sportal365Headers})}));a(this,"getEitherOrFeatures",()=>_(this,null,function*(){const e=`/clients/${this.clientId}/features/either_or?`,n={key:this.apiKey,disable_cache:Date.now().toString()};return yield fetch(this.clientApiBaseUrl+e+new URLSearchParams(n),{headers:Z({},this.headers)})}));a(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);a(this,"throwErrorFromXmlResponse",e=>_(this,null,function*(){const n=yield e.text(),r=new window.DOMParser().parseFromString(n,"text/xml"),i=r.getElementsByTagName("Code")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Code")[0].textContent:"",s=r.getElementsByTagName("Message")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Message")[0].textContent:"",o=r.getElementsByTagName("Details")&&r.getElementsByTagName("Code").length>0?r.getElementsByTagName("Details")[0].textContent:"";throw{error:{code:400,status:i,message:s+" "+o}}}));this.miniGamesApiBaseUrl=oA(e.environment),this.clientApiBaseUrl=lA(e.environment),this.headers={"Content-Type":"application/json"},this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.sportal365Config=n,this.sportal365Headers={Project:n==null?void 0:n.project,Authorization:n==null?void 0:n.authorization}}}var cA=Object.create,su=Object.defineProperty,dA=Object.getOwnPropertyDescriptor,fA=Object.getOwnPropertyNames,hA=Object.getPrototypeOf,pA=Object.prototype.hasOwnProperty,mA=(t,e,n)=>e in t?su(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Es=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fA(e))!pA.call(t,i)&&i!==n&&su(t,i,{get:()=>e[i],enumerable:!(r=dA(e,i))||r.enumerable});return t},vA=(t,e,n)=>(n=t!=null?cA(hA(t)):{},gA(e||!t||!t.__esModule?su(n,"default",{value:t,enumerable:!0}):n,t)),ou=(t,e,n)=>(mA(t,typeof e!="symbol"?e+"":e,n),n),yA=Es((t,e)=>{var n=function(){function r(h,y){return y!=null&&h instanceof y}var i;try{i=Map}catch(h){i=function(){}}var s;try{s=Set}catch(h){s=function(){}}var o;try{o=Promise}catch(h){o=function(){}}function l(h,y,g,v,b){typeof y=="object"&&(g=y.depth,v=y.prototype,b=y.includeNonEnumerable,y=y.circular);var w=[],I=[],m=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof g>"u"&&(g=1/0);function A(E,O){if(E===null)return null;if(O===0)return E;var T,x;if(typeof E!="object")return E;if(r(E,i))T=new i;else if(r(E,s))T=new s;else if(r(E,o))T=new o(function(z,U){E.then(function(F){z(A(F,O-1))},function(F){U(A(F,O-1))})});else if(l.__isArray(E))T=[];else if(l.__isRegExp(E))T=new RegExp(E.source,p(E)),E.lastIndex&&(T.lastIndex=E.lastIndex);else if(l.__isDate(E))T=new Date(E.getTime());else{if(m&&Buffer.isBuffer(E))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(E.length):T=new Buffer(E.length),E.copy(T),T;r(E,Error)?T=Object.create(E):typeof v>"u"?(x=Object.getPrototypeOf(E),T=Object.create(x)):(T=Object.create(v),x=v)}if(y){var P=w.indexOf(E);if(P!=-1)return I[P];w.push(E),I.push(T)}r(E,i)&&E.forEach(function(z,U){var F=A(U,O-1),C=A(z,O-1);T.set(F,C)}),r(E,s)&&E.forEach(function(z){var U=A(z,O-1);T.add(U)});for(var S in E){var R;x&&(R=Object.getOwnPropertyDescriptor(x,S)),!(R&&R.set==null)&&(T[S]=A(E[S],O-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(E),S=0;S<D.length;S++){var L=D[S],N=Object.getOwnPropertyDescriptor(E,L);N&&!N.enumerable&&!b||(T[L]=A(E[L],O-1),N.enumerable||Object.defineProperty(T,L,{enumerable:!1}))}if(b)for(var H=Object.getOwnPropertyNames(E),S=0;S<H.length;S++){var q=H[S],N=Object.getOwnPropertyDescriptor(E,q);N&&N.enumerable||(T[q]=A(E[q],O-1),Object.defineProperty(T,q,{enumerable:!1}))}return T}return A(h,g)}l.clonePrototype=function(h){if(h===null)return null;var y=function(){};return y.prototype=h,new y};function u(h){return Object.prototype.toString.call(h)}l.__objToStr=u;function c(h){return typeof h=="object"&&u(h)==="[object Date]"}l.__isDate=c;function d(h){return typeof h=="object"&&u(h)==="[object Array]"}l.__isArray=d;function f(h){return typeof h=="object"&&u(h)==="[object RegExp]"}l.__isRegExp=f;function p(h){var y="";return h.global&&(y+="g"),h.ignoreCase&&(y+="i"),h.multiline&&(y+="m"),y}return l.__getRegExpFlags=p,l}();typeof e=="object"&&e.exports&&(e.exports=n)}),wA=Es((t,e)=>{var n=typeof Reflect=="object"?Reflect:null,r=n&&typeof n.apply=="function"?n.apply:function(E,O,T){return Function.prototype.apply.call(E,O,T)},i;n&&typeof n.ownKeys=="function"?i=n.ownKeys:Object.getOwnPropertySymbols?i=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:i=function(E){return Object.getOwnPropertyNames(E)};function s(E){console&&console.warn&&console.warn(E)}var o=Number.isNaN||function(E){return E!==E};function l(){l.init.call(this)}e.exports=l,e.exports.once=I,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var u=10;function c(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");u=E}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function d(E){return E._maxListeners===void 0?l.defaultMaxListeners:E._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(E){for(var O=[],T=1;T<arguments.length;T++)O.push(arguments[T]);var x=E==="error",P=this._events;if(P!==void 0)x=x&&P.error===void 0;else if(!x)return!1;if(x){var S;if(O.length>0&&(S=O[0]),S instanceof Error)throw S;var R=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw R.context=S,R}var D=P[E];if(D===void 0)return!1;if(typeof D=="function")r(D,this,O);else for(var L=D.length,N=v(D,L),T=0;T<L;++T)r(N[T],this,O);return!0};function f(E,O,T,x){var P,S,R;if(c(T),S=E._events,S===void 0?(S=E._events=Object.create(null),E._eventsCount=0):(S.newListener!==void 0&&(E.emit("newListener",O,T.listener?T.listener:T),S=E._events),R=S[O]),R===void 0)R=S[O]=T,++E._eventsCount;else if(typeof R=="function"?R=S[O]=x?[T,R]:[R,T]:x?R.unshift(T):R.push(T),P=d(E),P>0&&R.length>P&&!R.warned){R.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=E,D.type=O,D.count=R.length,s(D)}return E}l.prototype.addListener=function(E,O){return f(this,E,O,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(E,O){return f(this,E,O,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(E,O,T){var x={fired:!1,wrapFn:void 0,target:E,type:O,listener:T},P=p.bind(x);return P.listener=T,x.wrapFn=P,P}l.prototype.once=function(E,O){return c(O),this.on(E,h(this,E,O)),this},l.prototype.prependOnceListener=function(E,O){return c(O),this.prependListener(E,h(this,E,O)),this},l.prototype.removeListener=function(E,O){var T,x,P,S,R;if(c(O),x=this._events,x===void 0)return this;if(T=x[E],T===void 0)return this;if(T===O||T.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete x[E],x.removeListener&&this.emit("removeListener",E,T.listener||O));else if(typeof T!="function"){for(P=-1,S=T.length-1;S>=0;S--)if(T[S]===O||T[S].listener===O){R=T[S].listener,P=S;break}if(P<0)return this;P===0?T.shift():b(T,P),T.length===1&&(x[E]=T[0]),x.removeListener!==void 0&&this.emit("removeListener",E,R||O)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(E){var O,T,x;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[E]),this;if(arguments.length===0){var P=Object.keys(T),S;for(x=0;x<P.length;++x)S=P[x],S!=="removeListener"&&this.removeAllListeners(S);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=T[E],typeof O=="function")this.removeListener(E,O);else if(O!==void 0)for(x=O.length-1;x>=0;x--)this.removeListener(E,O[x]);return this};function y(E,O,T){var x=E._events;if(x===void 0)return[];var P=x[O];return P===void 0?[]:typeof P=="function"?T?[P.listener||P]:[P]:T?w(P):v(P,P.length)}l.prototype.listeners=function(E){return y(this,E,!0)},l.prototype.rawListeners=function(E){return y(this,E,!1)},l.listenerCount=function(E,O){return typeof E.listenerCount=="function"?E.listenerCount(O):g.call(E,O)},l.prototype.listenerCount=g;function g(E){var O=this._events;if(O!==void 0){var T=O[E];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function v(E,O){for(var T=new Array(O),x=0;x<O;++x)T[x]=E[x];return T}function b(E,O){for(;O+1<E.length;O++)E[O]=E[O+1];E.pop()}function w(E){for(var O=new Array(E.length),T=0;T<O.length;++T)O[T]=E[T].listener||E[T];return O}function I(E,O){return new Promise(function(T,x){function P(R){E.removeListener(O,S),x(R)}function S(){typeof E.removeListener=="function"&&E.removeListener("error",P),T([].slice.call(arguments))}A(E,O,S,{once:!0}),O!=="error"&&m(E,P,{once:!0})})}function m(E,O,T){typeof E.on=="function"&&A(E,"error",O,T)}function A(E,O,T,x){if(typeof E.on=="function")x.once?E.once(O,T):E.on(O,T);else if(typeof E.addEventListener=="function")E.addEventListener(O,function P(S){x.once&&E.removeEventListener(O,P),T(S)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}}),bA=Es((t,e)=>{(function(){var n,r,i=[].splice,s=function(l,u){if(!(l instanceof u))throw new Error("Bound instance method accessed before binding")},o=[].indexOf;r=yA(),n=wA().EventEmitter,e.exports=function(){class l extends n{constructor(c={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=c,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(d=>{var f;f=this[d],this[d]=function(...p){var h,y,g,v;if(g=p,[...p]=g,[h]=i.call(p,-1),typeof h=="function")try{v=f(...p),h(null,v)}catch(b){y=b,h(y)}else return f(...p,h)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(c){var d,f;if(s(this,l),(f=this._isInvalidKey(c))!=null)throw f;if(this.data[c]!=null&&this._check(c,this.data[c]))return this.stats.hits++,d=this._unwrap(this.data[c]),d;this.stats.misses++}mget(c){var d,f,p,h,y,g;if(s(this,l),!Array.isArray(c))throw d=this._error("EKEYSTYPE"),d;for(g={},p=0,y=c.length;p<y;p++){if(h=c[p],(f=this._isInvalidKey(h))!=null)throw f;this.data[h]!=null&&this._check(h,this.data[h])?(this.stats.hits++,g[h]=this._unwrap(this.data[h])):this.stats.misses++}return g}set(c,d,f){var p,h,y;if(s(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw p=this._error("ECACHEFULL"),p;if(this.options.forceString&&!typeof d==="string"&&(d=JSON.stringify(d)),f==null&&(f=this.options.stdTTL),(h=this._isInvalidKey(c))!=null)throw h;return y=!1,this.data[c]&&(y=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[c],!1))),this.data[c]=this._wrap(d,f),this.stats.vsize+=this._getValLength(d),y||(this.stats.ksize+=this._getKeyLength(c),this.stats.keys++),this.emit("set",c,d),!0}mset(c){var d,f,p,h,y,g,v,b,w,I;if(s(this,l),this.options.maxKeys>-1&&this.stats.keys+c.length>=this.options.maxKeys)throw d=this._error("ECACHEFULL"),d;for(p=0,v=c.length;p<v;p++){if(g=c[p],{key:y,val:I,ttl:w}=g,w&&typeof w!="number")throw d=this._error("ETTLTYPE"),d;if((f=this._isInvalidKey(y))!=null)throw f}for(h=0,b=c.length;h<b;h++)g=c[h],{key:y,val:I,ttl:w}=g,this.set(y,I,w);return!0}del(c){var d,f,p,h,y,g;for(s(this,l),Array.isArray(c)||(c=[c]),d=0,p=0,y=c.length;p<y;p++){if(h=c[p],(f=this._isInvalidKey(h))!=null)throw f;this.data[h]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[h],!1)),this.stats.ksize-=this._getKeyLength(h),this.stats.keys--,d++,g=this.data[h],delete this.data[h],this.emit("del",h,g.v))}return d}take(c){var d;return s(this,l),d=this.get(c),d!=null&&this.del(c),d}ttl(c,d){var f;if(s(this,l),d||(d=this.options.stdTTL),!c)return!1;if((f=this._isInvalidKey(c))!=null)throw f;return this.data[c]!=null&&this._check(c,this.data[c])?(d>=0?this.data[c]=this._wrap(this.data[c].v,d,!1):this.del(c),!0):!1}getTtl(c){var d,f;if(s(this,l),!!c){if((f=this._isInvalidKey(c))!=null)throw f;if(this.data[c]!=null&&this._check(c,this.data[c]))return d=this.data[c].t,d}}keys(){var c;return s(this,l),c=Object.keys(this.data),c}has(c){var d;return s(this,l),d=this.data[c]!=null&&this._check(c,this.data[c]),d}getStats(){return s(this,l),this.stats}flushAll(c=!0){s(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(c),this.emit("flush")}flushStats(){s(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){s(this,l),this._killCheckPeriod()}_checkData(c=!0){var d,f,p;s(this,l),f=this.data;for(d in f)p=f[d],this._check(d,p);c&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,c),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(c,d){var f;return s(this,l),f=!0,d.t!==0&&d.t<Date.now()&&(this.options.deleteOnExpire&&(f=!1,this.del(c)),this.emit("expired",c,this._unwrap(d))),f}_isInvalidKey(c){var d;if(s(this,l),d=typeof c,o.call(this.validKeyTypes,d)<0)return this._error("EKEYTYPE",{type:typeof c})}_wrap(c,d,f=!0){var p,h,y;return s(this,l),this.options.useClones||(f=!1),h=Date.now(),p=0,y=1e3,d===0?p=0:d?p=h+d*y:this.options.stdTTL===0?p=this.options.stdTTL:p=h+this.options.stdTTL*y,{t:p,v:f?r(c):c}}_unwrap(c,d=!0){return this.options.useClones||(d=!1),c.v!=null?d?r(c.v):c.v:null}_getKeyLength(c){return c.toString().length}_getValLength(c){return s(this,l),typeof c=="string"?c.length:this.options.forceString?JSON.stringify(c).length:Array.isArray(c)?this.options.arrayValueSize*c.length:typeof c=="number"?8:typeof(c==null?void 0:c.then)=="function"?this.options.promiseValueSize:typeof Buffer<"u"&&Buffer!==null&&Buffer.isBuffer(c)?c.length:c!=null&&typeof c=="object"?this.options.objectValueSize*Object.keys(c).length:typeof c=="boolean"?8:0}_error(c,d={}){var f;return s(this,l),f=new Error,f.name=c,f.errorcode=c,f.message=this.ERRORS[c]!=null?this.ERRORS[c](d):"-",f.data=d,f}_initErrors(){var c,d,f;s(this,l),this.ERRORS={},f=this._ERRORS;for(d in f)c=f[d],this.ERRORS[d]=this.createErrorMessage(c)}createErrorMessage(c){return function(d){return c.replace("__key",d.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(t)}),_A=Es((t,e)=>{(function(){var n;n=e.exports=bA(),n.version="5.1.2"}).call(t)}),$h=t=>{let e=200,n=[],r=0;return n[r]=[],t.forEach(i=>{n[r].length<=e-1?n[r].push(i):(r++,n[r]=[i])}),n},ea=(t,e)=>{let n=[];for(;t.length>e;){let r=t.splice(0,e);n.push(r)}return n.push(t),n},rn=(t,e)=>{let n="";return t==="prod"?n={profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1",miniGames:"https://mini-games.fansunitedapi.com/v1",discussions:"https://discussions.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.fansunitedapi.com/v1"}[e]:t==="dev"?n={profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1",miniGames:"http://localhost:9040/v1",discussions:"http://localhost:9020/v1",privateLeagues:"http://localhost:9010/v1"}[e]:t==="watg"?n={profile:"https://profile.watg.fansunitedapi.com/v1",football:"https://football.watg.fansunitedapi.com/v1",idMapping:"https://id-mapping.watg.fansunitedapi.com/v1",predictor:"https://prediction.watg.fansunitedapi.com/v1",client:"https://client.watg.fansunitedapi.com/v1",loyalty:"https://loyalty.watg.fansunitedapi.com/v1",miniGames:"https://mini-games.watg.fansunitedapi.com/v1",discussions:"https://discussions.watg.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.watg.fansunitedapi.com/v1"}[e]:n={profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1",miniGames:"https://mini-games.fansunitedstagingapi.com/v1",discussions:"https://discussions.fansunitedstagingapi.com/v1",privateLeagues:"https://private-leagues.fansunitedstagingapi.com/v1"}[e],n},Is=t=>t.filter((e,n,r)=>n===r.indexOf(e)),Xe=t=>t||!1,Ye=()=>`&disable_cache=${Date.now()}`,jh=t=>JSON.parse(JSON.stringify(t.sort((e,n)=>e.localeCompare(n)))),EA=class{constructor(){a(this,"id",null);a(this,"name",null);a(this,"nickname",null);a(this,"avatar",null);a(this,"gender",null);a(this,"country",null);a(this,"birthDate",null);a(this,"interests",[]);a(this,"followingCount",0);a(this,"followersCount",0)}},IA=class{constructor(){a(this,"profilesFromResponse",t=>t?t.map(e=>this.fullProfileFromResponse(e)):null);a(this,"fullProfileFromResponse",t=>{let e=new EA;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e})}},lu=class{constructor(){a(this,"nextPageStartsAfter",null);a(this,"itemsPerPage",null)}},ta=class{constructor(){a(this,"pagination",new lu)}},Ut=class{constructor(){a(this,"meta",new ta);a(this,"data",[])}},AA=class{constructor(){a(this,"avatar",null);a(this,"followingId",null);a(this,"name",null);a(this,"nickname",null);a(this,"profileId",null)}},OA=class{constructor(){a(this,"followResponse",t=>t.map(e=>this.remapResponse(e)));a(this,"followingFromResponse",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapResponse(n)),e});a(this,"remapResponse",t=>{let e=new AA;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e})}},TA=class{constructor(){a(this,"avatar",null);a(this,"followerId",null);a(this,"name",null);a(this,"nickname",null);a(this,"profileId",null)}},CA=class{constructor(){a(this,"followersFromResponse",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapResponse(n)),e});a(this,"remapResponse",t=>{let e=new TA;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e})}},Hh=class{constructor(){a(this,"profile_ids",[])}};function uu(t){this.message=t}uu.prototype=new Error,uu.prototype.name="InvalidCharacterError";var Vh=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new uu("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,s=0,o="";r=e.charAt(s++);~r&&(n=i%4?64*n+r:r,i++%4)?o+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function SA(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Vh(n).replace(/(.)/g,function(r,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}(e)}catch(n){return Vh(e)}}function As(t){this.message=t}function PA(t,e){if(typeof t!="string")throw new As("Invalid token specified");var n=(e=e||{}).header===!0?0:1;try{return JSON.parse(SA(t.split(".")[n]))}catch(r){throw new As("Invalid token specified: "+r.message)}}As.prototype=new Error,As.prototype.name="InvalidTokenError";var MA=PA,Rt={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id",api_football:"api_football_id"},qh={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},Wh=["matchId","matchType","market","prediction"],RA=new Map().set("FT_1X2","fullTimeOneXTwo").set("HT_1X2","halfTimeOneXTwo").set("BOTH_TEAMS_SCORE","bothTeamsScore").set("DOUBLE_CHANCE","doubleChance").set("HT_FT","halfTimeFullTime").set("PLAYER_SCORE","playerScore").set("PLAYER_YELLOW_CARD","playerYellowCard").set("PLAYER_RED_CARD","playerRedCard").set("RED_CARD_MATCH","redCardMatch").set("PENALTY_MATCH","penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL","playerScoreFirstGoal").set("CORNERS_MATCH","cornersMatch").set("CORRECT_SCORE","correctScore").set("CORRECT_SCORE_ADVANCED","correctScoreAdvanced").set("CORRECT_SCORE_HT","correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK","playerScoreHattrick").set("PLAYER_SCORE_TWICE","playerScoreTwice").set("OVER_GOALS_0_5","overZeroPointFiveGoals").set("OVER_GOALS_1_5","overOnePointFiveGoals").set("OVER_GOALS_2_5","overTwoPointFiveGoals").set("OVER_GOALS_3_5","overThreePointFiveGoals").set("OVER_GOALS_4_5","overFourPointFiveGoals").set("OVER_GOALS_5_5","overFivePointFiveGoals").set("OVER_GOALS_6_5","overSixPointFiveGoals").set("OVER_CORNERS_6_5","overSixPointFiveCorners").set("OVER_CORNERS_7_5","overSevenPointFiveCorners").set("OVER_CORNERS_8_5","overEightPointFiveCorners").set("OVER_CORNERS_9_5","overNinePointFiveCorners").set("OVER_CORNERS_10_5","overTenPointFiveCorners").set("OVER_CORNERS_11_5","overElevenPointFiveCorners").set("OVER_CORNERS_12_5","overTwelvePointFiveCorners").set("OVER_CORNERS_13_5","overThirteenPointFiveCorners"),Gh={UNEXPECTED_STATUS_PROP:`Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation:
|
|
2277
2277
|
${qh.PREDICTOR_USER_RELATED_OPERATION}`,UNEXPECTED_TYPE_PROP:`Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation:
|
|
2278
2278
|
${qh.PREDICTOR_USER_RELATED_OPERATION}`},kA=(t,e)=>`The prediction '${t}' is invalid for market '${e}'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations`,zh=t=>`The market '${t}' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction`,xA=t=>`The market '${t}' is not valid for Top X game. The only available market is CORRECT_SCORE.`,DA=t=>`The field/s '${t.length>1?t.join(", "):t[0]}' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk`,FA=(t,e)=>`The following field/s is/are missing from ${t}: '${e.length>1?e.join(", "):e[0]}'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction`,NA=(t,e)=>`The field ${t} has incorrect type. The correct type is ${e}`,Os=class{constructor(t,e){a(this,"data",{error:{code:0,status:"",message:""}});a(this,"status",0);a(this,"statusText","");a(this,"headers",null);a(this,"errorMessage",()=>this.data.error.message);this.data.error.code=e.code,this.data.error.status=e.status,this.data.error.message=e.message,this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}},He=class{constructor(t,e,n){a(this,"error",{code:0,status:"",message:""});this.error.code=t,this.error.status=e,this.error.message=n}},yn=class{constructor(t,e){a(this,"baseUrl",null);a(this,"apiSignInUrl",null);a(this,"jwtToken",null);a(this,"idSchema",null);a(this,"retryRequest",!1);a(this,"headers",null);a(this,"authHeaders",null);a(this,"errorHandlingMode",null);a(this,"fetchWithoutAuth",(t,e)=>_(this,null,function*(){let n=yield fetch(this.baseUrl+t,{headers:this.headers}),r=yield n.json();if(!n.ok){let i=this.transformFetchException(n,r);throw console.warn(e,i),i}return r}));a(this,"fetchWithAuth",(t,e,n,r)=>_(this,null,function*(){this.validateJWTToken();let i=null,s=null;if(n&&r?i=yield fetch(this.baseUrl+t,{method:n,headers:this.authHeaders,body:JSON.stringify(r)}):n&&!r?i=yield fetch(this.baseUrl+t,{method:n,headers:this.authHeaders}):i=yield fetch(this.baseUrl+t,{headers:this.authHeaders}),n!=="DELETE"&&(s=yield i.json()),!i.ok){(i.status===401||i.status===403)&&!this.retryRequest&&(this.retryRequest=!0,yield this.fetchWithAuth(t,e,n,r)),this.retryRequest=!1;let o=this.transformFetchException(i,s||(yield i.json()));throw console.warn(e,o),o}return this.retryRequest=!1,s}));a(this,"fetchWithAuthNewBaseURL",(t,e,n,r,i)=>_(this,null,function*(){this.validateJWTToken();let s=null,o=null;if(r&&i?s=yield fetch(t+e,{method:r,headers:this.authHeaders,body:JSON.stringify(i)}):r&&!i?s=yield fetch(t+e,{method:r,headers:this.authHeaders}):s=yield fetch(t+e,{headers:this.authHeaders}),r!=="DELETE"&&(o=yield s.json()),!s.ok){(s.status===401||s.status===403)&&!this.retryRequest&&(this.retryRequest=!0,yield this.fetchWithAuthNewBaseURL(t,e,n,r,i)),this.retryRequest=!1;let l=this.transformFetchException(s,o||(yield s.json()));throw console.warn(n,l),l}return this.retryRequest=!1,o}));a(this,"transformFetchException",(t,e)=>{if(!e&&t.status===401){if(this.errorHandlingMode==="standard")return new He(401,"unauthorized","Invalid JWT token is provided");let s={code:401,status:"unauthorized",message:"Invalid JWT token is provided"};return new Os(t,s)}let{code:n,status:r,message:i}=e.error;return this.errorHandlingMode==="standard"?new He(n,r,i):new Os(t,e.error)});a(this,"validateJWTToken",()=>{let t=null;try{t=MA(this.jwtToken)}catch(e){if(this.errorHandlingMode==="default"){let n={status:401,statusText:e.message,headers:{}},r={code:401,status:"invalid_token",message:"Invalid JWT token is provided"};throw new Os(n,r)}else if(this.errorHandlingMode==="standard")throw new He(401,"invalid_token","Invalid JWT token is provided")}if(Date.now()>t.exp*1e3){if(this.errorHandlingMode==="default"){let e={status:401,statusText:"",headers:{}},n={code:401,status:"invalid_token",message:"The provided JWT token is expired"};throw new Os(e,n)}else if(this.errorHandlingMode==="standard")throw new He(401,"invalid_token","The provided JWT token is expired")}});this.baseUrl=e,this.apiSignInUrl=`?key=${t.apiKey}&client_id=${t.clientId}`,this.jwtToken=t.authProvider.getIdToken(),this.errorHandlingMode=t.errorHandlingMode,this.idSchema=t.idSchema,this.headers={"Content-Type":"application/json"},this.authHeaders={"Content-Type":"application/json",Authorization:`Bearer ${t.authProvider.getIdToken()}`}}},LA="/countries",kt="/profile",Ts="/profiles",Qh=class extends yn{constructor(e){super(e,rn(e.environment,"profile"));a(this,"profileRemapper",null);a(this,"followingRemapper",null);a(this,"followersRemapper",null);a(this,"lang",null);a(this,"limitIds",100);a(this,"getCountries",e=>_(this,null,function*(){let n=`&lang=${this.lang}`,r=`${LA}${this.apiSignInUrl}${n}`,i=Date.now(),s="There was a problem fetching profile countries";return e&&(r+=`&disable_cache=${i}`),(yield this.fetchWithoutAuth(r,s)).data}));a(this,"getProfile",e=>_(this,null,function*(){let n=`${kt}${this.apiSignInUrl}`,r="";if(e){n=`${Ts}/${e}${this.apiSignInUrl}`,r=`There was a problem fetching the following profile: ${e}`;let i=yield this.fetchWithoutAuth(n,r);return this.profileRemapper.fullProfileFromResponse(i.data)}else{r="There was a problem fetching your profile from API";let i=yield this.fetchWithAuth(n,r);return this.profileRemapper.fullProfileFromResponse(i.data)}}));a(this,"getProfiles",(e,n,r)=>_(this,null,function*(){let i=Date.now(),s=`There was a problem fetching the following profiles: ${e.join(",")}`;if(e&&e.length){if(e.length>this.limitIds){let d=[],f=ea(e,this.limitIds);for(let p of f){let h=`${Ts}${this.apiSignInUrl}&profile_ids=${p.join(",")}`;s=`There was a problem fetching the following profiles: ${p.join(",")}`,r&&(h+=`&disable_cache=${i}`);let y=yield this.fetchWithoutAuth(h,s);d.push(...this.profileRemapper.profilesFromResponse(y.data))}return d}let u=`${Ts}${this.apiSignInUrl}&profile_ids=${e.join(",")}`;r&&(u+=`&disable_cache=${i}`);let c=yield this.fetchWithoutAuth(u,s);return this.profileRemapper.profilesFromResponse(c.data)}let o=`${Ts}${this.apiSignInUrl}&search=${n}`;r&&(o+=`&disable_cache=${i}`);let l=yield this.fetchWithoutAuth(o,s);return this.profileRemapper.profilesFromResponse(l.data)}));a(this,"getFollowers",(e,n)=>_(this,null,function*(){let r=`${kt}/followers${this.apiSignInUrl}`,i="There was a problem fetching the followers for own profile";if(e&&!n){r=`${kt}/followers${this.apiSignInUrl}${e.constructFilterUrl()}`;let o=yield this.fetchWithAuth(r,i);return this.followersRemapper.followersFromResponse(o)}else if(!e&&!n){let o=yield this.fetchWithAuth(r,i);return this.followersRemapper.followersFromResponse(o)}e&&n?r=`${kt}/${n}/followers${this.apiSignInUrl}${e.constructFilterUrl()}`:!e&&n&&(r=`${kt}/${n}/followers${this.apiSignInUrl}`),i=`There was a problem fetching the followers for profile: ${n}`;let s=yield this.fetchWithoutAuth(r,i);return this.followersRemapper.followersFromResponse(s)}));a(this,"getFollowing",(e,n)=>_(this,null,function*(){let r=`${kt}/following${this.apiSignInUrl}`,i="There was a problem fetching the followers of own profile";if(e&&!n){r=`${kt}/following${this.apiSignInUrl}${e.constructFilterUrl()}`;let o=yield this.fetchWithAuth(r,i);return this.followingRemapper.followingFromResponse(o)}else if(!e&&!n){let o=yield this.fetchWithAuth(r,i);return this.followingRemapper.followingFromResponse(o)}e&&n?r=`${kt}/${n}/following${this.apiSignInUrl}${e.constructFilterUrl()}`:!e&&n&&(r=`${kt}/${n}/following${this.apiSignInUrl}`),i=`There was a problem fetching the followers of the following profile: ${n}`;let s=yield this.fetchWithoutAuth(r,i);return this.followingRemapper.followingFromResponse(s)}));a(this,"follow",e=>_(this,null,function*(){let n=new Hh;n.profile_ids=e;let r=kt+`/follow${this.apiSignInUrl}`,i=`There was a problem with following profiles: ${e.join(",")}`,s="POST",o=yield this.fetchWithAuth(r,i,s,n);return this.followingRemapper.followResponse(o.data)}));a(this,"unfollow",e=>_(this,null,function*(){let n=new Hh;n.profile_ids=e;let r=kt+`/follow${this.apiSignInUrl}`,i=`There was a problem with unfollowing profiles: ${e.join(",")}`,s="DELETE";return yield this.fetchWithAuth(r,i,s,n),!0}));a(this,"getBadges",e=>_(this,null,function*(){let n=`${kt}/badges${this.apiSignInUrl}`,r="There was a problem with fetching own badges";return e?(n=`${kt}/${e}/badges${this.apiSignInUrl}`,r="There was a problem with fetching the badges",(yield this.fetchWithoutAuth(n,r)).data):(yield this.fetchWithAuth(n,r)).data}));a(this,"updateProfile",e=>_(this,null,function*(){let n=kt+this.apiSignInUrl,r="There was a problem updating the own profile",i="PATCH",s=yield this.fetchWithAuth(n,r,i,e);return this.profileRemapper.fullProfileFromResponse(s.data)}));this.lang=e.lang,this.profileRemapper=new IA,this.followingRemapper=new OA,this.followersRemapper=new CA}},Yh=(t=>(t.NATIVE="native",t.ENETPULSE="enetpulse",t.SPORTRADAR="sportradar",t.SPORTAL_365="sportal365",t.API_FOOTBALL="api_football",t))(Yh||{}),na={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},BA=class extends yn{constructor(e){super(e,rn(e.environment,"idMapping"));a(this,"getEntityById",(e,n)=>_(this,null,function*(){let r=`/football${this.apiSignInUrl}&input_provider=${this.idSchema}&${na[e]}=${n}`,i=`There was a problem with id mapping request for the following id: ${n}`;return yield this.fetchWithoutAuth(r,i)}));a(this,"getEntityByIdAndSchema",(e,n,r)=>_(this,null,function*(){let i=`/football${this.apiSignInUrl}&input_provider=${r}&${na[e]}=${n}`,s=`There was a problem with id mapping request for the following id: ${n}`;return yield this.fetchWithoutAuth(i,s)}));a(this,"getEntityIdsByIdsAndSchema",(e,n,r)=>_(this,null,function*(){let i=`/football${this.apiSignInUrl}&input_provider=${r}&${na[e]}=${n.join(",")}`,s=`There was a problem with id mapping request for the following ids: ${n.join(",")}`;return yield this.fetchWithoutAuth(i,s)}));a(this,"getEntitiesByIds",(e,n,r)=>_(this,null,function*(){n.sort((o,l)=>o.localeCompare(l));let i=$h(n),s=[];for(let o of i){let l=`/football${this.apiSignInUrl}&input_provider=${r}&${na[e]}=${o.join(",")}`,u=`There was a problem with id mapping request for the following ids :${o.join(",")}`,c=yield this.fetchWithoutAuth(l,u);s=[...s,...c.data]}return s}));a(this,"getEntitiesByIdObjs",(e,n)=>_(this,null,function*(){let r=[],i={},s=[];Object.keys(e).forEach(u=>{r.push.apply(r,e[u])});let o=Is(r),l=$h(o);for(let u of l){let c="";if(Object.keys(e).forEach(d=>{i[d]=[];let f=u.filter(p=>e[d].includes(p));f&&f.length>0&&(i[d]=f)}),Object.keys(i).forEach(d=>{i[d].length>0&&(i[d].sort((f,p)=>f.localeCompare(p)),c+="&",c+=`${na[d]}=${i[d].join(",")}`)}),c&&c.length>0){let d=`/football${this.apiSignInUrl}&input_provider=${n||"native"}${c}`,f="There was a problem with id mapping request",p=yield this.fetchWithoutAuth(d,f);s.push(p.data)}else s.push([])}return Array.prototype.concat.apply([],s)}));a(this,"getTopEntities",()=>_(this,null,function*(){let e=`/football/top${this.apiSignInUrl}`,n="There was a problem with top id mappings request";return(yield this.fetchWithoutAuth(e,n)).data}))}},cu="FansUnited",du={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}},ra=class{constructor(t){a(this,"idSchema","");a(this,"expirationProfileTimeout",600);a(this,"expirationBadgesTimeout",3600);a(this,"expirationClientFeaturesTimeout",14400);a(this,"expirationFootballIdsTimeout",604800);a(this,"clearData",()=>{this.setData(du)});a(this,"getEntityById",(t="",e="")=>this.getData().football.ids.find(n=>{let r=Rt[this.idSchema];return n&&`${n[r]}`===e&&n.resource===t}));a(this,"getEntity",(t,e,n)=>Array.isArray(t)?this.getData().football.ids.filter(r=>{let i=Rt[n];return r&&t.includes(`${r[i]}`)&&r.resource===e}):this.getData().football.ids.find(r=>{let i=Rt[n];return r&&`${r[i]}`===t&&r.resource===e}));a(this,"getEntityByNativeId",(t="",e="")=>this.getData().football.ids.find(n=>n&&`${n.id}`===e&&n.resource===t));a(this,"checkForExistingIdObjs",(t,e)=>{let n=Rt[e],r={};return Object.keys(t).forEach(i=>{let s=t[i],o=this.getEntity(s,i,e).map(u=>u[n]),l=t[i].filter(u=>!o.includes(u));r[i]=s.map(u=>l.includes(u)?{id:u,exists:!1}:{id:u,exists:!0})}),r});a(this,"getIdsByType",(t,e,n)=>{let r=Rt[n],i=Rt[e],s={};return Object.keys(t).forEach(o=>{let l=t[o],u=[];this.getData().football.ids.forEach(c=>{l.forEach((d,f)=>{d===c[i]&&o===c.resource&&(u[f]=c[r])})}),s[o]=u}),s});a(this,"addIdMapping",t=>{let e=this.getData();e.football.ids.push(t),this.setData(e)});a(this,"addIdMappings",t=>{let e=this.getData(),n=e.football.ids;n=[...n,...t],e.football.ids=n,this.setData(e)});a(this,"addTopIdMappings",t=>{let e=this.getData();if(e.football.ids.length){let n=JSON.parse(JSON.stringify(e.football.ids));n=n.filter(r=>r.resource!=="match"),t=t.filter(r=>r.resource==="match"),n=[...n,...t],e.football.ids=n}else e.football.ids=t;e.football.expirations.ids=Math.floor(Date.now()/1e3)+this.expirationFootballIdsTimeout,this.setData(e)});a(this,"setOwnProfile",t=>{let e=this.getData();e.profile.info=t,e.profile.expirations.profile=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e)});a(this,"getOwnProfile",()=>this.getData().profile.info);a(this,"getProfileCountries",()=>this.getData().profile.countries);a(this,"setProfileCountries",t=>{let e=this.getData();e.profile.countries=t,this.setData(e)});a(this,"getProfileStats",()=>this.getData().profile.statistics);a(this,"setProfileStats",t=>{let e=this.getData();e.profile.statistics=t,e.profile.expirations.statistics=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e)});a(this,"getProfileBadges",()=>this.getData().profile.badges);a(this,"setProfileBadges",t=>{let e=this.getData();e.profile.badges=t,e.profile.expirations.badges=Math.floor(Date.now()/1e3)+this.expirationBadgesTimeout,this.setData(e)});a(this,"getFootballCountries",()=>this.getData().football.countries);a(this,"setFootballCountries",t=>{let e=this.getData();e.football.countries=t,this.setData(e)});a(this,"getCompetitions",t=>{let e=this.getData();return t?t.competitionSearchFilter(e.football.competitions):e.football.competitions});a(this,"setCompetitions",t=>{let e=this.getData(),n=[...e.football.competitions];n.push(...t),e.football.competitions=this.makeCompetitionsUnique(n),this.setData(e)});a(this,"getCompetitionsLength",()=>{let{football:t}=this.getData();return t.competitions.length});a(this,"getClientFeatures",()=>this.getData().client.features);a(this,"setClientFeatures",t=>{let e=this.getData(),n=JSON.parse(JSON.stringify(t));e.client.expirations.features=Math.floor(Date.now()/1e3)+this.expirationClientFeaturesTimeout,e.client.features=n,this.setData(e)});a(this,"deleteClientFeatures",()=>{let t=this.getData(),e=JSON.parse(JSON.stringify(t));e.client={features:{},expirations:{features:0}},this.setData(e)});a(this,"getExpiration",(t,e)=>{this.initialNewSchema(t,"expirations");let n=this.getData();switch(e){case"profile":return n.profile.expirations.profile;case"statistics":return n.profile.expirations.statistics;case"badges":return n.profile.expirations.badges;case"features":return n.client.expirations.features;case"ids":return n.football.expirations.ids}});a(this,"makeCompetitionsUnique",t=>{let e=new Set;return t.filter(n=>{let r=!e.has(n.id);return e.add(n.id),r})});a(this,"getData",()=>(localStorage.getItem(cu)||this.setData(du),JSON.parse(localStorage.getItem(cu))));a(this,"setData",t=>{localStorage.setItem(cu,JSON.stringify(t))});a(this,"initialNewSchema",(t,e)=>{let n=this.getData();(!n||!n[t]||!n[t][e])&&this.setData(du)});this.idSchema=t}static getInstance(t){return ra.instance||(ra.instance=new ra(t)),ra.instance}},Kh=ra;ou(Kh,"instance");var UA=vA(_A()),Ne=class{constructor(t){a(this,"profileTTL",600);a(this,"clientTTL",14400);a(this,"profileBadgesTTL",3600);a(this,"idMappingsExpiration",0);a(this,"idSchema","");a(this,"clearData",()=>Ne.nodeCache.flushAll());a(this,"getEntityById",(t,e)=>{let n=Ne.nodeCache.get("ids");return n?n.find(r=>{let i=Rt[this.idSchema];return r&&`${r[i]}`===e&&r.resource===t}):null});a(this,"getEntity",(t,e,n)=>{let r=Ne.nodeCache.get("ids");return r?Array.isArray(t)?[]:null:Array.isArray(t)?r.filter(i=>{let s=Rt[n];return i&&t.includes(`${i[s]}`)&&i.resource===e}):r.find(i=>{let s=Rt[n];return i&&`${i[s]}`===t&&i.resource===e})});a(this,"checkForExistingIdObjs",(t,e)=>{let n=Rt[e],r={};return Object.keys(t).forEach(i=>{let s=t[i],o=this.getEntity(s,i,e).map(u=>u[n]),l=t[i].filter(u=>!o.includes(u));r[i]=s.map(u=>l.includes(u)?{id:u,exists:!1}:{id:u,exists:!0})}),r});a(this,"getIdsByType",(t,e,n)=>{let r=Rt[n],i=Rt[e],s=Ne.nodeCache.get("ids"),o={};return s?(Object.keys(t).forEach(l=>{let u=t[l],c=[];s.forEach(d=>{u.forEach((f,p)=>{f===d[i]&&l===d.resource&&(c[p]=d[r])})}),o[l]=c}),o):null});a(this,"addIdMapping",t=>{let e=Ne.nodeCache.get("ids");e.push(t),Ne.nodeCache.set("ids",e)});a(this,"addIdMappings",t=>{let e=Ne.nodeCache.get("ids");e=[...e,...t],Ne.nodeCache.set("ids",e)});a(this,"addTopIdMappings",t=>{let e=Ne.nodeCache.get("ids"),n=604800;if(e){let r=JSON.parse(JSON.stringify(e));r=r.filter(i=>i.resource!=="match"),t=t.filter(i=>i.resource==="match"),r=[...r,...t],Ne.nodeCache.set("ids",r)}else Ne.nodeCache.set("ids",t);this.idMappingsExpiration=Math.floor(Date.now()/1e3)+n});a(this,"setOwnProfile",t=>Ne.nodeCache.set("profile",t,this.profileTTL));a(this,"getOwnProfile",()=>Ne.nodeCache.get("profile"));a(this,"getProfileCountries",()=>Ne.nodeCache.get("profile_countries"));a(this,"setProfileCountries",t=>Ne.nodeCache.set("profile_countries",t));a(this,"getProfileStats",()=>Ne.nodeCache.get("profile_stats"));a(this,"setProfileStats",t=>Ne.nodeCache.set("profile_stats",t,this.profileTTL));a(this,"getProfileBadges",()=>Ne.nodeCache.get("profile_badges"));a(this,"setProfileBadges",t=>{Ne.nodeCache.set("profile_badges",t,this.profileBadgesTTL)});a(this,"getFootballCountries",()=>Ne.nodeCache.get("football_countries"));a(this,"setFootballCountries",t=>Ne.nodeCache.set("football_countries",t));a(this,"getCompetitions",t=>{let e=Ne.nodeCache.get("football_competitions");return e?t?t.competitionSearchFilter(e):e:null});a(this,"setCompetitions",t=>Ne.nodeCache.set("football_competitions",t));a(this,"getCompetitionsLength",()=>{let t=Ne.nodeCache.get("football_competitions");return t?t.length:0});a(this,"getClientFeatures",()=>Ne.nodeCache.get("client"));a(this,"setClientFeatures",t=>Ne.nodeCache.set("client",t,this.clientTTL));a(this,"deleteClientFeatures",()=>Ne.nodeCache.del("client"));a(this,"getExpiration",(t,e)=>{let n=this.getKeyFromExpirationType(e);return n==="ids"?this.idMappingsExpiration:Ne.nodeCache.getTtl(n)});a(this,"getKeyFromExpirationType",t=>{switch(t){case"profile":return"profile";case"statistics":return"profile_stats";case"badges":return"profile_badges";case"features":return"client";case"ids":return"ids"}})}static getInstance(t){return Ne.instance||(Ne.instance=new Ne(t),Ne.nodeCache.options.useClones=!1),Ne.instance}},fu=Ne;ou(fu,"instance"),ou(fu,"nodeCache",new UA.default);var ia=class{constructor(){a(this,"createLocalCacheInstance",t=>typeof window>"u"?fu.getInstance(t):Kh.getInstance(t))}},$A=class{constructor(t){a(this,"localCache",null);a(this,"https",null);a(this,"getEntitiesByIds",(t,e,n)=>_(this,null,function*(){yield this.setTopIdMappings();try{let r=this.localCache.checkForExistingIdObjs(t,e),i=this.splitForRequestAndExisting(r),s=yield this.https.getEntitiesByIdObjs(i.request,e);return this.localCache.addIdMappings(s),this.localCache.getIdsByType(t,e,n)}catch(r){return console.warn("There was a problem retrieving the entity ids ",r),Promise.resolve([])}}));a(this,"getEntityById",(t,e,n)=>_(this,null,function*(){let r=this.localCache.getEntity(t,e,n);if(r)return r;let i=yield this.requestEntity(t,e,n);return this.localCache.addIdMappings(i),i}));a(this,"splitForRequestAndExisting",t=>{let e={},n={};return Object.keys(t).forEach(r=>{e[r]=t[r].filter(i=>!i.exists).map(i=>i.id),n[r]=t[r].filter(i=>i.exists).map(i=>i.id)}),{existing:n,request:e}});a(this,"requestEntity",(t,e,n)=>_(this,null,function*(){try{return t=Array.isArray(t)?t:[t],yield this.https.getEntitiesByIds(e,t,n)}catch(r){return console.warn(`There was a problem retrieving the requested entity: ${r}`),null}}));a(this,"setTopIdMappings",()=>_(this,null,function*(){let t=Math.floor(Date.now()/1e3);if(this.localCache.getExpiration("football","ids")>t)return Promise.resolve();let e=yield this.https.getTopEntities();this.localCache.addTopIdMappings(e)}));this.localCache=new ia().createLocalCacheInstance(t.idSchema),this.https=new BA(t)}},Jh=t=>{switch(t){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return t}},jA=class{constructor(){a(this,"extractedObjIds",{});a(this,"traverse",(t,e)=>(e=Jh(e),Array.isArray(t)?this.traverseArrExtract(t,e):t&&typeof t=="object"&&this.traverseObjExtract(t,e),this.extractedObjIds));a(this,"traverseArrExtract",(t,e)=>{t&&t.length>0&&t.forEach(n=>{this.traverseObjExtract(n,e)})});a(this,"traverseObjExtract",(t,e)=>{t&&Object.keys(t).length>0&&Object.keys(t).forEach(n=>{let r=t[n];n==="id"||n==="teamId"?(this.extractedObjIds.hasOwnProperty(e)||(this.extractedObjIds[e]=[]),r&&this.extractedObjIds[e].push(r)):t[n]&&this.traverse(t[n],n)})})}},HA=class{constructor(){a(this,"replaceObjIdsIndex",null);a(this,"remappedIdsObj",{});a(this,"traverse",(t,e,n)=>(e=Jh(e),this.replaceObjIdsIndex===null&&(this.initReplaceObjIdsIndex(n),this.remappedIdsObj=n),Array.isArray(t)?this.traverseArrReplace(t,e):t&&typeof t=="object"&&this.traverseObjReplace(t,e),t));a(this,"initReplaceObjIdsIndex",t=>{this.replaceObjIdsIndex={},Object.keys(t).forEach(e=>{this.replaceObjIdsIndex[e]=0})});a(this,"traverseArrReplace",(t,e)=>{t&&t.length>0&&t.forEach(n=>{this.traverseObjReplace(n,e)})});a(this,"traverseObjReplace",(t,e)=>{t&&Object.keys(t).length>0&&Object.keys(t).forEach(n=>{n==="id"||n==="teamId"?t[n]&&(t[n]=this.remappedIdsObj[e][this.replaceObjIdsIndex[e]],this.replaceObjIdsIndex[e]=this.replaceObjIdsIndex[e]+1):t[n]&&this.traverse(t[n],n,this.remappedIdsObj)})})}},wn=class{constructor(t){a(this,"idSchema","");a(this,"idMappingFacade",null);a(this,"getEntityIdBySchemaId",(t,e)=>this.idMappingFacade.getEntityById(e,t,this.idSchema));a(this,"remapEntities",(t,e)=>_(this,null,function*(){let n=JSON.parse(JSON.stringify(t));try{if(this.idSchema!=="native"){let r=new jA().traverse(n,e);return this.idMappingFacade.getEntitiesByIds(r,"native",this.idSchema).then(i=>new HA().traverse(n,e,i))}else return t}catch(r){return console.warn(`There was a problem remapping entity: ${e} with inner entity `,r),[]}}));a(this,"getEntityIdsBySchemaId",(t,e,n)=>_(this,null,function*(){let r={};return r[e]=t,this.idSchema!=="native"?yield this.idMappingFacade.getEntitiesByIds(r,this.idSchema,n):r}));this.idSchema=t.idSchema,this.idMappingFacade=new $A(t)}},bn=class{constructor(t){a(this,"completed",!1);a(this,"percentage");this.percentage=t}},VA=class{constructor(){a(this,"teamFollowed",new bn(10));a(this,"teamFavourite",new bn(15));a(this,"playerFollowed",new bn(10));a(this,"playerFavourite",new bn(10));a(this,"competitionFollowed",new bn(10));a(this,"competitionFavourite",new bn(5));a(this,"addedBirthdate",new bn(10));a(this,"addedGender",new bn(10));a(this,"addedCountry",new bn(10));a(this,"addedAvatar",new bn(10))}},qA=class{constructor(){a(this,"totalPercentage");a(this,"breakdown",new VA)}},Xh=class{constructor(t){a(this,"limit",0);a(this,"startAfter",null);a(this,"constructFilterUrl",()=>{let t="";return this.limit&&(t=t+"&",t=t+`limit=${this.limit}`),this.startAfter&&(t=t+"&",t=t+`start_after=${this.startAfter}`),t});this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},Cs=class{constructor(t,e,n){a(this,"localCache");a(this,"profileHttps",null);a(this,"activityHttps",null);a(this,"getOwn",()=>_(this,null,function*(){let t=this.getLocalStorageData("profile");if(t)return JSON.parse(JSON.stringify(t));try{let e=yield this.profileHttps.getProfile();return this.localCache.setOwnProfile(e),e}catch(e){throw console.warn("There was a problem retrieving your profile: ",e),e}}));a(this,"updateOwnProfile",()=>_(this,null,function*(){try{let t=yield this.profileHttps.getProfile();return this.localCache.setOwnProfile(t),t}catch(t){throw console.warn("There was a problem retrieving your profile: ",t),t}}));a(this,"getByIds",(t,e,n)=>_(this,null,function*(){if(t&&t.length>0&&e||!t&&t.length===0&&!e)throw new He(400,"invalid_method_call","The method 'getByIds' from Profile namespace is not called correctly. You need to provide 'profileIds' OR 'search' parameters to the method, but you can't use both of them or neither of them.");try{return yield this.profileHttps.getProfiles(t,e,n)}catch(r){throw console.warn(`There was a problem retrieving the selected profiles: ${t.join(",")} `,r),r}}));a(this,"getById",t=>_(this,null,function*(){try{return yield this.profileHttps.getProfile(t)}catch(e){throw console.warn(`There was a problem retrieving the selected profile: ${t} `,e),e}}));a(this,"getCountries",t=>_(this,null,function*(){t=t||!1;let e=this.localCache.getProfileCountries();if(e&&e.length>0)return e;try{let n=yield this.profileHttps.getCountries(t);return this.localCache.setProfileCountries(n),n}catch(n){throw console.warn("There was a problem retrieving profile countries: ",n),n}}));a(this,"getFollowers",(t,e)=>_(this,null,function*(){try{t&&(t=new Xh(t));let n=yield this.profileHttps.getFollowers(t,e),r=n.data.map(i=>i.followerId);if(r.length){let i=yield this.getByIds(r),s=n.data.map(o=>(i.forEach(l=>{o.followerId===l.id&&(o.name=l.name,o.nickname=l.nickname,o.avatar=l.avatar)}),o));return n.data=s,n}return n}catch(n){throw console.warn("There was a problem retrieving your followers: ",n),n}}));a(this,"getFollowing",(t,e)=>_(this,null,function*(){try{t&&(t=new Xh(t));let n=yield this.profileHttps.getFollowing(t,e),r=n.data.map(i=>i.followingId);if(r.length){let i=yield this.getByIds(r),s=n.data.map(o=>(i.forEach(l=>{o.followingId===l.id&&(o.name=l.name,o.nickname=l.nickname,o.avatar=l.avatar)}),o));return n.data=s,n}return n}catch(n){throw console.warn("There was a problem retrieving your following profiles: ",n),n}}));a(this,"follow",t=>_(this,null,function*(){try{return yield this.profileHttps.follow(t)}catch(e){throw console.warn(`There was a problem following profiles: ${t.join(",")} `,e),e}}));a(this,"unfollow",t=>_(this,null,function*(){try{return yield this.profileHttps.unfollow(t)}catch(e){throw console.warn(`There was a problem unfollowing profiles: ${t.join(",")} `,e),e}}));a(this,"showFullnessProfile",t=>{let e=new qA,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find(r=>r.type==="team"&&r.favourite)&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find(r=>r.type==="team")&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find(r=>r.type==="player"&&r.favourite)&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find(r=>r.type==="player")&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find(r=>r.type==="competition"&&r.favourite)&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find(r=>r.type==="competition")&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e});a(this,"getStats",()=>_(this,null,function*(){let t=["predictionsMade","predictions","tiers","badges"],e=this.getLocalStorageData("statistics"),n=e?t.every(r=>Object.keys(e).includes(r)):!1;if(e&&Object.keys(e).length&&n)return JSON.parse(JSON.stringify(e));try{let r=yield this.activityHttps.getStats();return this.localCache.setProfileStats(r),r}catch(r){throw console.warn("There was a problem retrieving own profile statistics: ",r),r}}));a(this,"getBadges",()=>_(this,null,function*(){let t=this.getLocalStorageData("badges");if(t)return t;try{let e=yield this.profileHttps.getBadges();return this.localCache.setProfileBadges(e),e}catch(e){throw console.warn("There was a problem retrieving own profile badges: ",e),e}}));a(this,"getLocalStorageData",t=>{let e=Math.floor(Date.now()/1e3),n=this.localCache.getExpiration("profile",t);switch(t){case"profile":if(n>e)return this.localCache.getOwnProfile();case"statistics":if(n>e)return this.localCache.getProfileStats();case"badges":if(n>e)return this.localCache.getProfileBadges();default:return null}});this.localCache=t,this.profileHttps=e,this.activityHttps=n}},WA=class{constructor(){a(this,"id",null);a(this,"name",null);a(this,"assets",null)}},GA=class{constructor(){a(this,"extractUpdatedProps",(t,e)=>{let n=["name","nickname","gender","avatar"],r={};return Object.keys(t).forEach(i=>{if(n.includes(i)&&t[i]!==e[i])r[i]=e[i];else if(i==="birthDate")(e[i]===null||t[i]===null&&e[i]||t[i]!==e[i])&&(r.birth_date=e[i]);else if(i==="country")e[i]===null?r.country_id=e[i]:(t[i]===null&&e[i]||t[i].id!==e[i].id)&&(r.country_id=e[i].id);else if(i==="interests"){let s=t[i],o=e[i];o.length&&this.isNewInterest(s,o)?r[i]=this.updateInterests(s,o):(!o.length&&s.length||s.length!==o.length&&!this.isNewInterest(s,o))&&(r[i]=o)}}),r});a(this,"updateInterests",(t,e)=>{if(t.length===e.length){let[n,r]=this.extractSameAndNewInterests(t,e);return[...r,...n]}else return e});a(this,"isNewInterest",(t,e)=>{let n=!1,[r]=this.extractSameAndNewInterests(t,e);return r.length&&(n=!0),n});a(this,"extractSameAndNewInterests",(t,e)=>{let n=e.filter(r=>t.some(i=>r.id===i.id&&r.type===i.type&&r.source===i.source&&r.favourite===i.favourite));return[e.filter(r=>!t.some(i=>r.id===i.id&&r.type===i.type&&r.source===i.source&&r.favourite===i.favourite)),n]});a(this,"isAvatarValidURL",t=>{try{return new URL(t),!0}catch(e){return!1}})}},tt=class extends Error{constructor(e,n,r){super();a(this,"code",0);a(this,"status",null);a(this,"message",null);a(this,"errorMessage",()=>this.message);this.code=e,this.status=n,this.message=r}},zA=class{constructor(t,e,n,r,i){a(this,"idsRemapper",null);a(this,"profileHttps",null);a(this,"profileService",null);a(this,"localCache",null);a(this,"profileFacade",null);a(this,"ownProfile",null);a(this,"modified",!1);a(this,"expireAt",0);a(this,"promises",[]);a(this,"isFetching",!1);a(this,"errorHandlingMode",null);a(this,"getOwnProfile",()=>_(this,null,function*(){for(;this.isFetching;)console.log("Another thread is fetching profile..."),yield this.delay(100);if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),this.ownProfile;let t=Math.floor(Date.now()/1e3);if(!this.ownProfile||this.expireAt<t){this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600;try{let e=yield this.profileFacade.getOwn();this.setOwnProfile(e)}catch(e){throw this.isFetching=!1,e}return this.modified=!1,this.isFetching=!1,this.ownProfile}return this.ownProfile}));a(this,"delay",t=>new Promise(e=>{setTimeout(e,t)}));a(this,"setOwnProfile",t=>{this.ownProfile=t});a(this,"getInfo",()=>_(this,null,function*(){let t=yield this.getOwnProfile(),e=JSON.parse(JSON.stringify(t));return delete e.interests,e}));a(this,"showInterests",()=>_(this,null,function*(){let t=yield this.getOwnProfile(),e=JSON.parse(JSON.stringify(t));return yield this.idsRemapper.remapInterests(e.interests)}));a(this,"showFullInterests",()=>_(this,null,function*(){let t=yield this.getOwnProfile(),e=JSON.parse(JSON.stringify(t));return yield this.idsRemapper.showFullInterests(e.interests)}));a(this,"getFollowers",t=>_(this,null,function*(){return yield this.profileFacade.getFollowers(t)}));a(this,"getFollowing",t=>_(this,null,function*(){return yield this.profileFacade.getFollowing(t)}));a(this,"follow",t=>_(this,null,function*(){let e=yield this.profileFacade.follow(t),n=yield this.profileFacade.updateOwnProfile();return this.setOwnProfile(n),e}));a(this,"unfollow",t=>_(this,null,function*(){let e=yield this.profileFacade.unfollow(t),n=yield this.profileFacade.updateOwnProfile();return this.setOwnProfile(n),e}));a(this,"getStats",()=>_(this,null,function*(){let t=yield this.profileFacade.getStats();return yield this.idsRemapper.remapProfileStats(t)}));a(this,"getBadges",()=>_(this,null,function*(){return yield this.profileFacade.getBadges()}));a(this,"addInterestPromise",t=>_(this,null,function*(){this.modified=!0;let e=Z({},t);yield this.getOwnProfile();let n=null;t.source!=="custom"?n=yield this.idsRemapper.remapInterestToNative(e):n=e;let r=this.ownProfile.interests.filter(i=>i.id!==n.id||i.type!==n.type||i.source!==n.source);return this.ownProfile.interests=[...r],this.ownProfile.interests.push(n),this}));a(this,"addInterest",t=>(this.promises.push(this.addInterestPromise(t)),this));a(this,"removeInterestPromise",t=>_(this,null,function*(){this.modified=!0;let e=Z({},t);yield this.getOwnProfile();let n=null;return t.source!=="custom"?n=yield this.idsRemapper.remapInterestToNative(e):n=e,this.ownProfile.interests=this.ownProfile.interests.filter(r=>r.id!==n.id||r.type!==n.type||r.source!==n.source),this}));a(this,"removeInterest",t=>(this.promises.push(this.removeInterestPromise(t)),this));a(this,"setBirthdatePromise",t=>_(this,null,function*(){return this.modified=!0,yield this.getOwnProfile(),t?this.ownProfile.birthDate=t:this.ownProfile.birthDate=null,this}));a(this,"setBirthdate",t=>(this.promises.push(this.setBirthdatePromise(t)),this));a(this,"setGenderPromise",t=>_(this,null,function*(){return this.modified=!0,yield this.getOwnProfile(),t==="male"||t==="female"?this.ownProfile.gender=t:this.ownProfile.gender="unspecified",this}));a(this,"setGender",t=>(this.promises.push(this.setGenderPromise(t)),this));a(this,"setNicknamePromise",t=>_(this,null,function*(){return this.modified=!0,yield this.getOwnProfile(),this.ownProfile.nickname=t,this}));a(this,"setNickname",t=>(this.promises.push(this.setNicknamePromise(t)),this));a(this,"setNamePromise",t=>_(this,null,function*(){return this.modified=!0,yield this.getOwnProfile(),this.ownProfile.name=t,this}));a(this,"setName",t=>(this.promises.push(this.setNamePromise(t)),this));a(this,"setCountryPromise",t=>_(this,null,function*(){return this.modified=!0,yield this.getOwnProfile(),t&&!this.ownProfile.country?(this.ownProfile.country=new WA,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,this}));a(this,"setCountry",t=>(this.promises.push(this.setCountryPromise(t)),this));a(this,"showFullnessProfile",()=>_(this,null,function*(){let t=yield this.getOwnProfile(),e=JSON.parse(JSON.stringify(t));return this.profileFacade.showFullnessProfile(e)}));a(this,"setAvatarPromise",t=>_(this,null,function*(){if(this.modified=!0,yield this.getOwnProfile(),this.profileService.isAvatarValidURL(t))this.ownProfile.avatar=t;else{if(this.errorHandlingMode==="default")throw new tt(400,"invalid_avatar","Invalid URL syntax for avatar image.");if(this.errorHandlingMode==="standard")throw new He(400,"invalid_avatar","Invalid URL syntax for avatar image.")}return this}));a(this,"setAvatar",t=>(this.promises.push(this.setAvatarPromise(t)),this));a(this,"update",()=>_(this,null,function*(){if(this.promises.length===0)return this.ownProfile;yield Promise.all(this.promises);let t=yield this.profileFacade.getOwn(),e=yield this.getOwnProfile(),n=this.profileService.extractUpdatedProps(t,e);if(this.modified=!1,this.expireAt=0,Object.keys(n).length){let i=yield this.profileHttps.updateProfile(n),s=JSON.parse(JSON.stringify(i));return this.setOwnProfile(s),this.localCache.setOwnProfile(s),delete i.interests,i}let r=JSON.parse(JSON.stringify(this.ownProfile));return delete r.interests,r}));this.idsRemapper=t,this.localCache=e,this.profileHttps=n,this.errorHandlingMode=i,this.profileService=new GA,this.profileFacade=new Cs(e,n,r)}},QA=class{constructor(t,e,n,r){a(this,"idsRemapper",null);a(this,"profileHttps",null);a(this,"activityHttps",null);a(this,"profileFacade",null);a(this,"profileId","");a(this,"setId",t=>(this.profileId=t,this));a(this,"getProfile",()=>_(this,null,function*(){return yield this.profileFacade.getById(this.profileId)}));a(this,"getInfo",()=>_(this,null,function*(){let t=yield this.getProfile();return delete t.interests,t}));a(this,"showInterests",()=>_(this,null,function*(){let t=yield this.getProfile(),e=JSON.parse(JSON.stringify(t));return yield this.idsRemapper.remapInterests(e.interests)}));a(this,"showFullInterests",()=>_(this,null,function*(){let t=yield this.getProfile(),e=JSON.parse(JSON.stringify(t));return yield this.idsRemapper.showFullInterests(e.interests)}));a(this,"getFollowers",t=>_(this,null,function*(){return yield this.profileFacade.getFollowers(t,this.profileId)}));a(this,"getFollowing",t=>_(this,null,function*(){return yield this.profileFacade.getFollowing(t,this.profileId)}));a(this,"showFullnessProfile",()=>_(this,null,function*(){let t=yield this.getProfile();return this.profileFacade.showFullnessProfile(t)}));a(this,"getStats",t=>_(this,null,function*(){let e=yield this.activityHttps.getStats(this.profileId,t);return yield this.idsRemapper.remapProfileStats(e)}));a(this,"getBadges",()=>_(this,null,function*(){return yield this.profileHttps.getBadges(this.profileId)}));this.idsRemapper=t,this.profileHttps=n,this.activityHttps=r,this.profileFacade=new Cs(e,n,r)}},YA=class{constructor(t,e,n){a(this,"localCache",null);a(this,"https",null);a(this,"idMapping",null);a(this,"getCountriesWithIdMapping",t=>_(this,null,function*(){try{let e=yield this.getCountries(t);return this.idMapping.remapEntities(e,"country")}catch(e){throw console.warn("There was a problem browsing countries as football entities",e),e}}));a(this,"getCountries",t=>_(this,null,function*(){t=t||!1;let e=this.localCache.getFootballCountries();if(e&&e.length>0)return e;try{let n=yield this.https.getCountries(t);return this.localCache.setFootballCountries(n),n}catch(n){throw console.warn("There was a problem retrieving countries as football entities",n),n}}));this.localCache=t,this.idMapping=n,this.https=e}},Zh=class{constructor(t){a(this,"countryId",null);a(this,"name",null);a(this,"gender",null);a(this,"type",null);a(this,"sortField",null);a(this,"sortOrder",null);a(this,"competitionIds",null);a(this,"constructFilterUrl",()=>{let t="";return this.countryId&&(t=t+"&",t=t+`country_id=${this.countryId}`),this.gender&&(t=t+"&",t=t+`gender=${this.gender}`),this.type&&(t=t+"&",t=t+`type=${this.type}`),this.sortField&&(t=t+"&",t=t+`sort_field=${this.sortField}`),this.sortOrder&&(t=t+"&",t=t+`sort_order=${this.sortOrder}`),this.name&&(t=t+"&",t=t+`name=${this.name}`),this.competitionIds&&(t=t+"&",t=t+`competition_ids=${this.competitionIds.join(",")}`),t});a(this,"competitionSearchFilter",t=>{try{let e=this.filter(t);return this.sortField||this.sortOrder?this.sort(e):e}catch(e){return console.warn("There was a problem filtering the local competitions",e),[]}});a(this,"filter",t=>{let e=this.entitiesToSearchWith();return t.filter(n=>{let r=!0;return e.forEach(i=>{i!=="sortOrder"&&i!=="sortField"&&(i==="countryId"?r&&(r=n.country.id===this[i]):i==="name"?r&&(r=n.name.toLocaleLowerCase().includes(this[i].toLocaleLowerCase())):i==="competitionIds"?r&&(r=this[i].some(s=>n.id===s)):r&&(r=n[i].toLocaleLowerCase()===this[i].toLocaleLowerCase()))}),r})});a(this,"entitiesToSearchWith",()=>{let t=[];return this.countryId&&t.push("countryId"),this.name&&t.push("name"),this.gender&&t.push("gender"),this.type&&t.push("type"),this.sortField&&t.push("sortField"),this.sortOrder&&t.push("sortOrder"),this.competitionIds&&t.push("competitionIds"),t});a(this,"sort",t=>{let e=[];return this.sortField==="name"?e=t.sort((n,r)=>this.sortOrder&&this.sortOrder==="desc"?r.name.localeCompare(n.name):n.name.localeCompare(r.name)):this.sortField==="country"?e=t.sort((n,r)=>this.sortOrder&&this.sortOrder==="desc"?r.country.name.localeCompare(n.country.name):n.country.name.localeCompare(r.country.name)):this.sortField==="scope"?t.forEach(n=>e[this.competitionIds.indexOf(n.id)]=n):!this.sortField&&this.sortOrder==="desc"&&(e=t.sort((n,r)=>r.id.localeCompare(n.id))),e});this.countryId=t.countryId?`${t.countryId}`:null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?`${t.sortField}`:null,this.sortOrder=t.sortOrder?`${t.sortOrder}`:null,this.competitionIds=t.competitionIds?t.competitionIds:null}},KA=class{constructor(t,e,n){a(this,"localStorage",null);a(this,"https",null);a(this,"idMapping",null);a(this,"getCompetitionsIdMapping",(t,e)=>_(this,null,function*(){try{let n=!1;if(t){if(t=new Zh(t),t.countryId){let i=yield this.idMapping.getEntityIdsBySchemaId([`${t.countryId}`],"country","native");i.country.length===0&&(n=!0),t.countryId=i.country[0]}if(t.competitionIds){let i=yield this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native");i.competition.length===0&&(n=!0),t.competitionIds=i.competition}if(n)return[]}let r=yield this.getCompetitions(t,e);return yield this.idMapping.remapEntities(r,"competition")}catch(n){throw console.warn("There was a problem browsing all of the competitions",n),n}}));a(this,"getCompetitionsMapWithNativeIds",t=>_(this,null,function*(){let e=new Map,n=t.length,r=new Zh({competitionIds:t,limit:n}),i=yield this.getCompetitions(r);i.sort((l,u)=>l.id.localeCompare(u.id));let s=jh(t),o=yield this.idMapping.remapEntities(i,"competition");return s.forEach((l,u)=>e.set(l,o[u])),e}));a(this,"getCompetitions",(t,e)=>_(this,null,function*(){let n=null;if(!this.localStorage.getCompetitionsLength()){try{n=yield this.https.getCompetitions()}catch(r){throw console.warn("There was a problem retrieving all competitions",r),r}this.localStorage.setCompetitions(n)}return this.localStorage.getCompetitions(t)}));a(this,"getCompetitionByIdIdMapping",(t,e)=>_(this,null,function*(){try{let n=(yield this.idMapping.getEntityIdsBySchemaId([t],"competition","native")).competition[0],r=yield this.getCompetitionById(n,e);return yield this.idMapping.remapEntities(r,"competition")}catch(n){throw console.warn(`There was a problem browsing the following competition:${t}`,n),n}}));a(this,"getCompetitionById",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getCompetitionById(t,e)}catch(n){throw console.warn(`There was a problem retrieving the competition with the following id: ${t}`,n),n}}));a(this,"getTopCompetitionsIdMapping",t=>_(this,null,function*(){try{let e=yield this.getTopCompetitions(t);return yield this.idMapping.remapEntities(e,"competition")}catch(e){throw console.warn("There was a problem browsing the top competitions",e),e}}));a(this,"getTopCompetitions",t=>_(this,null,function*(){try{return t=t||!1,yield this.https.getTopCompetitions(t)}catch(e){throw console.warn("There was a problem retrieving the top competitions",e),e}}));this.localStorage=t,this.idMapping=n,this.https=e}},ep=class{constructor(t){a(this,"name",null);a(this,"countryId",null);a(this,"national",!1);a(this,"gender",null);a(this,"limit",null);a(this,"page",null);a(this,"scope",null);a(this,"sortField",null);a(this,"sortOrder",null);a(this,"teamIds",null);a(this,"constructFilterUrl",()=>{let t="";return this.name&&(t=t+"&",t=t+`name=${this.name}`),this.countryId&&(t=t+"&",t=t+`country_id=${this.countryId}`),this.national&&(t=t+"&",t=t+`national=${this.national}`),this.gender&&(t=t+"&",t=t+`gender=${this.gender}`),this.limit&&(t=t+"&",t=t+`limit=${this.limit}`),this.scope&&(t=t+"&",t=t+`scope=${this.scope.join(",")}`),this.page&&(t=t+"&",t=t+`page=${this.page}`),this.sortField&&(t=t+"&",t=t+`sort_field=${this.sortField}`),this.sortOrder&&(t=t+"&",t=t+`sort_order=${this.sortOrder}`),this.teamIds&&(t=t+"&",t=t+`team_ids=${this.teamIds.join(",")}`),t});this.name=t.name?t.name:null,this.countryId=t.countryId?`${t.countryId}`:null,this.national=t.national?t.national:!1,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?`${t.sortField}`:null,this.sortOrder=t.sortOrder?`${t.sortOrder}`:null,this.teamIds=t.teamIds?t.teamIds:null}},JA=class{constructor(){a(this,"reason","");a(this,"words",[])}},tp=class{constructor(){a(this,"enabled",!1);a(this,"moderateLinks",!1);a(this,"linksWhitelist",[]);a(this,"moderatorProfileId","");a(this,"dictionary",new JA)}},XA=class{constructor(){a(this,"enabled",!1);a(this,"clientId",null);a(this,"automaticModeration",new tp)}},ZA=class{constructor(){a(this,"general",[]);a(this,"predictor",[]);a(this,"topX",[]);a(this,"matchQuiz",[])}},hu=class{constructor(){a(this,"points",null);a(this,"gameParticipationCount",null);a(this,"entityId",null);a(this,"entityType",null);a(this,"predictionsMade",null);a(this,"correctPredictions",null)}},eO=class{constructor(){a(this,"id");a(this,"label");a(this,"assets",{mainImageUrl:""});a(this,"enabled");a(this,"requirements",new hu)}},np=class extends hu{constructor(){super(...arguments);a(this,"postPoints",null);a(this,"postsCount",null);a(this,"reactionsCount",null);a(this,"totalDiscussionPoints",null)}},tO=class{constructor(){a(this,"id");a(this,"label");a(this,"assets",{mainImageUrl:""});a(this,"enabled");a(this,"requirements",new np)}},nO=class{constructor(){a(this,"id");a(this,"weight");a(this,"multiplier");a(this,"conditions")}},rO=class{constructor(){a(this,"value",[new nO])}},rp=class{constructor(){a(this,"points",null);a(this,"tiers",null);a(this,"badges",null)}},iO=class{constructor(){a(this,"enabled",!1);a(this,"clientId",null);a(this,"conditions",{list:null});a(this,"actions",new rO);a(this,"rewards",new rp)}},aO=class{constructor(){a(this,"general",null);a(this,"predictor",null);a(this,"activity",null);a(this,"topX",null);a(this,"matchQuiz",null);a(this,"discussionPost",null)}},ip=class{constructor(){a(this,"enabled",!1);a(this,"clientId",null);a(this,"defaultMarkets",null);a(this,"competitionsWhitelist",null)}},ap=class{constructor(){a(this,"enabled",!1);a(this,"clientId",null);a(this,"minFixtures",null);a(this,"maxFixtures",null);a(this,"competitionsWhitelist",null)}},sO=class{constructor(){a(this,"competitions",[]);a(this,"teams",[]);a(this,"markets",[])}},sp=class{constructor(){a(this,"enabled",!1);a(this,"clientId",null);a(this,"fullCoverageCompetitions",null);a(this,"markets",null);a(this,"successRateScopes",new sO);a(this,"userDataConfig",null)}},oO=class{constructor(){a(this,"storeIp",!1);a(this,"storeDeviceId",!1);a(this,"storeAgent",!1)}},lO=class{constructor(){a(this,"remapPredictorConfig",t=>{let e=new sp;return e.enabled=t.enabled,e.clientId=t.client_id,e.fullCoverageCompetitions=t.full_coverage_competitions,e.markets=t.markets,e.successRateScopes=t.success_rate_scopes,e.userDataConfig=t.user_data_config?this.remapUserDataConfig(t.user_data_config):null,e});a(this,"remapTopXConfig",t=>{let e=new ap;return e.enabled=t.enabled,e.clientId=t.client_id,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e});a(this,"remapMatchQuizConfig",t=>{let e=new ip;return e.enabled=t.enabled,e.clientId=t.client_id,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e});a(this,"remapLoyaltyConfig",t=>{let e=new iO;return e.enabled=t.enabled,e.clientId=t.client_id,e.conditions.list=t.conditions.list,e.actions.value=t.actions.value,e.rewards=this.remapRewards(t.rewards),e});a(this,"remapDiscussionsConfig",t=>{let e=new XA;return e.enabled=t.enabled,e.clientId=t.client_id,e.automaticModeration=t.automatic_moderation?this.remapAutomaticModeration(t.automatic_moderation):null,e});a(this,"remapAutomaticModeration",t=>{let e=new tp;return e.enabled=t.enabled,e.moderateLinks=t.moderate_links,e.linksWhitelist=t.links_whitelist,e.moderatorProfileId=t.moderator_profile_id,e.dictionary=t.dictionary,e});a(this,"remapRewards",t=>{let e=new rp;return e.points=this.remapPoints(t.points),e.tiers=t.tiers,e.badges=this.remapBadges(t.badges),e});a(this,"remapPoints",t=>{let e=new aO;return e.general=t.general,e.discussionPost=t.discussion_post,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e});a(this,"remapBadges",t=>{let e=new ZA;return e.general=this.remapGeneralBadgeValues(t.general),e.predictor=this.remapBadgeValues(t.predictor),e.topX=this.remapBadgeValues(t.top_x),e.matchQuiz=this.remapBadgeValues(t.match_quiz),e});a(this,"remapBadgeValues",t=>t.map(e=>{let n=new eO;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=this.remapRequirements(e.requirements),n}));a(this,"remapRequirements",t=>{let e=new hu;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e});a(this,"remapUserDataConfig",t=>{let e=new oO;return e.storeIp=t.store_ip,e.storeDeviceId=t.store_device_id,e.storeAgent=t.store_agent,e});a(this,"remapGeneralBadgeValues",t=>t.map(e=>{let n=new tO;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=this.remapGeneralRequirements(e.requirements),n}));a(this,"remapGeneralRequirements",t=>{let e=new np;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e.postPoints=t.post_points,e.postsCount=t.posts_count,e.reactionsCount=t.reactions_count,e.totalDiscussionPoints=t.total_discussion_points,e})}},Xr=class extends yn{constructor(e){super(e,rn(e.environment,"client"));a(this,"featureConfigRemapper",null);a(this,"localStorage",null);a(this,"clientId",null);a(this,"getConfig",e=>_(this,null,function*(){let n=this.getCachedFeatures();if(!n){let r=`/clients/${this.clientId}/features`,i=this.apiSignInUrl.split("&")[0],s=r+i,o="There was a problem fetching client features from Client API";n=(yield this.fetchWithoutAuth(s,o)).data,this.localStorage.setClientFeatures(n)}switch(e){case"predictor":return this.featureConfigRemapper.remapPredictorConfig(n.predictor);case"topX":return this.featureConfigRemapper.remapTopXConfig(n.top_x);case"matchQuiz":return this.featureConfigRemapper.remapMatchQuizConfig(n.match_quiz);case"loyalty":return this.featureConfigRemapper.remapLoyaltyConfig(n.loyalty);case"discussions":return this.featureConfigRemapper.remapDiscussionsConfig(n.discussions)}}));a(this,"getCachedFeatures",()=>{let e=this.getLocalStorageData();if(!(!e||!Object.keys(e).length))return e.predictor.client_id&&e.predictor.client_id!==this.clientId?(this.localStorage.deleteClientFeatures(),null):e});a(this,"getLocalStorageData",()=>{let e=Math.floor(Date.now()/1e3);return this.localStorage.getExpiration("client","features")>e?this.localStorage.getClientFeatures():null});this.clientId=e.clientId,this.localStorage=new ia().createLocalCacheInstance(e.idSchema),this.featureConfigRemapper=new lO}},Ss=class{constructor(){a(this,"currentPage",null);a(this,"itemsPerPage",null);a(this,"totalItems",null);a(this,"numberOfPages",null)}},Zr=class{constructor(){a(this,"pagination",new Ss)}},Ps=class{constructor(t){a(this,"clientHttps",null);a(this,"errorHandlingMode",null);a(this,"setAvailableMarketsForMatch",t=>_(this,null,function*(){let{fullCoverageCompetitions:e,markets:n}=yield this.clientHttps.getConfig("predictor");if(Array.isArray(t))return t.map(r=>this.setAvailableMarkets(r,e,n));if(typeof t=="object"&&Object.keys(t).length)return this.setAvailableMarkets(t,e,n)}));a(this,"setAvailableMarkets",(t,e,n)=>{var i;let r=(i=t.context.competition)==null?void 0:i.id;return r&&this.isMatchInCoverageCompetition(r,e)?(t.availableMarkets=n.all,t):(t.availableMarkets=n.main,t)});a(this,"setMetaDataBatchRequest",(t,e,n)=>{let r=new Zr;if(r.pagination.totalItems=t,r.pagination.itemsPerPage=e,r.pagination.numberOfPages=t?Math.ceil(t/e):0,r.pagination.currentPage=n,r.pagination.numberOfPages>0&&n>r.pagination.numberOfPages)throw this.errorHandlingMode==="standard"?new He(400,"invalid_page_number","Invalid page number provided. Use number between 1 and max number of pages."):new tt(400,"invalid_page_number","Invalid page number provided. Use number between 1 and max number of pages.");return r});a(this,"finalizeMatchesDataBatchRequest",(t,e)=>{t=t.sort((r,i)=>new Date(r.kickoffAt).getTime()-new Date(i.kickoffAt).getTime());let n=e.limit||20;if(e.page){let r=e.page>1?n*(e.page-1):0;t=t.slice(r,r+n)}return!e.page&&t.length>n&&(t=t.slice(0,n)),t});a(this,"isMatchInCoverageCompetition",(t,e)=>{let n=!1;return e.includes(t)&&(n=!0),n});this.clientHttps=new Xr(t),this.errorHandlingMode=t.errorHandlingMode}},uO=class{constructor(t,e,n){a(this,"footballService",null);a(this,"https",null);a(this,"idMapping",null);a(this,"getTeamsIdMapping",(t,e)=>_(this,null,function*(){try{let n=!1;if(t){if(t=new ep(t),t.countryId){let i=yield this.idMapping.getEntityIdsBySchemaId([`${t.countryId}`],"country","native");i.country.length===0&&(n=!0),t.countryId=i.country[0]}if(t.scope){let i=yield this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native");i.competition.length===0&&(n=!0),t.scope=i.competition}if(t.teamIds){let i=yield this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native");i.team.length===0&&(n=!0),t.teamIds=i.team}}if(n)return[];let r=yield this.getTeams(t,e);return r.data=yield this.idMapping.remapEntities(r.data,"team"),r}catch(n){throw console.warn("There was a problem browsing all teams",n),n}}));a(this,"getTeamsMapWithNativeIds",t=>_(this,null,function*(){let e=new Map,n=t.length,r=new ep({teamIds:t,limit:n}),{data:i}=yield this.getTeams(r);i.sort((l,u)=>l.id.localeCompare(u.id));let s=jh(t),o=yield this.idMapping.remapEntities(i,"team");return s.forEach((l,u)=>e.set(l,o[u])),e}));a(this,"getTeams",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getTeams(t,e)}catch(n){throw console.warn("There was a problem retrieving all teams",n),n}}));a(this,"getTeamByIdIdMapping",(t,e)=>_(this,null,function*(){try{t=(yield this.idMapping.getEntityIdsBySchemaId([t],"team","native")).team[0];let n=yield this.getTeamById(t,e);return yield this.idMapping.remapEntities(n,"team")}catch(n){throw console.warn(`There was a problem browsing the following team:${t}`,n),n}}));a(this,"getTeamById",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getTeamById(t,e)}catch(n){throw console.warn(`There was a problem retrieving the following team: ${t}`,n),n}}));a(this,"getTopTeamsIdMapping",t=>_(this,null,function*(){try{let e=yield this.getTopTeams(t);return yield this.idMapping.remapEntities(e,"team")}catch(e){throw console.warn("There was a problem browsing the top teams",e),e}}));a(this,"getTopTeams",t=>_(this,null,function*(){try{return t=t||!1,yield this.https.getTopTeams(t)}catch(e){throw console.warn("There was a problem retrieving the top teams",e),e}}));a(this,"getNextMatchForTeamIdMapping",(t,e)=>_(this,null,function*(){try{t=(yield this.idMapping.getEntityIdsBySchemaId([t],"team","native")).team[0];let n=yield this.getNextMatchForTeam(t,e);return yield this.idMapping.remapEntities(n,"match")}catch(n){throw console.warn(`There was a problem browsing the next match for the following team:${t}`,n),n}}));a(this,"getNextMatchForTeam",(t,e)=>_(this,null,function*(){try{e=e||!1;let n=yield this.https.getNextMatchForTeam(t,e);return yield this.footballService.setAvailableMarketsForMatch(n)}catch(n){throw console.warn(`There was a problem retrieving the next match for the following team: ${t}`,n),n}}));a(this,"getPrevMatchForTeamIdMapping",(t,e)=>_(this,null,function*(){try{t=(yield this.idMapping.getEntityIdsBySchemaId([t],"team","native")).team[0];let n=yield this.getPrevMatchForTeam(t,e);return yield this.idMapping.remapEntities(n,"match")}catch(n){throw console.warn(`There was a problem browsing the previous match for the following team:${t}`,n),n}}));a(this,"getPrevMatchForTeam",(t,e)=>_(this,null,function*(){try{e=e||!1;let n=yield this.https.getPrevMatchForTeam(t,e);return yield this.footballService.setAvailableMarketsForMatch(n)}catch(n){throw console.warn(`There was a problem retrieving the previous match for the following team: ${t}`,n),n}}));this.idMapping=n,this.https=e,this.footballService=new Ps(t)}},op=class{constructor(t){a(this,"countryId",null);a(this,"scope",null);a(this,"name",null);a(this,"playerIds",null);a(this,"limit",null);a(this,"page",null);a(this,"sortField",null);a(this,"sortOrder",null);a(this,"constructFilterUrl",()=>{let t="";return this.countryId&&(t=t+"&",t=t+`country_id=${this.countryId}`),this.scope&&(t=t+"&",t=t+`scope=${this.scope.join(",")}`),this.name&&(t=t+"&",t=t+`name=${this.name}`),this.playerIds&&(t=t+"&",t=t+`player_ids=${this.playerIds.join(",")}`),this.limit&&(t=t+"&",t=t+`limit=${this.limit}`),this.page&&(t=t+"&",t=t+`page=${this.page}`),this.sortField&&(t=t+"&",t=t+`sort_field=${this.sortField}`),this.sortOrder&&(t=t+"&",t=t+`sort_order=${this.sortOrder}`),t});this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},pu=class{constructor(t,e,n){a(this,"https",null);a(this,"footballService",null);a(this,"idMapping",null);a(this,"getPlayersIdMapping",(t,e)=>_(this,null,function*(){try{let n=!1;if(t){if(t=new op(t),t.countryId){let i=yield this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native");i.country.length===0&&(n=!0),t.countryId=i.country[0]}if(t.playerIds){let i=yield this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native");i.player.length===0&&(n=!0),t.playerIds=i.player}if(t.scope){let i=yield this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native");i.competition.length===0&&(n=!0),t.scope=i.competition}if(n)return[]}let r=yield this.getPlayers(t,e);return r.data=yield this.idMapping.remapEntities(r.data,"player"),r}catch(n){throw console.warn("There was a problem browsing the players",n),n}}));a(this,"getPlayersWithNativeIds",t=>_(this,null,function*(){let e=t.length,n=new op({playerIds:t,limit:e}),r=yield this.getPlayers(n);return r.data.sort((i,s)=>i.id.localeCompare(s.id)),yield this.idMapping.remapEntities(r.data,"player")}));a(this,"getPlayersMapWithNativeIds",t=>_(this,null,function*(){let e={},n=Is(t);n.sort((i,s)=>i.localeCompare(s));let r=yield this.getPlayersWithNativeIds(n);return n.forEach((i,s)=>e[i]=r[s]),e}));a(this,"getPlayers",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getPlayers(t,e)}catch(n){throw console.warn("There was a problem retrieving the players",n),n}}));a(this,"getPlayerIdMapping",(t,e)=>_(this,null,function*(){try{let n=yield this.idMapping.getEntityIdsBySchemaId([t],"player","native"),r=yield this.getPlayerById(n.player[0],e);return yield this.idMapping.remapEntities(r,"player")}catch(n){throw console.warn(`There was a problem browsing the following player:${t}`,n),n}}));a(this,"getPlayerById",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getPlayerById(t,e)}catch(n){throw console.warn(`There was a problem retrieving the following player: ${t}`,n),n}}));a(this,"getTopPlayersIdMapping",t=>_(this,null,function*(){try{let e=yield this.getTopPlayers(t);return yield this.idMapping.remapEntities(e,"player")}catch(e){throw console.warn("There was a problem browsing the top players",e),e}}));a(this,"getTopPlayers",t=>_(this,null,function*(){try{return t=t||!1,yield this.https.getTopPlayers(t)}catch(e){throw console.warn("There was a problem retrieving the top players",e),e}}));a(this,"getNextMatchForPlayerIdMapping",(t,e)=>_(this,null,function*(){try{t=(yield this.idMapping.getEntityIdsBySchemaId([t],"player","native")).player[0];let n=yield this.getNextMatchForPlayer(t,e);return yield this.idMapping.remapEntities(n,"match")}catch(n){throw console.warn(`There was a problem browsing the next match for player:${t}`,n),n}}));a(this,"getNextMatchForPlayer",(t,e)=>_(this,null,function*(){try{e=e||!1;let n=yield this.https.getNextMatchForPlayer(t,e);return yield this.footballService.setAvailableMarketsForMatch(n)}catch(n){throw console.warn(`There was a problem retrieving the next match for player: ${t}`,n),n}}));a(this,"getPrevMatchForPlayerIdMapping",(t,e)=>_(this,null,function*(){try{t=(yield this.idMapping.getEntityIdsBySchemaId([t],"player","native")).player[0];let n=yield this.getPrevMatchForPlayer(t,e);return yield this.idMapping.remapEntities(n,"match")}catch(n){throw console.warn(`There was a problem browsing the previous match for player:${t}`,n),n}}));a(this,"getPrevMatchForPlayer",(t,e)=>_(this,null,function*(){try{e=e||!1;let n=yield this.https.getPrevMatchForPlayer(t,e);return yield this.footballService.setAvailableMarketsForMatch(n)}catch(n){throw console.warn(`There was a problem retrieving the previous match for player: ${t}`,n),n}}));this.idMapping=n,this.https=e,this.footballService=new Ps(t)}},Ms=class{constructor(t){a(this,"countryIds",null);a(this,"competitionIds",null);a(this,"matchIds",null);a(this,"status",null);a(this,"teamIds",null);a(this,"fromDate",null);a(this,"toDate",null);a(this,"limit",null);a(this,"page",null);a(this,"sortField",null);a(this,"sortOrder",null);a(this,"constructFilterUrl",t=>{let e="";return this.countryIds&&(e=e+"&",e=e+`countries=${this.countryIds.join(",")}`),this.competitionIds&&this.competitionIds.length>0&&(e=e+"&",e=e+`competitions=${this.competitionIds.join(",")}`),this.matchIds&&this.matchIds.length>0&&(e=e+"&",e=e+`matches=${this.matchIds.join(",")}`),this.status&&(e=e+"&",e=e+`status=${this.status}`),this.teamIds&&this.teamIds.length>0&&(e=e+"&",e=e+`teams=${this.teamIds.join(",")}`),this.fromDate&&(e=e+"&",e=e+`from_date=${this.fromDate}`),this.toDate&&(e=e+"&",e=e+`to_date=${this.toDate}`),this.limit&&!t&&(e=e+"&",e=e+`limit=${this.limit}`),this.page&&!t&&(e=e+"&",e=e+`page=${this.page}`),this.sortField&&(e=e+"&",e=e+`sort_field=${this.sortField}`),this.sortOrder&&(e=e+"&",e=e+`sort_order=${this.sortOrder}`),e});this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},mu=class{constructor(t,e,n){a(this,"https",null);a(this,"idMapping",null);a(this,"footballService",null);a(this,"getMatchesIdMapping",(t,e)=>_(this,null,function*(){try{if(t){if(t=new Ms(t),t.countryIds){let r=yield this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native");t.countryIds=r.country}if(t.competitionIds){let r=yield this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native");t.competitionIds=r.competition}if(t.matchIds){let r=yield this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native");t.matchIds=r.match}if(t.teamIds){let r=yield this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native");t.teamIds=r.team}}let n=yield this.getMatches(t,e);return n.data=yield this.footballService.setAvailableMarketsForMatch([...n.data]),n.data=yield this.idMapping.remapEntities(n.data,"match"),n}catch(n){throw console.warn("There was a problem browsing the matches",n),n}}));a(this,"getMatchesWithNativeIds",t=>_(this,null,function*(){let e=t.length,n=new Ms({matchIds:t,limit:e}),r=yield this.getMatches(n);return r.data.sort((i,s)=>i.id.localeCompare(s.id)),yield this.idMapping.remapEntities(r.data,"match")}));a(this,"getMatchesMapWithNativeIds",t=>_(this,null,function*(){let e={},n=Is(t);n.sort((i,s)=>i.localeCompare(s));let r=yield this.getMatchesWithNativeIds(n);if(n.length!==r.length){let i=new Ms({matchIds:n,limit:n.length}),s=yield this.getMatches(i),o=n.filter(l=>{if(s.data.every(u=>u.id!==l))return l});n=n.filter(l=>{if(!o.includes(l))return l})}return n.forEach((i,s)=>e[i]=r[s]),e}));a(this,"getMatches",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getMatches(t,e)}catch(n){throw console.warn("There was a problem retrieving the matches",n),n}}));a(this,"getMatchIdMapping",(t,e)=>_(this,null,function*(){try{let n=yield this.idMapping.getEntityIdsBySchemaId([t],"match","native"),r=yield this.getMatchById(n.match[0],e),i=yield this.footballService.setAvailableMarketsForMatch(r);return yield this.idMapping.remapEntities(i,"match")}catch(n){throw console.warn(`There was a problem browsing the following match: ${t}`,n),n}}));a(this,"getMatchById",(t,e)=>_(this,null,function*(){try{return e=e||!1,yield this.https.getMatchById(t,e)}catch(n){throw console.warn(`There was a problem retrieving the following match: ${t}`,n),n}}));this.https=e,this.idMapping=n,this.footballService=new Ps(t)}},cO=class{constructor(t){a(this,"entities",null);a(this,"query",null);a(this,"scope",null);a(this,"constructFilterUrl",()=>{let t="";return this.entities&&(t=t+"&",t=t+`entities=${this.entities.join(",")}`),this.query&&(t=t+"&",t=t+`q=${this.query}`),this.scope&&(t=t+"&",t=t+`scope=${this.scope.join(",")}`),t});this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},dO=class{constructor(t,e){a(this,"https",null);a(this,"idMapping",null);a(this,"searchIdMapping",(t,e)=>_(this,null,function*(){try{if(t=new cO(t),t.scope){let r=yield this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native");t.scope=r.competition}let n=yield this.search(t,e);if(n.teams&&n.teams.length>0){let r=yield this.idMapping.remapEntities(n.teams,"team");n.teams=r}if(n.players&&n.players.length>0){let r=yield this.idMapping.remapEntities(n.players,"player");n.players=r}if(n.competitions&&n.competitions.length>0){let r=yield this.idMapping.remapEntities(n.competitions,"competition");n.competitions=r}return n}catch(n){throw console.warn("There was a problem with browsing the search result",n),n}}));a(this,"search",(t,e)=>_(this,null,function*(){try{return yield this.https.search(t,e)}catch(n){throw console.warn("There was a problem retrieving the search response",n),n}}));this.https=t,this.idMapping=e}},lp=class{constructor(t,e,n,r){a(this,"countriesFacade",null);a(this,"competitionsFacade",null);a(this,"teamsFacade",null);a(this,"playerFacade",null);a(this,"matchFacade",null);a(this,"searchFacade",null);a(this,"getCountries",t=>_(this,null,function*(){return this.countriesFacade.getCountriesWithIdMapping(t)}));a(this,"getCompetitions",(t,e)=>_(this,null,function*(){return this.competitionsFacade.getCompetitionsIdMapping(t,e)}));a(this,"getCompetitionById",(t,e)=>_(this,null,function*(){return this.competitionsFacade.getCompetitionByIdIdMapping(t,e)}));a(this,"getTopCompetitions",t=>_(this,null,function*(){return this.competitionsFacade.getTopCompetitionsIdMapping(t)}));a(this,"getCompetitionsMapWithNativeIds",t=>_(this,null,function*(){return yield this.competitionsFacade.getCompetitionsMapWithNativeIds(t)}));a(this,"getTeams",(t,e)=>_(this,null,function*(){return this.teamsFacade.getTeamsIdMapping(t,e)}));a(this,"getTeamById",(t,e)=>_(this,null,function*(){return this.teamsFacade.getTeamByIdIdMapping(t,e)}));a(this,"getTopTeams",t=>_(this,null,function*(){return this.teamsFacade.getTopTeamsIdMapping(t)}));a(this,"getNextMatchForTeam",(t,e)=>_(this,null,function*(){return this.teamsFacade.getNextMatchForTeamIdMapping(t,e)}));a(this,"getPrevMatchForTeam",(t,e)=>_(this,null,function*(){return this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)}));a(this,"getTeamsMapWithNativeIds",t=>_(this,null,function*(){return yield this.teamsFacade.getTeamsMapWithNativeIds(t)}));a(this,"getPlayers",(t,e)=>_(this,null,function*(){return this.playerFacade.getPlayersIdMapping(t,e)}));a(this,"getPlayerById",(t,e)=>_(this,null,function*(){return this.playerFacade.getPlayerIdMapping(t,e)}));a(this,"getTopPlayers",t=>_(this,null,function*(){return this.playerFacade.getTopPlayersIdMapping(t)}));a(this,"getNextMatchForPlayer",(t,e)=>_(this,null,function*(){return this.playerFacade.getNextMatchForPlayerIdMapping(t,e)}));a(this,"getPrevMatchForPlayer",(t,e)=>_(this,null,function*(){return this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)}));a(this,"getPlayersMapWithNativeIds",t=>_(this,null,function*(){return this.playerFacade.getPlayersMapWithNativeIds(t)}));a(this,"getMatches",(t,e)=>_(this,null,function*(){return this.matchFacade.getMatchesIdMapping(t,e)}));a(this,"getMatchById",(t,e)=>_(this,null,function*(){return this.matchFacade.getMatchIdMapping(t,e)}));a(this,"search",(t,e)=>_(this,null,function*(){return this.searchFacade.searchIdMapping(t,e)}));this.countriesFacade=new YA(e,n,r),this.competitionsFacade=new KA(e,n,r),this.teamsFacade=new uO(t,n,r),this.playerFacade=new pu(t,n,r),this.matchFacade=new mu(t,n,r),this.searchFacade=new dO(n,r)}},fO=class{constructor(){a(this,"id","");a(this,"alias","");a(this,"countryCode","");a(this,"assets",null);a(this,"name","")}},jn=class{constructor(){a(this,"countriesFromResponse",t=>{if(t)return t.map(e=>this.countryFromResponse(e))});a(this,"countryFromResponse",t=>{try{if(t){let e=new fO;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(e){throw e}return null})}},hO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"gender","");a(this,"assets",null);a(this,"type","");a(this,"name","")}},ei=class{constructor(){a(this,"countryRemapper",null);this.countryRemapper=new jn}fromResponse(t){try{let e=new hO;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}}},pO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"gender","");a(this,"assets",null);a(this,"type","");a(this,"name","");a(this,"participants",[])}},mO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"gender","");a(this,"assets",null);a(this,"name","");a(this,"code","");a(this,"national",!1);a(this,"fullName","");a(this,"shortName","");a(this,"isDeleted",!1)}},Or=class{constructor(){a(this,"countryRemapper",null);this.countryRemapper=new jn}fromResponse(t){try{let e=new mO;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e}catch(e){throw console.warn("There was a problem remapping teams response",e),e}}},gO=class{constructor(){a(this,"countryRemapper",null);a(this,"teamBasicRemapper",null);this.countryRemapper=new jn,this.teamBasicRemapper=new Or}fromResponse(t){try{let e=new pO;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e.participants=t.participants.map(n=>this.teamBasicRemapper.fromResponse(n)),e}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}}},vO=class{constructor(){a(this,"primary",null);a(this,"secondary",null);a(this,"tertiary",null)}},yO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"gender","");a(this,"assets",null);a(this,"name","");a(this,"competitions",[]);a(this,"code","");a(this,"national",!1);a(this,"fullName","");a(this,"shortName","");a(this,"isDeleted",!1);a(this,"colors",new vO);a(this,"squad",[])}},wO=class{constructor(){a(this,"id","");a(this,"startDate","");a(this,"endDate","");a(this,"shirtNumber");a(this,"loan",!1);a(this,"position","");a(this,"country",null);a(this,"name","");a(this,"assets",null);a(this,"birthDate","")}},bO=class{constructor(){a(this,"countryRemapper",null);this.countryRemapper=new jn}fromResponse(t){try{let e=new wO;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(e){throw console.warn("There was a problem remapping the player from squad",e),e}}},_O=class{constructor(){a(this,"countryRemapper",null);a(this,"competitionRemapper",null);a(this,"playerRemapper",null);this.countryRemapper=new jn,this.competitionRemapper=new ei,this.playerRemapper=new bO}fromResponse(t){try{let e=new yO;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e.competitions=t.competitions?t.competitions.map(n=>this.competitionRemapper.fromResponse(n)):[],e.colors=t.colors?t.colors:e.colors,e.squad=t.squad?t.squad.map(n=>this.playerRemapper.fromResponse(n)):[],e}catch(e){throw console.warn("There was a problem remapping team response",e),e}}},EO=class{constructor(){a(this,"id","");a(this,"kickoffAt","");a(this,"finishedAt","");a(this,"updatedAt","");a(this,"availableMarkets",null);a(this,"homeTeam",null);a(this,"awayTeam",null);a(this,"isDeleted",!1);a(this,"lineupsConfirmed",!1);a(this,"startedAt","");a(this,"minute","");a(this,"scores",null);a(this,"context",{competition:null});a(this,"status",{type:null,subType:null})}},IO=class{constructor(){a(this,"ftScore",null);a(this,"htScore",null);a(this,"aetScore",null);a(this,"aggScore",null);a(this,"penScore",null)}},up=class{constructor(){a(this,"statEntityFromResponse",t=>({homeGoals:t.home_goals,awayGoals:t.away_goals}))}fromResponse(t){try{let e=new IO;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(e){throw console.warn("There was a problem remapping the scores",e),e}}},AO=class{constructor(){a(this,"teamRemapper",null);a(this,"competitionRemapper",null);a(this,"scoresRemapper",null);this.teamRemapper=new Or,this.competitionRemapper=new ei,this.scoresRemapper=new up}fromResponse(t){try{let e=new EO;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(e){throw console.warn("There was a problem remapping the match response",e),e}}},aa=class{constructor(){a(this,"type",null);a(this,"subType",null)}},OO=class{constructor(){a(this,"id","");a(this,"kickoffAt","");a(this,"finishedAt","");a(this,"updatedAt","");a(this,"availableMarkets",null);a(this,"isDeleted",!1);a(this,"homeTeam",null);a(this,"awayTeam",null);a(this,"lineupsConfirmed",!1);a(this,"startedAt","");a(this,"minute","");a(this,"scores",null);a(this,"stats",null);a(this,"context",{competition:null});a(this,"timeline",[]);a(this,"status",new aa);a(this,"lineups",null)}},TO=class{constructor(){a(this,"corners",null);a(this,"cornersFirstHalf",null);a(this,"cornersSecondHalf",null);a(this,"cornersExtraTime",null);a(this,"crosses",null);a(this,"crossesFirstHalf",null);a(this,"crossesSecondHalf",null);a(this,"crossesExtraTime",null);a(this,"offside",null);a(this,"offsideFirstHalf",null);a(this,"offsideSecondHalf",null);a(this,"offsideExtraTime",null);a(this,"shotsOn",null);a(this,"shotsOnFirstHalf",null);a(this,"shotsOnSecondHalf",null);a(this,"shotsOnExtraTime",null);a(this,"throwIn",null);a(this,"throwInFirstHalf",null);a(this,"throwInSecondHalf",null);a(this,"throwInExtraTime",null);a(this,"redCards",null);a(this,"redCardsFirstHalf",null);a(this,"redCardsSecondHalf",null);a(this,"redCardsExtraTime",null);a(this,"shotsOff",null);a(this,"shotsOffFirstHalf",null);a(this,"shotsOffSecondHalf",null);a(this,"shotsOffExtraTime",null);a(this,"goalKicks",null);a(this,"goalKicksFirstHalf",null);a(this,"goalKicksSecondHalf",null);a(this,"goalKicksExtraTime",null);a(this,"possession",null);a(this,"possessionFirstHalf",null);a(this,"possessionSecondHalf",null);a(this,"possessionExtraTime",null);a(this,"treatments",null);a(this,"treatmentsFirstHalf",null);a(this,"treatmentsSecondHalf",null);a(this,"treatmentsExtraTime",null);a(this,"yellowCards",null);a(this,"yellowCardsFirstHalf",null);a(this,"yellowCardsSecondHalf",null);a(this,"yellowCardsExtraTime",null);a(this,"shotsBlocked",null);a(this,"shotsBlockedFirstHalf",null);a(this,"shotsBlockedSecondHalf",null);a(this,"shotsBlockedExtraTime",null);a(this,"substitutions",null);a(this,"substitutionsFirstHalf",null);a(this,"substitutionsSecondHalf",null);a(this,"substitutionsExtraTime",null);a(this,"counterAttacks",null);a(this,"counterAttacksFirstHalf",null);a(this,"counterAttacksSecondHalf",null);a(this,"counterAttacksExtraTime",null);a(this,"foulsCommitted",null);a(this,"foulsCommittedFirstHalf",null);a(this,"foulsCommittedSecondHalf",null);a(this,"foulsCommittedExtraTime",null)}},CO=class{constructor(){a(this,"statEntityFromResponse",t=>({homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}))}fromResponse(t){try{let e=new TO;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(e){throw console.warn("There was a problem remapping the stats",e),e}}},cp=class{constructor(){a(this,"homeTeam",{players:[]});a(this,"awayTeam",{players:[]})}},SO=class{constructor(){a(this,"id","");a(this,"name","");a(this,"position","");a(this,"shirtNumber");a(this,"assets",null);a(this,"type","")}},dp=class{fromResponse(t){try{let e=new SO;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(e){throw console.warn("There was a problem remapping the player from timeline",e),e}}},PO=class{constructor(){a(this,"playerRemapper",null);this.playerRemapper=new dp}fromResponse(t){try{let e=new cp;return e.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map(n=>this.playerRemapper.fromResponse(n)):[],e.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map(n=>this.playerRemapper.fromResponse(n)):[],e}catch(e){throw console.warn("There was a problem remapping the lineups",e),e}}},MO=class{constructor(){a(this,"minute","");a(this,"type","");a(this,"teamId","");a(this,"player",null);a(this,"relatedPlayer",null);a(this,"updatedAt","")}},RO=class{constructor(){a(this,"playerRemapper",null);this.playerRemapper=new dp}fromResponse(t){try{let e=new MO;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(e){throw console.warn("There was a problem remapping timeline",e),e}}},kO=class{constructor(){a(this,"teamMapper",null);a(this,"competitionsMapper",null);a(this,"lineupsMapper",null);a(this,"scoresMapper",null);a(this,"statsMapper",null);a(this,"timelineMapper",null);this.teamMapper=new Or,this.competitionsMapper=new ei,this.lineupsMapper=new PO,this.scoresMapper=new up,this.statsMapper=new CO,this.timelineMapper=new RO}fromResponse(t){try{let e=new OO;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,e.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresMapper.fromResponse(t.scores),e.stats=this.statsMapper.fromResponse(t.stats),e.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},e.timeline=t.timeline?t.timeline.map(n=>this.timelineMapper.fromResponse(n)):[],e.status={type:t.status.type,subType:t.status.sub_type},e.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new cp,e}catch(e){throw console.warn("There was a problem remapping the match response",e),e}}},xO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"birthDate","");a(this,"firstName","");a(this,"lastName","");a(this,"name","");a(this,"position","");a(this,"assets",null)}},DO=class{constructor(){a(this,"countryRemapper",null);this.countryRemapper=new jn}fromResponse(t){try{let e=new xO;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(e){throw console.warn("There was a problem remapping top player response",e),e}}},FO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"birthDate","");a(this,"firstName","");a(this,"lastName","");a(this,"name","");a(this,"position","");a(this,"assets",null);a(this,"isDeleted",!1);a(this,"teams",[])}},fp=class{constructor(){a(this,"countryRemapper",null);a(this,"teamRemapper",null);this.countryRemapper=new jn,this.teamRemapper=new Or}fromResponse(t){try{let e=new FO;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.teams=t.teams?t.teams.map(n=>this.teamRemapper.fromResponse(n)):[],e.position=t.position,e.isDeleted=t.is_deleted,e}catch(e){throw console.warn("There was a problem remapping players response",e),e}}},NO=class{constructor(){a(this,"id","");a(this,"country",null);a(this,"birthDate","");a(this,"firstName","");a(this,"lastName","");a(this,"name","");a(this,"position","");a(this,"assets",null);a(this,"isDeleted",!1);a(this,"competitions",[]);a(this,"teams",[])}},LO=class{constructor(){a(this,"countryRemapper",null);a(this,"teamRemapper",null);a(this,"competitionRemapper",null);this.countryRemapper=new jn,this.teamRemapper=new Or,this.competitionRemapper=new ei}fromResponse(t){try{let e=new NO;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.teams=t.teams?t.teams.map(n=>this.teamRemapper.fromResponse(n)):[],e.position=t.position,e.isDeleted=t.is_deleted,e.competitions=t.competitions?t.competitions.map(n=>this.competitionRemapper.fromResponse(n)):[],e}catch(e){throw console.warn("There was a problem remapping player response",e),e}}},BO=class{constructor(){a(this,"teams",null);a(this,"players",null);a(this,"competitions",null)}},UO=class{constructor(){a(this,"teamRemapper",null);a(this,"playerRemapper",null);a(this,"competitionremapper",null);this.teamRemapper=new Or,this.playerRemapper=new fp,this.competitionremapper=new ei}fromResponse(t){try{let e=new BO;return e.teams=t.teams?t.teams.map(n=>this.teamRemapper.fromResponse(n)):[],e.players=t.players?t.players.map(n=>this.playerRemapper.fromResponse(n)):[],e.competitions=t.competitions?t.competitions.map(n=>this.competitionremapper.fromResponse(n)):[],e}catch(e){throw console.warn("There was a problem remapping search response",e),e}}},gu=class{constructor(){a(this,"meta",new Zr);a(this,"data",[])}},$O=class{constructor(){a(this,"remapMetaProp",t=>{let e=new Zr;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e})}},Rs=class extends yn{constructor(e){super(e,rn(e.environment,"football"));a(this,"limitIds",200);a(this,"countryRemapper",null);a(this,"competitionBasicRemapper",null);a(this,"competitionFullRemapper",null);a(this,"teamBasicRemapper",null);a(this,"teamFullRemapper",null);a(this,"matchBasicRemapper",null);a(this,"matchFullRemapper",null);a(this,"playerBasicRemapper",null);a(this,"playerFullRemapper",null);a(this,"topPlayerRemapper",null);a(this,"searchRemapper",null);a(this,"footballMetaRemapper",null);a(this,"footballService",null);a(this,"getCountries",e=>_(this,null,function*(){let n="There was a problem with the football countries request",r=`/countries${this.apiSignInUrl}`,i=Date.now();e&&(r+=`&disable_cache=${i}`);let s=yield this.fetchWithoutAuth(r,n);return this.countryRemapper.countriesFromResponse(s.data)}));a(this,"getCompetitions",(e,n)=>_(this,null,function*(){let r=Date.now(),i="There was a problem with football competitions request";if(n=n||!1,e&&e.competitionIds&&e.competitionIds.length>this.limitIds-1){let s=[],o=ea(e.competitionIds,this.limitIds);for(let l of o){e.competitionIds=l;let u=`/competitions${this.apiSignInUrl}${e.constructFilterUrl()}`;n&&(u+=`&disable_cache=${r}`);let c=yield this.fetchWithoutAuth(u,i);s.push(c.data.map(d=>this.competitionBasicRemapper.fromResponse(d)))}return Array.prototype.concat.apply([],s)}else{let s=`/competitions${this.apiSignInUrl}`;return e&&(s+=`${e.constructFilterUrl()}`),n&&(s+=`&disable_cache=${r}`),(yield this.fetchWithoutAuth(s,i)).data.map(o=>this.competitionBasicRemapper.fromResponse(o))}}));a(this,"getCompetitionById",(e,n)=>_(this,null,function*(){let r=`/competitions/${e}${this.apiSignInUrl}`,i="There was a problem with football competition by ID request",s=Date.now();n&&(r+=`&disable_cache=${s}`);let o=yield this.fetchWithoutAuth(r,i);return this.competitionFullRemapper.fromResponse(o.data)}));a(this,"getTopCompetitions",e=>_(this,null,function*(){let n="There was a problem with top football competitions request",r=`/competitions/top${this.apiSignInUrl}`,i=Date.now();return e&&(r+=`&disable_cache=${i}`),(yield this.fetchWithoutAuth(r,n)).data.map(s=>this.competitionBasicRemapper.fromResponse(s))}));a(this,"getTeams",(e,n)=>_(this,null,function*(){let r=Date.now(),i="There was a problem with football teams request";if(e&&e.teamIds&&e.teamIds.length>this.limitIds){let s=[],o=ea(e.teamIds,this.limitIds);for(let l of o){e.teamIds=l;let u=`/teams${this.apiSignInUrl}${e.constructFilterUrl()}`;n&&(u+=`disable_cache=${r}`);let c=yield this.fetchWithoutAuth(u,i);s.push(c.data.map(d=>this.teamBasicRemapper.fromResponse(d)))}return Array.prototype.concat.apply([],s)}else{let s=new gu,o=`/teams${this.apiSignInUrl}`;e&&(o+=`${e.constructFilterUrl()}`),n&&(o+=`&disable_cache=${r}`);let l=yield this.fetchWithoutAuth(o,i);return s.meta=this.footballMetaRemapper.remapMetaProp(l.meta),s.data=l.data.map(u=>this.teamBasicRemapper.fromResponse(u)),s}}));a(this,"getTeamById",(e,n)=>_(this,null,function*(){let r="There was a problem with football team by ID request",i=`/teams/${e}${this.apiSignInUrl}`,s=Date.now();n&&(i+=`disable_cache=${s}`);let o=yield this.fetchWithoutAuth(i,r);return this.teamFullRemapper.fromResponse(o.data)}));a(this,"getTopTeams",e=>_(this,null,function*(){let n=`/teams/top${this.apiSignInUrl}`,r="There was a problem with top football teams request",i=Date.now();e&&(n+=`$disable_cache=${i}`);let s=yield this.fetchWithoutAuth(n,r);return s.data?s.data.map(o=>this.teamBasicRemapper.fromResponse(o)):[]}));a(this,"getNextMatchForTeam",(e,n)=>_(this,null,function*(){let r=`/teams/${e}/next-match${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with next match for team request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.matchFullRemapper.fromResponse(o.data)}));a(this,"getPrevMatchForTeam",(e,n)=>_(this,null,function*(){let r=`/teams/${e}/previous-match${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with previous match for team request";n&&(r+=`disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.matchFullRemapper.fromResponse(o.data)}));a(this,"getPlayers",(e,n)=>_(this,null,function*(){let r=Date.now(),i="There was a problem with football players request";if(e&&e.playerIds&&e.playerIds.length>this.limitIds-1){let s=[],o=ea(e.playerIds,this.limitIds);for(let l of o){e.playerIds=l;let u=`/players${this.apiSignInUrl}${e.constructFilterUrl()}`;n&&(u+=`&disable_cache=${r}`);let c=yield this.fetchWithoutAuth(u,i);s.push(c.data.map(d=>this.teamBasicRemapper.fromResponse(d)))}return Array.prototype.concat.apply([],s)}else{let s=new gu,o=`/players${this.apiSignInUrl}`;e&&(o+=`${e.constructFilterUrl()}`),n&&(o+=`&disable_cache=${r}`);let l=yield this.fetchWithoutAuth(o,i);return s.meta=this.footballMetaRemapper.remapMetaProp(l.meta),s.data=l.data.map(u=>this.playerBasicRemapper.fromResponse(u)),s}}));a(this,"getPlayerById",(e,n)=>_(this,null,function*(){let r=`/players/${e}${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with football player by ID request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.playerFullRemapper.fromResponse(o.data)}));a(this,"getTopPlayers",e=>_(this,null,function*(){let n=`/players/top${this.apiSignInUrl}`,r=Date.now(),i="There was a problem with top football players request";return e&&(n+=`&disable_cache=${r}`),(yield this.fetchWithoutAuth(n,i)).data.map(s=>this.topPlayerRemapper.fromResponse(s))}));a(this,"getNextMatchForPlayer",(e,n)=>_(this,null,function*(){let r=`/players/${e}/next-match${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with next match for player request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.matchFullRemapper.fromResponse(o.data)}));a(this,"getPrevMatchForPlayer",(e,n)=>_(this,null,function*(){let r=`/players/${e}/previous-match${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with previous match for player request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.matchFullRemapper.fromResponse(o.data)}));a(this,"getMatchById",(e,n)=>_(this,null,function*(){let r=`/matches/${e}${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with match by ID request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.matchFullRemapper.fromResponse(o.data)}));a(this,"getMatches",(e,n)=>_(this,null,function*(){let r=new gu,i="There was a problem with football matches request";if(e&&e.matchIds&&e.matchIds.length>this.limitIds){let s=[],o=ea(e.matchIds,this.limitIds);for(let u of o){e.matchIds=u;let c=!0,d=`/matches${this.apiSignInUrl}${e.constructFilterUrl(c)}&limit=${u.length}`;n&&(d+=Ye());let f=yield this.fetchWithoutAuth(d,i);s.push(f.data.map(p=>this.matchBasicRemapper.fromResponse(p)))}let l=Array.prototype.concat.apply([],s);return r.meta=this.footballService.setMetaDataBatchRequest(l.length,e.limit||20,e.page||1),r.data=this.footballService.finalizeMatchesDataBatchRequest(l,e),r}else{let s=`/matches${this.apiSignInUrl}`;e&&(s+=`${e.constructFilterUrl()}`),n&&(s+=Ye());let o=yield this.fetchWithoutAuth(s,i);return r.meta=this.footballMetaRemapper.remapMetaProp(o.meta),r.data=o.data.map(l=>this.matchBasicRemapper.fromResponse(l)),r}}));a(this,"search",(e,n)=>_(this,null,function*(){let r=`/search${this.apiSignInUrl}${e.constructFilterUrl()}`,i=Date.now(),s="There was a problem with football search request";n&&(r+=`&disable_cache=${i}`);let o=yield this.fetchWithoutAuth(r,s);return this.searchRemapper.fromResponse(o.data)}));this.apiSignInUrl=e.lang!=="en"?this.apiSignInUrl+`&lang=${e.lang}`:this.apiSignInUrl,this.countryRemapper=new jn,this.competitionBasicRemapper=new ei,this.competitionFullRemapper=new gO,this.teamBasicRemapper=new Or,this.teamFullRemapper=new _O,this.matchBasicRemapper=new AO,this.matchFullRemapper=new kO,this.playerBasicRemapper=new fp,this.playerFullRemapper=new LO,this.topPlayerRemapper=new DO,this.searchRemapper=new UO,this.footballMetaRemapper=new $O,this.footballService=new Ps(e)}},ks=(t=>(t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5",t))(ks||{}),jO=["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],HO=["OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],sr=["PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_HATTRICK","PLAYER_SCORE_TWICE","PLAYER_YELLOW_CARD"],VO=["FT_1X2","HT_1X2","HT_FT","DOUBLE_CHANCE","CORNERS_MATCH","CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],xs="PLAYER_SCORE_FIRST_GOAL",qO=class{constructor(){a(this,"id","");a(this,"achievedAt","")}},hp=class{constructor(){a(this,"totalPoints",null);a(this,"postPoints",null);a(this,"postsMade",null);a(this,"reactionPoints",null);a(this,"reactionCount",null)}},pp=class{constructor(){a(this,"participations",0);a(this,"points",0)}},vu=class{constructor(){a(this,"footballCompetitions",[]);a(this,"footballTeams",[])}},mp=class{constructor(){a(this,"predictionsMade",0);a(this,"correct",0);a(this,"points",0);a(this,"breakdown",new vu)}},gp=class{constructor(){a(this,"single",new mp);a(this,"topX",new pp);a(this,"matchQuiz",new pp)}},WO=class{constructor(){a(this,"overallPercent");a(this,"byFootballCompetition");a(this,"byFootballTeam");a(this,"byFootballMarket")}},GO=class{constructor(){a(this,"profileId");a(this,"tier");a(this,"points");a(this,"predictionsMade");a(this,"successRates",new WO);a(this,"predictions",new gp);a(this,"tiers",[]);a(this,"badges",[]);a(this,"discussions",new hp)}},zO=class{constructor(){a(this,"entityId","");a(this,"entityType","");a(this,"entitySource","");a(this,"model",null);a(this,"predictionsMade",0);a(this,"correct",0);a(this,"points",0)}},QO=class{constructor(){a(this,"successRatePercent");a(this,"model",null)}},vp=class{constructor(){a(this,"content",null);a(this,"tags",[]);a(this,"campaign",null)}},yp=class{constructor(){a(this,"id",null);a(this,"profileId",null);a(this,"property",null);a(this,"value",null);a(this,"action",null);a(this,"context",new vp);a(this,"points",0)}},YO=class{constructor(){a(this,"meta",new Zr);a(this,"data",[new yp])}},KO=class{constructor(){a(this,"remapSingleResponse",t=>{let e=new yp;return e.id=t.id,e.profileId=t.profile_id,e.property=t.property,e.value=t.value,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e});a(this,"remapActivitiesResponse",t=>{let e=new YO;return e.meta.pagination.currentPage=t.meta.pagination.current_page,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.meta.pagination.numberOfPages=t.meta.pagination.number_of_pages,e.meta.pagination.totalItems=t.meta.pagination.total_items,e.data=t.data.map(n=>this.remapSingleResponse(n)),e});a(this,"remapStatsResponse",t=>{let e=new GO;return e.profileId=t.profile_id,e.tier=t.tier,e.points=t.points,e.predictionsMade=t.predictions_made,e.successRates.overallPercent=t.success_rates.overall_percent,e.successRates.byFootballCompetition=this.constructNewRecord(t.success_rates.by_competition),e.successRates.byFootballTeam=this.constructNewRecord(t.success_rates.by_team),e.successRates.byFootballMarket=this.constructNewRecord(t.success_rates.by_market),e.predictions=t.predictions?this.remapPredictionsStats(t.predictions):null,e.tiers=t.tiers?this.remapAchievementsStats(t.tiers):null,e.badges=t.badges?this.remapAchievementsStats(t.badges):null,e.discussions=t.discussions?this.remapDiscussionStats(t.discussions):null,e});a(this,"constructNewRecord",t=>{let e;if(Object.entries(t).length)Object.entries(t).forEach(([n,r])=>{e=se(Z({},e),{[n]:this.remapSuccessRatePercent(r)}),ks[n]&&delete e[n].model});else return t;return e});a(this,"remapSuccessRatePercent",t=>{let e=new QO;return e.successRatePercent=t.success_rate_percent,e});a(this,"remapPredictionsStats",t=>{let e=new gp;return e.single=this.remapSinglePredictionsStats(t.single),e.topX=t.top_x,e.matchQuiz=t.match_quiz,e});a(this,"remapSinglePredictionsStats",t=>{let e=new mp;return e.predictionsMade=t.predictions_made,e.correct=t.correct,e.points=t.points,e.breakdown=this.remapBreakdownSinglePredictionsStats(t.breakdown),e});a(this,"remapBreakdownSinglePredictionsStats",t=>{if(t&&Object.keys(t).length){let e=new vu,n=[],r=[];return Object.keys(t).forEach(i=>{let s=new zO;s.entityId=i,s.entityType=t[i].entity_type,s.entitySource=t[i].entity_source,s.predictionsMade=t[i].predictions_made,s.correct=t[i].correct,s.points=t[i].points,s.entityType==="competition"?n.push(s):s.entityType==="team"&&r.push(s)}),e.footballCompetitions=n,e.footballTeams=r,e}return new vu});a(this,"remapAchievementsStats",t=>t.map(e=>{let n=new qO;return n.id=e.id,n.achievedAt=e.achieved_at,n}));a(this,"remapDiscussionStats",t=>{let e=new hp;return e.totalPoints=t.total_points,e.postPoints=t.post_points,e.postsMade=t.posts_made,e.reactionPoints=t.reaction_points,e.reactionCount=t.reaction_count,e})}},wp=class extends yn{constructor(e){super(e,rn(e.environment,"loyalty"));a(this,"activityRemapper",null);a(this,"createActivity",e=>_(this,null,function*(){let n=`/activities${this.apiSignInUrl}`,r="There was a problem with creating activity",i="POST",s=yield this.fetchWithAuth(n,r,i,e);return this.activityRemapper.remapSingleResponse(s)}));a(this,"deleteActivity",e=>_(this,null,function*(){let n=`/activities/${e}${this.apiSignInUrl}`,r=`There was a problem deleting the following activity: ${e}`,i="DELETE";return yield this.fetchWithAuth(n,r,i),!0}));a(this,"getOwnActivities",(e,n)=>_(this,null,function*(){let r=`/activities${this.apiSignInUrl}`,i=Date.now(),s="There was a problem with fetching own activities";e&&(r+=`${e.constructFilterUrl()}`),n&&(r+=`disable_cache=${i}`);let o=yield this.fetchWithAuth(r,s);return this.activityRemapper.remapActivitiesResponse(o)}));a(this,"getActivitiesForUser",(e,n,r)=>_(this,null,function*(){let i=`/users/${e}/activities${this.apiSignInUrl}`,s=Date.now(),o=`There was a problem with fetching activities for user: ${e}`;n&&(i+=`${n.constructFilterUrl()}`),r&&(i+=`disable_cache=${s}`);let l=yield this.fetchWithoutAuth(i,o);return this.activityRemapper.remapActivitiesResponse(l)}));a(this,"getStats",(e,n)=>_(this,null,function*(){let r="",i="",s=null;return e?(r+=Xe(n)?`/users/${e}/statistics${this.apiSignInUrl}${Ye()}`:`/users/${e}/statistics${this.apiSignInUrl}`,i=`There was a problem fetching statistics for profile: ${e}`,s=yield this.fetchWithoutAuth(r,i)):(r+=`/statistics${this.apiSignInUrl}`,i="There was a problem fetching profile`s statistics",s=yield this.fetchWithAuth(r,i)),this.activityRemapper.remapStatsResponse(s.data)}));this.activityRemapper=new KO}},JO=class{constructor(){a(this,"id","");a(this,"source","");a(this,"type","");a(this,"favourite",!1)}},XO=class extends JO{constructor(){super(...arguments);a(this,"model",null)}},ZO=class{constructor(t,e,n){a(this,"idMapping",null);a(this,"idSchema",null);a(this,"native","native");a(this,"footballFacade",null);a(this,"remapProfileStats",t=>_(this,null,function*(){if(!t.predictions)return t;let{successRates:e,predictions:n}=t,r={competition:this.getIdsKeys(e.byFootballCompetition,n.single.breakdown.footballCompetitions),team:this.getIdsKeys(e.byFootballTeam,n.single.breakdown.footballTeams)};if(Object.values(r.competition).length){let i=JSON.parse(JSON.stringify(t.successRates.byFootballCompetition)),s=yield this.getEntitiesMap(r.competition,"competition"),o=yield this.setSuccessRatesModels(i,s);t.successRates.byFootballCompetition=o,n.single.breakdown.footballCompetitions=this.reconstructBreakdown(n.single.breakdown.footballCompetitions,s)}if(Object.values(r.team).length){let i=JSON.parse(JSON.stringify(t.successRates.byFootballTeam)),s=yield this.getEntitiesMap(r.team,"team"),o=yield this.setSuccessRatesModels(i,s);t.successRates.byFootballTeam=o,n.single.breakdown.footballTeams=this.reconstructBreakdown(n.single.breakdown.footballTeams,s)}return t}));a(this,"setSuccessRatesModels",(t,e)=>_(this,null,function*(){let n;return this.reconstructRecords(t,n,e)}));a(this,"getEntitiesMap",(t,e)=>_(this,null,function*(){switch(e){case"competition":return yield this.footballFacade.getCompetitionsMapWithNativeIds(t);case"team":return yield this.footballFacade.getTeamsMapWithNativeIds(t)}}));a(this,"reconstructRecords",(t,e,n)=>t&&Object.keys(t).length?(Object.keys(t).forEach(r=>{let i=n.get(r);e=se(Z({},e),{[i.id]:t[r]}),e[i.id].model=i}),e):t);a(this,"reconstructBreakdown",(t,e)=>t.length?t.map(n=>{let r=e.get(n.entityId);return n.entityId=r.id,n.model=r,n}):t);a(this,"getIdsKeys",(t,e)=>{let n=Object.keys(t);if(e.length){let r=e.map(i=>i.entityId);return Array.from(new Set([...n,...r]))}return n});a(this,"remapInterestsToIdSchema",t=>_(this,null,function*(){if(this.idSchema!==this.native)if(t&&t.length>0){let e={},n={},r=t.filter(l=>l.source.toLocaleUpperCase()==="FOOTBALL"),i=t.filter(l=>l.source.toLocaleUpperCase()!=="FOOTBALL");r.forEach(l=>{e.hasOwnProperty(l.type)||(e[l.type]=[],n[l.type]=[]),e[l.type].push(l.id),n[l.type].push(l)});let s=yield this.remapIdsObj(e,this.native,this.idSchema),o=[];for(let[l,u]of Object.entries(n))u.forEach((c,d)=>{c.id=s[l][d],o.push(c)});return o.concat(i)}else return t;return t}));a(this,"remapInterestToNative",t=>_(this,null,function*(){if(this.idSchema!==this.native&&t.source.toLocaleUpperCase()==="FOOTBALL"){let e={},{id:n,type:r}=t;e[r]=[n];let i=yield this.remapIdsObj(e,this.idSchema,this.native);return t.id=i[r][0],t}return t}));a(this,"inquiryCustomInterests",(t,e)=>{let n=[];return t&&t.length>0&&(n=t.filter(r=>r.source.toLocaleUpperCase()==="CUSTOM"),e)?n.map(r=>{let i=new XO;return i.id=r.id,i.type=r.type,i.source=r.source,i.favourite=r.favourite,i}):n});a(this,"remapInterests",t=>_(this,null,function*(){let e=this.inquiryCustomInterests(t,!1);if(e&&e.length>0){let n=t.filter(i=>i.source.toLocaleUpperCase()!=="CUSTOM"),r=yield this.remapInterestsToIdSchema(n);return e.forEach(i=>r.push(i)),r}return yield this.remapInterestsToIdSchema(t)}));a(this,"showFullInterests",t=>_(this,null,function*(){let e=[];if(t&&t.length>0){let n=this.inquiryCustomInterests(t,!0);e.push(n);let r=t.filter(u=>u.source.toLocaleUpperCase()!=="CUSTOM"),{competitionsMap:i,teamsMap:s,playersMap:o}=yield this.getInterestsEntitiesMap(r),l=r.map(u=>{let c=null;if(u.source.toLocaleUpperCase()==="FOOTBALL"){if(u.type==="competition")return c=i.get(u.id),c&&(u.id=c.id),u.model=c,u;if(u.type==="team")return c=s.get(u.id),c&&(u.id=c.id),u.model=c,u;if(u.type==="player")return o?(u.model=o[u.id],u.id=o[u.id].id):u.model=c,u}else return u.model=c,u});return e.push(l),e.flat()}return e}));a(this,"getInterestsEntitiesMap",t=>_(this,null,function*(){let e=[],n=[],r=[],i=new Map,s=new Map,o=null;return t.forEach(l=>{l.type==="competition"&&l.source.toLocaleUpperCase()==="FOOTBALL"?e.push(l.id):l.type==="team"&&l.source.toLocaleUpperCase()==="FOOTBALL"?n.push(l.id):l.type==="player"&&l.source.toLocaleUpperCase()==="FOOTBALL"&&r.push(l.id)}),e.length&&(i=yield this.footballFacade.getCompetitionsMapWithNativeIds(e)),n.length&&(s=yield this.footballFacade.getTeamsMapWithNativeIds(n)),r.length&&(o=yield this.footballFacade.getPlayersMapWithNativeIds(r)),{competitionsMap:i,teamsMap:s,playersMap:o}}));a(this,"remapIdsObj",(t,e,n)=>_(this,null,function*(){return yield this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)}));this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},eT=class{constructor(t,e){a(this,"idMapping",null);a(this,"profileOperations",null);a(this,"remapProfileStats",t=>_(this,null,function*(){return yield this.profileOperations.remapProfileStats(t)}));a(this,"remapInterestToNative",t=>_(this,null,function*(){return yield this.profileOperations.remapInterestToNative(t)}));a(this,"remapInterests",t=>_(this,null,function*(){return yield this.profileOperations.remapInterests(t)}));a(this,"showFullInterests",t=>_(this,null,function*(){return yield this.profileOperations.showFullInterests(t)}));this.idMapping=new wn(t),this.profileOperations=new ZO(t,e,this.idMapping)}},or=class{constructor(t){a(this,"idsRemapper",null);a(this,"profileHttps",null);a(this,"activityHttps",null);a(this,"footballHttps",null);a(this,"footballFacade",null);a(this,"idMapping",null);a(this,"localCache",null);a(this,"profileFacade",null);a(this,"ownProfileBuilder",null);a(this,"profileBuilder",null);a(this,"getOwn",()=>this.ownProfileBuilder);a(this,"getById",t=>this.profileBuilder.setId(t));a(this,"getCountries",t=>_(this,null,function*(){return yield this.profileFacade.getCountries(t)}));a(this,"getByIds",(t,e,n)=>_(this,null,function*(){return yield this.profileFacade.getByIds(t,e,n)}));this.profileHttps=new Qh(t),this.activityHttps=new wp(t),this.footballHttps=new Rs(t),this.idMapping=new wn(t),this.localCache=new ia().createLocalCacheInstance(t.idSchema),this.footballFacade=new lp(t,this.localCache,this.footballHttps,this.idMapping),this.profileFacade=new Cs(this.localCache,this.profileHttps,this.activityHttps),this.idsRemapper=new eT(t,this.footballFacade),this.ownProfileBuilder=new zA(this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps,t.errorHandlingMode),this.profileBuilder=new QA(this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps)}},bp=(t=>(t.EN="en",t.BG="bg",t.RO="ro",t.EL="el",t.SK="sk",t.PT="pt",t.SR="sr",t.HU="hu",t.SV="sv",t.ES="es",t.FR="fr",t.NL="nl",t.DE="de",t.IT="it",t))(bp||{}),tT=class{constructor(){a(this,"validate",t=>{let e=this.validateField(t.lang),n=this.generateMessage(e);return{validation:e,message:n}});a(this,"validateField",t=>{let e=Object.values(bp),n=null;return t!=null&&t.length>0?e.includes(t)?n="valid":n="invalid":n="missing",n});a(this,"generateMessage",t=>{let e=null,n="warning";return t==="missing"&&(e="If no lang is passed the default one will be set which is: en"),t==="invalid"&&(e="This lang value is not supported, the default one will be set which is: en"),t==="valid"&&(e=null,n=null),{text:e,type:n}})}},nT=class{constructor(){a(this,"validateField",t=>{let e=["dev","staging","prod","watg"],n=null;return t!=null&&t.length>0?e.includes(t)?n="valid":n="invalid":n="missing",n});a(this,"generateMessage",t=>{let e=null,n="warning";return t==="missing"&&(e="If no environment is passed the default one will be set which is: prod"),t==="invalid"&&(e="This environment value is not supported, the default one will be set which is: prod"),t==="valid"&&(e=null,n=null),{text:e,type:n}})}validate(t){let e=this.validateField(t.environment),n=this.generateMessage(e);return{validation:e,message:n}}},rT=class{constructor(){a(this,"validateField",t=>{let e=null;return t!=null&&t.length>0?e="valid":e="missing",e});a(this,"generateMessage",t=>{let e=null,n="error";return t==="missing"&&(e="The field apiKey with valid value must be provided to use Fans United JS SDK"),t==="valid"&&(n=null),{text:e,type:n}})}validate(t){let e=this.validateField(t.apiKey),n=this.generateMessage(e);return{validation:e,message:n}}},iT=class{constructor(){a(this,"validateField",t=>{let e=Object.values(Yh),n=null;return t!=null&&t.length>0?e.includes(t)?n="valid":n="invalid":n="missing",n});a(this,"generateMessage",t=>{let e=null,n="warning";return t==="missing"&&(e="If no idSchema is passed the default one will be set which is: native"),t==="invalid"&&(e="This idSchema value is not supported, the default one will be set which is: native"),t==="valid"&&(e=null,n=null),{text:e,type:n}})}validate(t){let e=this.validateField(t.idSchema),n=this.generateMessage(e);return{validation:e,message:n}}},yu=class{constructor(){a(this,"getIdToken",null);a(this,"logout",null)}},wu=class{constructor(){a(this,"text",null);a(this,"type",null)}},aT=class{constructor(){a(this,"validation",null);a(this,"message",new wu);a(this,"getIdToken",{validation:null,message:new wu});a(this,"logout",{validation:null,message:new wu})}},sT=class{constructor(){a(this,"validateAuthProvider",t=>{let e=Object.keys(new yu),n=new aT;if(t){let r=Object.keys(t).filter(i=>!e.includes(i));r.length>0?(n.validation="invalid",n.message.type="warning",n.message.text=`You have passed a property which is not supported for the authentication provider: ${r.join(",")}`):n.validation="valid"}else n.validation="missing",n.message.type="error",n.message.text="The field authProvider must be provided to use this SDK";return n});a(this,"validateAuthProviderConfigFields",(t,e)=>(Object.keys(new yu).forEach(n=>{t[n]?e[n].validation="valid":e[n].validation="missing"}),e));a(this,"generateAuthProviderConfigMessages",t=>(Object.keys(t).filter(e=>e!=="validation"&&e!=="message").forEach(e=>{let n=t[e];n.validation==="missing"&&(n.message.text=`The following property is missing from the authProvider object: ${e}`,n.message.type="error")}),t));a(this,"checkAuthProviderConfigMessagesForErrors",t=>(Object.keys(t).filter(e=>e!=="validation"&&e!=="message").forEach(e=>{t[e].validation==="missing"&&t.validation==="valid"&&(t.validation="invalid",t.message.type="error",t.message.text="The field authProvider has missing properties")}),t))}validate(t){let e=this.validateAuthProvider(t.authProvider);return e.validation!=="missing"&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e}},_p=class{constructor(){a(this,"validation");a(this,"message")}},oT=class{constructor(){a(this,"apiKey",null);a(this,"environment",null);a(this,"idSchema",null);a(this,"clientId",null);a(this,"lang",null);a(this,"errorHandlingMode",null);a(this,"authProvider",{getIdToken:new _p,logout:new _p});a(this,"isValid",!1)}},lT=class{constructor(){a(this,"validateField",t=>{let e=null;return t!=null&&t.length>0?e="valid":e="missing",e});a(this,"generateMessage",t=>{let e=null,n="error";return t==="missing"&&(e="The field clientId must be provided to use Fans United JS SDK"),t==="valid"&&(e=null,n=null),{text:e,type:n}})}validate(t){let e=this.validateField(t.clientId),n=this.generateMessage(e);return{validation:e,message:n}}},uT=class{constructor(){a(this,"validate",t=>{let e=this.validateField(t.errorHandlingMode),n=this.generateMessage(e);return{validation:e,message:n}});a(this,"validateField",t=>{let e=["default","standard"],n=null;return t?e.includes(t)?n="valid":n="invalid":n="missing",n});a(this,"generateMessage",t=>{let e=null,n="warning";return t==="missing"&&(e="If no errorHandlingMode is passed the default one will be set which is: default"),t==="invalid"&&(e="This errorHandlingMode value is not supported, the default one will be set which is: default"),t==="valid"&&(e=null,n=null),{text:e,type:n}})}},cT=class{constructor(){a(this,"validate",t=>{let e=this.checkFieldsForValues(t);return e.isValid=this.containsErrorMessage(e),e});a(this,"checkFieldsForValues",t=>{let e=new oT,n={apiKey:new rT,environment:new nT,idSchema:new iT,clientId:new lT,lang:new tT,errorHandlingMode:new uT,authProvider:new sT};for(let[r,i]of Object.entries(e))r!=="isValid"&&(i=n[r].validate(t));return Object.keys(n).forEach(r=>{e[r]=n[r].validate(t)}),e});a(this,"containsErrorMessage",t=>{let e=!0;for(let[n,r]of Object.entries(t))if(n!=="authProvider"){if(n!=="isValid"&&r.message.type==="error")return e=!1,e;if(n!=="isValid"&&r.message.type==="warning")return e=!0,e}else if(r.message.type==="error")return e=!1,e;return e})}},Ds=class{constructor(t){a(this,"https",null);a(this,"idMapping",null);a(this,"localCache",null);a(this,"footballFacade",null);a(this,"getCountries",t=>_(this,null,function*(){return yield this.footballFacade.getCountries(t)}));a(this,"getCompetitions",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getCompetitions(t,e)}));a(this,"getCompetitionById",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getCompetitionById(t,e)}));a(this,"getTopCompetitions",t=>_(this,null,function*(){return yield this.footballFacade.getTopCompetitions(t)}));a(this,"getTeams",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getTeams(t,e)}));a(this,"getTeamById",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getTeamById(t,e)}));a(this,"getTopTeams",t=>_(this,null,function*(){return yield this.footballFacade.getTopTeams(t)}));a(this,"getNextMatchForTeam",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getNextMatchForTeam(t,e)}));a(this,"getPrevMatchForTeam",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getPrevMatchForTeam(t,e)}));a(this,"getPlayers",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getPlayers(t,e)}));a(this,"getPlayerById",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getPlayerById(t,e)}));a(this,"getTopPlayers",t=>_(this,null,function*(){return yield this.footballFacade.getTopPlayers(t)}));a(this,"getNextMatchForPlayer",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getNextMatchForPlayer(t,e)}));a(this,"getPrevMatchForPlayer",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getPrevMatchForPlayer(t,e)}));a(this,"getMatches",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getMatches(t,e)}));a(this,"getMatchById",(t,e)=>_(this,null,function*(){return yield this.footballFacade.getMatchById(t,e)}));a(this,"search",(t,e)=>_(this,null,function*(){return yield this.footballFacade.search(t,e)}));this.https=new Rs(t),this.idMapping=new wn(t),this.localCache=new ia().createLocalCacheInstance(t.idSchema),this.footballFacade=new lp(t,this.localCache,this.https,this.idMapping)}},dT=class{constructor(){a(this,"value",null);a(this,"playerId",null);a(this,"playerModel",null)}},Ep=class{constructor(){a(this,"market",null);a(this,"matchId",null);a(this,"matchType",null);a(this,"matchModel",null);a(this,"prediction",new dT);a(this,"result",null)}},fT=class{constructor(){a(this,"value",!1);a(this,"playerId",null)}},ti=class{constructor(t,e,n,r){a(this,"matchId",null);a(this,"market",null);a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.market=e,this.prediction=new fT,this.prediction.value=n,this.prediction.playerId=r}},Ip=class{constructor(){a(this,"settledAt",null);a(this,"resettledAt",null);a(this,"status",null);a(this,"outcome",null);a(this,"points",0)}},hT=class{constructor(){a(this,"value",null)}},bu=class{constructor(t,e,n){a(this,"matchId",null);a(this,"market",null);a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.market=e,this.prediction=new hT,this.prediction.value=n}},sa=class{constructor(){a(this,"value",!1)}},Ap=class{constructor(t,e,n){a(this,"matchId",null);a(this,"market",null);a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.market=e,this.prediction=new sa,this.prediction.value=n}},Op=class{constructor(t,e,n){a(this,"matchId",null);a(this,"market",null);a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.market=e,this.prediction=new sa,this.prediction.value=n}},pT=class{constructor(t,e,n){a(this,"matchFacade",null);a(this,"playerFacade",null);a(this,"predictorService",null);a(this,"remapFixturesRequest",t=>{let e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof ti)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof Ap||t instanceof Op)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof bu){e.market=t.market;let n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e});a(this,"remapFixturesResponse",t=>_(this,null,function*(){let e="OWN_GOAL",n=[],r=[],i=null,s=[];t.length>1&&t.sort((l,u)=>l.match_id.localeCompare(u.match_id));for(let l of t)n.push(l.match_id),l.player_id&&!r.includes(l.player_id)&&r.push(l.player_id);let o=yield this.matchFacade.getMatchesMapWithNativeIds(n);r.sort((l,u)=>l.localeCompare(u)),r&&r.length>0&&!r.includes(e)&&(i=yield this.playerFacade.getPlayersMapWithNativeIds(r));for(let l of t){let u=new Ep;l.target?u.market=this.predictorService.convertMarketForResponseModel(l.market,l.target):u.market=l.market,u.matchId=o[l.match_id].id,u.matchType=l.match_type,u.matchModel=o?o[l.match_id]:null,delete u.matchModel.availableMarkets,l.goals_home!==void 0&&l.goals_away!==void 0?u.prediction.value=l.goals_home.toString()+":"+l.goals_away.toString():u.prediction.value=l.prediction,u.prediction.playerId=l.player_id?l.player_id:null,u.prediction.playerId&&u.prediction.playerId!==e&&(u.prediction.playerModel=i[l.player_id],u.prediction.playerId=i[l.player_id].id),u.result=this.remapResult(l.result),s.push(u)}return s}));a(this,"remapResult",t=>{let e=new Ip;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e});this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},Fs=class{constructor(){a(this,"goldenGoal",null)}},Tp=class{constructor(){a(this,"id",null);a(this,"gameInstanceId",null);a(this,"gameType",null);a(this,"wager",null);a(this,"totalFixtures",null);a(this,"settledFixtures",null);a(this,"userId",null);a(this,"fixtures",[]);a(this,"status",null);a(this,"tiebreaker",new Fs);a(this,"points",null);a(this,"createdAt",null);a(this,"updatedAt",null)}},pt=class{constructor(){a(this,"no",0);a(this,"yes",0)}},mT=class{constructor(){a(this,"fullTimeOneXTwo",{});a(this,"halfTimeOneXTwo",{});a(this,"bothTeamsScore",new pt);a(this,"doubleChance",{});a(this,"halfTimeFullTime",{});a(this,"playerScore",{});a(this,"playerYellowCard",{});a(this,"playerRedCard",{});a(this,"redCardMatch",new pt);a(this,"penaltyMatch",new pt);a(this,"playerScoreFirstGoal",{});a(this,"cornersMatch",{});a(this,"correctScore",{});a(this,"correctScoreHalfTime",{});a(this,"correctScoreAdvanced",{});a(this,"playerScoreHattrick",{});a(this,"playerScoreTwice",{});a(this,"overZeroPointFiveGoals",new pt);a(this,"overOnePointFiveGoals",new pt);a(this,"overTwoPointFiveGoals",new pt);a(this,"overThreePointFiveGoals",new pt);a(this,"overFourPointFiveGoals",new pt);a(this,"overFivePointFiveGoals",new pt);a(this,"overSixPointFiveGoals",new pt);a(this,"overSixPointFiveCorners",new pt);a(this,"overSevenPointFiveCorners",new pt);a(this,"overEightPointFiveCorners",new pt);a(this,"overNinePointFiveCorners",new pt);a(this,"overTenPointFiveCorners",new pt);a(this,"overElevenPointFiveCorners",new pt);a(this,"overTwelvePointFiveCorners",new pt);a(this,"overThirteenPointFiveCorners",new pt)}},Ns=class{constructor(){a(this,"timeTiebreaker",!1)}},Ls=class{constructor(){a(this,"id",null);a(this,"title",null);a(this,"description",null);a(this,"type",null);a(this,"status",null);a(this,"outcome",null);a(this,"predictionsCutoff",null);a(this,"fixtures",[]);a(this,"tiebreaker",new Ns);a(this,"predictionId",null);a(this,"participantsCount",0);a(this,"related",null);a(this,"excludedProfileIds",null);a(this,"rules",null);a(this,"flags",null);a(this,"points",null);a(this,"createdAt",null);a(this,"updatedAt",null);a(this,"predictionsMadeAt",null);a(this,"scheduleOpenAt",null);a(this,"images",null);a(this,"predictionTiebreaker",new Fs)}},_u=class{constructor(){a(this,"userId",null);a(this,"points",null);a(this,"results",[]);a(this,"tiebreaker",null)}},Cp=(t=>(t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED",t))(Cp||{}),Sp=["WON","LOST","PARTIALLY_WON","CANCELED"],_n=class{constructor(t){a(this,"limit",null);a(this,"startAfter",null);a(this,"status",null);a(this,"type",null);a(this,"matchIds",null);a(this,"gameIds",null);a(this,"constructFiltersUrl",()=>{let t="",e=!1;return this.status&&(e=Object.values(Cp).some(n=>this.status.includes(n))),this.limit&&(t+="&",t+=`limit=${this.limit}`),this.startAfter&&(t+="&",t+=`start_after=${this.startAfter}`),this.status&&e&&(t+="&",t+=`status=${this.status.join(",")}`),this.type&&(t+="&",t+=`game_types=${this.type}`),this.matchIds&&(t+="&",t+=`match_ids=${this.matchIds.join(",")}`),this.gameIds&&(t+="&",t+=`game_ids=${this.gameIds.join(",")}`),t});this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.matchIds=t.matchIds?t.matchIds:null,this.gameIds=t.gameIds?t.gameIds:null}},Tr=class{constructor(t){a(this,"limit");a(this,"startAfter");this.limit=t&&t.limit?t.limit:null,this.startAfter=t&&t.startAfter?t.startAfter:null}constructMainFiltersUrl(){let t="";return this.limit&&(t+="&",t+=`limit=${this.limit}`),this.startAfter&&(t+="&",t+=`start_after=${this.startAfter}`),t}},Pp=(t=>(t.OPEN="OPEN",t.LIVE="LIVE",t.PENDING="PENDING",t.CANCELED="CANCELED",t.CLOSED="CLOSED",t.SETTLED="SETTLED",t))(Pp||{}),Cr=class extends Tr{constructor(e){super(e);a(this,"status",null);a(this,"type",null);a(this,"gameIds",null);a(this,"sortOrder",null);a(this,"constructFiltersUrl",()=>{let e=super.constructMainFiltersUrl();return this.status&&Object.values(Pp).includes(this.status)&&(e+="&",e+=`status=${this.status}`),this.type&&(e+="&",e+=`type=${this.type}`),this.gameIds&&this.gameIds.length>0&&(e+="&",e+=`game_ids=${this.gameIds.join(",")}`),this.sortOrder&&(e+="&",e+=`sort_order=${this.sortOrder}`),e});this.status=e.status?e.status:null,this.type=e.type?e.type:null,this.gameIds=e.gameIds?e.gameIds:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},Bs=class{constructor(){a(this,"main",null);a(this,"cover",null);a(this,"mobile",null)}},Us=class{constructor(){a(this,"id",null);a(this,"title",null);a(this,"description",null);a(this,"type",null);a(this,"status",null);a(this,"scheduleOpenAt",null);a(this,"predictionsCutoff",null);a(this,"fixtures",[]);a(this,"tiebreaker",new Ns);a(this,"participantsCount",0);a(this,"related",null);a(this,"excludedProfileIds",null);a(this,"rules",null);a(this,"labels",null);a(this,"customFields",null);a(this,"flags",null);a(this,"images",new Bs);a(this,"createdAt",null);a(this,"updatedAt",null)}},oa=class{constructor(){a(this,"id",null);a(this,"title",null);a(this,"description",null);a(this,"type",null);a(this,"status",null);a(this,"outcome",null);a(this,"predictionsCutoff",null);a(this,"fixtures",[]);a(this,"tiebreaker",new Ns);a(this,"predictionId",null);a(this,"participantsCount",0);a(this,"related",null);a(this,"excludedProfileIds",null);a(this,"rules",null);a(this,"flags",null);a(this,"points",null);a(this,"createdAt",null);a(this,"updatedAt",null);a(this,"predictionsMadeAt",null);a(this,"images",null);a(this,"scheduleOpenAt",null)}},Mp=class extends Us{constructor(){super(...arguments);a(this,"adContent",null)}},$s=class{constructor(t,e){a(this,"footballHttps",null);a(this,"idMapping",null);a(this,"matchFacade",null);a(this,"playerFacade",null);a(this,"profileNamespace",null);a(this,"remapMatchIdToNative",t=>_(this,null,function*(){return(yield this.idMapping.getEntityIdsBySchemaId(t,"match","native")).match}));a(this,"remapPlayerIdToNative",t=>_(this,null,function*(){return(yield this.idMapping.getEntityIdsBySchemaId(t,"player","native")).player[0]}));a(this,"remapPlayerIdMapToNative",t=>_(this,null,function*(){let e={},n=Is(t),r=(yield this.idMapping.getEntityIdsBySchemaId(n,"player","native")).player;return n.forEach((i,s)=>e[i]=r[s]),e}));a(this,"remapPlayerIdToIdSchema",t=>_(this,null,function*(){let e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[];for(let[i,s]of Object.entries(t))if(e.includes(i))for(let o of Object.keys(s))o!=="NOBODY"&&o!=="OWN_GOAL"&&n.push(o);if(!n.length)return t;let r=yield this.playerFacade.getPlayersMapWithNativeIds(n);for(let[i,s]of Object.entries(t))if(e.includes(i))for(let o of Object.keys(s))o!=="NOBODY"&&o!=="OWN_GOAL"&&(s[r[o].id]=s[o],s[r[o].id].model=r[o],this.idMapping.idSchema!=="native"&&delete s[o]);return t}));a(this,"convertMarketForResponseModel",(t,e)=>{let n=e.toString();return t+"_"+n});a(this,"getMarketSummary",(t,e,n)=>_(this,null,function*(){let r=RA.get(e),i={};if(i.matchId=t.matchId,i.matchType=t.matchType,Object.keys(t.predictions).includes(r))i[r]=t.predictions[r];else throw new Error("You have passed invalid market");if(sr.includes(e)&&n){let s="";if(n!=="OWN_GOAL"&&n!=="NOBODY"&&(s=(yield this.idMapping.idMappingFacade.getEntitiesByIds({player:[n]},this.idMapping.idSchema,"native")).player[0]),s&&i[r][s]){let o=yield this.playerFacade.getPlayersMapWithNativeIds([s]);return i[r][s].model=o[s],i[r][s]}else return s?(i[r][s]=new pt,i[r][s]):i[r][n]}else if(sr.includes(e)&&!n){let s=Object.keys(i[r]).filter(l=>l!=="NOBODY"&&l!=="OWN_GOAL"),o=s.length?yield this.playerFacade.getPlayersMapWithNativeIds(s):{};Object.keys(o).length&&Object.keys(i[r]).forEach(l=>{l!=="NOBODY"&&l!=="OWN_GOAL"&&(i[r][o[l].id]=i[r][l],i[r][o[l].id].model=o[l],this.idMapping.idSchema!=="native"&&delete i[r][l])})}return i}));a(this,"remapCompetitionsFromConfig",t=>_(this,null,function*(){if(t instanceof sp){let e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},i=yield this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema),s=yield this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema),o=yield this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema);return t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=s.competition,t.successRateScopes.teams=o.team,t}if(t instanceof ap||t instanceof ip){let e={competition:t.competitionsWhitelist},n=yield this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema);return t.competitionsWhitelist=n.competition,t}}));a(this,"remapMatchIdsFixtures",t=>_(this,null,function*(){if(Array.isArray(t.data))if(t.data.length>0){let e=[],n=[];return t.data.forEach(r=>{r instanceof Us||r instanceof Ls||r instanceof oa||r instanceof Mp?(r.fixtures.forEach(i=>e.push(i.matchId)),r instanceof oa&&r.fixtures.forEach(i=>{i.prediction.playerId&&i.prediction.playerId!=="OWN_GOAL"&&n.push(i.prediction.playerId)})):r instanceof _u&&r.results.forEach(i=>e.push(i.matchId))}),yield this.refactorResponseArrModel(t,e,n)}else return t;else return yield this.refactorResponseObjModel(t)}));a(this,"refactorResponseArrModel",(t,e,n)=>_(this,null,function*(){let r=[],i=yield this.matchFacade.getMatchesMapWithNativeIds(e),s={};return n.length>0&&(s=yield this.playerFacade.getPlayersMapWithNativeIds(n)),t.data.forEach(o=>{o instanceof Us||o instanceof Ls||o instanceof oa?(o.fixtures.forEach(l=>{this.handleMatchModel(i,l),o instanceof oa&&l.prediction.playerId&&l.prediction.playerId!=="OWN_GOAL"&&(l.prediction.playerModel=s[l.prediction.playerId],l.prediction.playerId=s[l.prediction.playerId].id)}),r.push(o)):o instanceof _u&&(o.results.forEach(l=>{l.matchModel=i[l.matchId],delete l.matchModel.availableMarkets,l.matchId=l.matchModel.id}),r.push(o))}),t.data=r,t}));a(this,"refactorResponseObjModel",t=>_(this,null,function*(){let e=[];t.fixtures.forEach(r=>e.push(r.matchId));let n=yield this.matchFacade.getMatchesMapWithNativeIds(e);return t.fixtures.forEach(r=>this.handleMatchModel(n,r)),t}));a(this,"getCurrentGameId",t=>{let e=new Date;if(t.data.length>1){let n=[];return t.data.forEach(r=>n.push(r.predictionsCutoff)),t.data.sort((r,i)=>{let[s,o]=[r.predictionsCutoff,i.predictionsCutoff].map(l=>Math.abs(new Date(l)-e));return s-o})[0].id}else return t.data[0].id});a(this,"initGameTypePredictions",(t,e)=>{let n={type:t,limit:null,startAfter:null};return e&&(n=se(Z({},n),{limit:e.limit,startAfter:e.startAfter})),n=new _n(n),n});a(this,"initGameFilters",(t,e,n)=>{if(e&&n)return e.type=t,e.gameIds=n,e=new Cr(e),e;if(e&&!n)return e.type=t,e=new Cr(e),e;if(!e&&n){let r={type:t,gameIds:n};return r=new Cr(r),r}else{let r={type:t};return r=new Cr(r),r}});a(this,"addPredictionProp",(t,e)=>_(this,null,function*(){return e.data.forEach(n=>{t.data.forEach(r=>{n.id===r.game_instance_id&&(n.predictionId=r.id,n.outcome=r.status,n.fixtures.forEach((i,s)=>{r.fixtures[s].goals_home!==void 0&&r.fixtures[s].goals_away!==void 0?i.prediction.value=r.fixtures[s].goals_home+":"+r.fixtures[s].goals_away:i.prediction.value=r.fixtures[s].prediction,r.fixtures[s].player_id?i.prediction.playerId=r.fixtures[s].player_id:r.fixtures[s].target&&(i.prediction.target=r.fixtures[s].target),i.prediction.result=this.remapResult(r.fixtures[s].result)}),n.predictionsMadeAt=r.created_at,n.points=r.points,n instanceof Ls&&(r.tiebreaker?n.predictionTiebreaker.goldenGoal=r.tiebreaker.golden_goal:n.predictionTiebreaker=r.tiebreaker))})}),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,yield this.remapMatchIdsFixtures(e)}));a(this,"remapResult",t=>{let e=new Ip;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e});a(this,"areIdsExceeded",t=>t.length>10);a(this,"initPredictionsFilters",(t,e,n)=>{switch(e){case"user":t&&(t=new _n(t));break;case"current":if(t)this.deleteUnexpectedProperties(t),t.status=["ACTIVE"],t=new _n(t);else{let r={status:["ACTIVE"]};t=new _n(r)}break;case"past":if(t)this.deleteUnexpectedProperties(t),t.status=Sp,t=new _n(t);else{let r={status:Sp};t=new _n(r)}break;case"matches":if(t)this.deleteUnexpectedProperties(t),t.matchIds=n,t=new _n(t);else{let r={matchIds:n};t=new _n(r)}break}return t});a(this,"completeGameMarketResults",(t,e)=>_(this,null,function*(){switch(e){case"MATCH_QUIZ":let n={},r=t.results[0].matchId,i=t.results.map(u=>sr.includes(u.market)&&!u.result.includes("OWN_GOAL")?[...u.result]:[]).flat(),s=yield this.matchFacade.getMatchesMapWithNativeIds([r]);return i.length&&(n=yield this.playerFacade.getPlayersMapWithNativeIds(i)),t.results=t.results.map(u=>{if(u.matchModel=s[u.matchId]?s[u.matchId]:null,u.playerModels&&Object.keys(n).length&&u.result.forEach(c=>{let d=n[c];u.playerModels.push(d)}),this.idMapping.idSchema!=="native"&&(this.remapMatchIdForResultsMarkets(s,u),u.playerModels&&Object.keys(n).length)){let c=u.result;u.result=c.map(d=>n[d].id)}return u}),t;case"TOP_X":let o=t.results.map(u=>u.matchId),l=yield this.matchFacade.getMatchesMapWithNativeIds(o);if(t.results=t.results.map(u=>(u.matchModel=l[u.matchId]?l[u.matchId]:null,this.idMapping.idSchema!=="native"&&this.remapMatchIdForResultsMarkets(l,u),u)),t.tieBreakers.goldenGoals.length){let u=t.tieBreakers.goldenGoals.map(d=>d.playerId),c=yield this.playerFacade.getPlayersMapWithNativeIds(u);t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map(d=>(d.matchModel=l[d.matchId],d.playerModel=c[d.playerId],this.idMapping.idSchema!=="native"&&(d.matchId=l[d.matchId].id,d.playerId=c[d.playerId].id),d))}return t}}));a(this,"completeContestWinners",t=>_(this,null,function*(){if(t.userList&&t.userList.length){let e=t.userList.map(r=>r.profileId),n=yield this.profileNamespace.getByIds(e);t.userList.forEach(r=>{let i=n.filter(s=>s.id===r.profileId)[0];delete i.interests,r.profileModel=i})}return t}));a(this,"handleMatchModel",(t,e)=>{t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,this.idMapping.idSchema!=="native"&&this.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then(n=>{e.matchId=n[Rt[this.idMapping.idSchema]]}))});a(this,"remapMatchIdForResultsMarkets",(t,e)=>{t[e.matchId]?e.matchId=t[e.matchId].id:this.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then(n=>{e.matchId=n[Rt[this.idMapping.idSchema]]})});a(this,"deleteUnexpectedProperties",t=>(t.status&&(console.warn(Gh.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(Gh.UNEXPECTED_TYPE_PROP),delete t.type),t));this.footballHttps=new Rs(t),this.idMapping=e,this.matchFacade=new mu(t,this.footballHttps,e),this.playerFacade=new pu(t,this.footballHttps,e),this.profileNamespace=new or(t)}},Rp=class{constructor(t){a(this,"gameInstanceId",null);a(this,"fixtures",[]);a(this,"tiebreaker",null);this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach(e=>this.fixtures.push(new bu(e.matchId,e.market,e.prediction.value))),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},kp=class{constructor(t,e){a(this,"fixturesRemapper",null);a(this,"footballHttps",null);a(this,"matchFacade",null);a(this,"playerFacade",null);a(this,"predictorService",null);a(this,"remapRequestBody",t=>{let e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map(n=>this.fixturesRemapper.remapFixturesRequest(n)),t instanceof Rp&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e});a(this,"remapResponseArrayBody",t=>_(this,null,function*(){if(t.length){let e="OWN_GOAL",n=[],r=[],i={},s=[];t.forEach(l=>{l.fixtures.forEach(u=>{n.push(u.match_id),u.player_id&&u.player_id!==e&&r.push(u.player_id)})});let o=yield this.matchFacade.getMatchesMapWithNativeIds(n);return r.length>0&&(i=yield this.playerFacade.getPlayersMapWithNativeIds(r)),t.forEach(l=>{let u=new Tp,c=[];u.id=l.id,u.gameInstanceId=l.game_instance_id,u.gameType=l.game_type,u.wager=l.wager,u.totalFixtures=l.total_fixtures,u.settledFixtures=l.settled_fixtures,u.userId=l.user_id,l.fixtures.forEach(d=>{let f=new Ep;d.target?f.market=this.predictorService.convertMarketForResponseModel(d.market,d.target):f.market=d.market,f.matchId=o[d.match_id].id,f.matchType=d.match_type,f.matchModel=o[d.match_id],delete f.matchModel.availableMarkets,d.goals_home!==void 0&&d.goals_away!==void 0?f.prediction.value=d.goals_home.toString()+":"+d.goals_away.toString():f.prediction.value=d.prediction,f.prediction.playerId=d.player_id?d.player_id:null,f.prediction.playerId&&f.prediction.playerId!==e&&(f.prediction.playerModel=i[f.prediction.playerId],f.prediction.playerId=i[f.prediction.playerId].id),f.result=this.fixturesRemapper.remapResult(d.result),c.push(f)}),u.fixtures=c,u.status=l.status,l.tiebreaker?u.tiebreaker.goldenGoal=l.tiebreaker.golden_goal:u.tiebreaker=null,u.points=l.points,u.createdAt=l.created_at,u.updatedAt=l.updated_at,s.push(u)}),s}return t}));a(this,"remapResponseObjBody",t=>_(this,null,function*(){let e=new Tp;return e.id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,e.fixtures=yield this.fixturesRemapper.remapFixturesResponse(t.fixtures),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e}));a(this,"remapPredictionModel",t=>{let e=new mT;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e});this.footballHttps=new Rs(t),this.matchFacade=new mu(t,this.footballHttps,e),this.playerFacade=new pu(t,this.footballHttps,e),this.predictorService=new $s(t,e),this.fixturesRemapper=new pT(this.matchFacade,this.playerFacade,this.predictorService)}},gT=class{constructor(){a(this,"matchId",null);a(this,"matchType",null);a(this,"predictions",null)}},vT=class{constructor(t,e){a(this,"remapPredictions",null);a(this,"remapResponse",t=>{let e=new gT;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=this.remapPredictions.remapPredictionModel(t.predictions),e});this.remapPredictions=new kp(t,e)}},yT=class{constructor(){a(this,"matchId",null);a(this,"matchType",null);a(this,"market",null);a(this,"matchModel",null);a(this,"matchStatus",new aa)}},wT=class{constructor(){a(this,"value",null);a(this,"target",null);a(this,"playerId",null);a(this,"playerModel",null);a(this,"result",null)}},bT=class{constructor(){a(this,"matchId",null);a(this,"matchType",null);a(this,"market",null);a(this,"matchModel",null);a(this,"matchStatus",new aa);a(this,"prediction",new wT)}},_T=class{constructor(){a(this,"value",null);a(this,"result",null)}},ET=class{constructor(){a(this,"matchId",null);a(this,"matchType",null);a(this,"market",null);a(this,"matchModel",null);a(this,"matchStatus",new aa);a(this,"prediction",new _T)}},IT=class{constructor(){a(this,"matchId",null);a(this,"matchModel",null);a(this,"outcome",null)}},AT=class{constructor(){a(this,"gameId",null);a(this,"results",null);a(this,"tieBreakers",null)}},xp=class{constructor(){a(this,"entityId",null);a(this,"entityType",null)}},OT=class{constructor(){a(this,"contestId","");a(this,"contestType","GAME");a(this,"contestModel",null);a(this,"description","");a(this,"userList",[])}},TT=class{constructor(){a(this,"position","");a(this,"profileId","");a(this,"profileModel",null);a(this,"note","");a(this,"tags",[])}},CT=class{constructor(){a(this,"remapPaginatedGames",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapGamesListResponse(n)),e});a(this,"remapGamesListResponse",t=>{let e=new Us;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.status=t.status,e.scheduleOpenAt=t.schedule_open_at,e.predictionsCutoff=t.predictions_cutoff,e.fixtures=t.fixtures.map(n=>this.remapFixturesResponse(n)),e.tiebreaker=t.tiebreaker?this.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,e.participantsCount=t.participants_count,e.related=t.related?this.remapRelated(t.related):null,e.excludedProfileIds=t.excluded_profile_ids,e.rules=t.rules,e.labels=t.labels,e.customFields=t.custom_fields,e.flags=t.flags,e.images=t.images,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapGameByIdResponse",t=>{let e=new Mp;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.status=t.status,e.scheduleOpenAt=t.schedule_open_at,e.predictionsCutoff=t.predictions_cutoff,e.fixtures=t.fixtures.map(n=>this.remapFixturesResponse(n)),e.tiebreaker=t.tiebreaker?this.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,e.participantsCount=t.participants_count,e.related=t.related?this.remapRelated(t.related):null,e.excludedProfileIds=t.excluded_profile_ids,e.rules=t.rules,e.flags=t.flags,e.adContent=t.ad_content,e.labels=t.labels,e.customFields=t.custom_fields,e.images=t.images,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapFixturesResponse",t=>{let e=new yT;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e});a(this,"remapPaginatedUserTopXEditions",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapUserTopXEditionsResponse(n)),e});a(this,"remapUserTopXEditionsResponse",t=>{let e=new Ls;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.status=t.status,e.predictionsCutoff=t.predictions_cutoff,e.scheduleOpenAt=t.schedule_open_at,e.fixtures=t.fixtures.map(n=>this.remapTopXFixturesResponse(n)),e.tiebreaker=t.tiebreaker?this.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,e.participantsCount=t.participants_count,e.related=t.related?this.remapRelated(t.related):null,e.excludedProfileIds=t.excluded_profile_ids,e.rules=t.rules,e.flags=t.flags,e.images=t.images,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapTopXFixturesResponse",t=>{let e=new ET;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e});a(this,"remapPaginatedUserMathQuizEditions",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapUserMatchQuizEditionsResponse(n)),e});a(this,"remapUserMatchQuizEditionsResponse",t=>{let e=new oa;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.status=t.status,e.predictionsCutoff=t.predictions_cutoff,e.scheduleOpenAt=t.schedule_open_at,e.fixtures=t.fixtures.map(n=>this.remapMatchQuizFixturesResponse(n)),e.tiebreaker=t.tiebreaker?this.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,e.participantsCount=t.participants_count,e.related=t.related?this.remapRelated(t.related):null,e.excludedProfileIds=t.excluded_profile_ids,e.rules=t.rules,e.flags=t.flags,e.images=t.images,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapMatchQuizFixturesResponse",t=>{let e=new bT;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e});a(this,"remapPaginatedGameResults",t=>{let e=new Ut;return e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,e.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,e.data=t.data.map(n=>this.remapGameResults(n)),e});a(this,"remapGameResults",t=>{let e=new _u;return e.userId=t.user_id,e.points=t.points?t.points:0,e.results=t.results.map(n=>this.remapResults(n)),e.tiebreaker=t.tiebreaker?this.remapTiebreaker(t.tiebreaker):null,e});a(this,"remapGameMarketsResults",t=>{let e=new AT;return e.gameId=t.game_id,e.results=this.remapMarketsResults(t.results),e.tieBreakers=t.tie_breakers?this.remapTieBreakers(t.tie_breakers):null,e});a(this,"remapContestWinners",t=>{let e=new OT;return e.contestId=t.contest_id,e.contestType=t.contest_type,e.description=t.description,e.userList=t.user_list?t.user_list.map(n=>this.remapUserListWinners(n)):null,e});a(this,"remapUserListWinners",t=>{let e=new TT;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e});a(this,"remapTieBreakers",t=>{let e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map(n=>({minute:n.minute,matchId:n.match_id,matchModel:null,playerId:n.player_id,playerModel:null,goalType:n.goal_type})),e});a(this,"remapMarketsResults",t=>{let e=[];return t.forEach(n=>{let r={matchId:n.match_id,market:n.market,result:this.remapMarketResult(n.market,n.result),matchModel:null,playerModels:[],matchStatus:this.remapMarketsResultsMatchStatus(n.match_status)};e.push(this.deleteUnusefulField(r))}),e});a(this,"remapMarketsResultsMatchStatus",t=>{let e=new aa;return t&&(e.type=t.type,e.subType=t.sub_type),e});a(this,"remapMarketResult",(t,e)=>{if(VO.includes(t))return e[0];if(sr.includes(t))return e;if(e[0]==="true")return!0;if(e[0]==="false")return!1});a(this,"deleteUnusefulField",t=>((!sr.includes(t.market)||this.isPlayerMarketWithNoResult(t.market,t.result))&&delete t.playerModels,t));a(this,"isPlayerMarketWithNoResult",(t,e)=>sr.includes(t)&&e.length===0);a(this,"remapResults",t=>{let e=new IT;return e.matchId=t.match_id,e.outcome=t.outcome,e});a(this,"remapTiebreaker",t=>{let e=new Fs;return e.goldenGoal=t.golden_goal,e});a(this,"remapTimeTiebreaker",t=>{let e=new Ns;return e.timeTiebreaker=t,e});a(this,"remapRelated",t=>t.map(e=>{let n=new xp;return n.entityId=e.entity_id,n.entityType=e.entity_type,n}))}},ST=class{constructor(){a(this,"remapMetaData",t=>{let e=new ta;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e})}},js=class extends yn{constructor(e,n){super(e,rn(e.environment,"predictor"));a(this,"predictionRemapper",null);a(this,"matchSummaryRemapper",null);a(this,"gamesRemapper",null);a(this,"metaRemapper",null);a(this,"makeFootballPrediction",e=>_(this,null,function*(){let n=`/predictions${this.apiSignInUrl}`,r="There was a problem making POST request",i="POST",s=yield this.fetchWithAuth(n,r,i,this.predictionRemapper.remapRequestBody(e));return yield this.predictionRemapper.remapResponseObjBody(s)}));a(this,"getMatchSummary",(e,n)=>_(this,null,function*(){let r=Xe(n)?`/predictions/summary/${e}${this.apiSignInUrl}${Ye()}`:`/predictions/summary/${e}${this.apiSignInUrl}`,i=`There was a problem fetching predictions for match: ${e}`,s=yield this.fetchWithoutAuth(r,i);return this.matchSummaryRemapper.remapResponse(s)}));a(this,"deleteFootballPrediction",e=>_(this,null,function*(){let n=`/predictions/${e}${this.apiSignInUrl}`,r=`There was a problem deleting your prediction: ${e}`,i="DELETE";return yield this.fetchWithAuth(n,r,i),!0}));a(this,"getMyPredictions",e=>_(this,null,function*(){let n=new Ut,r=`/predictions${this.apiSignInUrl}`,i="There was a problem fetching own predictions";e&&(r+=`${e.constructFiltersUrl()}`);let s=yield this.fetchWithAuth(r,i);return n.meta=this.metaRemapper.remapMetaData(s.meta),n.data=yield this.predictionRemapper.remapResponseArrayBody(s.data),n}));a(this,"getMyPredictionsNoRemap",e=>_(this,null,function*(){let n=`/predictions${this.apiSignInUrl}${e.constructFiltersUrl()}`,r="There was a problem fetching own predictions";return yield this.fetchWithAuth(n,r)}));a(this,"getUserPredictions",(e,n,r)=>_(this,null,function*(){let i=new Ut,s=Xe(n)?`/predictions/users/${e}${this.apiSignInUrl}${Ye()}`:`/predictions/users/${e}${this.apiSignInUrl}`,o=`There was a problem fetching predictions for user: ${e}`;r&&(s+=`${r.constructFiltersUrl()}`);let l=yield this.fetchWithoutAuth(s,o);return i.meta=this.metaRemapper.remapMetaData(l.meta),i.data=yield this.predictionRemapper.remapResponseArrayBody(l.data),i}));a(this,"getUserPredictionsNoRemap",(e,n)=>_(this,null,function*(){let r=`/predictions/users/${e}${this.apiSignInUrl}${n.constructFiltersUrl()}`,i=`There was a problem fetching predictions for user: ${e}`;return yield this.fetchWithoutAuth(r,i)}));a(this,"getGames",(e,n)=>_(this,null,function*(){let r=Xe(n)?`/games/${this.apiSignInUrl}${e.constructFiltersUrl()}${Ye()}`:`/games/${this.apiSignInUrl}${e.constructFiltersUrl()}`,i="There was a problem fetching the games list",s=yield this.fetchWithoutAuth(r,i);return this.gamesRemapper.remapPaginatedGames(s)}));a(this,"getGameById",(e,n)=>_(this,null,function*(){let r=Xe(n)?`/games/${e}${this.apiSignInUrl}${Ye()}`:`/games/${e}${this.apiSignInUrl}`,i=`There was a problem fetching the following game: ${e}`,s=yield this.fetchWithoutAuth(r,i);return this.gamesRemapper.remapGameByIdResponse(s)}));a(this,"getGamePredictions",(e,n,r)=>_(this,null,function*(){let i=new Ut,s=Xe(n)?`/games/${e}/predictions${this.apiSignInUrl}${Ye()}`:`/games/${e}/predictions${this.apiSignInUrl}`,o=`There was a problem fetching the predictions for game: ${e}`;r&&(s+=`${r.constructFiltersUrl()}`);let l=yield this.fetchWithoutAuth(s,o);return i.meta=this.metaRemapper.remapMetaData(l.meta),i.data=yield this.predictionRemapper.remapResponseArrayBody(l.data),i}));a(this,"getUserGameEditions",(e,n)=>_(this,null,function*(){let r=null,i=Xe(n)?`/games/${this.apiSignInUrl}${e.constructFiltersUrl()}${Ye()}`:`/games/${this.apiSignInUrl}${e.constructFiltersUrl()}`,s="There was a problem fetching the games list",o=yield this.fetchWithoutAuth(i,s);return o.data.forEach(l=>{l.type==="TOP_X"?r=this.gamesRemapper.remapPaginatedUserTopXEditions(o):l.type==="MATCH_QUIZ"&&(r=this.gamesRemapper.remapPaginatedUserMathQuizEditions(o))}),r}));a(this,"getGameResults",(e,n,r)=>_(this,null,function*(){let i=Xe(n)?`/games/${e}/results/${this.apiSignInUrl}${Ye()}`:`/games/${e}/results/${this.apiSignInUrl}`,s=`There was a problem fetching the results for the following game: ${e}`;r&&(i+=`${r.constructMainFiltersUrl()}`);let o=yield this.fetchWithoutAuth(i,s);return this.gamesRemapper.remapPaginatedGameResults(o)}));a(this,"getMarketResultsForGame",(e,n)=>_(this,null,function*(){let r=`/games/${e}/correct-results/${this.apiSignInUrl}`,i=`There was a problem fetching the markets correct results for the following game: ${e}`;Xe(n)&&(r+=`${Ye()}`);let s=yield this.fetchWithoutAuth(r,i);return this.gamesRemapper.remapGameMarketsResults(s.data)}));a(this,"getContestWinners",(e,n)=>_(this,null,function*(){let r=`/winners/${this.apiSignInUrl}&contest_id=${e}`,i=`There was a problem fetching winners for the following game: ${e}`;n&&(r+=Ye());let s=yield this.fetchWithoutAuth(r,i);return this.gamesRemapper.remapContestWinners(s)}));a(this,"getPredictionById",e=>_(this,null,function*(){let n=`/predictions/${e}${this.apiSignInUrl}`,r=`There was a problem fetching info for the following prediction: ${e}`,i=yield this.fetchWithoutAuth(n,r);return(yield this.predictionRemapper.remapResponseArrayBody([i.data]))[0]}));a(this,"getPredictionsByIds",e=>_(this,null,function*(){let n=`/predictions/by-ids${this.apiSignInUrl}&prediction_ids=${e.join(",")}`,r="There was a problem fetching predictions",i=yield this.fetchWithoutAuth(n,r);return yield this.predictionRemapper.remapResponseArrayBody(i.data)}));this.predictionRemapper=new kp(e,n),this.matchSummaryRemapper=new vT(e,n),this.gamesRemapper=new CT,this.metaRemapper=new ST}},Dp=class{constructor(){a(this,"gameInstanceId",null);a(this,"fixtures",null)}},Fp=(t=>(t.ONE="1",t.X="x",t.TWO="2",t))(Fp||{}),Np=(t=>(t.ONE_X="1x",t.X_TWO="x2",t.ONE_TWO="12",t))(Np||{}),Lp=(t=>(t.ONE_ONE="1/1",t.ONE_X="1/x",t.ONE_TWO="1/2",t.X_ONE="x/1",t.X_X="x/x",t.X_TWO="x/2",t.TWO_ONE="2/1",t.TWO_X="2/x",t.TWO_TWO="2/2",t))(Lp||{}),PT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","BOTH_TEAMS_SCORE");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new sa,this.prediction.value=e}},MT=class{constructor(){a(this,"value")}},RT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","CORNERS_MATCH");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new MT,this.prediction.value=e}},kT=class{constructor(){a(this,"value",null)}},xT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","DOUBLE_CHANCE");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new kT,this.prediction.value=e}},DT=class{constructor(){a(this,"value",null)}},FT=class{constructor(t,e,n){a(this,"matchId",null);a(this,"market",null);a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.market=e,this.prediction=new DT,this.prediction.value=n}},NT=class{constructor(){a(this,"value",null)}},LT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","HT_FT");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new NT,this.prediction.value=e}},BT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","PENALTY_MATCH");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new sa,this.prediction.value=e}},UT=class{constructor(t,e){a(this,"matchId",null);a(this,"market","RED_CARD_MATCH");a(this,"matchType","FOOTBALL");a(this,"prediction",null);this.matchId=t,this.prediction=new sa,this.prediction.value=e}},Eu=class{constructor(t){a(this,"errorHandlingMode",null);a(this,"validateBodyFields",(t,e)=>{let n=Object.keys(e),r=Object.keys(new Dp);switch(t){case"MATCH_QUIZ":n.forEach(l=>{r.includes(l)||this.throwInvalidParamException([l])});break;case"TOP_X":let s=e;s.fixtures.forEach(l=>this.validateMarketTopX(l.market));let o="tiebreaker";n.includes(o)&&s.tiebreaker&&this.validateTiebreaker(s.tiebreaker),n.forEach(l=>{l!=="tiebreaker"&&!r.includes(l)&&this.throwInvalidParamException([l])});break}let i=r.filter(s=>!n.includes(s));return i.length&&this.throwMissingFieldsException("game prediction body",i),e.fixtures.forEach(s=>{this.validateFixtureFields(s)}),e});a(this,"validateFixture",(t,e,n,r)=>{this.validateMarket(e);let i=Object.values(Fp),s=Object.values(Lp),o=Object.values(Np);if(e==="FT_1X2"||e==="HT_1X2"){if(i.includes(n))return new FT(t,e,n)}else if(e==="HT_FT"){if(s.includes(n))return new LT(t,n)}else if(e==="DOUBLE_CHANCE"){if(o.includes(n))return new xT(t,n)}else if(e==="CORRECT_SCORE"||e==="CORRECT_SCORE_ADVANCED"||e==="CORRECT_SCORE_HT"){if(typeof n=="string"&&/\d+:\d+/.test(n))return new bu(t,e,n)}else if(e==="CORNERS_MATCH"){if(typeof n=="number")return new RT(t,n)}else if(e==="BOTH_TEAMS_SCORE"){if(this.isPredictionBoolean(n))return new PT(t,n)}else if(e==="RED_CARD_MATCH"){if(this.isPredictionBoolean(n))return new UT(t,n)}else if(e==="PENALTY_MATCH"){if(this.isPredictionBoolean(n))return new BT(t,n)}else if(sr.includes(e)){let l="OWN_GOAL";if(this.validatePlayerId(e,r),e===xs&&this.isPredictionBoolean(n)){let u=r&&r===l?l:r;return new ti(t,e,n,u)}if(r&&this.isPredictionBoolean(n))return new ti(t,e,n,r)}else if(jO.includes(e)){if(this.isPredictionBoolean(n))return new Op(t,e,n)}else if(HO.includes(e)&&this.isPredictionBoolean(n))return new Ap(t,e,n);this.throwInvalidPredictionException(n,e)});a(this,"validateFixtureFields",t=>{let e=Object.keys(t);e.forEach(r=>{Wh.includes(r)||this.throwInvalidParamException([r])});let n=Wh.filter(r=>{if(r!=="matchType"&&!e.includes(r))return r});n.length&&this.throwMissingFieldsException("fixtures",n),this.validatePredictionKey(t.market,t.prediction)});a(this,"validateTiebreaker",t=>{let e=Object.keys(t);(!e.length||typeof t!="object")&&this.throwInvalidType("tiebreaker","object");let n=Object.keys(new Fs)[0];e.forEach(r=>{n!==r&&this.throwInvalidParamException([r])}),e.includes(n)||this.throwMissingFieldsException("tiebreaker",[n]),typeof t.goldenGoal!="number"&&this.throwInvalidType("goldenGoal","number")});a(this,"validatePredictionKey",(t,e)=>{if(typeof e=="object"){let n=Object.keys(e),r=["value"];if(n.length||this.throwMissingFieldsException("prediction",r),n.length===1&&!n.includes(r[0])&&this.throwInvalidParamException(n),n.length>1){sr.includes(t)&&r.push("playerId");let i=n.filter(s=>!r.includes(s));i.length&&this.throwInvalidParamException(i)}}else this.throwInvalidType("prediction","object")});a(this,"validatePlayerId",(t,e)=>{let n="playerId";t!==xs&&(e||this.throwInvalidParamException([n]),typeof e!="string"&&this.throwInvalidType(n,"string"))});a(this,"validateMarket",t=>{Object.values(ks).includes(t)||this.throwInvalidMarketException(t)});a(this,"validateMarketTopX",t=>{t!=="CORRECT_SCORE"&&t!=="CORRECT_SCORE_ADVANCED"&&this.throwInvalidMarketException(t,"TOP_X")});a(this,"isPredictionBoolean",t=>typeof t=="boolean");a(this,"throwInvalidPredictionException",(t,e)=>{let n=kA(t,e);throw this.errorHandlingMode==="default"?new tt(400,"INVALID_PREDICTION",n):new He(400,"INVALID_TYPE",n)});a(this,"throwInvalidMarketException",(t,e)=>{let n=null;throw e&&e==="TOP_X"?n=xA(t):n=zh(t),this.errorHandlingMode==="default"?new tt(400,"INVALID_MARKET",n):new He(400,"INVALID_TYPE",n)});a(this,"throwInvalidParamException",t=>{let e=DA(t);throw this.errorHandlingMode==="default"?new tt(400,"INVALID_FIELD",e):new He(400,"INVALID_TYPE",e)});a(this,"throwMissingFieldsException",(t,e)=>{let n=FA(t,e);throw this.errorHandlingMode==="default"?new tt(400,"INVALID_FIELD",n):new He(400,"INVALID_TYPE",n)});a(this,"throwInvalidType",(t,e)=>{let n=NA(t,e);throw this.errorHandlingMode==="default"?new tt(400,"INVALID_TYPE",n):new He(400,"INVALID_TYPE",n)});this.errorHandlingMode=t}},$T=class{constructor(t,e,n,r){a(this,"predictorHttps",null);a(this,"clientHttps",null);a(this,"idMapping",null);a(this,"predictorService",null);a(this,"predictorValidator",null);a(this,"errorHandlingMode",null);a(this,"makeFootballPrediction",(t,e,n,r)=>_(this,null,function*(){let i=this.predictorValidator.validateFixture(t,e,n,r),s=new Dp;if(this.idMapping.idSchema!=="native"){let o=i.matchId,l="",u=yield this.predictorService.remapMatchIdToNative([o]);if(i.matchId=u[0],this.errorHandlingMode==="default"&&!i.matchId)throw new tt(400,"INVALID_FIELD","Match id is invalid!").errorMessage();if(this.errorHandlingMode==="standard"&&!i.matchId)throw new He(400,"INVALID_FIELD","Match id is invalid!");if(i instanceof ti&&i.prediction.playerId!=="OWN_GOAL"){if(i.prediction.playerId&&(l=i.prediction.playerId,i.prediction.playerId=yield this.predictorService.remapPlayerIdToNative([l])),this.errorHandlingMode==="default"&&i.market!==xs&&!i.prediction.playerId)throw new tt(400,"INVALID_FIELD","Player id is invalid!").errorMessage();if(this.errorHandlingMode==="standard"&&i.market!==xs&&!i.prediction.playerId)throw new He(400,"INVALID_FIELD","Player id is invalid!")}s.fixtures=[i];let c=yield this.predictorHttps.makeFootballPrediction(s);return c.fixtures.forEach(d=>{d.prediction.playerId&&d.prediction.playerId!=="OWN_GOAL"&&(d.prediction.playerId=l),d.matchId=o}),c}else return s.fixtures=[i],yield this.predictorHttps.makeFootballPrediction(s)}));a(this,"getMatchSummary",(t,e)=>_(this,null,function*(){let n=yield this.getMatchSummaryBase(t,e),r=JSON.parse(JSON.stringify(n.predictions)),i=yield this.predictorService.remapPlayerIdToIdSchema(r);return n.predictions=i,n}));a(this,"getMarketSummary",(t,e,n,r)=>_(this,null,function*(){try{let i=yield this.getMatchSummaryBase(t,r);return yield this.predictorService.getMarketSummary(i,e,n)}catch(i){throw i}}));a(this,"getMatchSummaryBase",(t,e)=>_(this,null,function*(){if(this.idMapping.idSchema!=="native"){let n=(yield this.predictorService.remapMatchIdToNative([t]))[0],r=yield this.predictorHttps.getMatchSummary(n,e);return r.matchId=t,r}else return yield this.predictorHttps.getMatchSummary(t,e)}));a(this,"getConfig",()=>_(this,null,function*(){let t=yield this.clientHttps.getConfig("predictor");return this.idMapping.idSchema!=="native"?yield this.predictorService.remapCompetitionsFromConfig(t):t}));a(this,"deleteFootballPrediction",t=>_(this,null,function*(){return yield this.predictorHttps.deleteFootballPrediction(t)}));a(this,"getMyPredictions",t=>_(this,null,function*(){let e=this.predictorService.initPredictionsFilters(t,"user");return yield this.predictorHttps.getMyPredictions(e)}));a(this,"getMyPredictionsForMatches",(t,e)=>_(this,null,function*(){if(this.errorHandlingMode==="default"&&this.predictorService.areIdsExceeded(t))throw new tt(400,"EXCEEDED_LENGTH","Maximum matchIds in PredictionFilters should be 10 or less.").errorMessage();if(this.errorHandlingMode==="standard"&&this.predictorService.areIdsExceeded(t))throw new He(400,"EXCEEDED_LENGTH","Maximum matchIds in PredictionFilters should be 10 or less.");this.idMapping.idSchema!=="native"&&(t=yield this.predictorService.remapMatchIdToNative([...t]));let n=this.predictorService.initPredictionsFilters(e,"matches",t);return yield this.predictorHttps.getMyPredictions(n)}));a(this,"getMyCurrentPredictions",t=>_(this,null,function*(){let e=this.predictorService.initPredictionsFilters(t,"current");return yield this.predictorHttps.getMyPredictions(e)}));a(this,"getMyPastPredictions",t=>_(this,null,function*(){let e=this.predictorService.initPredictionsFilters(t,"past");return yield this.predictorHttps.getMyPredictions(e)}));a(this,"getUserPredictions",(t,e,n)=>_(this,null,function*(){let r=this.predictorService.initPredictionsFilters(e,"user");return yield this.predictorHttps.getUserPredictions(t,n,r)}));a(this,"getUserCurrentPredictions",(t,e,n)=>_(this,null,function*(){let r=this.predictorService.initPredictionsFilters(e,"current");return yield this.predictorHttps.getUserPredictions(t,n,r)}));a(this,"getUserPastPredictions",(t,e,n)=>_(this,null,function*(){let r=this.predictorService.initPredictionsFilters(e,"past");return yield this.predictorHttps.getUserPredictions(t,n,r)}));a(this,"getUserPredictionsForMatches",(t,e,n,r)=>_(this,null,function*(){if(this.errorHandlingMode==="default"&&this.predictorService.areIdsExceeded(e))throw new tt(400,"EXCEEDED_LENGTH","Maximum matchIds in PredictionFilters should be 10 or less.").errorMessage();if(this.errorHandlingMode==="standard"&&this.predictorService.areIdsExceeded(e))throw new He(400,"EXCEEDED_LENGTH","Maximum matchIds in PredictionFilters should be 10 or less.");this.idMapping.idSchema!=="native"&&(e=yield this.predictorService.remapMatchIdToNative([...e]));let i=this.predictorService.initPredictionsFilters(n,"matches",e);return yield this.predictorHttps.getUserPredictions(t,r,i)}));a(this,"getPredictionById",t=>_(this,null,function*(){return yield this.predictorHttps.getPredictionById(t)}));a(this,"getPredictionsByIds",t=>_(this,null,function*(){return yield this.predictorHttps.getPredictionsByIds(t)}));this.predictorHttps=e,this.idMapping=r,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new Eu(t.errorHandlingMode),this.predictorService=new $s(t,r)}},Bp=class{constructor(t){a(this,"predictorHttps",null);a(this,"clientHttps",null);a(this,"predictorFacade",null);a(this,"idMapping",null);a(this,"makeFootballPrediction",(t,e,n,r)=>_(this,null,function*(){return yield this.predictorFacade.makeFootballPrediction(t,e,n,r)}));a(this,"getMatchSummary",(t,e)=>_(this,null,function*(){return yield this.predictorFacade.getMatchSummary(t,e)}));a(this,"getMarketSummary",(t,e,n,r)=>_(this,null,function*(){return yield this.predictorFacade.getMarketSummary(t,e,n,r)}));a(this,"getConfig",()=>_(this,null,function*(){return yield this.predictorFacade.getConfig()}));a(this,"deleteFootballPrediction",t=>_(this,null,function*(){return yield this.predictorFacade.deleteFootballPrediction(t)}));a(this,"getMyPredictions",t=>_(this,null,function*(){return yield this.predictorFacade.getMyPredictions(t)}));a(this,"getMyCurrentPredictions",t=>_(this,null,function*(){return yield this.predictorFacade.getMyCurrentPredictions(t)}));a(this,"getMyPastPredictions",t=>_(this,null,function*(){return yield this.predictorFacade.getMyPastPredictions(t)}));a(this,"getMyPredictionsForMatches",(t,e)=>_(this,null,function*(){return yield this.predictorFacade.getMyPredictionsForMatches(t,e)}));a(this,"getUserPredictions",(t,e,n)=>_(this,null,function*(){return yield this.predictorFacade.getUserPredictions(t,e,n)}));a(this,"getUserCurrentPredictions",(t,e,n)=>_(this,null,function*(){return yield this.predictorFacade.getUserCurrentPredictions(t,e,n)}));a(this,"getUserPastPredictions",(t,e,n)=>_(this,null,function*(){return yield this.predictorFacade.getUserPastPredictions(t,e,n)}));a(this,"getUserPredictionsForMatches",(t,e,n,r)=>_(this,null,function*(){return yield this.predictorFacade.getUserPredictionsForMatches(t,e,n,r)}));a(this,"getPredictionById",t=>_(this,null,function*(){return yield this.predictorFacade.getPredictionById(t)}));a(this,"getPredictionsByIds",t=>_(this,null,function*(){return yield this.predictorFacade.getPredictionsByIds(t)}));this.idMapping=new wn(t),this.predictorHttps=new js(t,this.idMapping),this.clientHttps=new Xr(t),this.predictorFacade=new $T(t,this.predictorHttps,this.clientHttps,this.idMapping)}},jT=class{constructor(){a(this,"templateId",null);a(this,"privateLeagueId",null);a(this,"fromDate",null);a(this,"toDate",null);a(this,"pagination",new Ss)}},HT=class{constructor(){a(this,"rankType",null);a(this,"fromDate",null);a(this,"toDate",null);a(this,"pagination",new Ss)}},Up=class{constructor(){a(this,"position",null);a(this,"profileId",null);a(this,"profileModel",null);a(this,"points",null);a(this,"predictionsMade",null)}},VT=class{constructor(){a(this,"remapResponse",t=>(t.meta=this.remapMeta(t.meta),t.data=this.remapData(t.data),t));a(this,"remapLeagueLeaderboardResponse",t=>(t.meta=this.remapLeagueLeaderboardMeta(t.meta),t.data=this.remapData(t.data),t));a(this,"remapMeta",t=>{let e=new HT;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e});a(this,"remapLeagueLeaderboardMeta",t=>{let e=new jT;return e.templateId=t.template_id,e.privateLeagueId=t.private_league_id,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e});a(this,"remapData",t=>{let e=[];return t.forEach(n=>{let r=new Up;r.position=n.position,r.profileId=n.profile_id,r.points=n.points,r.predictionsMade=n.predictions_made,e.push(r)}),e})}},qT=class{constructor(){a(this,"templateId","");a(this,"templateModel",null);a(this,"challengeId","");a(this,"challengeModel",null);a(this,"position","");a(this,"points",0);a(this,"type","challenge")}},WT=class{constructor(){a(this,"templateId","");a(this,"templateModel",null);a(this,"privateLeagueId","");a(this,"privateLeagueModel",null);a(this,"position","");a(this,"points",0);a(this,"type","private_league")}},GT=class extends Up{constructor(){super(...arguments);a(this,"id",null);a(this,"rankType",null);a(this,"model",null);a(this,"gameType",null)}},zT=class{constructor(){a(this,"remapRankings",t=>(t.meta=this.remapMeta(t.meta),t.data=this.remapData(t.data),t));a(this,"remapRankingsPrivateLeague",t=>(t.meta=this.remapMeta(t.meta),t.data=this.remapDataUserRankingPrivateLeague(t.data),t));a(this,"remapRankingsChallenge",t=>(t.meta=this.remapMeta(t.meta),t.data=this.remapDataUserRankingChallenge(t.data),t));a(this,"remapMeta",t=>{let e=new Zr;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e})}remapData(t){let e=[];return t.forEach(n=>{let r=new GT;r.id=n.id,r.rankType=n.rank_type,r.position=n.position,r.points=n.points,r.gameType=n.game_type,delete r.profileId,delete r.profileModel,delete r.predictionsMade,e.push(r)}),e}remapDataUserRankingPrivateLeague(t){let e=[];return t.forEach(n=>{let r=new WT;r.templateId=n.template_id,r.privateLeagueId=n.private_league_id,r.position=n.position,r.points=n.points,e.push(r)}),e}remapDataUserRankingChallenge(t){let e=[];return t.forEach(n=>{let r=new qT;r.templateId=n.template_id,r.challengeId=n.private_league_id,r.position=n.position,r.points=n.points,e.push(r)}),e}},QT=class{constructor(){a(this,"flags","");a(this,"status","");a(this,"type","");a(this,"activeFrom","");a(this,"activeTo","");a(this,"createdFrom","");a(this,"createdTo","");a(this,"updatedFrom","");a(this,"updatedTo","")}},YT=class{constructor(){a(this,"pagination",new Ss);a(this,"filters",new QT)}},$p=class{constructor(){a(this,"id",null);a(this,"name",null);a(this,"description",null);a(this,"type",null);a(this,"fromDate",null);a(this,"toDate",null);a(this,"markets",[]);a(this,"teamIds",[]);a(this,"matchIds",[]);a(this,"groups",[]);a(this,"gameIds",[]);a(this,"gameTypes",[]);a(this,"competitionIds",[]);a(this,"excludedProfileIds",[]);a(this,"rules",null);a(this,"labels",null);a(this,"customFields",null);a(this,"flags",null);a(this,"images",new Bs);a(this,"status",null);a(this,"automaticallyChangeStatus",!0);a(this,"createdAt",null);a(this,"updatedAt",null);a(this,"related",null)}},KT=class extends $p{constructor(){super(...arguments);a(this,"adContent",null)}},JT=class{constructor(){a(this,"fromDate",null);a(this,"toDate",null);a(this,"matchIds",[])}},XT=class{constructor(){a(this,"groupId",null);a(this,"label",null);a(this,"filters",null)}},ZT=class{constructor(){a(this,"remapResponse",t=>{let e=[];return t.forEach(n=>{let r=new $p;r.id=n.id,r.name=n.name,r.description=n.description,r.type=n.type,r.fromDate=n.from_date,r.toDate=n.to_date,r.markets=n.markets?n.markets:null,r.teamIds=n.team_ids?n.team_ids:null,r.matchIds=n.match_ids?n.match_ids:null,r.groups=n.groups?this.remapGroups(n.groups):null,r.gameIds=n.game_ids?n.game_ids:null,r.gameTypes=n.game_types?n.game_types:null,r.competitionIds=n.competition_ids?n.competition_ids:null,r.excludedProfileIds=n.excluded_profile_ids?n.excluded_profile_ids:null,r.rules=n.rules?n.rules:null,r.labels=n.labels?n.labels:null,r.customFields=n.custom_fields?n.custom_fields:null,r.flags=n.flags?n.flags:null,r.images=n.images?n.images:null,r.status=n.status?n.status:null,r.automaticallyChangeStatus=n.automatically_change_status,r.createdAt=n.created_at,r.updatedAt=n.updated_at,r.related=n.related?this.remapRelated(n.related):null,e.push(r)}),e});a(this,"remapResponseId",t=>{let e=new KT;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.fromDate=t.from_date,e.toDate=t.to_date,e.markets=t.markets?t.markets:null,e.teamIds=t.team_ids?t.team_ids:null,e.matchIds=t.match_ids?t.match_ids:null,e.groups=t.groups?this.remapGroups(t.groups):null,e.gameIds=t.game_ids?t.game_ids:null,e.gameTypes=t.game_types?t.game_types:null,e.competitionIds=t.competition_ids?t.competition_ids:null,e.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,e.rules=t.rules?t.rules:null,e.flags=t.flags?t.flags:null,e.images=t.images?t.images:null,e.status=t.status?t.status:null,e.automaticallyChangeStatus=t.automatically_change_status,e.related=t.related?this.remapRelated(t.related):null,e.labels=t.labels,e.customFields=t.custom_fields,e.adContent=t.ad_content,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapMeta",t=>{let e=new YT;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e.filters.flags=t.filters.flags,e.filters.status=t.filters.status,e.filters.type=t.filters.type,e.filters.activeFrom=t.filters.active_from,e.filters.activeTo=t.filters.active_to,e.filters.createdFrom=t.filters.created_from,e.filters.createdTo=t.filters.created_to,e.filters.updatedFrom=t.filters.updated_from,e.filters.updatedTo=t.filters.updated_to,e});a(this,"remapRelated",t=>t.map(e=>{let n=new xp;return n.entityId=e.entity_id,n.entityType=e.entity_type,n}));a(this,"remapGroups",t=>t.map(e=>{let n=new XT;return n.groupId=e.group_id,n.label=e.label,n.filters=this.remapGroupFilters(e.filters),n}));a(this,"remapGroupFilters",t=>{let e=new JT;return e.fromDate=t.from_date,e.toDate=t.to_date,e.matchIds=t.match_ids,e})}},eC=class{constructor(){a(this,"position",null);a(this,"points",null);a(this,"predictionsMade",null);a(this,"profileId",null);a(this,"profileModel",null);a(this,"successRatePercent",null)}},tC=class{constructor(){a(this,"remapHighestSuccessRate",t=>t.map(e=>{let n=new eC;return n.position=e.position,n.points=e.points,n.predictionsMade=e.predictions_made,n.profileId=e.profile_id,n.successRatePercent=e.success_rate_percent,n}))}},Iu=class extends yn{constructor(e){super(e,rn(e.environment,"loyalty"));a(this,"templateRemapper",null);a(this,"leaderboardRemapper",null);a(this,"rankingsRemapper",null);a(this,"highestSuccessRateRemapper",null);a(this,"getTemplates",(e,n)=>_(this,null,function*(){let r=e?`/leaderboard/templates/${this.apiSignInUrl}${e.constructFiltersUrl()}`:`/leaderboard/templates/${this.apiSignInUrl}`;r+=Xe(n)?Ye():"";let i="There was a problem fetching the list of templates",s=yield this.fetchWithoutAuth(r,i),o=JSON.parse(JSON.stringify(s));return o.meta=this.templateRemapper.remapMeta(s.meta),o.data=this.templateRemapper.remapResponse(s.data),o}));a(this,"getTemplateById",(e,n)=>_(this,null,function*(){let r=Xe(n)?`/leaderboard/templates/${e}${this.apiSignInUrl}${Ye()}`:`/leaderboard/templates/${e}${this.apiSignInUrl}`,i=`There was a problem requesting the following template: ${e}`,s=yield this.fetchWithoutAuth(r,i);return this.templateRemapper.remapResponseId(s.data)}));a(this,"getLeaderboard",(e,n,r)=>_(this,null,function*(){let i=Xe(n)?`/leaderboard/${e}/${this.apiSignInUrl}${Ye()}`:`/leaderboard/${e}/${this.apiSignInUrl}`,s=`There was a problem fetching the leaderboard for the following template: ${e}`;r&&(i+=`${r.constructFiltersUrl()}`);let o=yield this.fetchWithoutAuth(i,s),l=JSON.parse(JSON.stringify(o));return this.leaderboardRemapper.remapResponse(l)}));a(this,"getLeaderboardForGame",(e,n,r)=>_(this,null,function*(){let i=Xe(n)?`/leaderboard/games/${e}/${this.apiSignInUrl}${Ye()}`:`/leaderboard/games/${e}/${this.apiSignInUrl}`,s=`There was a problem fetching the leaderboard for the following game: ${e}`;r&&(i+=`${r.constructFiltersUrl()}`);let o=yield this.fetchWithoutAuth(i,s),l=JSON.parse(JSON.stringify(o));return this.leaderboardRemapper.remapResponse(l)}));a(this,"getLeaderboardForLeague",(e,n)=>_(this,null,function*(){let r=`/private-league/${e}/${this.apiSignInUrl}`,i=`There was a problem fetching the leaderboard for the following league: ${e}`;n&&(r+=`${n.constructFiltersUrl()}`);let s=yield this.fetchWithoutAuth(r,i);return this.leaderboardRemapper.remapLeagueLeaderboardResponse(s)}));a(this,"getUserRankings",(e,n,r)=>_(this,null,function*(){let i=`/leaderboard/users/${e}/rankings/${this.apiSignInUrl}`,s=`There was a problem fetching the rankings for the following user: ${e}`;n&&(i+=`${n.constructFiltersUrl()}`),Xe(r)&&(i+=`${Ye()}`);let o=yield this.fetchWithoutAuth(i,s);return this.rankingsRemapper.remapRankings(o)}));a(this,"getHighestSuccessRate",(e,n)=>_(this,null,function*(){let r=`/statistics/top${this.apiSignInUrl}`,i="There was a problem fetching highest success rate";e&&(r+=`${e.constructFiltersUrl()}`),Xe(n)&&(r+=`${Ye()}`);let s=yield this.fetchWithoutAuth(r,i);return this.highestSuccessRateRemapper.remapHighestSuccessRate(s.data)}));a(this,"getEntitiesFollows",(e,n)=>_(this,null,function*(){let r=Xe(n)?`/statistics/follows${this.apiSignInUrl}${Ye()}`:`/statistics/follows${this.apiSignInUrl}`,i="There was a problem fetching follows for entities";return e.footballCompetitions&&(r+=`&competitions=${e.footballCompetitions.join(",")}`),e.footballTeams&&(r+=`&teams=${e.footballTeams.join(",")}`),e.footballPlayers&&(r+=`&players=${e.footballPlayers.join(",")}`),(yield this.fetchWithoutAuth(r,i)).data}));a(this,"getUserRankingsForPrivateLeagueAndChallenges",(e,n,r)=>_(this,null,function*(){let i=`/private-league/users/${e}/rankings/${this.apiSignInUrl}&private_league_type=${n==="PRIVATE_LEAGUE"?"private":"one_vs_one"}`,s=`There was a problem fetching user rankings for ${n}`;r&&(i+=`${r.constructFiltersUrl()}`);let o=yield this.fetchWithoutAuth(i,s);return n==="PRIVATE_LEAGUE"?this.rankingsRemapper.remapRankingsPrivateLeague(o):this.rankingsRemapper.remapRankingsChallenge(o)}));this.templateRemapper=new ZT,this.leaderboardRemapper=new VT,this.rankingsRemapper=new zT,this.highestSuccessRateRemapper=new tC}},nC=class{constructor(){a(this,"general");a(this,"predictor");a(this,"topX");a(this,"matchQuiz")}},Au=class{constructor(t){a(this,"limit",null);a(this,"page",null);this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}constructFiltersUrl(){let t="";return this.limit&&(t+="&",t+=`limit=${this.limit}`),this.page&&(t+="&",t+=`page=${this.page}`),t}},rC=class extends Au{constructor(e){super(e);a(this,"templateId",null);this.templateId=(e==null?void 0:e.templateId)||null}constructFiltersUrl(){let e=super.constructFiltersUrl();return this.templateId&&(e+=`&template_id=${this.templateId}`),e}},iC=class extends Au{constructor(e){super(e);a(this,"sortOrder",null);a(this,"rankType",null);a(this,"leaderboardIds",null);a(this,"gameType",null);a(this,"constructFiltersUrl",()=>{let e=super.constructFiltersUrl();return this.sortOrder&&(e+="&",e+=`sort_order=${this.sortOrder}`),this.rankType&&(e+="&",e+=`rank_type=${this.rankType}`),this.leaderboardIds&&(e+="&",e+=`type_ids=${this.leaderboardIds.join(",")}`),this.gameType&&(e+="&",e+=`game_type=${this.gameType}`),e});this.sortOrder=e.sortOrder,this.rankType=e.rankType,this.leaderboardIds=e.leaderboardIds,this.gameType=e.type&&e.type.toLowerCase()==="game"?e.gameType:null}},aC=class{constructor(t){a(this,"idMappingService",null);a(this,"profileNamespace",null);a(this,"footballNamespace",null);a(this,"errorHandlingMode",null);a(this,"remapTemplatesIds",t=>_(this,null,function*(){if(t.length>0){let e=[],n=[],r=[];t.forEach(o=>{o.teamIds&&o.teamIds.length>0&&(e=[...e,...o.teamIds]),o.matchIds&&o.matchIds.length>0&&(n=[...n,...o.matchIds]),o.competitionIds&&o.competitionIds.length>0&&(r=[...r,...o.competitionIds])});let i={team:e,match:n,competition:r},s=yield this.idMappingService.idMappingFacade.getEntitiesByIds(i,"native",this.idMappingService.idSchema);return[...s.team],[...s.match],[...s.competition],t.forEach(o=>{o.teamIds&&o.teamIds.length>0&&(o.teamIds=o.teamIds.map(l=>s.team.shift())),o.matchIds&&o.matchIds.length>0&&(o.matchIds=o.matchIds.map(l=>s.match.shift())),o.competitionIds&&o.competitionIds.length>0&&(o.competitionIds=o.competitionIds.map(l=>s.competition.shift()))}),t}return t}));a(this,"remapTemplateGroupMatchIds",t=>_(this,null,function*(){if(t&&t.length>0){for(let e of t)if(e.filters.matchIds&&e.filters.matchIds){let n={match:Array.from(e.filters.matchIds)},r=yield this.idMappingService.idMappingFacade.getEntitiesByIds(n,"native",this.idMappingService.idSchema);e.filters.matchIds=Array.from(r.match)}}}));a(this,"addProfileModelToLeaderboard",t=>_(this,null,function*(){if(t.length>0){let e=[],n=t.map(i=>i.profileId);if(!n.length)return t;let r=yield this.profileNamespace.getByIds(n);return t.forEach(i=>{r.forEach(s=>{s.id===i.profileId&&(delete s.interests,i.profileModel=s)}),i.profileModel||(i.profileModel=null),e.push(i)}),e}return t}));a(this,"buildClientBadges",t=>{let e=new nC;return e.general=this.extractEnabledBadgesId(t.general),e.predictor=this.extractEnabledBadgesId(t.predictor),e.topX=this.extractEnabledBadgesId(t.topX),e.matchQuiz=this.extractEnabledBadgesId(t.matchQuiz),e});a(this,"initFilters",(t,e)=>{switch(e){case"loyalty":t&&(t=new Au(t));break;case"rankings":t&&(t=new iC(t));break;case"league_leaderboard":t&&(t=new rC(t))}return t});a(this,"addProfileModelToHighestSuccessRate",t=>_(this,null,function*(){let e=t.map(r=>r.profileId);if(!e.length)return t;let n=yield this.profileNamespace.getByIds(e);return t.map(r=>(n.forEach(i=>{i.id===r.profileId&&(delete i.interests,r.profileModel=i)}),r))}));a(this,"extractRankingsIdsMap",t=>{let e=[],n=[],r=[];return t.forEach(i=>{i.rankType==="GAME"&&i.gameType==="TOP_X"?e.push(i.id):i.rankType==="GAME"&&i.gameType==="MATCH_QUIZ"?n.push(i.id):i.rankType==="TEMPLATE"&&r.push(i.id)}),[e,n,r]});a(this,"setModelsForUserRankings",(t,e,n,r)=>(r.data.forEach(i=>{i.gameType==="MATCH_QUIZ"&&e?i.model=e.filter(s=>s.id===i.id)[0]:i.gameType==="TOP_X"&&t?i.model=t.filter(s=>s.id===i.id)[0]:i.rankType==="TEMPLATE"&&n&&(i.model=n.filter(s=>s.id===i.id)[0])}),r));a(this,"completeContestWinners",t=>_(this,null,function*(){if(t.userList&&t.userList.length){let e=t.userList.map(r=>r.profileId),n=yield this.profileNamespace.getByIds(e);t.userList.forEach(r=>{let i=n.filter(s=>s.id===r.profileId)[0];delete i.interests,r.profileModel=i})}return t}));a(this,"validateEntitiesFollowsFilters",t=>{if(!t||(!t.footballCompetitions||!t.footballCompetitions.length)&&(!t.footballTeams||!t.footballTeams.length)&&(!t.footballPlayers||!t.footballPlayers.length))throw this.errorHandlingMode==="default"?new tt(400,"invalid_filters","At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters."):new He(400,"invalid_filters","At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.");if(t.footballCompetitions&&t.footballCompetitions.length>24||t.footballTeams&&t.footballTeams.length>24||t.footballPlayers&&t.footballPlayers.length>24)throw this.errorHandlingMode==="default"?new tt(400,"EXCEEDED_LENGTH","Maximum length per entity should be 24 or less."):new He(400,"EXCEEDED_LENGTH","Maximum length per entity should be 24 or less.")});a(this,"remapEntitiesFollowsFilters",t=>_(this,null,function*(){let e=JSON.parse(JSON.stringify(t)),n={},r={};e.footballCompetitions&&e.footballCompetitions.length&&(r.competition=e.footballCompetitions),e.footballTeams&&e.footballTeams.length&&(r.team=e.footballTeams),e.footballPlayers&&e.footballPlayers.length&&(r.player=e.footballPlayers);let i=yield this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,"native");return Object.keys(i).forEach(s=>{s==="competition"?n.footballCompetitions=i[s]:s==="team"?n.footballTeams=i[s]:s==="player"&&(n.footballPlayers=i[s])}),n}));a(this,"addModelsToEntitiesFollows",t=>_(this,null,function*(){let e=[],n="fb:c:",r=new Map,i=[],s="fb:t:",o=new Map,l=[],u="fb:p:",c=null;return t.breakdown.forEach(d=>{d.id.includes(n)?e.push(d.id):d.id.includes(s)?i.push(d.id):d.id.includes(u)&&l.push(d.id)}),e.length&&(r=yield this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(e)),i.length&&(o=yield this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(i)),l.length&&(c=yield this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(l)),t.breakdown.forEach(d=>{d.id.includes(n)?(d.model=r.get(d.id),d.id=d.model.id):d.id.includes(s)?(d.model=o.get(d.id),d.id=d.model.id):d.id.includes(u)&&(d.model=c[d.id],d.id=d.model.id)}),t}));a(this,"initMatchFiltersForTemplates",(t,e)=>{let n=[],r=[],i=[],s=this.reformatDate(t.fromDate),o=this.reformatDate(t.toDate),l=500;if(t.competitionIds&&t.competitionIds.length>0&&(n=Array.from(t.competitionIds)),t.teamIds&&t.teamIds.length>0&&(r=Array.from(t.teamIds)),t.matchIds&&t.matchIds.length>0&&(i=Array.from(t.matchIds)),e){let u=t.groups.find(c=>c.groupId===e);if(!u)throw this.errorHandlingMode==="default"?new tt(400,"invalid_template_group_id","There is no group in this template with the provided groupId"):new He(400,"invalid_template_group_id","There is no group in this template with the provided groupId");if(!u.filters)throw this.errorHandlingMode==="default"?new tt(400,"invalid_template_group_filters","The provided template group has no filters"):new He(400,"invalid_template_group_filters","The provided template group has no filters");s=this.reformatDate(u.filters.fromDate),o=this.reformatDate(u.filters.toDate),u.filters.matchIds.every(c=>c)&&(i=Array.from(u.filters.matchIds))}return new Ms({competitionIds:n,teamIds:r,matchIds:i,fromDate:s,toDate:o,limit:l})});a(this,"reformatDate",t=>{let e=new Date(t).toISOString();return e=e.slice(0,-5)+"Z",e});a(this,"extractEnabledBadgesId",t=>{let e=[];return t.forEach(n=>{n.enabled&&e.push(n.id)}),e});this.idMappingService=new wn(t),this.profileNamespace=new or(t),this.footballNamespace=new Ds(t),this.errorHandlingMode=t.errorHandlingMode}},sC=class{constructor(){a(this,"validate",(t,e)=>{t.market&&this.validateMarket(t.market,e),t.fromDate&&this.validateDate(t.fromDate,"fromDate",e),t.toDate&&this.validateDate(t.toDate,"toDate",e),t.usersCount&&this.validateNumberFilters(t.usersCount,"usersCount",e),t.minimumPredictions&&this.validateNumberFilters(t.minimumPredictions,"minimumPredictions",e)});a(this,"validateMarket",(t,e)=>{if(!Object.keys(ks).includes(t)){let n=zh(t);throw e==="default"?new tt(400,"INVALID_MARKET",n):new He(400,"INVALID_MARKET",n)}});a(this,"validateDate",(t,e,n)=>{let r=/^\d{4}-\d{2}-\d{2}$/;if(typeof t!="string")throw n==="default"?new tt(400,"invalid_filters",`You have provided invalid type. The valid type is string for ${e} filter`):new He(400,"invalid_filters",`You have provided invalid type. The valid type is string for ${e} filter`);if(!r.test(t))throw n==="default"?new tt(400,"invalid_filters",`You have provided invalid value. The valid value is YYYY-MM-DD for ${e}`):new He(400,"invalid_filters",`You have provided invalid value. The valid value is YYYY-MM-DD for ${e}`)});a(this,"validateNumberFilters",(t,e,n)=>{let r=e==="usersCount"?1:0,i=e==="usersCount"?1e3:1e6;if(typeof t!="number")throw n==="default"?new tt(400,"invalid_filters",`You have provided invalid type. The valid type is number for ${e} filter`):new He(400,"invalid_filters",`You have provided invalid type. The valid type is number for ${e} filter`);if(t<r||t>i)throw n==="default"?new tt(400,"invalid_filters",`You have provided invalid value. The valid value is between ${r} and ${i}`):new He(400,"invalid_filters",`You have provided invalid value. The valid value is between ${r} and ${i}`)})}},jp=class{constructor(t,e){a(this,"idMapping",null);a(this,"predictorHttps",null);a(this,"predictorService",null);a(this,"predictorValidator",null);a(this,"clientHttps",null);a(this,"errorHandlingMode",null);a(this,"getConfig",()=>_(this,null,function*(){let t=yield this.clientHttps.getConfig("topX");return this.idMapping.idSchema!=="native"?yield this.predictorService.remapCompetitionsFromConfig(t):t}));a(this,"getGames",(t,e)=>_(this,null,function*(){e=e||!1;let n=this.predictorService.initGameFilters("TOP_X",t),r=yield this.predictorHttps.getGames(n,e);return yield this.predictorService.remapMatchIdsFixtures(r)}));a(this,"getGameById",(t,e)=>_(this,null,function*(){e=e||!1;let n=yield this.predictorHttps.getGameById(t,e);return yield this.predictorService.remapMatchIdsFixtures(n)}));a(this,"getGamePredictions",(t,e,n)=>_(this,null,function*(){return n=n||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new _n(e)),yield this.predictorHttps.getGamePredictions(t,n,e)}));a(this,"getGameResults",(t,e,n)=>_(this,null,function*(){n=n||!1,e&&(e=new Cr(e));let r=yield this.predictorHttps.getGameResults(t,n,e);return yield this.predictorService.remapMatchIdsFixtures(r)}));a(this,"getCurrentGameResults",t=>_(this,null,function*(){t=t||!1;let e={status:"OPEN",type:"TOP_X"};e=new Cr(e);let n=yield this.predictorHttps.getGames(e,t),r=this.predictorService.getCurrentGameId(n);return(yield this.getGameResults(r,null,t)).data[0]}));a(this,"play",t=>_(this,null,function*(){let e=new Rp(t);if(e=this.predictorValidator.validateBodyFields("TOP_X",e),e.fixtures=e.fixtures.map(r=>this.predictorValidator.validateFixture(r.matchId,r.market,r.prediction.value)),this.idMapping.idSchema!=="native"){let r=[];e.fixtures.forEach(s=>r.push(s.matchId));let i=yield this.predictorService.remapMatchIdToNative(r);e.fixtures.forEach(s=>s.matchId=i.shift())}let n=yield this.predictorHttps.makeFootballPrediction(e);return n.fixtures.forEach(r=>{r.matchId=r.matchModel.id}),n}));a(this,"delete",t=>_(this,null,function*(){return yield this.predictorHttps.deleteFootballPrediction(t)}));a(this,"getMyGameEditions",(t,e)=>_(this,null,function*(){t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1;let n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],i=yield this.predictorHttps.getMyPredictionsNoRemap(n);if(i.data.length>0){i.data.forEach(l=>{l.game_instance_id&&r.push(l.game_instance_id)});let s=this.predictorService.initGameFilters("TOP_X",null,r),o=yield this.predictorHttps.getUserGameEditions(s,e);return yield this.predictorService.addPredictionProp(i,o)}else return new Ut}));a(this,"getMyGamePrediction",t=>_(this,null,function*(){let e=this.predictorService.initGameTypePredictions("TOP_X"),n=yield this.predictorHttps.getMyPredictions(e);if(n.data.length>0){let r=n.data.filter(i=>i.gameInstanceId===t);return r.length?r[0]:null}return null}));a(this,"getUserGameEditions",(t,e,n)=>_(this,null,function*(){e&&e.limit&&this.validateLimitFilterOnGames(e.limit),n=n||!1;let r=this.predictorService.initGameTypePredictions("TOP_X",e),i=[],s=yield this.predictorHttps.getUserPredictionsNoRemap(t,r);if(s.data.length>0){s.data.forEach(u=>{u.game_instance_id&&i.push(u.game_instance_id)});let o=this.predictorService.initGameFilters("TOP_X",null,i),l=yield this.predictorHttps.getUserGameEditions(o,n);return yield this.predictorService.addPredictionProp(s,l)}else return new Ut}));a(this,"getUserGamePrediction",(t,e,n)=>_(this,null,function*(){n=n||!1;let r=this.predictorService.initGameTypePredictions("TOP_X"),i=yield this.predictorHttps.getUserPredictions(t,n,r);if(i.data.length>0){let s=i.data.filter(o=>o.gameInstanceId===e);return s.length?s[0]:null}else return null}));a(this,"getMarketsResultsForGame",(t,e)=>_(this,null,function*(){let n=yield this.predictorHttps.getMarketResultsForGame(t,e);return yield this.predictorService.completeGameMarketResults(n,"TOP_X")}));a(this,"getGameWinners",(t,e)=>_(this,null,function*(){let n=yield this.predictorHttps.getContestWinners(t,e),r=yield this.getGameById(t);return n.contestModel=r,this.predictorService.completeContestWinners(n)}));a(this,"validateLimitFilterOnGames",t=>{if(this.errorHandlingMode==="default"&&t>50)throw new tt(400,"EXCEEDED_LENGTH","Maximum limit for filtering games is 50 or less.");if(this.errorHandlingMode==="standard"&&t>50)throw new He(400,"EXCEEDED_LENGTH","Maximum limit for filtering games is 50 or less.")});this.idMapping=e,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new Eu(t.errorHandlingMode),this.predictorHttps=new js(t,e),this.predictorService=new $s(t,e),this.clientHttps=new Xr(t)}},Hp=class{constructor(t){a(this,"predictorHttps",null);a(this,"predictorService",null);a(this,"idMapping",null);a(this,"clientHttps",null);a(this,"predictorValidator",null);a(this,"errorHandlingMode",null);a(this,"getConfig",()=>_(this,null,function*(){let t=yield this.clientHttps.getConfig("matchQuiz");return this.idMapping.idSchema!=="native"?yield this.predictorService.remapCompetitionsFromConfig(t):t}));a(this,"play",t=>_(this,null,function*(){t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t);let e=t.fixtures.map(n=>this.predictorValidator.validateFixture(n.matchId,n.market,n.prediction.value,n.prediction.playerId));if(e&&e.length&&this.idMapping.idSchema!=="native"){let n=[],r=[];e.forEach(o=>{n.push(o.matchId),o instanceof ti&&o.prediction.playerId&&o.prediction.playerId!=="OWN_GOAL"&&r.push(o.prediction.playerId)});let i=yield this.predictorService.remapMatchIdToNative(n),s={};r&&r.length>0&&(s=yield this.predictorService.remapPlayerIdMapToNative(r)),e.forEach((o,l)=>{o.matchId=i[l],o instanceof ti&&o.prediction.playerId!=="OWN_GOAL"&&(o.prediction.playerId=s[o.prediction.playerId])})}return t.fixtures=e,yield this.predictorHttps.makeFootballPrediction(t)}));a(this,"delete",t=>_(this,null,function*(){return yield this.predictorHttps.deleteFootballPrediction(t)}));a(this,"getGames",(t,e)=>_(this,null,function*(){e=e||!1;let n=this.predictorService.initGameFilters("MATCH_QUIZ",t),r=yield this.predictorHttps.getGames(n,e);return yield this.predictorService.remapMatchIdsFixtures(r)}));a(this,"getGameById",(t,e)=>_(this,null,function*(){e=e||!1;let n=yield this.predictorHttps.getGameById(t,e);return yield this.predictorService.remapMatchIdsFixtures(n)}));a(this,"getGamePredictions",(t,e,n)=>_(this,null,function*(){return n=n||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new _n(e)),yield this.predictorHttps.getGamePredictions(t,n,e)}));a(this,"getGameResults",(t,e,n)=>_(this,null,function*(){n=n||!1,e&&(e=new Tr(e));let r=yield this.predictorHttps.getGameResults(t,n,e);return yield this.predictorService.remapMatchIdsFixtures(r)}));a(this,"getCurrentGameResults",t=>_(this,null,function*(){t=t||!1;let e={status:"OPEN",type:"MATCH_QUIZ"};e=new Cr(e);let n=yield this.predictorHttps.getGames(e,t),r=this.predictorService.getCurrentGameId(n);return(yield this.getGameResults(r,null,t)).data[0]}));a(this,"getMyGameEditions",(t,e)=>_(this,null,function*(){t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1;let n=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],i=yield this.predictorHttps.getMyPredictionsNoRemap(n);if(i.data.length>0){i.data.forEach(l=>{l.game_instance_id&&r.push(l.game_instance_id)});let s=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),o=yield this.predictorHttps.getUserGameEditions(s,e);return yield this.predictorService.addPredictionProp(i,o)}else return new Ut}));a(this,"getMyGamePrediction",t=>_(this,null,function*(){let e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),n=yield this.predictorHttps.getMyPredictions(e);if(n.data.length>0){let r=n.data.filter(i=>i.gameInstanceId===t);return r.length?r[0]:null}return null}));a(this,"getUserGameEditions",(t,e,n)=>_(this,null,function*(){e&&e.limit&&this.validateLimitFilterOnGames(e.limit),n=n||!1;let r=this.predictorService.initGameTypePredictions("MATCH_QUIZ",e),i=[],s=yield this.predictorHttps.getUserPredictionsNoRemap(t,r);if(s.data.length>0){s.data.forEach(u=>{u.game_instance_id&&i.push(u.game_instance_id)});let o=this.predictorService.initGameFilters("MATCH_QUIZ",null,i),l=yield this.predictorHttps.getUserGameEditions(o,n);return yield this.predictorService.addPredictionProp(s,l)}else return new Ut}));a(this,"getUserGamePrediction",(t,e,n)=>_(this,null,function*(){n=n||!1;let r=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),i=yield this.predictorHttps.getUserPredictions(t,n,r);if(i.data.length>0){let s=i.data.filter(o=>o.gameInstanceId===e);return s.length?s[0]:null}else return null}));a(this,"getMarketsResultsForGame",(t,e)=>_(this,null,function*(){let n=yield this.predictorHttps.getMarketResultsForGame(t,e);return yield this.predictorService.completeGameMarketResults(n,"MATCH_QUIZ")}));a(this,"getGameWinners",(t,e)=>_(this,null,function*(){let n=yield this.predictorHttps.getContestWinners(t,e),r=yield this.getGameById(t);return n.contestModel=r,this.predictorService.completeContestWinners(n)}));a(this,"validateLimitFilterOnGames",t=>{if(this.errorHandlingMode==="default"&&t>50)throw new tt(400,"EXCEEDED_LENGTH","Maximum limit for filtering games is 50 or less.");if(this.errorHandlingMode==="standard"&&t>50)throw new He(400,"EXCEEDED_LENGTH","Maximum limit for filtering games is 50 or less.")});this.predictorValidator=new Eu(t.errorHandlingMode),this.idMapping=new wn(t),this.predictorHttps=new js(t,this.idMapping),this.predictorService=new $s(t,this.idMapping),this.clientHttps=new Xr(t),this.errorHandlingMode=t.errorHandlingMode}},oC=class{constructor(t){a(this,"market");a(this,"fromDate");a(this,"toDate");a(this,"usersCount");a(this,"minimumPredictions");this.market=t.market?t.market:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.usersCount=t.usersCount?t.usersCount:null,this.minimumPredictions=t.minimumPredictions?t.minimumPredictions:null}constructFiltersUrl(){let t="";return this.market&&(t+="&",t+=`market=${this.market}`),this.fromDate&&(t+="&",t+=`from_date=${this.fromDate}`),this.toDate&&(t+="&",t+=`to_date=${this.toDate}`),this.usersCount&&(t+="&",t+=`users_count=${this.usersCount}`),this.minimumPredictions&&(t+="&",t+=`minimum_predictions=${this.minimumPredictions}`),t}},lC=class{constructor(t){a(this,"flags",null);a(this,"status",null);a(this,"type",null);a(this,"activeFrom",null);a(this,"activeTo",null);a(this,"createdFrom",null);a(this,"createdTo",null);a(this,"updatedFrom",null);a(this,"updatedTo",null);this.flags=t.flags?t.flags:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.activeFrom=t.activeFrom?t.activeFrom:null,this.activeTo=t.activeTo?t.activeTo:null,this.createdFrom=t.createdFrom?t.createdFrom:null,this.createdTo=t.createdTo?t.createdTo:null,this.updatedFrom=t.updatedFrom?t.updatedFrom:null,this.updatedTo=t.updatedTo?t.updatedTo:null}constructFiltersUrl(){let t="";return this.flags&&(t+="&",t+=`flags=${this.flags}`),this.status&&(t+="&",t+=`status=${this.status}`),this.type&&(t+="&",t+=`type=${this.type}`),this.activeFrom&&(t+="&",t+=`active_from=${this.activeFrom}`),this.activeTo&&(t+="&",t+=`active_to=${this.activeTo}`),this.createdFrom&&(t+="&",t+=`created_from=${this.createdFrom}`),this.createdTo&&(t+="&",t+=`created_to=${this.createdTo}`),this.updatedFrom&&(t+="&",t+=`updated_from=${this.updatedFrom}`),this.updatedTo&&(t+="&",t+=`updated_to=${this.updatedTo}`),t}},uC=class{constructor(t,e,n,r,i){a(this,"config",null);a(this,"clientHttps",null);a(this,"loyaltyHttps",null);a(this,"loyaltyService",null);a(this,"profileFacade",null);a(this,"loyaltyValidator",null);a(this,"idMapping",null);a(this,"topXFacade",null);a(this,"matchQuizFacade",null);a(this,"predictorHttps",null);a(this,"errorHandlingMode",null);a(this,"football",null);a(this,"getConfig",()=>_(this,null,function*(){return yield this.clientHttps.getConfig("loyalty")}));a(this,"getClientBadges",()=>_(this,null,function*(){let t=yield this.getConfig();return this.loyaltyService.buildClientBadges(t.rewards.badges)}));a(this,"getTemplates",(t,e)=>_(this,null,function*(){if(t&&(t=new lC(t)),this.config.idSchema==="native")return yield this.loyaltyHttps.getTemplates(t,e);let n=yield this.loyaltyHttps.getTemplates(t,e);n.data=yield this.loyaltyService.remapTemplatesIds([...n.data]);for(let r of n.data)yield this.loyaltyService.remapTemplateGroupMatchIds(r.groups);return n}));a(this,"getTemplateById",(t,e)=>_(this,null,function*(){let n=yield this.loyaltyHttps.getTemplateById(t,e);if(this.config.idSchema==="native")return n;let r=yield this.loyaltyService.remapTemplatesIds([n]);return yield this.loyaltyService.remapTemplateGroupMatchIds(r[0].groups),r[0]}));a(this,"getLeaderboard",(t,e,n)=>_(this,null,function*(){e=this.loyaltyService.initFilters(e,"loyalty");let r=yield this.loyaltyHttps.getLeaderboard(t,n,e);return r.data=yield this.loyaltyService.addProfileModelToLeaderboard(r.data),r}));a(this,"getLeaderboardForGame",(t,e,n)=>_(this,null,function*(){e=this.loyaltyService.initFilters(e,"loyalty");let r=yield this.loyaltyHttps.getLeaderboardForGame(t,n,e);return r.data=yield this.loyaltyService.addProfileModelToLeaderboard(r.data),r}));a(this,"getLeaderboardForLeague",(t,e)=>_(this,null,function*(){e=this.loyaltyService.initFilters(e,"league_leaderboard");let n=yield this.loyaltyHttps.getLeaderboardForLeague(t,e);return n.data=yield this.loyaltyService.addProfileModelToLeaderboard(n.data),n}));a(this,"getOwnRankings",(t,e)=>_(this,null,function*(){let{id:n}=yield this.profileFacade.getOwn();return this.getUserRankings(n,t,e)}));a(this,"getUserRankings",(t,e,n)=>_(this,null,function*(){e=this.loyaltyService.initFilters(e,"rankings");let r=yield this.loyaltyHttps.getUserRankings(t,e,n);return yield this.getModelsForUserRankings(r)}));a(this,"getHighestSuccessRate",(t,e)=>_(this,null,function*(){t&&(t=new oC(t),this.loyaltyValidator.validate(t,this.errorHandlingMode));let n=yield this.loyaltyHttps.getHighestSuccessRate(t,e);return this.loyaltyService.addProfileModelToHighestSuccessRate(n)}));a(this,"getTemplateWinners",(t,e)=>_(this,null,function*(){let n=yield this.predictorHttps.getContestWinners(t,e),r=yield this.getTemplateById(t);return n.contestModel=r,this.loyaltyService.completeContestWinners(n)}));a(this,"getEntitiesFollows",(t,e)=>_(this,null,function*(){this.loyaltyService.validateEntitiesFollowsFilters(t),this.config.idSchema!=="native"&&(t=yield this.loyaltyService.remapEntitiesFollowsFilters(t));let n=yield this.loyaltyHttps.getEntitiesFollows(t,e);return yield this.loyaltyService.addModelsToEntitiesFollows(n)}));a(this,"getModelsForUserRankings",t=>_(this,null,function*(){let e=null,n=null,r=null,[i,s,o]=this.loyaltyService.extractRankingsIdsMap(t.data);if(o.length&&(e=(yield this.getTemplates()).data.filter(l=>o.includes(l.id))),i.length){let l={gameIds:i};n=(yield this.topXFacade.getGames(l)).data}if(s.length){let l={gameIds:s};r=(yield this.matchQuizFacade.getGames(l)).data}return this.loyaltyService.setModelsForUserRankings(n,r,e,t)}));a(this,"getTemplateMatches",(t,e,n)=>_(this,null,function*(){let r=yield this.getTemplateById(t,n);if((!r.competitionIds||r.competitionIds.length===0)&&(!r.teamIds||r.teamIds.length===0)&&(!r.matchIds||r.matchIds.length===0)&&(!r.groups||r.groups.length===0))return[];let i=this.loyaltyService.initMatchFiltersForTemplates(r,e);return(yield this.football.getMatches(i,n)).data}));this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new Cs(i,r),this.loyaltyService=new aC(this.config),this.loyaltyValidator=new sC,this.idMapping=new wn(t),this.topXFacade=new jp(t,this.idMapping),this.matchQuizFacade=new Hp(t),this.predictorHttps=new js(t,this.idMapping),this.errorHandlingMode=t.errorHandlingMode,this.football=new Ds(t)}},Vp=class{constructor(t){a(this,"clientHttps",null);a(this,"profileHttps",null);a(this,"loyaltyHttps",null);a(this,"loyaltyFacade",null);a(this,"localCache",null);a(this,"getConfig",()=>_(this,null,function*(){return yield this.loyaltyFacade.getConfig()}));a(this,"getClientBadges",()=>_(this,null,function*(){return yield this.loyaltyFacade.getClientBadges()}));a(this,"getTemplates",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getTemplates(t,e)}));a(this,"getTemplateById",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getTemplateById(t,e)}));a(this,"getLeaderboard",(t,e,n)=>_(this,null,function*(){return yield this.loyaltyFacade.getLeaderboard(t,e,n)}));a(this,"getLeaderboardForGame",(t,e,n)=>_(this,null,function*(){return yield this.loyaltyFacade.getLeaderboardForGame(t,e,n)}));a(this,"getLeaderboardForLeague",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getLeaderboardForLeague(t,e)}));a(this,"getOwnRankings",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getOwnRankings(t,e)}));a(this,"getUserRankings",(t,e,n)=>_(this,null,function*(){return yield this.loyaltyFacade.getUserRankings(t,e,n)}));a(this,"getHighestSuccessRate",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getHighestSuccessRate(t,e)}));a(this,"getTemplateWinners",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getTemplateWinners(t,e)}));a(this,"getEntitiesFollows",(t,e)=>_(this,null,function*(){return yield this.loyaltyFacade.getEntitiesFollows(t,e)}));a(this,"getTemplateMatches",(t,e,n)=>_(this,null,function*(){return yield this.loyaltyFacade.getTemplateMatches(t,e,n)}));this.clientHttps=new Xr(t),this.profileHttps=new Qh(t),this.loyaltyHttps=new Iu(t),this.localCache=new ia().createLocalCacheInstance(t.idSchema),this.loyaltyFacade=new uC(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localCache)}},cC=class{constructor(t){a(this,"topXFacade",null);a(this,"idMapping",null);a(this,"getConfig",()=>_(this,null,function*(){return yield this.topXFacade.getConfig()}));a(this,"getGames",(t,e)=>_(this,null,function*(){return yield this.topXFacade.getGames(t,e)}));a(this,"getGameById",(t,e)=>_(this,null,function*(){return yield this.topXFacade.getGameById(t,e)}));a(this,"getGamePredictions",(t,e,n)=>_(this,null,function*(){return yield this.topXFacade.getGamePredictions(t,e,n)}));a(this,"getGameResults",(t,e,n)=>_(this,null,function*(){return yield this.topXFacade.getGameResults(t,e,n)}));a(this,"getCurrentGameResults",t=>_(this,null,function*(){return yield this.topXFacade.getCurrentGameResults(t)}));a(this,"play",t=>_(this,null,function*(){return yield this.topXFacade.play(t)}));a(this,"delete",t=>_(this,null,function*(){return yield this.topXFacade.delete(t)}));a(this,"getMyGameEditions",(t,e)=>_(this,null,function*(){return yield this.topXFacade.getMyGameEditions(t,e)}));a(this,"getMyGamePrediction",t=>_(this,null,function*(){return yield this.topXFacade.getMyGamePrediction(t)}));a(this,"getUserGameEditions",(t,e,n)=>_(this,null,function*(){return yield this.topXFacade.getUserGameEditions(t,e,n)}));a(this,"getUserGamePrediction",(t,e,n)=>_(this,null,function*(){return yield this.topXFacade.getUserGamePrediction(t,e,n)}));a(this,"getMarketsResultsForGame",(t,e)=>_(this,null,function*(){return yield this.topXFacade.getMarketsResultsForGame(t,e)}));a(this,"getGameWinners",(t,e)=>_(this,null,function*(){return yield this.topXFacade.getGameWinners(t,e)}));this.idMapping=new wn(t),this.topXFacade=new jp(t,this.idMapping)}},dC=class{constructor(t){a(this,"matchQuizFacade",null);a(this,"getConfig",()=>_(this,null,function*(){return yield this.matchQuizFacade.getConfig()}));a(this,"play",t=>_(this,null,function*(){return yield this.matchQuizFacade.play(t)}));a(this,"delete",t=>_(this,null,function*(){return yield this.matchQuizFacade.delete(t)}));a(this,"getGames",(t,e)=>_(this,null,function*(){return yield this.matchQuizFacade.getGames(t,e)}));a(this,"getGameById",(t,e)=>_(this,null,function*(){return yield this.matchQuizFacade.getGameById(t,e)}));a(this,"getGamePredictions",(t,e,n)=>_(this,null,function*(){return yield this.matchQuizFacade.getGamePredictions(t,e,n)}));a(this,"getGameResults",(t,e,n)=>_(this,null,function*(){return yield this.matchQuizFacade.getGameResults(t,e,n)}));a(this,"getCurrentGameResults",t=>_(this,null,function*(){return yield this.matchQuizFacade.getCurrentGameResults(t)}));a(this,"getMyGameEditions",(t,e)=>_(this,null,function*(){return yield this.matchQuizFacade.getMyGameEditions(t,e)}));a(this,"getMyGamePrediction",t=>_(this,null,function*(){return yield this.matchQuizFacade.getMyGamePrediction(t)}));a(this,"getUserGameEditions",(t,e,n)=>_(this,null,function*(){return yield this.matchQuizFacade.getUserGameEditions(t,e,n)}));a(this,"getUserGamePrediction",(t,e,n)=>_(this,null,function*(){return yield this.matchQuizFacade.getUserGamePrediction(t,e,n)}));a(this,"getMarketsResultsForGame",(t,e)=>_(this,null,function*(){return yield this.matchQuizFacade.getMarketsResultsForGame(t,e)}));a(this,"getGameWinners",(t,e)=>_(this,null,function*(){return yield this.matchQuizFacade.getGameWinners(t,e)}));this.matchQuizFacade=new Hp(t)}},qp=class{constructor(t,e,n,r){a(this,"action",null);a(this,"context",new vp);this.action=t,this.context.tags=e,n&&(this.context.content=n),r&&(this.context.campaign=r)}},Ou=class{constructor(t){a(this,"idSchema");a(this,"idMapping");a(this,"remapTagsIds",(t,e,n)=>_(this,null,function*(){if(!t||!t.length)return t;let r={},i={},s=[];t.forEach(l=>{r.hasOwnProperty(l.type)||(r[l.type]=[],i[l.type]=[]),r[l.type].push(l.id),i[l.type].push(l)});let o=yield this.idMapping.idMappingFacade.getEntitiesByIds(r,e,n);for(let[l,u]of Object.entries(i))u.forEach((c,d)=>{c.id=o[l][d],s.push(c)});return s}));this.idSchema=t.idSchema,this.idMapping=new wn(t)}},Wp=class{constructor(t){a(this,"page",null);a(this,"limit",null);this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},fC=class extends Wp{constructor(e){super(e);a(this,"action",null);this.action=e.action?e.action:null}constructFilterUrl(){let e="";return this.action&&(e+="&",e+=`action=${this.action}`),this.page&&(e+="&",e+=`page=${this.page}`),this.limit&&(e+="&",e+=`limit=${this.limit}`),e}},hC=class extends Wp{constructor(e){super(e);a(this,"action",null);this.action=e.action?e.action:null}constructFilterUrl(){let e="";return this.action&&(e+="&",e+=`action=${this.action}`),this.page&&(e+="&",e+=`page=${this.page}`),this.limit&&(e+="&",e+=`limit=${this.limit}`),e}},pC=class{constructor(t){a(this,"idSchema");a(this,"activityHttps");a(this,"activityService");a(this,"add",(t,e,n,r)=>_(this,null,function*(){if(this.idSchema!="native"){let s=JSON.parse(JSON.stringify(e)),o=yield this.activityService.remapTagsIds(e,this.idSchema,"native"),l=new qp(t,o,n,r),u=yield this.activityHttps.createActivity(l);return u.context.tags=s,u}let i=new qp(t,e,n,r);return this.activityHttps.createActivity(i)}));a(this,"delete",t=>_(this,null,function*(){return yield this.activityHttps.deleteActivity(t)}));a(this,"like",(t,e,n)=>_(this,null,function*(){let r="like";return yield this.add(r,t,e,n)}));a(this,"dislike",(t,e,n)=>_(this,null,function*(){let r="dislike";return yield this.add(r,t,e,n)}));a(this,"addPageview",(t,e,n)=>_(this,null,function*(){let r="page_view";return yield this.add(r,t,e,n)}));a(this,"addContentConsumed",(t,e,n)=>_(this,null,function*(){let r="content_consumed";return yield this.add(r,t,e,n)}));a(this,"addShare",(t,e,n)=>_(this,null,function*(){let r="share";return yield this.add(r,t,e,n)}));a(this,"addComment",(t,e,n)=>_(this,null,function*(){let r="comment";return yield this.add(r,t,e,n)}));a(this,"addClickAd",(t,e,n)=>_(this,null,function*(){let r="click_ad";return yield this.add(r,t,e,n)}));a(this,"addConversion",(t,e,n)=>_(this,null,function*(){let r="conversion";return yield this.add(r,t,e,n)}));a(this,"getOwn",(t,e)=>_(this,null,function*(){if(e=e||!1,t&&(t=new fC(t)),this.idSchema!="native"){let n=yield this.activityHttps.getOwnActivities(t,e);for(let r of n.data)yield this.activityService.remapTagsIds(r.context.tags,"native",this.idSchema);return n}return yield this.activityHttps.getOwnActivities(t,e)}));a(this,"getForUser",(t,e,n)=>_(this,null,function*(){if(n=n||!1,e&&(e=new hC(e)),this.idSchema!="native"){let r=yield this.activityHttps.getActivitiesForUser(t,e,n),i=JSON.parse(JSON.stringify(r));for(let s of i.data)yield this.activityService.remapTagsIds([...s.context.tags],"native",this.idSchema);return i}return yield this.activityHttps.getActivitiesForUser(t,e,n)}));this.idSchema=t.idSchema,this.activityHttps=new wp(t),this.activityService=new Ou(t)}},mC=class{constructor(t){a(this,"activityFacade");a(this,"add",(t,e,n,r)=>_(this,null,function*(){return yield this.activityFacade.add(t,e,n,r)}));a(this,"delete",t=>_(this,null,function*(){return yield this.activityFacade.delete(t)}));a(this,"like",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.like(t,e,n)}));a(this,"dislike",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.dislike(t,e,n)}));a(this,"addPageview",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addPageview(t,e,n)}));a(this,"addContentConsumed",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addContentConsumed(t,e,n)}));a(this,"addShare",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addShare(t,e,n)}));a(this,"addComment",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addComment(t,e,n)}));a(this,"addClickAd",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addClickAd(t,e,n)}));a(this,"addConversion",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.addConversion(t,e,n)}));a(this,"getOwn",(t,e)=>_(this,null,function*(){return yield this.activityFacade.getOwn(t,e)}));a(this,"getForUser",(t,e,n)=>_(this,null,function*(){return yield this.activityFacade.getForUser(t,e,n)}));this.activityFacade=new pC(t)}},Gp=class{constructor(){a(this,"id",null);a(this,"title",null);a(this,"description",null);a(this,"type",null);a(this,"images",new Bs);a(this,"participationCount",null);a(this,"questionsCount",null);a(this,"status",null);a(this,"flags",null);a(this,"customFields",null);a(this,"labels",null);a(this,"time",null);a(this,"averageScore",null);a(this,"perfectScore",null);a(this,"adContent",null);a(this,"context",null);a(this,"createdAt",null);a(this,"updatedAt",null)}},gC=class extends Gp{constructor(){super(...arguments);a(this,"rules",null);a(this,"questions",[])}},vC=class{constructor(){a(this,"questionId",null);a(this,"question",null);a(this,"images",null);a(this,"options",[])}},yC=class{constructor(){a(this,"optionId",null);a(this,"option",null);a(this,"images",null)}},wC=class{constructor(){a(this,"classicQuizId",null);a(this,"userId",null);a(this,"questions",[]);a(this,"correctOptions",null)}},bC=class{constructor(){a(this,"questionId",null);a(this,"optionId",null);a(this,"correct",null);a(this,"correctOptionId",null)}},_C=class{constructor(){a(this,"classicQuizId",null);a(this,"correct",null);a(this,"classicQuizQuestions",null)}},zp=class{constructor(){a(this,"content",null);a(this,"tags",[]);a(this,"campaign",null)}},Qp=class{constructor(){a(this,"id",null);a(this,"model",null);a(this,"source",null);a(this,"type",null)}},EC=class{constructor(){a(this,"remapClassicQuizzes",t=>(t.meta.pagination=this.remapMetaPagination(t.meta.pagination),t.data=t.data.map(e=>this.remapBasicClassicQuiz(e)),t));a(this,"remapClassicQuizById",t=>{let e=new gC;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.images=t.images,e.participationCount=t.participation_count,e.questionsCount=t.questions_count,e.status=t.status,e.flags=t.flags,e.adContent=t.ad_content,e.rules=t.rules,e.customFields=t.custom_fields,e.labels=t.labels,e.time=t.time,e.context=t.context?this.remapContext(t.context):t.context,e.averageScore=t.average_score,e.perfectScore=t.perfect_score,e.questions=t.questions.map(n=>this.remapQuestions(n)),e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapClassicQuizParticipation",t=>{let e=new wC;return e.classicQuizId=t.classic_quiz_id,e.userId=t.user_id,e.questions=t.questions?t.questions.map(n=>this.remapParticipationQuestions(n)):null,e.correctOptions=t.correct_options,e});a(this,"remapClassicQuizParticipationBody",t=>t.map(e=>({question_id:e.questionId,option_id:e.optionId})));a(this,"remapUserClassicQuizParticipations",t=>t.map(e=>{let n=new _C;return n.classicQuizId=e.classic_quiz_id,n.correct=e.correct,n.classicQuizQuestions=e.classic_quiz_questions,n}));a(this,"remapMetaPagination",t=>{let e=new lu;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e});a(this,"remapBasicClassicQuiz",t=>{let e=new Gp;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.images=t.images,e.participationCount=t.participation_count,e.questionsCount=t.questions_count,e.status=t.status,e.flags=t.flags,e.customFields=t.custom_fields,e.labels=t.labels,e.time=t.time,e.averageScore=t.average_score,e.perfectScore=t.perfect_score,e.context=t.context?this.remapContext(t.context):t.context,e.adContent=t.ad_content,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapQuestions",t=>{let e=new vC;return e.questionId=t.question_id,e.question=t.question,e.images=t.images,e.options=t.options.map(n=>this.remapOptions(n)),e});a(this,"remapOptions",t=>{let e=new yC;return e.optionId=t.option_id,e.option=t.option,e.images=t.images,e});a(this,"remapParticipationQuestions",t=>{let e=new bC;return e.questionId=t.question_id,e.optionId=t.option_id,e.correct=t.correct,e.correctOptionId=t.correct_option_id,e});a(this,"remapContext",t=>{let e=new zp;return e.content=t.content,e.tags=t.tags?t.tags.map(n=>{let r=new Qp;return r.id=n.id,r.type=n.type,r.source=n.source,r}):null,e.campaign=t.campaign,e})}},Yp=class{constructor(){a(this,"id","");a(this,"title","");a(this,"description","");a(this,"images",new Bs);a(this,"flags",[]);a(this,"status","");a(this,"winningCondition","");a(this,"lives",0);a(this,"time",0);a(this,"points",[]);a(this,"customFields",null);a(this,"labels",null);a(this,"adContent","");a(this,"context",null);a(this,"type","");a(this,"createdAt","");a(this,"updatedAt","")}},IC=class extends Yp{constructor(){super(...arguments);a(this,"rules","")}},AC=class{constructor(){a(this,"correctSteps",0);a(this,"score",0)}},OC=class{constructor(){a(this,"eitherOrId","");a(this,"personalBest",0)}},TC=class{constructor(){a(this,"instanceId","");a(this,"eitherOrId","");a(this,"gameStartedAt","");a(this,"currentStep",0);a(this,"currentStreak",0);a(this,"remainingSteps",0);a(this,"currentLives",0);a(this,"currentPoints",0);a(this,"personalBest",0);a(this,"steps",[])}},CC=class{constructor(){a(this,"main");a(this,"mobile")}},Kp=class{constructor(){a(this,"id","");a(this,"label","");a(this,"images",new CC);a(this,"value",null)}},SC=class{constructor(){a(this,"pairId","");a(this,"userSelection","");a(this,"correct",null);a(this,"played",null);a(this,"timestamp","");a(this,"optionOne",new Kp);a(this,"optionTwo",new Kp)}},PC=class{constructor(){a(this,"rangeStartInclusive",0);a(this,"rangeEndInclusive",0);a(this,"totalUsers",0)}},MC=class{constructor(){a(this,"standings",[]);a(this,"breakdown",[])}},RC=class{constructor(){a(this,"userId","");a(this,"userModel",null);a(this,"personalBest","")}},kC=class{constructor(){a(this,"remapEitherOrs",t=>(t.meta.pagination=this.remapMetaPagination(t.meta.pagination),t.data=t.data.map(e=>this.remapBasicEitherOr(e)),t));a(this,"remapEitherOrById",t=>{let e=new IC;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.images=t.images,e.status=t.status,e.winningCondition=t.winning_condition,e.lives=t.lives,e.flags=t.flags,e.customFields=t.custom_fields,e.labels=t.labels,e.time=t.time,e.context=t.context?this.remapContext(t.context):t.context,e.points=t.points?t.points.map(n=>this.remapPoints(n)):t.points,e.rules=t.rules,e.adContent=t.ad_content,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapEitherOrOwnStats",t=>{let e=new OC;return e.eitherOrId=t.either_or_id,e.personalBest=t.personal_best,e});a(this,"remapEitherOrResults",t=>{let e=new MC;return e.standings=t.standings?t.standings.map(n=>this.remapResultsStandings(n)):t.standings,e.breakdown=t.breakdown?t.breakdown.map(n=>this.remapResultsBreakdown(n)):t.breakdown,e});a(this,"remapEitherOrParticipation",t=>{let e=new TC;return e.instanceId=t.instance_id,e.eitherOrId=t.either_or_id,e.gameStartedAt=t.game_started_at,e.currentStep=t.current_step,e.currentStreak=t.current_streak,e.remainingSteps=t.remaining_steps,e.currentLives=t.current_lives,e.currentPoints=t.current_points,e.personalBest=t.personal_best,e.steps=t.steps?t.steps.map(n=>this.remapParticipationSteps(n)):t.steps,e});a(this,"remapBasicEitherOr",t=>{let e=new Yp;return e.id=t.id,e.title=t.title,e.description=t.description,e.type=t.type,e.images=t.images,e.status=t.status,e.winningCondition=t.winning_condition,e.lives=t.lives,e.flags=t.flags,e.customFields=t.custom_fields,e.labels=t.labels,e.adContent=t.ad_content,e.context=t.context?this.remapContext(t.context):t.context,e.time=t.time,e.points=t.points?t.points.map(n=>this.remapPoints(n)):t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapMetaPagination",t=>{let e=new lu;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e});a(this,"remapPoints",t=>{let e=new AC;return e.correctSteps=t.correct_steps,e.score=t.score,e});a(this,"remapResultsStandings",t=>{let e=new RC;return e.userId=t.user_id,e.personalBest=t.personal_best,e});a(this,"remapResultsBreakdown",t=>{let e=new PC;return e.rangeStartInclusive=t.range_start_inclusive,e.rangeEndInclusive=t.range_end_inclusive,e.totalUsers=t.total_users,e});a(this,"remapParticipationSteps",t=>{let e=new SC;return e.pairId=t.pair_id,e.userSelection=t.user_selection,e.correct=t.correct,e.played=t.played,e.timestamp=t.timestamp,e.optionOne=t.option_one,e.optionTwo=t.option_two,e});a(this,"remapContext",t=>{let e=new zp;return e.content=t.content,e.tags=t.tags?t.tags.map(n=>{let r=new Qp;return r.id=n.id,r.type=n.type,r.source=n.source,r}):null,e.campaign=t.campaign,e})}},Jp=class extends yn{constructor(e){super(e,rn(e.environment,"miniGames"));a(this,"classicQuizRemapper",null);a(this,"eitherOrRemapper",null);a(this,"getClassicQuizzes",(e,n)=>_(this,null,function*(){let r=`/classic-quizzes${this.apiSignInUrl}`;e&&(r+=e.constructMainFiltersUrl()),r+=Xe(n)?Ye():"";let i="There was a problem with fetching classic quizzes",s=yield this.fetchWithoutAuth(r,i);return this.classicQuizRemapper.remapClassicQuizzes(s)}));a(this,"getClassicQuizById",(e,n)=>_(this,null,function*(){let r=`/classic-quizzes/${e}${this.apiSignInUrl}`;Xe(n)&&(r+=Ye());let i="There was a problem with fetching classic quiz by ID",s=yield this.fetchWithoutAuth(r,i);return this.classicQuizRemapper.remapClassicQuizById(s.data)}));a(this,"participateInClassicQuiz",(e,n,r)=>_(this,null,function*(){let i=`/classic-quizzes/${e}/participate${this.apiSignInUrl}`,s=`There was a problem with participating in the following classic quiz: ${e}`,o="POST",l={questions:this.classicQuizRemapper.remapClassicQuizParticipationBody(n),include_correct_options:!!r},u=yield this.fetchWithAuth(i,s,o,l);return this.classicQuizRemapper.remapClassicQuizParticipation(u.data)}));a(this,"getMyClassicQuizParticipations",e=>_(this,null,function*(){let n=`/classic-quizzes/participations/${this.apiSignInUrl}&classic_quiz_ids=${e?e.join(","):""}`,r="There was a problem with fetching user's own Classic Quiz participations",i=yield this.fetchWithAuth(n,r);return this.classicQuizRemapper.remapUserClassicQuizParticipations(i.data)}));a(this,"getEitherOrs",(e,n)=>_(this,null,function*(){let r=`/either-or${this.apiSignInUrl}`;e&&(r+=e.constructMainFiltersUrl()),r+=Xe(n)?Ye():"";let i="There was a problem with fetching list of Either/Ors",s=yield this.fetchWithoutAuth(r,i);return this.eitherOrRemapper.remapEitherOrs(s)}));a(this,"getEitherOrById",(e,n)=>_(this,null,function*(){let r=`/either-or/${e}${this.apiSignInUrl}`;Xe(n)&&(r+=Ye());let i="There was a problem with fetching Either/Or by ID",s=yield this.fetchWithoutAuth(r,i);return this.eitherOrRemapper.remapEitherOrById(s.data)}));a(this,"getMyEitherOrStats",e=>_(this,null,function*(){let n=`/either-or/${e}/own-stats${this.apiSignInUrl}`,r="There was a problem with fetching Either/Or own statistics",i=yield this.fetchWithAuth(n,r);return this.eitherOrRemapper.remapEitherOrOwnStats(i.data)}));a(this,"getEitherOrResults",(e,n)=>_(this,null,function*(){let r=`/either-or/${e}/results${this.apiSignInUrl}${Xe(n)?Ye():""}`,i="There was a problem with fetching Either/Or results",s=yield this.fetchWithAuth(r,i);return this.eitherOrRemapper.remapEitherOrResults(s.data)}));a(this,"participateInEitherOr",(e,n)=>_(this,null,function*(){let r=`/either-or/${e}/participate${this.apiSignInUrl}`,i="There was a problem with participating in Either/Or",s="POST",o=yield this.fetchWithAuth(r,i,s,n);return this.eitherOrRemapper.remapEitherOrParticipation(o.data)}));this.classicQuizRemapper=new EC,this.eitherOrRemapper=new kC}},Xp=class extends Tr{constructor(e){super(e);a(this,"flags",null);a(this,"status",null);a(this,"entityIds",null);a(this,"entityType",null);a(this,"sort",null);a(this,"groupByStatus",null);this.flags=e&&e.flags?e.flags:null,this.status=e&&e.status?e.status:null,this.entityIds=e&&e.entityIds?e.entityIds:null,this.entityType=e&&e.entityType?e.entityType:null,this.sort=e&&e.sort?e.sort:null,this.groupByStatus=e&&e.groupByStatus?e.groupByStatus:null}constructMainFiltersUrl(){let e=super.constructMainFiltersUrl();return this.flags&&this.flags.length>0&&(e+=`&flags=${this.flags.join(",")}`),this.status&&(e+=`&status=${this.status}`),this.entityIds&&this.entityIds.length>0&&(e+=`&entity_ids=${this.entityIds}`),this.sort&&(e+=`&sort=${this.sort}`),this.groupByStatus!==null&&(e+=`&group_by_status=${this.groupByStatus}`),e}},xC=class extends Xp{constructor(e){super(e);a(this,"classicQuizIds",null);this.classicQuizIds=e&&e.classicQuizIds?e.classicQuizIds:null}constructMainFiltersUrl(){let e=super.constructMainFiltersUrl();return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+=`&classic_quiz_ids=${this.classicQuizIds.join(",")}`),e}},DC=class extends Xp{constructor(e){super(e);a(this,"eitherOrIds",null);this.eitherOrIds=e&&e.eitherOrIds?e.eitherOrIds:null}constructMainFiltersUrl(){let e=super.constructMainFiltersUrl();return this.eitherOrIds&&this.eitherOrIds.length>0&&(e+=`&either_or_ids=${this.eitherOrIds.join(",")}`),e}},FC=class{constructor(){a(this,"pair","");a(this,"answer","")}},NC=class extends FC{constructor(){super(...arguments);a(this,"expired",!1);a(this,"time",0)}},LC=class{constructor(t){a(this,"errorHandlingModel",null);a(this,"entityTypes",["competition","team","player"]);a(this,"validateFilters",t=>{!t.entityIds&&!t.entityType||(t.entityIds&&!t.entityType&&this.throwException(400,"invalid_filters","You need to use both 'entityIds' and 'entityType' filters together"),!t.entityIds&&t.entityType&&this.throwException(400,"invalid_filters","You need to use both 'entityIds' and 'entityType' filters together"),this.entityTypes.includes(t.entityType)||this.throwException(400,"invalid_filters","Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player"))});a(this,"throwException",(t,e,n)=>{throw this.errorHandlingModel==="standard"?new He(t,e,n):new tt(t,e,n)});this.errorHandlingModel=t.errorHandlingMode}},BC=class{constructor(t){a(this,"idSchema",null);a(this,"idMapping",null);a(this,"validator",null);a(this,"https",null);a(this,"entityTypes",["competition","team","player"]);a(this,"profile",null);a(this,"football",null);a(this,"eitherOrTime",0);a(this,"participationStartTimestamp",0);a(this,"countdownTimer",0);a(this,"intervalId",null);a(this,"currentPairId","");a(this,"finalizeMiniGamesFilters",t=>_(this,null,function*(){if(this.idSchema!=="native"&&t.entityIds&&t.entityIds.length>0){this.validator.validateFilters(t);let e=yield this.idMapping.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,"native");t.entityIds=e[t.entityType]}}));a(this,"setProfileModelsForEitherOrStandings",t=>_(this,null,function*(){let e=t.standings.map(r=>r.userId);if(!e.length)return t;let n=yield this.profile.getByIds(e);return t.standings.forEach(r=>r.userModel=n.find(i=>i.id===r.userId)||null),t}));a(this,"defaultEitherOrParticipation",(t,e)=>_(this,null,function*(){if(!this.eitherOrTime&&!e){let i=yield this.https.getEitherOrById(t,!0);this.eitherOrTime=i.time;let s=yield this.https.participateInEitherOr(t,null);return this.participationStartTimestamp=Date.now(),s}let n=0;if(this.participationStartTimestamp)n=(Date.now()-this.participationStartTimestamp)/1e3;else{if(!this.eitherOrTime){let i=yield this.https.getEitherOrById(t,!0);this.eitherOrTime=i.time}n=this.eitherOrTime+1}let r=this.createNewParticipation(n,e);try{let i=yield this.https.participateInEitherOr(t,r);return!i.currentLives||!i.remainingSteps?this.resetDefaultParticipationTimers():this.participationStartTimestamp=Date.now(),i}catch(i){throw this.resetDefaultParticipationTimers(),i}}));a(this,"handleEitherOrParticipationWithCallback",(t,e,n)=>_(this,null,function*(){return e?yield this.eitherOrParticipationWithCallback(t,e,n):yield this.initialEitherOrParticipationWithCallback(t,n)}));a(this,"initialEitherOrParticipationWithCallback",(t,e)=>_(this,null,function*(){let n=yield this.https.getEitherOrById(t,!0);this.eitherOrTime=n.time;let r=yield this.https.participateInEitherOr(t,null);return this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(r),yield this.handleEitherOrParticipationCallbackInterface(t,e),r}));a(this,"eitherOrParticipationWithCallback",(t,e,n)=>_(this,null,function*(){this.intervalId&&clearInterval(this.intervalId);let r=0;if(this.participationStartTimestamp)r=(Date.now()-this.participationStartTimestamp)/1e3;else{if(!this.eitherOrTime){let s=yield this.https.getEitherOrById(t,!0);this.eitherOrTime=s.time}r=this.eitherOrTime+1}let i=this.createNewParticipation(r,e);try{let s=yield this.https.participateInEitherOr(t,i);return!s.currentLives||!s.remainingSteps?(this.resetCallbackParticipationTimers(),n.onElapsedResponse(s),clearInterval(this.intervalId)):(this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(s),yield this.handleEitherOrParticipationCallbackInterface(t,n)),s}catch(s){throw this.resetCallbackParticipationTimers(),clearInterval(this.intervalId),s}}));a(this,"setCurrentPairId",t=>{this.currentPairId=t.steps.find(e=>!e.played).pairId||""});a(this,"handleEitherOrParticipationCallbackInterface",(t,e)=>_(this,null,function*(){this.intervalId=setInterval(()=>_(this,null,function*(){if(this.countdownTimer>0)this.countdownTimer--,e.onTimerTick(this.countdownTimer);else{clearInterval(this.intervalId);let n=(Date.now()-this.participationStartTimestamp)/1e3,r={pair:this.currentPairId,answer:this.currentPairId.split("_")[0]},i=this.createNewParticipation(n,r),s=yield this.eitherOrParticipationWithCallback(t,i,e);e.onElapsedResponse(s)}}),1e3)}));a(this,"createNewParticipation",(t,e)=>{let n=new NC;return n.expired=t>this.eitherOrTime,n.time=Number(t.toFixed(3)),n.pair=e.pair,n.answer=e.answer,n});a(this,"resetCallbackParticipationTimers",()=>{this.resetDefaultParticipationTimers(),this.countdownTimer=0,this.currentPairId=""});a(this,"resetDefaultParticipationTimers",()=>{this.eitherOrTime=0,this.participationStartTimestamp=0});a(this,"setContextTagsModels",t=>_(this,null,function*(){let e={competitions:[],teams:[],players:[]};if(t.forEach(n=>{n.context&&n.context.tags&&n.context.tags.length>0&&(e.competitions=[...e.competitions,...this.extractEntityIdsFromTags(n.context.tags,"competition")],e.competitions=Array.from(new Set(e.competitions)),e.teams=[...e.teams,...this.extractEntityIdsFromTags(n.context.tags,"team")],e.teams=Array.from(new Set(e.teams)),e.players=[...e.players,...this.extractEntityIdsFromTags(n.context.tags,"player")],e.players=Array.from(new Set(e.players)))}),e.competitions.length){let n=yield this.football.footballFacade.getCompetitionsMapWithNativeIds(e.competitions);this.setModelsForContextTags(t,n,"competition")}if(e.teams.length){let n=yield this.football.footballFacade.getTeamsMapWithNativeIds(e.teams);this.setModelsForContextTags(t,n,"team")}if(e.players.length){let n=yield this.football.footballFacade.getPlayersMapWithNativeIds(e.players);this.setModelsForContextTags(t,n,"player")}}));a(this,"extractEntityIdsFromTags",(t,e)=>t.filter(n=>n.type===e).map(n=>n.id));a(this,"setModelsForContextTags",(t,e,n)=>{t.forEach(r=>{r.context&&r.context.tags&&r.context.tags.length>0&&r.context.tags.forEach(i=>{i.type===n&&(i.model=n==="player"?e[i.id]:e.get(i.id),i.id=i.model.id)})})});this.idSchema=t.idSchema,this.idMapping=new wn(t),this.validator=new LC(t),this.profile=new or(t),this.football=new Ds(t),this.https=new Jp(t)}},UC=class{constructor(t){a(this,"https",null);a(this,"service",null);a(this,"activityService",null);a(this,"idSchema",null);a(this,"getClassicQuizzes",(t,e,n)=>_(this,null,function*(){t&&(t=new xC(t),yield this.service.finalizeMiniGamesFilters(t));let r=yield this.https.getClassicQuizzes(t,n);if(e)yield this.service.setContextTagsModels(r.data);else for(let i of r.data)yield this.remapTags(i,"native",this.idSchema);return r}));a(this,"getClassicQuizById",(t,e)=>_(this,null,function*(){let n=yield this.https.getClassicQuizById(t,e);return yield this.service.setContextTagsModels([n]),n}));a(this,"participateInClassicQuiz",(t,e,n)=>_(this,null,function*(){return yield this.https.participateInClassicQuiz(t,e,n)}));a(this,"getMyClassicQuizParticipations",t=>_(this,null,function*(){return yield this.https.getMyClassicQuizParticipations(t)}));a(this,"getEitherOrs",(t,e,n)=>_(this,null,function*(){t&&(t=new DC(t),yield this.service.finalizeMiniGamesFilters(t));let r=yield this.https.getEitherOrs(t,n);if(e)yield this.service.setContextTagsModels(r.data);else for(let i of r.data)yield this.remapTags(i,"native",this.idSchema);return r}));a(this,"getEitherOrById",(t,e)=>_(this,null,function*(){let n=yield this.https.getEitherOrById(t,e);return yield this.service.setContextTagsModels([n]),n}));a(this,"getMyEitherOrStats",t=>_(this,null,function*(){return yield this.https.getMyEitherOrStats(t)}));a(this,"getEitherOrResults",(t,e)=>_(this,null,function*(){let n=yield this.https.getEitherOrResults(t,e);return yield this.service.setProfileModelsForEitherOrStandings(n)}));a(this,"participateInEitherOr",(t,e,n)=>_(this,null,function*(){return n?yield this.service.handleEitherOrParticipationWithCallback(t,e,n):yield this.service.defaultEitherOrParticipation(t,e)}));a(this,"remapTags",(t,e,n)=>_(this,null,function*(){if(this.idSchema!="native"&&t.context&&t.context.tags&&t.context.tags.length){let r=JSON.parse(JSON.stringify(t.context.tags)),i=yield this.activityService.remapTagsIds(r,e,n);t.context.tags=i}}));this.https=new Jp(t),this.service=new BC(t),this.activityService=new Ou(t),this.idSchema=t.idSchema}},$C=class{constructor(t){a(this,"facade",null);a(this,"getClassicQuizzes",(t,e,n)=>_(this,null,function*(){return yield this.facade.getClassicQuizzes(t,e,n)}));a(this,"getClassicQuizById",(t,e)=>_(this,null,function*(){return yield this.facade.getClassicQuizById(t,e)}));a(this,"participateInClassicQuiz",(t,e,n)=>_(this,null,function*(){return yield this.facade.participateInClassicQuiz(t,e,n)}));a(this,"getMyClassicQuizParticipations",t=>_(this,null,function*(){return yield this.facade.getMyClassicQuizParticipations(t)}));a(this,"getEitherOrs",(t,e,n)=>_(this,null,function*(){return yield this.facade.getEitherOrs(t,e,n)}));a(this,"getEitherOrById",(t,e)=>_(this,null,function*(){return yield this.facade.getEitherOrById(t,e)}));a(this,"getMyEitherOrStats",t=>_(this,null,function*(){return yield this.facade.getMyEitherOrStats(t)}));a(this,"getEitherOrResults",(t,e)=>_(this,null,function*(){return yield this.facade.getEitherOrResults(t,e)}));a(this,"participateInEitherOr",(t,e,n)=>_(this,null,function*(){return yield this.facade.participateInEitherOr(t,e,n)}));this.facade=new UC(t)}},jC=class{constructor(){a(this,"id","");a(this,"label","");a(this,"discussionType","LEAGUE");a(this,"moderationType","USER");a(this,"postsCount",0);a(this,"pinnedPosts",[]);a(this,"lastPostId","");a(this,"context",null);a(this,"createdAt","");a(this,"updatedAt","")}},Tu=class{constructor(){a(this,"pagination",{totalItems:0,nextPageStartsAfter:"",lastCommentCreateTimestamp:""})}},Zp=class{constructor(){a(this,"id","");a(this,"userId","");a(this,"discussionId","");a(this,"content","");a(this,"repliesCount",0);a(this,"replyId","");a(this,"reactions",[]);a(this,"reactionsCount",0);a(this,"reports",[]);a(this,"reportsCount",0);a(this,"versions",null);a(this,"privatePost",!1);a(this,"deleted",!1);a(this,"deletedAt","");a(this,"deletedBy","");a(this,"moderated",!1);a(this,"moderatedAt","");a(this,"moderatedBy","");a(this,"moderatedReason","");a(this,"createdAt","");a(this,"updatedAt","")}},HC=class{constructor(){a(this,"meta",new Tu);a(this,"data",[])}},VC=class{constructor(){a(this,"type","");a(this,"userIds",[]);a(this,"reactionCount",0)}},qC=class{constructor(){a(this,"updatedAt","");a(this,"content","")}},WC=class{constructor(){a(this,"userId",null);a(this,"reason","AD");a(this,"reasonDetails",null)}},GC=class extends Zp{constructor(){super(...arguments);a(this,"userModel",null)}},zC=class{constructor(){a(this,"meta",new Tu);a(this,"data",[])}},QC=class{constructor(){a(this,"meta",new ta);a(this,"data",[])}},em=class{constructor(){a(this,"remapToDiscussions",t=>(t.meta=this.remapToMeta(t.meta),t.data=t.data.map(e=>this.remapToDiscussionById(e)),t));a(this,"remapToDiscussionById",t=>{let e=new jC;return e.id=t.id,e.label=t.label,e.discussionType=t.discussion_type,e.moderationType=t.moderation_type,e.postsCount=t.posts_count,e.pinnedPosts=t.pinned_posts,e.lastPostId=t.last_post_id,e.context=t.context,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapToPostsForDiscussion",(t,e)=>{let n=new HC,r=new zC;return n.meta=this.remapToPostMeta(t.meta),n.data=t.data.map(i=>this.remapToPostByIdBasic(i)),r.meta=this.remapToPostMeta(t.meta),r.data=t.data.map(i=>this.remapToPostByIdFull(i)),e==="basic"?n:r});a(this,"remapToPosts",t=>{let e=new QC;return e.meta=this.remapToMeta(t.meta),e.data=t.data.map(n=>this.remapToPostByIdBasic(n)),e});a(this,"remapToPostMeta",t=>{let e=new Tu;return e.pagination.totalItems=t.pagination.total_items,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.lastCommentCreateTimestamp=t.pagination.last_comment_create_timestamp,e});a(this,"remapToMeta",t=>{let e=new ta;return e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e});a(this,"remapToPostByIdBasic",t=>{let e=new Zp;return e.id=t.id,e.userId=t.user_id,e.discussionId=t.discussion_id,e.content=t.content,e.reactionsCount=t.reactions_count,e.replyId=t.reply_id,e.reactions=t.reactions.length?t.reactions.map(n=>this.remapReactionsPost(n)):t.reactions,e.reactionsCount=t.reactions_count,e.reports=t.reports.length?t.reports.map(n=>this.remapReportPost(n)):t.reports,e.reportsCount=t.reports_count,e.versions=t.versions.length?t.versions.map(n=>this.remapVersionsPost(n)):t.versions,e.privatePost=t.private_post,e.deleted=t.deleted,e.deletedAt=t.deleted_at,e.deletedBy=t.deleted_by,e.moderated=t.moderated,e.moderatedAt=t.moderated_at,e.moderatedBy=t.moderated_by,e.moderatedReason=t.moderated_reason,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapToPostByIdFull",t=>{let e=new GC;return e.id=t.id,e.userId=t.user_id,e.discussionId=t.discussion_id,e.content=t.content,e.reactionsCount=t.reactions_count,e.replyId=t.reply_id,e.reactions=t.reactions.length?t.reactions.map(n=>this.remapReactionsPost(n)):t.reactions,e.reactionsCount=t.reactions_count,e.reports=t.reports.length?t.reports.map(n=>this.remapReportPost(n)):t.reports,e.reportsCount=t.reports_count,e.versions=t.versions.length?t.versions.map(n=>this.remapVersionsPost(n)):t.versions,e.privatePost=t.private_post,e.deleted=t.deleted,e.deletedAt=t.deleted_at,e.deletedBy=t.deleted_by,e.moderated=t.moderated,e.moderatedAt=t.moderated_at,e.moderatedBy=t.moderated_by,e.moderatedReason=t.moderated_reason,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e});a(this,"remapReactionsPost",t=>{let e=new VC;return e.type=t.type,e.userIds=t.user_ids,e.reactionCount=t.reaction_count,e});a(this,"remapVersionsPost",t=>{let e=new qC;return e.content=t.content,e.updatedAt=t.updated_at,e});a(this,"remapReportPost",t=>{let e=new WC;return e.userId=t.user_id,e.reason=t.reason,e.reasonDetails=t.reason_details,e})}},YC=class extends yn{constructor(e){super(e,rn(e.environment,"discussions"));a(this,"remapper",null);a(this,"getAll",(e,n)=>_(this,null,function*(){let r="/discussions"+this.apiSignInUrl;e&&(r+=`${e.constructMainFiltersUrl()}`),Xe(n)&&(r+=Ye());let i="There was a problem getting discussions",s=yield this.fetchWithoutAuth(r,i);return this.remapper.remapToDiscussions(s)}));a(this,"getById",e=>_(this,null,function*(){let n=`/discussions/${e}`+this.apiSignInUrl,r="There was a problem getting discussion",i=yield this.fetchWithoutAuth(n,r);return this.remapper.remapToDiscussionById(i.data)}));a(this,"createPost",(e,n)=>_(this,null,function*(){let r=`/discussions/${e}/posts`+this.apiSignInUrl,i="There was a problem creating post in discussion",s="POST",o=yield this.fetchWithAuth(r,i,s,n);return this.remapper.remapToPostByIdBasic(o.data)}));a(this,"getPostById",e=>_(this,null,function*(){let n=`/posts/${e}`+this.apiSignInUrl,r="There was a problem getting post by ID in discussion",i=yield this.fetchWithoutAuth(n,r);return this.remapper.remapToPostByIdFull(i.data)}));a(this,"updatePost",(e,n)=>_(this,null,function*(){let r=`/posts/${e}`+this.apiSignInUrl,i="There was a problem editing post in discussion",s="PUT",o={content:n},l=yield this.fetchWithAuth(r,i,s,o);return this.remapper.remapToPostByIdBasic(l.data)}));a(this,"reactToPost",(e,n)=>_(this,null,function*(){let r=`/posts/${e}/reaction`+this.apiSignInUrl,i="There was a problem reacting to post in discussion",s="PUT",o={reaction:n.toLocaleLowerCase()},l=yield this.fetchWithAuth(r,i,s,o);return this.remapper.remapToPostByIdBasic(l.data)}));a(this,"deletePost",e=>_(this,null,function*(){let n=`/posts/${e}`+this.apiSignInUrl,r="There was a problem deleting post in discussion",i="DELETE";return yield this.fetchWithAuth(n,r,i),!0}));a(this,"getPosts",(e,n)=>_(this,null,function*(){let r=`/discussions/${e}/posts`+this.apiSignInUrl;n&&(r+=`${n.constructMainFiltersUrl()}`);let i="There was a problem getting posts in discussion",s=yield this.fetchWithoutAuth(r,i);return this.remapper.remapToPostsForDiscussion(s,"full")}));a(this,"getPostReplies",(e,n)=>_(this,null,function*(){let r=`/posts/${e}/replies`+this.apiSignInUrl;n&&(r+=`${n.constructMainFiltersUrl()}`);let i="There was a problem getting post's replies in discussion",s=yield this.fetchWithoutAuth(r,i);return this.remapper.remapToPostsForDiscussion(s,"full")}));a(this,"reportPost",(e,n,r)=>_(this,null,function*(){let i=`/posts/${e}/report`+this.apiSignInUrl,s="There was a problem reporting post in discussion",o="POST",l={reason:n.toLocaleUpperCase(),reason_details:r||null},u=yield this.fetchWithAuth(i,s,o,l);return this.remapper.remapToPostByIdBasic(u.data)}));a(this,"getOwnPosts",e=>_(this,null,function*(){let n="/posts"+this.apiSignInUrl;e&&(n+=`${e.constructMainFiltersUrl()}`);let r="There was a problem getting own posts",i=yield this.fetchWithAuth(n,r);return this.remapper.remapToPosts(i)}));a(this,"getUserPosts",(e,n,r)=>_(this,null,function*(){let i=`/posts/users/${e}`+this.apiSignInUrl;n&&(i+=`${n.constructMainFiltersUrl()}`),Xe(r)&&(i+=Ye());let s="There was a problem getting user's posts",o=yield this.fetchWithoutAuth(i,s);return this.remapper.remapToPosts(o)}));this.remapper=new em}},KC=class{constructor(){a(this,"content","");a(this,"reply_id","");a(this,"context",null)}},JC=class{constructor(){a(this,"createRequestBodyFromParam",t=>{let e=new KC;return e.content=t.content,e.reply_id=t.replyId,e.context=t.context,e})}},XC=class extends Tr{constructor(e){super(e);a(this,"discussionIds");a(this,"label");a(this,"fromDate");a(this,"toDate");a(this,"fromCount");a(this,"toCount");a(this,"sort");this.discussionIds=e&&e.discussionIds?e.discussionIds:null,this.label=e&&e.label?e.label:null,this.fromDate=e&&e.fromDate?e.fromDate:null,this.toDate=e&&e.toDate?e.toDate:null,this.fromCount=e&&e.fromCount?e.fromCount:null,this.toCount=e&&e.toCount?e.toCount:null,this.sort=e&&e.sort?e.sort:null}constructMainFiltersUrl(){let e=super.constructMainFiltersUrl();return this.discussionIds!==null&&(e+=`&discussion_ids=${this.discussionIds.join(",")}`),this.label!==null&&(e+=`&label=${this.label}`),this.fromDate!==null&&(e+=`&from_date=${this.fromDate}`),this.toDate!==null&&(e+=`&to_date=${this.toDate}`),this.fromCount!==null&&(e+=`&from_count=${this.fromCount}`),this.toCount!==null&&(e+=`&to_count=${this.toCount}`),this.sort&&(e+=`&sort=${this.sort}`),e}},Hs=class extends Tr{constructor(e){super(e);a(this,"skipDeleted");a(this,"sort");this.skipDeleted=e&&e.skipDeleted!==void 0?e.skipDeleted:null,this.sort=e&&e.sort?e.sort.toLocaleLowerCase():null}constructMainFiltersUrl(){let e=super.constructMainFiltersUrl();return this.skipDeleted!==null&&(e+=`&skip_deleted=${this.skipDeleted}`),this.sort&&(e+=`&sort=${this.sort}`),e}},Cu=class{constructor(t){a(this,"profile",null);a(this,"finalizePostFullModel",t=>_(this,null,function*(){let e=t.map(r=>r.userId),n=yield this.profile.getByIds(e);return t.map(r=>(r.userModel=this.extractModelById(n,r.userId),r))}));a(this,"extractModelById",(t,e)=>{if(t.length){let n=t.find(r=>r.id===e);return n?(delete n.interests,n):null}return null});this.profile=new or(t)}},ZC=class{constructor(t){a(this,"idSchema",null);a(this,"https",null);a(this,"clientHttps",null);a(this,"activityService",null);a(this,"service",null);a(this,"factory",null);a(this,"getAll",(t,e)=>_(this,null,function*(){t&&(t=new XC(t));let n=yield this.https.getAll(t,e);for(let r of n.data)yield this.remapTags(r,"native",this.idSchema);return n}));a(this,"getById",t=>_(this,null,function*(){let e=yield this.https.getById(t);return yield this.remapTags(e,"native",this.idSchema),e}));a(this,"createPost",(t,e)=>_(this,null,function*(){let n=JSON.parse(JSON.stringify(e));yield this.remapTags(n,this.idSchema,"native");let r=this.factory.createRequestBodyFromParam(n);return yield this.https.createPost(t,r)}));a(this,"getPostById",t=>_(this,null,function*(){let e=yield this.https.getPostById(t);return(yield this.service.finalizePostFullModel([e]))[0]}));a(this,"updatePost",(t,e)=>_(this,null,function*(){return yield this.https.updatePost(t,e)}));a(this,"deletePost",t=>_(this,null,function*(){return yield this.https.deletePost(t)}));a(this,"getPosts",(t,e)=>_(this,null,function*(){e&&(e=new Hs(e));let n=yield this.https.getPosts(t,e);return n.data=yield this.service.finalizePostFullModel(n.data),n}));a(this,"getPostReplies",(t,e)=>_(this,null,function*(){e&&(e=new Hs(e));let n=yield this.https.getPostReplies(t,e);return n.data=yield this.service.finalizePostFullModel(n.data),n}));a(this,"reactToPost",(t,e)=>_(this,null,function*(){return yield this.https.reactToPost(t,e)}));a(this,"reportPost",(t,e,n)=>_(this,null,function*(){return yield this.https.reportPost(t,e,n)}));a(this,"getOwnPosts",t=>_(this,null,function*(){return t&&(t=new Hs(t)),yield this.https.getOwnPosts(t)}));a(this,"getUserPosts",(t,e,n)=>_(this,null,function*(){return e&&(e=new Hs(e)),yield this.https.getUserPosts(t,e,n)}));a(this,"getConfig",()=>_(this,null,function*(){return yield this.clientHttps.getConfig("discussions")}));a(this,"remapTags",(t,e,n)=>_(this,null,function*(){if(this.idSchema!="native"&&t.context&&t.context.tags&&t.context.tags.length){let r=JSON.parse(JSON.stringify(t.context.tags)),i=yield this.activityService.remapTagsIds(r,e,n);t.context.tags=i}}));this.idSchema=t.idSchema,this.https=new YC(t),this.clientHttps=new Xr(t),this.activityService=new Ou(t),this.service=new Cu(t),this.factory=new JC}},eS=class{constructor(t){a(this,"facade",null);a(this,"getAll",(t,e)=>_(this,null,function*(){return yield this.facade.getAll(t,e)}));a(this,"getById",t=>_(this,null,function*(){return yield this.facade.getById(t)}));a(this,"createPost",(t,e)=>_(this,null,function*(){return yield this.facade.createPost(t,e)}));a(this,"getPostById",t=>_(this,null,function*(){return yield this.facade.getPostById(t)}));a(this,"updatePost",(t,e)=>_(this,null,function*(){return yield this.facade.updatePost(t,e)}));a(this,"deletePost",t=>_(this,null,function*(){return yield this.facade.deletePost(t)}));a(this,"getPosts",(t,e)=>_(this,null,function*(){return yield this.facade.getPosts(t,e)}));a(this,"getPostReplies",(t,e)=>_(this,null,function*(){return yield this.facade.getPostReplies(t,e)}));a(this,"react",(t,e)=>_(this,null,function*(){return yield this.facade.reactToPost(t,e)}));a(this,"reportPost",(t,e,n)=>_(this,null,function*(){return yield this.facade.reportPost(t,e,n)}));a(this,"getOwnPosts",t=>_(this,null,function*(){return yield this.facade.getOwnPosts(t)}));a(this,"getUserPosts",(t,e,n)=>_(this,null,function*(){return yield this.facade.getUserPosts(t,e,n)}));a(this,"getConfig",()=>_(this,null,function*(){return yield this.facade.getConfig()}));this.facade=new ZC(t)}},tS=class{constructor(){a(this,"profileId","");a(this,"profileModel",null);a(this,"challengeId","");a(this,"challengeModel",null);a(this,"message","")}},nS=class{constructor(){a(this,"profileId","");a(this,"profileModel",null);a(this,"leagueId","");a(this,"leagueModel",null);a(this,"message","")}},tm=class{constructor(){a(this,"id","");a(this,"name","");a(this,"description","");a(this,"type","");a(this,"banned",[]);a(this,"invites",[]);a(this,"administrators",[]);a(this,"invitationCode","");a(this,"templateId","");a(this,"templateModel",null);a(this,"pastTemplates",[]);a(this,"usersCanInviteUsers",!1);a(this,"scoringStartsAt","");a(this,"pinnedPosts",[])}},rS=class extends tm{constructor(){super(...arguments);a(this,"members",[])}},iS=class{constructor(){a(this,"predictionId",null);a(this,"predictionModel",null);a(this,"profileId",null);a(this,"profileModel",null)}},aS=class{constructor(){a(this,"remapToPrivateLeagues",t=>(t.meta=this.remapMetaPrivateLeagues(t.meta.pagination),t.data=t.data.map(e=>this.remapToPrivateLeagueById(e)),t));a(this,"remapMetaPrivateLeagues",t=>{let e=new ta;return e.pagination.itemsPerPage=t.items_per_page,e.pagination.nextPageStartsAfter=t.next_page_starts_after,e});a(this,"remapToPrivateLeagueById",t=>{let e=new rS;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.members=t.members,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e});a(this,"remapToMyPrivateLeagues",t=>{let e=new tm;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e});a(this,"remapToAcceptPrivateLeague",t=>{let e=new nS;return e.profileId=t.profile_id,e.leagueId=t.league_id,e.message=t.message,e});a(this,"remapToAcceptChallenge",t=>{let e=new tS;return e.profileId=t.profile_id,e.challengeId=t.league_id,e.message=t.message,e});a(this,"remapPredictions",t=>(t.meta=this.remapMeta(t.meta),t.data=this.remapPredictionsData(t.data),t));a(this,"remapMeta",t=>{let e=new Zr;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e});a(this,"remapPredictionsData",t=>t.map(e=>{let n=new iS;return n.predictionId=e.prediction_id,n.profileId=e.profile_id,n}))}},nm=class extends yn{constructor(e){super(e,rn(e.environment,"privateLeagues"));a(this,"remapper",null);a(this,"discussionsRemapper",null);a(this,"discussionsBaseURL",null);a(this,"create",(e,n)=>_(this,null,function*(){let r="/leagues"+this.apiSignInUrl,i=`There was a problem ${n==="PRIVATE_LEAGUE"?"creating private league":"issuing challenge"}`,s="POST",o=yield this.fetchWithAuth(r,i,s,e);return this.remapper.remapToPrivateLeagueById(o.data)}));a(this,"update",(e,n,r)=>_(this,null,function*(){let i=`/leagues/${e}`+this.apiSignInUrl,s=`There was a problem updating ${r==="PRIVATE_LEAGUE"?"private league":"challenge"}`,o="PUT",l=yield this.fetchWithAuth(i,s,o,n);return this.remapper.remapToPrivateLeagueById(l.data)}));a(this,"updateLeagueTemplate",(e,n,r,i)=>_(this,null,function*(){let s=`/leagues/${e}/template`+this.apiSignInUrl,o=`There was a problem updating template for the ${i==="PRIVATE_LEAGUE"?"private league":"challenge"}`,l="POST",u={new_template_id:n,past_template_name:r},c=yield this.fetchWithAuth(s,o,l,u);return this.remapper.remapToPrivateLeagueById(c.data)}));a(this,"getById",(e,n,r)=>_(this,null,function*(){let i=`/leagues/${e}`+this.apiSignInUrl;Xe(r)&&(i+=Ye());let s=`There was a problem getting ${n==="PRIVATE_LEAGUE"?"private league":"challenge"}`,o=yield this.fetchWithAuth(i,s);return this.remapper.remapToPrivateLeagueById(o.data)}));a(this,"getMyLeagues",(e,n)=>_(this,null,function*(){let r="/leagues"+this.apiSignInUrl+e.constructFiltersUrl(),i=`There was a problem getting user's ${n==="PRIVATE_LEAGUE"?"private leagues":"challenges"}`;return(yield this.fetchWithAuth(r,i)).data.map(s=>this.remapper.remapToMyPrivateLeagues(s))}));a(this,"delete",(e,n)=>_(this,null,function*(){let r=`/leagues/${e}`+this.apiSignInUrl,i=`There was a problem deleting ${n==="PRIVATE_LEAGUE"?"private league":"challenge"}`,s="DELETE";return yield this.fetchWithAuth(r,i,s),!0}));a(this,"invite",(e,n)=>_(this,null,function*(){let r=`/membership/invite/${e}`+this.apiSignInUrl,i=`There was a problem inviting the following users: ${n.join(",")}`,s="POST",o={profiles:n};return(yield this.fetchWithAuth(r,i,s,o)).data}));a(this,"deleteInvitation",(e,n)=>_(this,null,function*(){let r=`/membership/invite/${e}`+this.apiSignInUrl,i=`There was a problem deleting invitation for the following users: ${n.join(",")}`,s="DELETE",o={profiles:n};return yield this.fetchWithAuth(r,i,s,o),!0}));a(this,"accept",(e,n,r)=>_(this,null,function*(){let i=`/membership/accept/${e}`+this.apiSignInUrl+`&accept=${n?"ACCEPT":"REJECT"}`,s=`There was a problem ${n?"accepting":"rejecting"} invitation for ${r==="PRIVATE_LEAGUE"?"private league":"challenge"}: ${e}`,o="POST",l=yield this.fetchWithAuth(i,s,o);return r==="PRIVATE_LEAGUE"?this.remapper.remapToAcceptPrivateLeague(l.data):this.remapper.remapToAcceptChallenge(l.data)}));a(this,"ban",(e,n)=>_(this,null,function*(){let r=`/membership/ban/${e}`+this.apiSignInUrl,i=`There was a problem banning the following users: ${n.join(",")}`,s="POST",o={profiles:n};return(yield this.fetchWithAuth(r,i,s,o)).data}));a(this,"unban",(e,n)=>_(this,null,function*(){let r=`/membership/unban/${e}`+this.apiSignInUrl,i=`There was a problem unbanning the following users: ${n.join(",")}`,s="POST",o={profiles:n};return(yield this.fetchWithAuth(r,i,s,o)).data}));a(this,"join",e=>_(this,null,function*(){let n="/membership/join"+this.apiSignInUrl+`&invitation_code=${e}`,r="There was a problem joining league",i="POST",s=yield this.fetchWithAuth(n,r,i);return this.remapper.remapToAcceptPrivateLeague(s.data)}));a(this,"leave",(e,n)=>_(this,null,function*(){let r=`/membership/leave/${e}`+this.apiSignInUrl,i=`There was a problem leaving the following ${n==="PRIVATE_LEAGUE"?"league":"challenge"}: ${e}`,s="POST";return(yield this.fetchWithAuth(r,i,s)).data}));a(this,"getInvitations",(e,n)=>_(this,null,function*(){let r="/membership/invitations"+this.apiSignInUrl+n.constructMainFiltersUrl(),i=`There was a problem getting invitations for ${e==="PRIVATE_LEAGUE"?"leagues":"challenges"}`,s=yield this.fetchWithAuth(r,i);return this.remapper.remapToPrivateLeagues(s)}));a(this,"getReportedPosts",(e,n)=>_(this,null,function*(){let r=`/discussions/${e}/posts/reported${this.apiSignInUrl}`,i=`There was a problem fetching posts for the following: ${e}`;n&&(r+=n.constructMainFiltersUrl());let s=yield this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,r,i);return this.discussionsRemapper.remapToPostsForDiscussion(s,"full")}));a(this,"getPredictions",(e,n)=>_(this,null,function*(){let r=`/leagues/${e}/predictions`+this.apiSignInUrl,i=`There was a problem getting predictions for private league: ${e}`;n&&(r+=n.constructFiltersUrl());let s=yield this.fetchWithAuth(r,i);return this.remapper.remapPredictions(s)}));a(this,"moderatePost",(e,n)=>_(this,null,function*(){let r=`/posts/${e}/admin/moderate${this.apiSignInUrl}`,i=`There was a problem moderating the following post: ${e}`,s="POST",o={moderation_reason:n},l=yield this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,r,i,s,o);return this.discussionsRemapper.remapToPostByIdBasic(l.data)}));this.discussionsBaseURL=rn(e.environment,"discussions"),this.remapper=new aS,this.discussionsRemapper=new em}},rm=class{constructor(){a(this,"name","");a(this,"description","");a(this,"invitation_code","");a(this,"template_id","");a(this,"users_can_invite_users",!1);a(this,"administrators",[]);a(this,"scoring_starts_at","")}},sS=class extends rm{constructor(){super(...arguments);a(this,"type","ONE_VS_ONE")}},oS=class extends rm{constructor(){super(...arguments);a(this,"type","PRIVATE")}},im=class{constructor(){a(this,"name","");a(this,"description","");a(this,"invitation_code","");a(this,"template_id","");a(this,"users_can_invite_users",!1);a(this,"administrators",[]);a(this,"pinned_posts",[]);a(this,"scoring_starts_at","")}},lS=class extends im{constructor(){super(...arguments);a(this,"type","PRIVATE")}},uS=class extends im{constructor(){super(...arguments);a(this,"type","ONE_VS_ONE")}},am=class{constructor(){a(this,"createRequestBodyFromParam",(t,e)=>{let n=e==="PRIVATE"?new oS:new sS;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,t.administrators?n.administrators=t.administrators:delete n.administrators,t.scoringStartsAt?n.scoring_starts_at=t.scoringStartsAt:delete n.scoring_starts_at,n});a(this,"createUpdateRequestBodyFromParam",(t,e)=>{let n=e==="PRIVATE"?new lS:new uS;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,n.administrators=t.administrators,n.pinned_posts=t.pinnedPosts,n.scoring_starts_at=t.scoringStartsAt,n})}},sm=class extends Tr{constructor(e){super(e);a(this,"type",null);a(this,"constructMainFiltersUrl",()=>{let e=super.constructMainFiltersUrl();return this.type&&(e+=`&type=${this.type}`),e});this.type=e&&e.type?e.type:null}},cS=class{constructor(t){a(this,"type","PRIVATE");a(this,"userRole",null);a(this,"constructFiltersUrl",()=>{let t=`&type=${this.type}`;return this.userRole&&(t+=`&user_role=${this.userRole}`),t});this.userRole=(t==null?void 0:t.userRole)||null}},dS=class{constructor(t){a(this,"limit",null);a(this,"page",null);a(this,"leagueId",null);a(this,"templateId",null);a(this,"sortOrder",null);a(this,"constructFiltersUrl",()=>{let t="";return this.limit&&(t+=`&limit=${this.limit}`),this.page&&(t+=`&page=${this.page}`),this.leagueId&&(t+=`&league_id=${this.leagueId}`),this.templateId&&(t+=`&template_id=${this.templateId}`),this.sortOrder&&(t+=`&sort_order=${this.sortOrder}`),t});this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.leagueId=t&&t.leagueId?t.leagueId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},om=class extends Tr{constructor(e){super(e);a(this,"reportsCount",null);a(this,"constructMainFiltersUrl",()=>{let e=super.constructMainFiltersUrl();return this.reportsCount&&(e+=`&reports_count=${this.reportsCount}`),e});this.reportsCount=e.reportsCount?e.reportsCount:null}},lm=class{constructor(t){a(this,"limit",null);a(this,"page",null);a(this,"profileIds",null);a(this,"constructFiltersUrl",()=>{let t="";return this.limit&&(t+=`&limit=${this.limit}`),this.page&&(t+=`&page=${this.page}`),this.profileIds&&(t+=`&profile_ids=${this.profileIds.join(",")}`),t});this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.profileIds=t&&t.profileIds?t.leagueId:null}},um=class{constructor(t){a(this,"loyalty",null);a(this,"profile",null);a(this,"predictor",null);a(this,"setTemplateModels",t=>_(this,null,function*(){let e=yield this.loyalty.getTemplates();t.templateModel=e.data.find(n=>n.id===t.templateId),t.pastTemplates&&t.pastTemplates.length>0&&t.pastTemplates.forEach(n=>{n.model=e.data.find(r=>r.id===n.id)})}));a(this,"setTemplateModelsInLeagues",t=>_(this,null,function*(){if(!t.length)return;let e=yield this.loyalty.getTemplates();t.forEach(n=>{n.templateModel=e.data.find(r=>r.id===n.templateId),n.pastTemplates&&n.pastTemplates.length>0&&n.pastTemplates.forEach(r=>{r.model=e.data.find(i=>i.id===r.id)})})}));a(this,"setTemplateModelsFromLeagueModels",(t,e)=>{if(e==="PRIVATE_LEAGUE"){t.forEach(n=>{n.templateModel=n.templateId===n.privateLeagueModel.templateId?n.privateLeagueModel.templateModel:n.privateLeagueModel.pastTemplates.find(r=>r.id===n.templateId).model});return}t.forEach(n=>{n.templateModel=n.templateId===n.challengeModel.templateId?n.challengeModel.templateModel:n.challengeModel.pastTemplates.find(r=>r.id===n.templateId).model})});a(this,"setProfileModel",t=>_(this,null,function*(){let e=yield this.profile.getById(t.profileId).getInfo();t.profileModel=e}));a(this,"setModelsForPredictions",t=>_(this,null,function*(){if(t.data.length){let e=t.data.map(s=>s.profileId),n=t.data.map(s=>s.predictionId),r=yield this.getProfileModels(e),i=yield this.getPredictionModels(n);t.data.forEach(s=>{s.profileModel=r.find(o=>o.id===s.profileId),s.predictionModel=i.find(o=>o.id===s.predictionId)})}return t}));a(this,"getProfileModels",t=>_(this,null,function*(){return yield this.profile.getByIds(t)}));a(this,"getPredictionModels",t=>_(this,null,function*(){return yield this.predictor.getPredictionsByIds(t)}));this.loyalty=new Vp(t),this.profile=new or(t),this.predictor=new Bp(t)}},fS=class{constructor(t){a(this,"factory",null);a(this,"privateLeagueHttps",null);a(this,"loyaltyHttps",null);a(this,"profile",null);a(this,"service",null);a(this,"discussionsService",null);a(this,"create",t=>_(this,null,function*(){let e=this.factory.createRequestBodyFromParam(t,"PRIVATE"),n=yield this.privateLeagueHttps.create(e,"PRIVATE_LEAGUE");return yield this.service.setTemplateModels(n),n}));a(this,"getById",(t,e)=>_(this,null,function*(){let n=yield this.privateLeagueHttps.getById(t,"PRIVATE_LEAGUE",e);return yield this.service.setTemplateModels(n),n}));a(this,"getMyLeagues",t=>_(this,null,function*(){t=new cS(t);let e=yield this.privateLeagueHttps.getMyLeagues(t,"PRIVATE_LEAGUE");return yield this.service.setTemplateModelsInLeagues(e),e}));a(this,"update",(t,e)=>_(this,null,function*(){let n=this.factory.createUpdateRequestBodyFromParam(e,"PRIVATE"),r=yield this.privateLeagueHttps.update(t,n,"PRIVATE_LEAGUE");return yield this.service.setTemplateModels(r),r}));a(this,"updateTemplate",(t,e,n)=>_(this,null,function*(){let r=yield this.privateLeagueHttps.updateLeagueTemplate(t,e,n,"PRIVATE_LEAGUE");return yield this.service.setTemplateModels(r),r}));a(this,"delete",t=>_(this,null,function*(){return yield this.privateLeagueHttps.delete(t,"PRIVATE_LEAGUE")}));a(this,"invite",(t,e)=>_(this,null,function*(){return yield this.privateLeagueHttps.invite(t,e)}));a(this,"deleteInvitation",(t,e)=>_(this,null,function*(){return yield this.privateLeagueHttps.deleteInvitation(t,e)}));a(this,"accept",t=>_(this,null,function*(){let e=yield this.privateLeagueHttps.accept(t,!0,"PRIVATE_LEAGUE");return yield this.finalizeAcceptModel(e,!0)}));a(this,"reject",t=>_(this,null,function*(){let e=yield this.privateLeagueHttps.accept(t,!1,"PRIVATE_LEAGUE");return yield this.finalizeAcceptModel(e,!1)}));a(this,"banUsers",(t,e)=>_(this,null,function*(){return yield this.privateLeagueHttps.ban(t,e)}));a(this,"unbanUsers",(t,e)=>_(this,null,function*(){return yield this.privateLeagueHttps.unban(t,e)}));a(this,"join",t=>_(this,null,function*(){let e=yield this.privateLeagueHttps.join(t);return yield this.finalizeAcceptModel(e,!0)}));a(this,"leave",t=>_(this,null,function*(){return yield this.privateLeagueHttps.leave(t,"PRIVATE_LEAGUE")}));a(this,"finalizeAcceptModel",(t,e)=>_(this,null,function*(){if(e){let n=yield this.getById(t.leagueId);t.leagueModel=n}return yield this.service.setProfileModel(t),t}));a(this,"getMyLeaguesStandings",t=>_(this,null,function*(){t&&(t=new dS(t));let e=yield this.profile.getOwn().getInfo(),n=yield this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"PRIVATE_LEAGUE",t);for(let r of n.data){let i=yield this.getById(r.privateLeagueId);r.privateLeagueModel=i}return this.service.setTemplateModelsFromLeagueModels(n.data,"PRIVATE_LEAGUE"),n}));a(this,"getInvitations",t=>_(this,null,function*(){t=new sm(t),t.type="PRIVATE";let e=yield this.privateLeagueHttps.getInvitations("PRIVATE_LEAGUE",t);return yield this.service.setTemplateModelsInLeagues(e.data),e}));a(this,"getReportedPosts",(t,e)=>_(this,null,function*(){e&&(e=new om(e));let n=yield this.privateLeagueHttps.getReportedPosts(t,e);return n.data=yield this.discussionsService.finalizePostFullModel(n.data),n}));a(this,"getPredictions",(t,e)=>_(this,null,function*(){if(e){if(e.limit&&e.limit>20)throw new He(400,"invalid_limit","Invalid limit filter. The maximum limit is 20");e=new lm(e)}let n=yield this.privateLeagueHttps.getPredictions(t,e);return yield this.service.setModelsForPredictions(n)}));a(this,"moderatePost",(t,e)=>_(this,null,function*(){return yield this.privateLeagueHttps.moderatePost(t,e)}));this.factory=new am,this.privateLeagueHttps=new nm(t),this.loyaltyHttps=new Iu(t),this.profile=new or(t),this.service=new um(t),this.discussionsService=new Cu(t)}},hS=class{constructor(t){a(this,"privateLeaguesFacade",null);a(this,"create",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.create(t)}));a(this,"update",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.update(t,e)}));a(this,"updateTemplate",(t,e,n)=>_(this,null,function*(){return yield this.privateLeaguesFacade.updateTemplate(t,e,n)}));a(this,"delete",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.delete(t)}));a(this,"getById",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.getById(t,e)}));a(this,"getMyLeagues",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.getMyLeagues(t)}));a(this,"invite",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.invite(t,e)}));a(this,"deleteInvitation",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.deleteInvitation(t,e)}));a(this,"accept",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.accept(t)}));a(this,"reject",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.reject(t)}));a(this,"banUsers",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.banUsers(t,e)}));a(this,"unbanUsers",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.unbanUsers(t,e)}));a(this,"join",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.join(t)}));a(this,"leave",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.leave(t)}));a(this,"getMyLeaguesStandings",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.getMyLeaguesStandings(t)}));a(this,"getInvitations",t=>_(this,null,function*(){return yield this.privateLeaguesFacade.getInvitations(t)}));a(this,"getReportedPosts",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.getReportedPosts(t,e)}));a(this,"getPredictions",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.getPredictions(t,e)}));a(this,"moderatePost",(t,e)=>_(this,null,function*(){return yield this.privateLeaguesFacade.moderatePost(t,e)}));this.privateLeaguesFacade=new fS(t)}},pS=class{constructor(t){a(this,"limit",null);a(this,"page",null);a(this,"challengeId",null);a(this,"templateId",null);a(this,"sortOrder",null);a(this,"constructFiltersUrl",()=>{let t="";return this.limit&&(t+=`&limit=${this.limit}`),this.page&&(t+=`&page=${this.page}`),this.challengeId&&(t+=`&league_id=${this.challengeId}`),this.templateId&&(t+=`&template_id=${this.templateId}`),this.sortOrder&&(t+=`&sort_order=${this.sortOrder}`),t});this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.challengeId=t&&t.challengeId?t.challengeId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},mS=class{constructor(t){a(this,"type","ONE_VS_ONE");a(this,"userRole",null);a(this,"constructFiltersUrl",()=>{let t=`&type=${this.type}`;return this.userRole&&(t+=`&user_role=${this.userRole}`),t});this.userRole=(t==null?void 0:t.userRole)||null}},gS=class{constructor(t){a(this,"factory",null);a(this,"https",null);a(this,"loyaltyHttps",null);a(this,"profile",null);a(this,"service",null);a(this,"discussionsService",null);a(this,"issue",(t,e)=>_(this,null,function*(){let n=this.factory.createRequestBodyFromParam(t,"ONE_VS_ONE"),r=yield this.https.create(n,"CHALLENGE");yield this.service.setTemplateModels(r);let i=yield this.https.invite(r.id,[e]);return r.invites=[],r.invites.push(i[0]),r}));a(this,"update",(t,e)=>_(this,null,function*(){let n=this.factory.createUpdateRequestBodyFromParam(e,"ONE_VS_ONE"),r=yield this.https.update(t,n,"CHALLENGE");return yield this.service.setTemplateModels(r),r}));a(this,"updateTemplate",(t,e,n)=>_(this,null,function*(){let r=yield this.https.updateLeagueTemplate(t,e,n,"CHALLENGE");return yield this.service.setTemplateModels(r),r}));a(this,"delete",t=>_(this,null,function*(){return yield this.https.delete(t,"CHALLENGE")}));a(this,"getById",(t,e)=>_(this,null,function*(){let n=yield this.https.getById(t,"CHALLENGE",e);return yield this.service.setTemplateModels(n),n}));a(this,"getMyChallenges",t=>_(this,null,function*(){t=new mS(t);let e=yield this.https.getMyLeagues(t,"CHALLENGE");return yield this.service.setTemplateModelsInLeagues(e),e}));a(this,"accept",t=>_(this,null,function*(){let e=yield this.https.accept(t,!0,"CHALLENGE");return yield this.finalizeAcceptModel(e,!0)}));a(this,"reject",t=>_(this,null,function*(){let e=yield this.https.accept(t,!1,"CHALLENGE");return yield this.finalizeAcceptModel(e,!1)}));a(this,"leave",t=>_(this,null,function*(){return yield this.https.leave(t,"CHALLENGE")}));a(this,"finalizeAcceptModel",(t,e)=>_(this,null,function*(){if(e){let n=yield this.getById(t.challengeId);t.challengeModel=n}return yield this.service.setProfileModel(t),t}));a(this,"getMyChallengesStandings",t=>_(this,null,function*(){t&&(t=new pS(t));let e=yield this.profile.getOwn().getInfo(),n=yield this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"CHALLENGE",t);for(let r of n.data){let i=yield this.getById(r.challengeId);r.challengeModel=i}return this.service.setTemplateModelsFromLeagueModels(n.data,"CHALLENGE"),n}));a(this,"getInvitations",t=>_(this,null,function*(){t=new sm(t),t.type="ONE_VS_ONE";let e=yield this.https.getInvitations("CHALLENGE",t);return yield this.service.setTemplateModelsInLeagues(e.data),e}));a(this,"getReportedPosts",(t,e)=>_(this,null,function*(){e&&(e=new om(e));let n=yield this.https.getReportedPosts(t,e);return n.data=yield this.discussionsService.finalizePostFullModel(n.data),n}));a(this,"getPredictions",(t,e)=>_(this,null,function*(){if(e){if(e.limit&&e.limit>20)throw new He(400,"invalid_limit","Invalid limit filter. The maximum limit is 20");e=new lm(e)}let n=yield this.https.getPredictions(t,e);return yield this.service.setModelsForPredictions(n)}));a(this,"moderatePost",(t,e)=>_(this,null,function*(){return yield this.https.moderatePost(t,e)}));this.factory=new am,this.https=new nm(t),this.service=new um(t),this.loyaltyHttps=new Iu(t),this.profile=new or(t),this.discussionsService=new Cu(t)}},vS=class{constructor(t){a(this,"facade",null);a(this,"issue",(t,e)=>_(this,null,function*(){return yield this.facade.issue(t,e)}));a(this,"update",(t,e)=>_(this,null,function*(){return yield this.facade.update(t,e)}));a(this,"updateTemplate",(t,e,n)=>_(this,null,function*(){return yield this.facade.updateTemplate(t,e,n)}));a(this,"delete",t=>_(this,null,function*(){return yield this.facade.delete(t)}));a(this,"getById",(t,e)=>_(this,null,function*(){return yield this.facade.getById(t,e)}));a(this,"getMyChallenges",t=>_(this,null,function*(){return yield this.facade.getMyChallenges(t)}));a(this,"accept",t=>_(this,null,function*(){return yield this.facade.accept(t)}));a(this,"reject",t=>_(this,null,function*(){return yield this.facade.reject(t)}));a(this,"leave",t=>_(this,null,function*(){return yield this.facade.leave(t)}));a(this,"getMyChallengesStandings",t=>_(this,null,function*(){return yield this.facade.getMyChallengesStandings(t)}));a(this,"getInvitations",t=>_(this,null,function*(){return yield this.facade.getInvitations(t)}));a(this,"getReportedPosts",(t,e)=>_(this,null,function*(){return yield this.facade.getReportedPosts(t,e)}));a(this,"getPredictions",(t,e)=>_(this,null,function*(){return yield this.facade.getPredictions(t,e)}));a(this,"moderatePost",(t,e)=>_(this,null,function*(){return yield this.facade.moderatePost(t,e)}));this.facade=new gS(t)}},yS=class{constructor(){a(this,"KEY_PREFIX","fu-progress-");a(this,"get",(t,e)=>{let n=localStorage.getItem(`${this.KEY_PREFIX}${t}-${e}`);return n&&JSON.parse(n)});a(this,"set",(t,e,n)=>(localStorage.setItem(`${this.KEY_PREFIX}${t}-${e}`,JSON.stringify(n)),JSON.stringify(n)));a(this,"delete",(t,e)=>{localStorage.removeItem(`${this.KEY_PREFIX}${t}-${e}`)})}},Vs=null,Su=null;function wS(t){if(bS(t)){let e=_S(t);if(e.isValid)return Vs={profile:new or(t),football:new Ds(t),predictor:new Bp(t),loyalty:new Vp(t),topX:new cC(t),matchQuiz:new dC(t),activity:new mC(t),miniGames:new $C(t),discussions:new eS(t),privateLeagues:new hS(t),challenges:new vS(t),progress:new yS},Su=Z({},t),Vs;ES(e)}return Vs}var bS=t=>!Vs||JSON.stringify(t)!==JSON.stringify(Su)||t.authProvider.getIdToken()!==Su.authProvider.getIdToken(),_S=t=>{let e=new cT().validate(t);return(e.idSchema.validation==="missing"||e.idSchema.validation==="invalid")&&(console.warn(e.idSchema.message.text),t.idSchema="native"),(e.environment.validation==="missing"||e.environment.validation==="invalid")&&(console.warn(e.environment.message.text),t.environment="prod"),(e.lang.validation==="missing"||e.lang.validation==="invalid")&&(console.warn(e.lang.message.text),t.lang="en"),(e.errorHandlingMode.validation==="missing"||e.errorHandlingMode.validation==="invalid")&&(console.warn(e.errorHandlingMode.message.text),t.errorHandlingMode="default"),e.authProvider.validation==="invalid"&&console.warn(e.authProvider.message.text),e},ES=t=>{let e="authProvider",n="isValid";Object.keys(t).forEach(r=>{let i=t[r];if(r!==n&&r!==e){if(i.message.type==="error")throw new Error(i.message.text)}else r!==n&&r===e&&Object.keys(new yu).forEach(s=>{if(i[s].message.type==="error")throw new Error(i[s].message.text)})})};const En=K.createContext(null),IS=({config:t,sportal365Config:e,children:n})=>{const r=K.useMemo(()=>wS(t),[t]),i=K.useMemo(()=>new uA(t,e),[t]);return j(En.Provider,{value:{sdk:r,https:i},children:n})},AS=({data:t,fetchEitherOrById:e,handleModal:n,setSelectedEitherOr:r})=>{const{timeFormat:i}=Ie(Me),{https:s}=Ie(En),{data:o}=iu({queryKey:["eitherOrTypes"],queryFn:s.getEitherOrTypes}),l=(u,c)=>{u.stopPropagation(),r(c),n()};return j("tbody",{className:"eow-bg-white",children:t.map(u=>{var c;return ae("tr",{className:"eow-border-b hover:eow-bg-gray-50 eow-cursor-pointer",onClick:()=>e(u.id),children:[ae("td",{className:"eow-p-2 eow-font-semibold eow-text-black eow-text-xl eow-mb-2",children:[j("p",{className:"eow-mb-1",children:u.title}),j("div",{className:"eow-flex eow-flex-wrap",children:u.flags.map(d=>j("span",{className:"eow-d-inline-block eow-mr-1 eow-mb-1 eow-border eow-rounded eow-border-gray-200 eow-p-1 eow-text-xs",children:d},d))})]}),j("td",{className:"md:eow-text-center eow-text-right eow-p-2",children:j("span",{className:`eow-text-center eow-text-xs eow-px-3 eow-py-2 eow-font-semibold eow-leading-tight ${u.status.toLocaleLowerCase()==="active"?"eow-text-green-700 eow-bg-green-100":"eow-text-red-700 eow-bg-red-100"} eow-rounded`,children:u.status})}),j("td",{className:"md:eow-text-center eow-hidden md:eow-table-cell eow-text-right eow-text-sm eow-p-2",children:o?((c=o.find(d=>d.id===u.type))==null?void 0:c.label)||"No type":""}),j("td",{className:"eow-text-sm eow-hidden md:eow-table-cell eow-text-center eow-p-2",children:Xi(u.createdAt).format(i)}),j("td",{className:"eow-text-right eow-p-2",children:j("div",{className:"eow-flex eow-items-center eow-justify-end",children:j(aA,{onClickEdit:()=>e(u.id),onClickDelete:d=>l(d,u),quizStatus:u.status})})})]},u.id)})})},OS=t=>j("div",{className:"eow-flex eow-items-baseline eow-flex-wrap eow-p-2",children:ae("div",{className:"eow-flex",children:[t.pageCount!==1&&j("button",{className:"eow-text-base eow-rounded-r-none focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition",onClick:t.getPreviousPage,children:ae("div",{className:"eow-flex eow-leading-5 eow-text-xs eow-items-center",children:[j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-left eow-w-4 eow-h-4",children:j("polyline",{points:"15 18 9 12 15 6"})}),"Previous"]})}),t.pageGames.get(t.pageCount)&&t.pageGames.get(t.pageCount).length===10&&j("button",{className:`eow-text-base ${t.pageCount!==1?"eow-text-xs eow-rounded-l-none eow-border-l-0":""} focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition`,onClick:t.getNextPage,children:ae("div",{className:"eow-text-xs eow-flex eow-leading-5 eow-items-center",children:["Next",j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-right eow-w-4 eow-h-4 eow-ml-1",children:j("polyline",{points:"9 18 15 12 9 6"})})]})})]})}),cm=()=>j("div",{className:"eow-flex eow-justify-center eow-my-80",children:ae("svg",{className:"eow-mr-2 eow-w-16 eow-h-16 eow-text-gray-200 eow-animate-spin eow-dark:text-gray-600 eow-fill-gray-600 eow-dark:fill-gray-300",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),j("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})}),TS=({managementScreen:t,toggleScreen:e,clearQuizById:n})=>{const{create:r,edit:i}=Ie(Me);return ae("div",{className:"eow-flex eow-items-center",children:[j("button",{className:"eow-rounded eow-bg-transparent eow-mr-2 eow-flex eow-items-center",onClick:()=>{e(),n()},children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-h-7 eow-w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 15l-3-3m0 0l3-3m-3 3h8M3 12a9 9 0 1118 0 9 9 0 01-18 0z"})})}),j("h3",{className:"eow-text-xl eow-font-bold eow-my-4",children:t==="create"?r:i})]})};class CS{constructor(){a(this,"isValid",!0);a(this,"message","");a(this,"minTimeAndLives",1);a(this,"maxTimeAndLives",20);a(this,"minPoints",1);a(this,"maxPoints",100);a(this,"minCorrectSteps",0);a(this,"maxCorrectSteps",50);a(this,"validateCreate",(e,n)=>{this.validateRequiredFields(e,n),this.isValid&&(this.validateLives(e.lives,n),this.validateTime(e.time,n),this.validatePoints(e.points,n),this.validateOptions(e.options,n),this.validateContext(e.context,n))});a(this,"validateUpdate",(e,n)=>{this.validateRequiredFields(e,n),this.isValid&&(this.validateLives(e.lives,n),this.validateTime(e.time,n),this.validatePoints(e.points,n),this.validateOptions(e.options,n),this.validateContext(e.context,n))});a(this,"validateRequiredFields",(e,n)=>{e.title||(this.isValid=!1,this.message=n.titleRequiredFieldValidationMessage)});a(this,"validateLives",(e,n)=>{(e<this.minTimeAndLives||e>this.maxTimeAndLives)&&(this.isValid=!1,this.message=n.livesFieldValidationMessage)});a(this,"validateTime",(e,n)=>{(e<this.minTimeAndLives||e>this.maxTimeAndLives)&&(this.isValid=!1,this.message=n.timeFieldValidationMessage)});a(this,"validatePoints",(e,n)=>{if(e&&e.length>0){const r=e.some(i=>i.score>this.minPoints||i.score<this.maxPoints||i.correct_steps>this.minCorrectSteps||i.correct_steps<this.maxCorrectSteps);r||(this.isValid=r,this.message=n.pointsFieldValidationMessage)}});a(this,"validateOptions",(e,n)=>{if(e&&e.length>0){const r=e.map(s=>s.id);new Set(r).size!==r.length&&(this.isValid=!1,this.message=n.optionsFieldValidationMessage)}});a(this,"validateContext",(e,n)=>{!e||e.tags.forEach(r=>{r.id||(this.isValid=!1,this.message=n.tagsInvalidFieldValidationMessage)})})}}class SS{constructor(){a(this,"title",null);a(this,"description",null);a(this,"type",null);a(this,"time",null);a(this,"rules",null);a(this,"ad_content",null);a(this,"labels",null);a(this,"custom_fields",null);a(this,"images",null);a(this,"status","INACTIVE");a(this,"flags",[]);a(this,"context",null);a(this,"winning_condition","MORE");a(this,"lives",null);a(this,"points",[]);a(this,"options",[])}}class la{constructor(){a(this,"createNewRequestBody",e=>{if(!e){const n=new SS;return n.points=this.constructEmptyCreatePoints(),n.options=this.constructEmptyCreateOptions(),n}return Z({},e)});a(this,"finalizeNewRequestBody",e=>(e.images&&(e.images=this.reconstructImages(Z({},e.images))),e.context&&(e.context=this.reconstructContext(Z({},e.context))),delete e.pairs,e));a(this,"reconstructImages",e=>this.isObjectValuesEmpty(e)?null:e);a(this,"reconstructContext",e=>!e.content&&!e.tags.length&&!e.campaign?null:(e.content&&this.isObjectValuesEmpty(e.content)&&(e.content=null),e.tags=e.tags.filter(n=>n.id),e.campaign&&this.isObjectValuesEmpty(e.campaign)&&(e.campaign=null),e));a(this,"createImagesModel",()=>({main:null,cover:null,mobile:null}));a(this,"createContext",e=>e?(e.content||(e.content={id:"",label:"",type:""}),e.campaign||(e.campaign={id:"",label:""}),e):{content:{id:"",label:"",type:""},tags:[],campaign:{id:"",label:""}});a(this,"constructEmptyTag",()=>({id:"",type:"competition",source:"football"}));a(this,"isObjectValuesEmpty",e=>Object.values(e).every(n=>!n));a(this,"createGameImagesModel",()=>({main:"",mobile:""}));a(this,"constructPoints",e=>e&&e.length?Array.from(e):this.constructEmptyCreatePoints());a(this,"constructEmptyCreatePoints",()=>[{correct_steps:0,score:10},{correct_steps:5,score:20},{correct_steps:10,score:30},{correct_steps:15,score:40},{correct_steps:20,score:50}]);a(this,"constructEmptyPoints",()=>({correct_steps:0,score:0}));a(this,"constructOptions",e=>e&&e.length?Array.from(e):this.constructEmptyCreateOptions());a(this,"constructEmptyCreateOptions",()=>{const e=[];for(let r=0;r<9;r++)e.push({id:`${r+1}`,label:"",value:0,images:this.createGameImagesModel()});return e});a(this,"constructEmptyOption",e=>({id:e,label:"",value:0,images:this.createGameImagesModel()}))}}const dm=()=>ae("svg",{className:"eow-h-4 eow-w-4 eow-animate-spin eow-mr-2",viewBox:"3 3 18 18",children:[j("path",{d:"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z",fill:"currentColor"}),j("path",{d:"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z",fill:"currentFill"})]}),PS=({isLoading:t,manageEitherOr:e,handleModal:n})=>{const{save:r,preview:i}=Ie(Me);return ae("div",{className:"eow-my-4 eow-flex eow-justify-center",children:[j("button",{disabled:t,onClick:n,className:"eow-rounded eow-bg-gray-200 eow-text-gray-700 eow-uppercase eow-text-xs eow-font-bold eow-py-3 eow-px-24 eow-mr-2",children:i}),ae("button",{disabled:t,onClick:e,className:`eow-rounded eow-bg-gray-700 eow-text-white ${t?"":"hover:eow-bg-gray-800"} eow-uppercase eow-text-xs eow-font-bold eow-py-3 eow-px-24`,children:[t?j(dm,{}):j(De,{}),r]})]})},MS=t=>{const e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e},fm=({children:t,wrapperId:e})=>{const[n,r]=K.useState(null);return K.useLayoutEffect(()=>{let i=document.getElementById(e),s=!1;return i||(s=!0,i=MS(e)),r(i),()=>{s&&i.parentNode&&i.parentNode.removeChild(i)}},[e]),n===null?null:cr.default.createPortal(t,n)},RS=t=>!t||!t.main&&!t.mobile&&!t.cover?"":t.main?t.main:t.cover?t.cover:t.mobile,hm=t=>!t||!t.main&&!t.mobile?"":t.main?t.main:t.mobile,kS=({isOpen:t,requestBody:e,description:n,handleClose:r})=>{const{previewEitherOr:i,close:s,label:o,optionsValue:l}=Ie(Me);K.useLayoutEffect(()=>(t&&document.body.addEventListener("keydown",u),()=>{document.body.removeEventListener("keydown",u)}),[r]);const u=c=>c.key==="Escape"?r():null;return t?j(fm,{wrapperId:"preview-modal",children:ae(De,{children:[j("div",{className:"eow-fixed eow-inset-0 eow-z-50 eow-flex eow-items-center eow-justify-center",children:j("div",{className:"eow-relative eow-w-full eow-px-4 eow-my-8 eow-max-w-xl",children:ae("div",{className:"eow-border-0 eow-rounded eow-shadow-lg eow-bg-white eow-outline-none focus:eow-outline-none eow-max-h-screen-70 eow-overflow-y-auto",children:[ae("div",{className:"eow-flex eow-justify-items-center eow-p-4 eow-border-b eow-border-solid eow-border-gray-200",children:[j("h3",{className:"eow-text-2xl eow-font-semibold eow-mr-2",children:i}),j("button",{className:"eow-flex eow-justify-items-center eow-ml-auto eow-bg-transparent eow-border-0 eow-leading-none eow-font-semibold eow-outline-none focus:eow-outline-none",onClick:r,children:j("span",{className:"eow-bg-transparent eow-h-6 eow-w-6 eow-text-2xl eow-block eow-outline-none focus:eow-outline-none eow-text-red-500 hover:eow-text-red-600",children:"x"})})]}),ae("div",{className:"eow-relative eow-whitespace-nowrap eow-p-4 eow-text-gray-500 eow-text-lg eow-mb-4",children:[j("h2",{className:"eow-whitespace-normal eow-mb-4 eow-font-bold eow-text-xl",children:e.title}),j("img",{src:RS(e.images),className:"eow-w-full eow-h-auto eow-rounded eow-mr-2 eow-object-cover",alt:"main-image"}),j("div",{className:"eow-whitespace-normal eow-mb-4",dangerouslySetInnerHTML:{__html:n}}),j("hr",{className:"eow-mb-4"}),e.options.map((c,d)=>j("div",{className:"eow-mb-4 eow-border eow-border-gray-200 eow-rounded",children:ae("div",{className:`eow-flex eow-items-stretch eow-w-full ${hm(c.images)?"":"eow-p-2"}`,children:[j("div",{className:"eow-flex eow-flex-col justify-center eow-w-1/3 eow-mr-2",children:j("img",{src:hm(c.images),className:"eow-w-full eow-h-auto eow-rounded eow-mr-2 eow-object-cover",alt:"Option"})}),ae("div",{className:"eow-flex eow-flex-col eow-justify-center eow-w-2/3 eow-text-wrap",children:[ae("p",{children:[o,": ",c.label]}),ae("p",{children:[l,": ",c.value]})]})]})},`preview-option-${c.id}-${d}`))]}),j("div",{className:"eow-flex eow-justify-end eow-p-3 eow-border-t eow-border-solid eow-border-gray-200 eow-rounded-b",children:j("button",{className:"eow-bg-red-500 hover:eow-bg-red-700 eow-text-white eow-font-bold eow-text-sm eow-px-4 eow-py-2 eow-rounded eow-outline-none focus:eow-outline-none eow-mr-2 eow-mb-1 eow-ease-linear eow-transition-all eow-duration-150",onClick:r,children:s})})]})})}),j("div",{className:"eow-opacity-80 eow-fixed eow-inset-0 eow-z-40 eow-bg-black"})]})}):null},Yt="eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase eow-font-extrabold",ua="eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2",pm=new Map().set("cover","coverImage").set("mobile","mobileImage"),xS=new Map().set("mobile","mobileImage"),DS=({value:t})=>{const{id:e}=Ie(Me);return t?ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:e,className:Yt,children:e}),j("input",{type:"text",className:ua,value:t,readOnly:!0})]}):j(De,{})},ni=({title:t,placeholder:e,defaultValue:n,onChange:r})=>ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:t,className:Yt,children:t}),j("input",{onChange:r,value:n,type:"text",id:t,className:ua,placeholder:e})]});function FS(){this.__data__=[],this.size=0}var NS=FS;function LS(t,e){return t===e||t!==t&&e!==e}var mm=LS,BS=mm;function US(t,e){for(var n=t.length;n--;)if(BS(t[n][0],e))return n;return-1}var qs=US,$S=qs,jS=Array.prototype,HS=jS.splice;function VS(t){var e=this.__data__,n=$S(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():HS.call(e,n,1),--this.size,!0}var qS=VS,WS=qs;function GS(t){var e=this.__data__,n=WS(e,t);return n<0?void 0:e[n][1]}var zS=GS,QS=qs;function YS(t){return QS(this.__data__,t)>-1}var KS=YS,JS=qs;function XS(t,e){var n=this.__data__,r=JS(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var ZS=XS,eP=NS,tP=qS,nP=zS,rP=KS,iP=ZS;function ri(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ri.prototype.clear=eP,ri.prototype.delete=tP,ri.prototype.get=nP,ri.prototype.has=rP,ri.prototype.set=iP;var Ws=ri,aP=Ws;function sP(){this.__data__=new aP,this.size=0}var oP=sP;function lP(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var uP=lP;function cP(t){return this.__data__.get(t)}var dP=cP;function fP(t){return this.__data__.has(t)}var hP=fP,pP=typeof it=="object"&&it&&it.Object===Object&&it,gm=pP,mP=gm,gP=typeof self=="object"&&self&&self.Object===Object&&self,vP=mP||gP||Function("return this")(),In=vP,yP=In,wP=yP.Symbol,Gs=wP,vm=Gs,ym=Object.prototype,bP=ym.hasOwnProperty,_P=ym.toString,ca=vm?vm.toStringTag:void 0;function EP(t){var e=bP.call(t,ca),n=t[ca];try{t[ca]=void 0;var r=!0}catch(s){}var i=_P.call(t);return r&&(e?t[ca]=n:delete t[ca]),i}var IP=EP,AP=Object.prototype,OP=AP.toString;function TP(t){return OP.call(t)}var CP=TP,wm=Gs,SP=IP,PP=CP,MP="[object Null]",RP="[object Undefined]",bm=wm?wm.toStringTag:void 0;function kP(t){return t==null?t===void 0?RP:MP:bm&&bm in Object(t)?SP(t):PP(t)}var da=kP;function xP(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var zs=xP,DP=da,FP=zs,NP="[object AsyncFunction]",LP="[object Function]",BP="[object GeneratorFunction]",UP="[object Proxy]";function $P(t){if(!FP(t))return!1;var e=DP(t);return e==LP||e==BP||e==NP||e==UP}var _m=$P,jP=In,HP=jP["__core-js_shared__"],VP=HP,Pu=VP,Em=function(){var t=/[^.]+$/.exec(Pu&&Pu.keys&&Pu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function qP(t){return!!Em&&Em in t}var WP=qP,GP=Function.prototype,zP=GP.toString;function QP(t){if(t!=null){try{return zP.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Im=QP,YP=_m,KP=WP,JP=zs,XP=Im,ZP=/[\\^$.*+?()[\]{}|]/g,eM=/^\[object .+?Constructor\]$/,tM=Function.prototype,nM=Object.prototype,rM=tM.toString,iM=nM.hasOwnProperty,aM=RegExp("^"+rM.call(iM).replace(ZP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sM(t){if(!JP(t)||KP(t))return!1;var e=YP(t)?aM:eM;return e.test(XP(t))}var oM=sM;function lM(t,e){return t==null?void 0:t[e]}var uM=lM,cM=oM,dM=uM;function fM(t,e){var n=dM(t,e);return cM(n)?n:void 0}var ii=fM,hM=ii,pM=In,mM=hM(pM,"Map"),Mu=mM,gM=ii,vM=gM(Object,"create"),Qs=vM,Am=Qs;function yM(){this.__data__=Am?Am(null):{},this.size=0}var wM=yM;function bM(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var _M=bM,EM=Qs,IM="__lodash_hash_undefined__",AM=Object.prototype,OM=AM.hasOwnProperty;function TM(t){var e=this.__data__;if(EM){var n=e[t];return n===IM?void 0:n}return OM.call(e,t)?e[t]:void 0}var CM=TM,SM=Qs,PM=Object.prototype,MM=PM.hasOwnProperty;function RM(t){var e=this.__data__;return SM?e[t]!==void 0:MM.call(e,t)}var kM=RM,xM=Qs,DM="__lodash_hash_undefined__";function FM(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=xM&&e===void 0?DM:e,this}var NM=FM,LM=wM,BM=_M,UM=CM,$M=kM,jM=NM;function ai(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ai.prototype.clear=LM,ai.prototype.delete=BM,ai.prototype.get=UM,ai.prototype.has=$M,ai.prototype.set=jM;var HM=ai,Om=HM,VM=Ws,qM=Mu;function WM(){this.size=0,this.__data__={hash:new Om,map:new(qM||VM),string:new Om}}var GM=WM;function zM(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var QM=zM,YM=QM;function KM(t,e){var n=t.__data__;return YM(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Ys=KM,JM=Ys;function XM(t){var e=JM(this,t).delete(t);return this.size-=e?1:0,e}var ZM=XM,eR=Ys;function tR(t){return eR(this,t).get(t)}var nR=tR,rR=Ys;function iR(t){return rR(this,t).has(t)}var aR=iR,sR=Ys;function oR(t,e){var n=sR(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var lR=oR,uR=GM,cR=ZM,dR=nR,fR=aR,hR=lR;function si(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}si.prototype.clear=uR,si.prototype.delete=cR,si.prototype.get=dR,si.prototype.has=fR,si.prototype.set=hR;var Tm=si,pR=Ws,mR=Mu,gR=Tm,vR=200;function yR(t,e){var n=this.__data__;if(n instanceof pR){var r=n.__data__;if(!mR||r.length<vR-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new gR(r)}return n.set(t,e),this.size=n.size,this}var wR=yR,bR=Ws,_R=oP,ER=uP,IR=dP,AR=hP,OR=wR;function oi(t){var e=this.__data__=new bR(t);this.size=e.size}oi.prototype.clear=_R,oi.prototype.delete=ER,oi.prototype.get=IR,oi.prototype.has=AR,oi.prototype.set=OR;var TR=oi,CR="__lodash_hash_undefined__";function SR(t){return this.__data__.set(t,CR),this}var PR=SR;function MR(t){return this.__data__.has(t)}var RR=MR,kR=Tm,xR=PR,DR=RR;function Ks(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kR;++e<n;)this.add(t[e])}Ks.prototype.add=Ks.prototype.push=xR,Ks.prototype.has=DR;var FR=Ks;function NR(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var LR=NR;function BR(t,e){return t.has(e)}var UR=BR,$R=FR,jR=LR,HR=UR,VR=1,qR=2;function WR(t,e,n,r,i,s){var o=n&VR,l=t.length,u=e.length;if(l!=u&&!(o&&u>l))return!1;var c=s.get(t),d=s.get(e);if(c&&d)return c==e&&d==t;var f=-1,p=!0,h=n&qR?new $R:void 0;for(s.set(t,e),s.set(e,t);++f<l;){var y=t[f],g=e[f];if(r)var v=o?r(g,y,f,e,t,s):r(y,g,f,t,e,s);if(v!==void 0){if(v)continue;p=!1;break}if(h){if(!jR(e,function(b,w){if(!HR(h,w)&&(y===b||i(y,b,n,r,s)))return h.push(w)})){p=!1;break}}else if(!(y===g||i(y,g,n,r,s))){p=!1;break}}return s.delete(t),s.delete(e),p}var Cm=WR,GR=In,zR=GR.Uint8Array,QR=zR;function YR(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var KR=YR;function JR(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var XR=JR,Sm=Gs,Pm=QR,ZR=mm,ek=Cm,tk=KR,nk=XR,rk=1,ik=2,ak="[object Boolean]",sk="[object Date]",ok="[object Error]",lk="[object Map]",uk="[object Number]",ck="[object RegExp]",dk="[object Set]",fk="[object String]",hk="[object Symbol]",pk="[object ArrayBuffer]",mk="[object DataView]",Mm=Sm?Sm.prototype:void 0,Ru=Mm?Mm.valueOf:void 0;function gk(t,e,n,r,i,s,o){switch(n){case mk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case pk:return!(t.byteLength!=e.byteLength||!s(new Pm(t),new Pm(e)));case ak:case sk:case uk:return ZR(+t,+e);case ok:return t.name==e.name&&t.message==e.message;case ck:case fk:return t==e+"";case lk:var l=tk;case dk:var u=r&rk;if(l||(l=nk),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=ik,o.set(t,e);var d=ek(l(t),l(e),r,i,s,o);return o.delete(t),d;case hk:if(Ru)return Ru.call(t)==Ru.call(e)}return!1}var vk=gk;function yk(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var wk=yk,bk=Array.isArray,Js=bk,_k=wk,Ek=Js;function Ik(t,e,n){var r=e(t);return Ek(t)?r:_k(r,n(t))}var Ak=Ik;function Ok(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}var Tk=Ok;function Ck(){return[]}var Sk=Ck,Pk=Tk,Mk=Sk,Rk=Object.prototype,kk=Rk.propertyIsEnumerable,Rm=Object.getOwnPropertySymbols,xk=Rm?function(t){return t==null?[]:(t=Object(t),Pk(Rm(t),function(e){return kk.call(t,e)}))}:Mk,Dk=xk;function Fk(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Nk=Fk;function Lk(t){return t!=null&&typeof t=="object"}var fa=Lk,Bk=da,Uk=fa,$k="[object Arguments]";function jk(t){return Uk(t)&&Bk(t)==$k}var Hk=jk,km=Hk,Vk=fa,xm=Object.prototype,qk=xm.hasOwnProperty,Wk=xm.propertyIsEnumerable,Gk=km(function(){return arguments}())?km:function(t){return Vk(t)&&qk.call(t,"callee")&&!Wk.call(t,"callee")},zk=Gk,Xs={exports:{}};function Qk(){return!1}var Yk=Qk;(function(t,e){var n=In,r=Yk,i=e&&!e.nodeType&&e,s=i&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===i,l=o?n.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||r;t.exports=c})(Xs,Xs.exports);var Kk=9007199254740991,Jk=/^(?:0|[1-9]\d*)$/;function Xk(t,e){var n=typeof t;return e=e==null?Kk:e,!!e&&(n=="number"||n!="symbol"&&Jk.test(t))&&t>-1&&t%1==0&&t<e}var Zk=Xk,ex=9007199254740991;function tx(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ex}var Dm=tx,nx=da,rx=Dm,ix=fa,ax="[object Arguments]",sx="[object Array]",ox="[object Boolean]",lx="[object Date]",ux="[object Error]",cx="[object Function]",dx="[object Map]",fx="[object Number]",hx="[object Object]",px="[object RegExp]",mx="[object Set]",gx="[object String]",vx="[object WeakMap]",yx="[object ArrayBuffer]",wx="[object DataView]",bx="[object Float32Array]",_x="[object Float64Array]",Ex="[object Int8Array]",Ix="[object Int16Array]",Ax="[object Int32Array]",Ox="[object Uint8Array]",Tx="[object Uint8ClampedArray]",Cx="[object Uint16Array]",Sx="[object Uint32Array]",Je={};Je[bx]=Je[_x]=Je[Ex]=Je[Ix]=Je[Ax]=Je[Ox]=Je[Tx]=Je[Cx]=Je[Sx]=!0,Je[ax]=Je[sx]=Je[yx]=Je[ox]=Je[wx]=Je[lx]=Je[ux]=Je[cx]=Je[dx]=Je[fx]=Je[hx]=Je[px]=Je[mx]=Je[gx]=Je[vx]=!1;function Px(t){return ix(t)&&rx(t.length)&&!!Je[nx(t)]}var Mx=Px;function Rx(t){return function(e){return t(e)}}var kx=Rx,ku={exports:{}};(function(t,e){var n=gm,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===r,o=s&&n.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch(c){}}();t.exports=l})(ku,ku.exports);var xx=Mx,Dx=kx,Fm=ku.exports,Nm=Fm&&Fm.isTypedArray,Fx=Nm?Dx(Nm):xx,Lm=Fx,Nx=Nk,Lx=zk,Bx=Js,Ux=Xs.exports,$x=Zk,jx=Lm,Hx=Object.prototype,Vx=Hx.hasOwnProperty;function qx(t,e){var n=Bx(t),r=!n&&Lx(t),i=!n&&!r&&Ux(t),s=!n&&!r&&!i&&jx(t),o=n||r||i||s,l=o?Nx(t.length,String):[],u=l.length;for(var c in t)(e||Vx.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||$x(c,u)))&&l.push(c);return l}var Wx=qx,Gx=Object.prototype;function zx(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Gx;return t===n}var Qx=zx;function Yx(t,e){return function(n){return t(e(n))}}var Kx=Yx,Jx=Kx,Xx=Jx(Object.keys,Object),Zx=Xx,eD=Qx,tD=Zx,nD=Object.prototype,rD=nD.hasOwnProperty;function iD(t){if(!eD(t))return tD(t);var e=[];for(var n in Object(t))rD.call(t,n)&&n!="constructor"&&e.push(n);return e}var aD=iD,sD=_m,oD=Dm;function lD(t){return t!=null&&oD(t.length)&&!sD(t)}var uD=lD,cD=Wx,dD=aD,fD=uD;function hD(t){return fD(t)?cD(t):dD(t)}var pD=hD,mD=Ak,gD=Dk,vD=pD;function yD(t){return mD(t,vD,gD)}var wD=yD,Bm=wD,bD=1,_D=Object.prototype,ED=_D.hasOwnProperty;function ID(t,e,n,r,i,s){var o=n&bD,l=Bm(t),u=l.length,c=Bm(e),d=c.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in e:ED.call(e,p)))return!1}var h=s.get(t),y=s.get(e);if(h&&y)return h==e&&y==t;var g=!0;s.set(t,e),s.set(e,t);for(var v=o;++f<u;){p=l[f];var b=t[p],w=e[p];if(r)var I=o?r(w,b,p,e,t,s):r(b,w,p,t,e,s);if(!(I===void 0?b===w||i(b,w,n,r,s):I)){g=!1;break}v||(v=p=="constructor")}if(g&&!v){var m=t.constructor,A=e.constructor;m!=A&&"constructor"in t&&"constructor"in e&&!(typeof m=="function"&&m instanceof m&&typeof A=="function"&&A instanceof A)&&(g=!1)}return s.delete(t),s.delete(e),g}var AD=ID,OD=ii,TD=In,CD=OD(TD,"DataView"),SD=CD,PD=ii,MD=In,RD=PD(MD,"Promise"),kD=RD,xD=ii,DD=In,FD=xD(DD,"Set"),ND=FD,LD=ii,BD=In,UD=LD(BD,"WeakMap"),$D=UD,xu=SD,Du=Mu,Fu=kD,Nu=ND,Lu=$D,Um=da,li=Im,$m="[object Map]",jD="[object Object]",jm="[object Promise]",Hm="[object Set]",Vm="[object WeakMap]",qm="[object DataView]",HD=li(xu),VD=li(Du),qD=li(Fu),WD=li(Nu),GD=li(Lu),Sr=Um;(xu&&Sr(new xu(new ArrayBuffer(1)))!=qm||Du&&Sr(new Du)!=$m||Fu&&Sr(Fu.resolve())!=jm||Nu&&Sr(new Nu)!=Hm||Lu&&Sr(new Lu)!=Vm)&&(Sr=function(t){var e=Um(t),n=e==jD?t.constructor:void 0,r=n?li(n):"";if(r)switch(r){case HD:return qm;case VD:return $m;case qD:return jm;case WD:return Hm;case GD:return Vm}return e});var zD=Sr,Bu=TR,QD=Cm,YD=vk,KD=AD,Wm=zD,Gm=Js,zm=Xs.exports,JD=Lm,XD=1,Qm="[object Arguments]",Ym="[object Array]",Zs="[object Object]",ZD=Object.prototype,Km=ZD.hasOwnProperty;function eF(t,e,n,r,i,s){var o=Gm(t),l=Gm(e),u=o?Ym:Wm(t),c=l?Ym:Wm(e);u=u==Qm?Zs:u,c=c==Qm?Zs:c;var d=u==Zs,f=c==Zs,p=u==c;if(p&&zm(t)){if(!zm(e))return!1;o=!0,d=!1}if(p&&!d)return s||(s=new Bu),o||JD(t)?QD(t,e,n,r,i,s):YD(t,e,u,n,r,i,s);if(!(n&XD)){var h=d&&Km.call(t,"__wrapped__"),y=f&&Km.call(e,"__wrapped__");if(h||y){var g=h?t.value():t,v=y?e.value():e;return s||(s=new Bu),i(g,v,n,r,s)}}return p?(s||(s=new Bu),KD(t,e,n,r,i,s)):!1}var tF=eF,nF=tF,Jm=fa;function Xm(t,e,n,r,i){return t===e?!0:t==null||e==null||!Jm(t)&&!Jm(e)?t!==t&&e!==e:nF(t,e,n,r,Xm,i)}var rF=Xm,iF=rF;function aF(t,e){return iF(t,e)}var sF=aF,Zm={exports:{}};/*!
|
|
2279
2279
|
* Quill Editor v1.3.7
|
|
@@ -2281,33 +2281,33 @@ object-assign
|
|
|
2281
2281
|
* Copyright (c) 2014, Jason Chen
|
|
2282
2282
|
* Copyright (c) 2013, salesforce.com
|
|
2283
2283
|
*/(function(t,e){(function(r,i){t.exports=i()})(typeof self!="undefined"?self:it,function(){return function(n){var r={};function i(s){if(r[s])return r[s].exports;var o=r[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(s,o,l){i.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=109)}([function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(17),o=i(18),l=i(19),u=i(45),c=i(46),d=i(47),f=i(48),p=i(49),h=i(12),y=i(32),g=i(33),v=i(31),b=i(1),w={Scope:b.Scope,create:b.create,find:b.find,query:b.query,register:b.register,Container:s.default,Format:o.default,Leaf:l.default,Embed:f.default,Scroll:u.default,Block:d.default,Inline:c.default,Text:p.default,Attributor:{Attribute:h.default,Class:y.default,Style:g.default,Store:v.default}};r.default=w},function(n,r,i){var s=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var I in w)w.hasOwnProperty(I)&&(b[I]=w[I])};return function(b,w){v(b,w);function I(){this.constructor=b}b.prototype=w===null?Object.create(w):(I.prototype=w.prototype,new I)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(v){s(b,v);function b(w){var I=this;return w="[Parchment] "+w,I=v.call(this,w)||this,I.message=w,I.name=I.constructor.name,I}return b}(Error);r.ParchmentError=o;var l={},u={},c={},d={};r.DATA_KEY="__blot";var f;(function(v){v[v.TYPE=3]="TYPE",v[v.LEVEL=12]="LEVEL",v[v.ATTRIBUTE=13]="ATTRIBUTE",v[v.BLOT=14]="BLOT",v[v.INLINE=7]="INLINE",v[v.BLOCK=11]="BLOCK",v[v.BLOCK_BLOT=10]="BLOCK_BLOT",v[v.INLINE_BLOT=6]="INLINE_BLOT",v[v.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",v[v.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",v[v.ANY=15]="ANY"})(f=r.Scope||(r.Scope={}));function p(v,b){var w=y(v);if(w==null)throw new o("Unable to create "+v+" blot");var I=w,m=v instanceof Node||v.nodeType===Node.TEXT_NODE?v:I.create(b);return new I(m,b)}r.create=p;function h(v,b){return b===void 0&&(b=!1),v==null?null:v[r.DATA_KEY]!=null?v[r.DATA_KEY].blot:b?h(v.parentNode,b):null}r.find=h;function y(v,b){b===void 0&&(b=f.ANY);var w;if(typeof v=="string")w=d[v]||l[v];else if(v instanceof Text||v.nodeType===Node.TEXT_NODE)w=d.text;else if(typeof v=="number")v&f.LEVEL&f.BLOCK?w=d.block:v&f.LEVEL&f.INLINE&&(w=d.inline);else if(v instanceof HTMLElement){var I=(v.getAttribute("class")||"").split(/\s+/);for(var m in I)if(w=u[I[m]],w)break;w=w||c[v.tagName]}return w==null?null:b&f.LEVEL&w.scope&&b&f.TYPE&w.scope?w:null}r.query=y;function g(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];if(v.length>1)return v.map(function(m){return g(m)});var w=v[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new o("Invalid definition");if(w.blotName==="abstract")throw new o("Cannot register abstract class");if(d[w.blotName||w.attrName]=w,typeof w.keyName=="string")l[w.keyName]=w;else if(w.className!=null&&(u[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(m){return m.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var I=Array.isArray(w.tagName)?w.tagName:[w.tagName];I.forEach(function(m){(c[m]==null||w.className==null)&&(c[m]=w)})}return w}r.register=g},function(n,r,i){var s=i(51),o=i(11),l=i(3),u=i(20),c=String.fromCharCode(0),d=function(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]};d.prototype.insert=function(f,p){var h={};return f.length===0?this:(h.insert=f,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(h.attributes=p),this.push(h))},d.prototype.delete=function(f){return f<=0?this:this.push({delete:f})},d.prototype.retain=function(f,p){if(f<=0)return this;var h={retain:f};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(h.attributes=p),this.push(h)},d.prototype.push=function(f){var p=this.ops.length,h=this.ops[p-1];if(f=l(!0,{},f),typeof h=="object"){if(typeof f.delete=="number"&&typeof h.delete=="number")return this.ops[p-1]={delete:h.delete+f.delete},this;if(typeof h.delete=="number"&&f.insert!=null&&(p-=1,h=this.ops[p-1],typeof h!="object"))return this.ops.unshift(f),this;if(o(f.attributes,h.attributes)){if(typeof f.insert=="string"&&typeof h.insert=="string")return this.ops[p-1]={insert:h.insert+f.insert},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof h.retain=="number")return this.ops[p-1]={retain:h.retain+f.retain},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this}}return p===this.ops.length?this.ops.push(f):this.ops.splice(p,0,f),this},d.prototype.chop=function(){var f=this.ops[this.ops.length-1];return f&&f.retain&&!f.attributes&&this.ops.pop(),this},d.prototype.filter=function(f){return this.ops.filter(f)},d.prototype.forEach=function(f){this.ops.forEach(f)},d.prototype.map=function(f){return this.ops.map(f)},d.prototype.partition=function(f){var p=[],h=[];return this.forEach(function(y){var g=f(y)?p:h;g.push(y)}),[p,h]},d.prototype.reduce=function(f,p){return this.ops.reduce(f,p)},d.prototype.changeLength=function(){return this.reduce(function(f,p){return p.insert?f+u.length(p):p.delete?f-p.delete:f},0)},d.prototype.length=function(){return this.reduce(function(f,p){return f+u.length(p)},0)},d.prototype.slice=function(f,p){f=f||0,typeof p!="number"&&(p=1/0);for(var h=[],y=u.iterator(this.ops),g=0;g<p&&y.hasNext();){var v;g<f?v=y.next(f-g):(v=y.next(p-g),h.push(v)),g+=u.length(v)}return new d(h)},d.prototype.compose=function(f){var p=u.iterator(this.ops),h=u.iterator(f.ops),y=[],g=h.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var v=g.retain;p.peekType()==="insert"&&p.peekLength()<=v;)v-=p.peekLength(),y.push(p.next());g.retain-v>0&&h.next(g.retain-v)}for(var b=new d(y);p.hasNext()||h.hasNext();)if(h.peekType()==="insert")b.push(h.next());else if(p.peekType()==="delete")b.push(p.next());else{var w=Math.min(p.peekLength(),h.peekLength()),I=p.next(w),m=h.next(w);if(typeof m.retain=="number"){var A={};typeof I.retain=="number"?A.retain=w:A.insert=I.insert;var E=u.attributes.compose(I.attributes,m.attributes,typeof I.retain=="number");if(E&&(A.attributes=E),b.push(A),!h.hasNext()&&o(b.ops[b.ops.length-1],A)){var O=new d(p.rest());return b.concat(O).chop()}}else typeof m.delete=="number"&&typeof I.retain=="number"&&b.push(m)}return b.chop()},d.prototype.concat=function(f){var p=new d(this.ops.slice());return f.ops.length>0&&(p.push(f.ops[0]),p.ops=p.ops.concat(f.ops.slice(1))),p},d.prototype.diff=function(f,p){if(this.ops===f.ops)return new d;var h=[this,f].map(function(w){return w.map(function(I){if(I.insert!=null)return typeof I.insert=="string"?I.insert:c;var m=w===f?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")}),y=new d,g=s(h[0],h[1],p),v=u.iterator(this.ops),b=u.iterator(f.ops);return g.forEach(function(w){for(var I=w[1].length;I>0;){var m=0;switch(w[0]){case s.INSERT:m=Math.min(b.peekLength(),I),y.push(b.next(m));break;case s.DELETE:m=Math.min(I,v.peekLength()),v.next(m),y.delete(m);break;case s.EQUAL:m=Math.min(v.peekLength(),b.peekLength(),I);var A=v.next(m),E=b.next(m);o(A.insert,E.insert)?y.retain(m,u.attributes.diff(A.attributes,E.attributes)):y.push(E).delete(m);break}I-=m}}),y.chop()},d.prototype.eachLine=function(f,p){p=p||`
|
|
2284
|
-
`;for(var h=u.iterator(this.ops),y=new d,g=0;h.hasNext();){if(h.peekType()!=="insert")return;var v=h.peek(),b=u.length(v)-h.peekLength(),w=typeof v.insert=="string"?v.insert.indexOf(p,b)-b:-1;if(w<0)y.push(h.next());else if(w>0)y.push(h.next(w));else{if(f(y,h.next(1).attributes||{},g)===!1)return;g+=1,y=new d}}y.length()>0&&f(y,{},g)},d.prototype.transform=function(f,p){if(p=!!p,typeof f=="number")return this.transformPosition(f,p);for(var h=u.iterator(this.ops),y=u.iterator(f.ops),g=new d;h.hasNext()||y.hasNext();)if(h.peekType()==="insert"&&(p||y.peekType()!=="insert"))g.retain(u.length(h.next()));else if(y.peekType()==="insert")g.push(y.next());else{var v=Math.min(h.peekLength(),y.peekLength()),b=h.next(v),w=y.next(v);if(b.delete)continue;w.delete?g.push(w):g.retain(v,u.attributes.transform(b.attributes,w.attributes,p))}return g.chop()},d.prototype.transformPosition=function(f,p){p=!!p;for(var h=u.iterator(this.ops),y=0;h.hasNext()&&y<=f;){var g=h.peekLength(),v=h.peekType();if(h.next(),v==="delete"){f-=Math.min(g,f-y);continue}else v==="insert"&&(y<f||!p)&&(f+=g);y+=g}return f},n.exports=d},function(n,r){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},c=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var y=i.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&i.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var v;for(v in h);return typeof v=="undefined"||i.call(h,v)},d=function(h,y){o&&y.name==="__proto__"?o(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(i.call(h,y)){if(l)return l(h,y).value}else return;return h[y]};n.exports=function p(){var h,y,g,v,b,w,I=arguments[0],m=1,A=arguments.length,E=!1;for(typeof I=="boolean"&&(E=I,I=arguments[1]||{},m=2),(I==null||typeof I!="object"&&typeof I!="function")&&(I={});m<A;++m)if(h=arguments[m],h!=null)for(y in h)g=f(I,y),v=f(h,y),I!==v&&(E&&v&&(c(v)||(b=u(v)))?(b?(b=!1,w=g&&u(g)?g:[]):w=g&&c(g)?g:{},d(I,{name:y,newValue:p(E,w,v)})):typeof v!="undefined"&&d(I,{name:y,newValue:v}));return I}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var s=function(){function S(
|
|
2285
|
-
`)){var q=p.default.create(x.blotName);this.parent.insertBefore(q,L===0?this:this.next),q.insertAt(0,
|
|
2286
|
-
`,P(this))),this.cache.delta}},{key:"deleteAt",value:function(L,
|
|
2287
|
-
`),z=q.shift();z.length>0&&(L<this.length()-1||this.children.tail==null?o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(L,this.length()-1),z):this.children.tail.insertAt(this.children.tail.length(),z),this.cache={});var U=this;q.reduce(function(N,C){return U=U.split(N,!0),U.insertAt(0,C),C.length},L+z.length)}}},{key:"insertBefore",value:function(L,F){var H=this.children.head;o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,L,F),H instanceof y.default&&H.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"length",this).call(this)+O),this.cache.length}},{key:"moveChildren",value:function(L,F){o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,L,F),this.cache={}}},{key:"optimize",value:function(L){o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,L),this.cache={}}},{key:"path",value:function(L){return o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,L,!0)}},{key:"removeChild",value:function(L){o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,L),this.cache={}}},{key:"split",value:function(L){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(L===0||L>=this.length()-O)){var H=this.clone();return L===0?(this.parent.insertBefore(H,this),this):(this.parent.insertBefore(H,this.next),H)}else{var q=o(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,L,F);return this.cache={},q}}}]),M}(p.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[v.default,p.default.Embed,w.default];function P(S){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S==null||(typeof S.formats=="function"&&(M=(0,u.default)(M,S.formats())),S.parent==null||S.parent.blotName=="scroll"||S.parent.statics.scope!==S.statics.scope)?M:P(S.parent,M)}r.bubbleFormats=P,r.BlockEmbed=T,r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},o=function(){function U(N,C){var R=[],k=!0,B=!1,W=void 0;try{for(var $=N[Symbol.iterator](),Q;!(k=(Q=$.next()).done)&&(R.push(Q.value),!(C&&R.length===C));k=!0);}catch(Y){B=!0,W=Y}finally{try{!k&&$.return&&$.return()}finally{if(B)throw W}}return R}return function(N,C){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return U(N,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function U(N,C){for(var R=0;R<C.length;R++){var k=C[R];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(N,k.key,k)}}return function(N,C,R){return C&&U(N.prototype,C),R&&U(N,R),N}}();i(50);var u=i(2),c=P(u),d=i(14),f=P(d),p=i(8),h=P(p),y=i(9),g=P(y),v=i(0),b=P(v),w=i(15),I=P(w),m=i(3),A=P(m),E=i(10),O=P(E),T=i(34),x=P(T);function P(U){return U&&U.__esModule?U:{default:U}}function S(U,N,C){return N in U?Object.defineProperty(U,N,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[N]=C,U}function M(U,N){if(!(U instanceof N))throw new TypeError("Cannot call a class as a function")}var D=(0,O.default)("quill"),L=function(){l(U,null,[{key:"debug",value:function(C){C===!0&&(C="log"),O.default.level(C)}},{key:"find",value:function(C){return C.__quill||b.default.find(C)}},{key:"import",value:function(C){return this.imports[C]==null&&D.error("Cannot import "+C+". Are you sure it was registered?"),this.imports[C]}},{key:"register",value:function(C,R){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof C!="string"){var W=C.attrName||C.blotName;typeof W=="string"?this.register("formats/"+W,C,R):Object.keys(C).forEach(function($){k.register($,C[$],R)})}else this.imports[C]!=null&&!B&&D.warn("Overwriting "+C+" with",R),this.imports[C]=R,(C.startsWith("blots/")||C.startsWith("formats/"))&&R.blotName!=="abstract"?b.default.register(R):C.startsWith("modules")&&typeof R.register=="function"&&R.register()}}]);function U(N){var C=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,U),this.options=F(N,R),this.container=this.options.container,this.container==null)return D.error("Invalid Quill container",N);this.options.debug&&U.debug(this.options.debug);var k=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new h.default,this.scroll=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new I.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(h.default.events.EDITOR_CHANGE,function(W){W===h.default.events.TEXT_CHANGE&&C.root.classList.toggle("ql-blank",C.editor.isBlank())}),this.emitter.on(h.default.events.SCROLL_UPDATE,function(W,$){var Q=C.selection.lastRange,Y=Q&&Q.length===0?Q.index:void 0;H.call(C,function(){return C.editor.update(null,$,Y)},W)});var B=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+k+"<p><br></p></div>");this.setContents(B),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(U,[{key:"addContainer",value:function(C){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof C=="string"){var k=C;C=document.createElement("div"),C.classList.add(k)}return this.container.insertBefore(C,R),C}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(C,R,k){var B=this,W=q(C,R,k),$=o(W,4);return C=$[0],R=$[1],k=$[3],H.call(this,function(){return B.editor.deleteText(C,R)},k,C,-1*R)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(C),this.container.classList.toggle("ql-disabled",!C)}},{key:"focus",value:function(){var C=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=C,this.scrollIntoView()}},{key:"format",value:function(C,R){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;return H.call(this,function(){var W=k.getSelection(!0),$=new c.default;if(W==null)return $;if(b.default.query(C,b.default.Scope.BLOCK))$=k.editor.formatLine(W.index,W.length,S({},C,R));else{if(W.length===0)return k.selection.format(C,R),$;$=k.editor.formatText(W.index,W.length,S({},C,R))}return k.setSelection(W,h.default.sources.SILENT),$},B)}},{key:"formatLine",value:function(C,R,k,B,W){var $=this,Q=void 0,Y=q(C,R,k,B,W),X=o(Y,4);return C=X[0],R=X[1],Q=X[2],W=X[3],H.call(this,function(){return $.editor.formatLine(C,R,Q)},W,C,0)}},{key:"formatText",value:function(C,R,k,B,W){var $=this,Q=void 0,Y=q(C,R,k,B,W),X=o(Y,4);return C=X[0],R=X[1],Q=X[2],W=X[3],H.call(this,function(){return $.editor.formatText(C,R,Q)},W,C,0)}},{key:"getBounds",value:function(C){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=void 0;typeof C=="number"?k=this.selection.getBounds(C,R):k=this.selection.getBounds(C.index,C.length);var B=this.container.getBoundingClientRect();return{bottom:k.bottom-B.top,height:k.height,left:k.left-B.left,right:k.right-B.left,top:k.top-B.top,width:k.width}}},{key:"getContents",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,k=q(C,R),B=o(k,2);return C=B[0],R=B[1],this.editor.getContents(C,R)}},{key:"getFormat",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof C=="number"?this.editor.getFormat(C,R):this.editor.getFormat(C.index,C.length)}},{key:"getIndex",value:function(C){return C.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(C){return this.scroll.leaf(C)}},{key:"getLine",value:function(C){return this.scroll.line(C)}},{key:"getLines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof C!="number"?this.scroll.lines(C.index,C.length):this.scroll.lines(C,R)}},{key:"getModule",value:function(C){return this.theme.modules[C]}},{key:"getSelection",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return C&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,k=q(C,R),B=o(k,2);return C=B[0],R=B[1],this.editor.getText(C,R)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(C,R,k){var B=this,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:U.sources.API;return H.call(this,function(){return B.editor.insertEmbed(C,R,k)},W,C)}},{key:"insertText",value:function(C,R,k,B,W){var $=this,Q=void 0,Y=q(C,0,k,B,W),X=o(Y,4);return C=X[0],Q=X[2],W=X[3],H.call(this,function(){return $.editor.insertText(C,R,Q)},W,C,R.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(C,R,k){this.clipboard.dangerouslyPasteHTML(C,R,k)}},{key:"removeFormat",value:function(C,R,k){var B=this,W=q(C,R,k),$=o(W,4);return C=$[0],R=$[1],k=$[3],H.call(this,function(){return B.editor.removeFormat(C,R)},k,C)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(C){var R=this,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return H.call(this,function(){C=new c.default(C);var B=R.getLength(),W=R.editor.deleteText(0,B),$=R.editor.applyDelta(C),Q=$.ops[$.ops.length-1];Q!=null&&typeof Q.insert=="string"&&Q.insert[Q.insert.length-1]===`
|
|
2288
|
-
`&&(R.editor.deleteText(R.getLength()-1,1),$.delete(1));var Y=W.compose($);return Y},k)}},{key:"setSelection",value:function(C,R,k){if(C==null)this.selection.setRange(null,R||U.sources.API);else{var B=q(C,R,k),W=o(B,4);C=W[0],R=W[1],k=W[3],this.selection.setRange(new w.Range(C,R),k),k!==h.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(C){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API,k=new c.default().insert(C);return this.setContents(k,R)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.default.sources.USER,R=this.scroll.update(C);return this.selection.update(C),R}},{key:"updateContents",value:function(C){var R=this,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return H.call(this,function(){return C=new c.default(C),R.editor.applyDelta(C,k)},k,!0)}}]),U}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=h.default.events,L.sources=h.default.sources,L.version="1.3.7",L.imports={delta:c.default,parchment:b.default,"core/module":g.default,"core/theme":x.default};function F(U,N){if(N=(0,A.default)(!0,{container:U,modules:{clipboard:!0,keyboard:!0,history:!0}},N),!N.theme||N.theme===L.DEFAULTS.theme)N.theme=x.default;else if(N.theme=L.import("themes/"+N.theme),N.theme==null)throw new Error("Invalid theme "+N.theme+". Did you register it?");var C=(0,A.default)(!0,{},N.theme.DEFAULTS);[C,N].forEach(function(B){B.modules=B.modules||{},Object.keys(B.modules).forEach(function(W){B.modules[W]===!0&&(B.modules[W]={})})});var R=Object.keys(C.modules).concat(Object.keys(N.modules)),k=R.reduce(function(B,W){var $=L.import("modules/"+W);return $==null?D.error("Cannot load "+W+" module. Are you sure you registered it?"):B[W]=$.DEFAULTS||{},B},{});return N.modules!=null&&N.modules.toolbar&&N.modules.toolbar.constructor!==Object&&(N.modules.toolbar={container:N.modules.toolbar}),N=(0,A.default)(!0,{},L.DEFAULTS,{modules:k},C,N),["bounds","container","scrollingContainer"].forEach(function(B){typeof N[B]=="string"&&(N[B]=document.querySelector(N[B]))}),N.modules=Object.keys(N.modules).reduce(function(B,W){return N.modules[W]&&(B[W]=N.modules[W]),B},{}),N}function H(U,N,C,R){if(this.options.strict&&!this.isEnabled()&&N===h.default.sources.USER)return new c.default;var k=C==null?null:this.getSelection(),B=this.editor.delta,W=U();if(k!=null&&(C===!0&&(C=k.index),R==null?k=z(k,W,N):R!==0&&(k=z(k,C,R,N)),this.setSelection(k,h.default.sources.SILENT)),W.length()>0){var $,Q=[h.default.events.TEXT_CHANGE,W,B,N];if(($=this.emitter).emit.apply($,[h.default.events.EDITOR_CHANGE].concat(Q)),N!==h.default.sources.SILENT){var Y;(Y=this.emitter).emit.apply(Y,Q)}}return W}function q(U,N,C,R,k){var B={};return typeof U.index=="number"&&typeof U.length=="number"?typeof N!="number"?(k=R,R=C,C=N,N=U.length,U=U.index):(N=U.length,U=U.index):typeof N!="number"&&(k=R,R=C,C=N,N=0),(typeof C=="undefined"?"undefined":s(C))==="object"?(B=C,k=R):typeof C=="string"&&(R!=null?B[C]=R:k=C),k=k||h.default.sources.API,[U,N,B,k]}function z(U,N,C,R){if(U==null)return null;var k=void 0,B=void 0;if(N instanceof c.default){var W=[U.index,U.index+U.length].map(function(X){return N.transformPosition(X,R!==h.default.sources.USER)}),$=o(W,2);k=$[0],B=$[1]}else{var Q=[U.index,U.index+U.length].map(function(X){return X<N||X===N&&R===h.default.sources.USER?X:C>=0?X+C:Math.max(N,X+C)}),Y=o(Q,2);k=Y[0],B=Y[1]}return new w.Range(k,B-k)}r.expandConfig=F,r.overload=q,r.default=L},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(7),u=f(l),c=i(0),d=f(c);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function h(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function y(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var g=function(v){y(b,v);function b(){return p(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"formatAt",value:function(I,m,A,E){if(b.compare(this.statics.blotName,A)<0&&d.default.query(A,d.default.Scope.BLOT)){var O=this.isolate(I,m);E&&O.wrap(A,E)}else o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,I,m,A,E)}},{key:"optimize",value:function(I){if(o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,I),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var m=this.parent.isolate(this.offset(),this.length());this.moveChildren(m),m.wrap(this)}}}],[{key:"compare",value:function(I,m){var A=b.order.indexOf(I),E=b.order.indexOf(m);return A>=0||E>=0?A-E:I===m?0:I<m?-1:1}}]),b}(d.default.Inline);g.allowedChildren=[g,d.default.Embed,u.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default.Text);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function w(I,m){for(var A=0;A<m.length;A++){var E=m[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}return function(I,m,A){return m&&w(I.prototype,m),A&&w(I,A),I}}(),o=function w(I,m,A){I===null&&(I=Function.prototype);var E=Object.getOwnPropertyDescriptor(I,m);if(E===void 0){var O=Object.getPrototypeOf(I);return O===null?void 0:w(O,m,A)}else{if("value"in E)return E.value;var T=E.get;return T===void 0?void 0:T.call(A)}},l=i(54),u=f(l),c=i(10),d=f(c);function f(w){return w&&w.__esModule?w:{default:w}}function p(w,I){if(!(w instanceof I))throw new TypeError("Cannot call a class as a function")}function h(w,I){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:w}function y(w,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);w.prototype=Object.create(I&&I.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(w,I):w.__proto__=I)}var g=(0,d.default)("quill:events"),v=["selectionchange","mousedown","mouseup","click"];v.forEach(function(w){document.addEventListener(w,function(){for(var I=arguments.length,m=Array(I),A=0;A<I;A++)m[A]=arguments[A];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(E){if(E.__quill&&E.__quill.emitter){var O;(O=E.__quill.emitter).handleDOM.apply(O,m)}})})});var b=function(w){y(I,w);function I(){p(this,I);var m=h(this,(I.__proto__||Object.getPrototypeOf(I)).call(this));return m.listeners={},m.on("error",g.error),m}return s(I,[{key:"emit",value:function(){g.log.apply(g,arguments),o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(A){for(var E=arguments.length,O=Array(E>1?E-1:0),T=1;T<E;T++)O[T-1]=arguments[T];(this.listeners[A.type]||[]).forEach(function(x){var P=x.node,S=x.handler;(A.target===P||P.contains(A.target))&&S.apply(void 0,[A].concat(O))})}},{key:"listenDOM",value:function(A,E,O){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push({node:E,handler:O})}}]),I}(u.default);b.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},r.default=b},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function s(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var o=function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,l),this.quill=u,this.options=c};o.DEFAULTS={},r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=["error","warn","log","info"],o="warn";function l(c){if(s.indexOf(c)<=s.indexOf(o)){for(var d,f=arguments.length,p=Array(f>1?f-1:0),h=1;h<f;h++)p[h-1]=arguments[h];(d=console)[c].apply(d,p)}}function u(c){return s.reduce(function(d,f){return d[f]=l.bind(console,f,c),d},{})}l.level=u.level=function(c){o=c},r.default=u},function(n,r,i){var s=Array.prototype.slice,o=i(52),l=i(53),u=n.exports=function(p,h,y){return y||(y={}),p===h?!0:p instanceof Date&&h instanceof Date?p.getTime()===h.getTime():!p||!h||typeof p!="object"&&typeof h!="object"?y.strict?p===h:p==h:f(p,h,y)};function c(p){return p==null}function d(p){return!(!p||typeof p!="object"||typeof p.length!="number"||typeof p.copy!="function"||typeof p.slice!="function"||p.length>0&&typeof p[0]!="number")}function f(p,h,y){var g,v;if(c(p)||c(h)||p.prototype!==h.prototype)return!1;if(l(p))return l(h)?(p=s.call(p),h=s.call(h),u(p,h,y)):!1;if(d(p)){if(!d(h)||p.length!==h.length)return!1;for(g=0;g<p.length;g++)if(p[g]!==h[g])return!1;return!0}try{var b=o(p),w=o(h)}catch(I){return!1}if(b.length!=w.length)return!1;for(b.sort(),w.sort(),g=b.length-1;g>=0;g--)if(b[g]!=w[g])return!1;for(g=b.length-1;g>=0;g--)if(v=b[g],!u(p[v],h[v],y))return!1;return typeof p==typeof h}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=function(){function l(u,c,d){d===void 0&&(d={}),this.attrName=u,this.keyName=c;var f=s.Scope.TYPE&s.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&s.Scope.LEVEL|f:this.scope=s.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return l.keys=function(u){return[].map.call(u.attributes,function(c){return c.name})},l.prototype.add=function(u,c){return this.canAdd(u,c)?(u.setAttribute(this.keyName,c),!0):!1},l.prototype.canAdd=function(u,c){var d=s.query(u,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof c=="string"?this.whitelist.indexOf(c.replace(/["']/g,""))>-1:this.whitelist.indexOf(c)>-1},l.prototype.remove=function(u){u.removeAttribute(this.keyName)},l.prototype.value=function(u){var c=u.getAttribute(this.keyName);return this.canAdd(u,c)&&c?c:""},l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var s=function(){function T(x,P){var S=[],M=!0,D=!1,L=void 0;try{for(var F=x[Symbol.iterator](),H;!(M=(H=F.next()).done)&&(S.push(H.value),!(P&&S.length===P));M=!0);}catch(q){D=!0,L=q}finally{try{!M&&F.return&&F.return()}finally{if(D)throw L}}return S}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(x,P){for(var S=0;S<P.length;S++){var M=P[S];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(x,M.key,M)}}return function(x,P,S){return P&&T(x.prototype,P),S&&T(x,S),x}}(),l=function T(x,P,S){x===null&&(x=Function.prototype);var M=Object.getOwnPropertyDescriptor(x,P);if(M===void 0){var D=Object.getPrototypeOf(x);return D===null?void 0:T(D,P,S)}else{if("value"in M)return M.value;var L=M.get;return L===void 0?void 0:L.call(S)}},u=i(2),c=w(u),d=i(0),f=w(d),p=i(4),h=w(p),y=i(6),g=w(y),v=i(7),b=w(v);function w(T){return T&&T.__esModule?T:{default:T}}function I(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function m(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function A(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var E=function(T){A(x,T);function x(){return I(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x}(g.default);E.blotName="code",E.tagName="CODE";var O=function(T){A(x,T);function x(){return I(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,[{key:"delta",value:function(){var S=this,M=this.domNode.textContent;return M.endsWith(`
|
|
2289
|
-
`)&&(
|
|
2284
|
+
`;for(var h=u.iterator(this.ops),y=new d,g=0;h.hasNext();){if(h.peekType()!=="insert")return;var v=h.peek(),b=u.length(v)-h.peekLength(),w=typeof v.insert=="string"?v.insert.indexOf(p,b)-b:-1;if(w<0)y.push(h.next());else if(w>0)y.push(h.next(w));else{if(f(y,h.next(1).attributes||{},g)===!1)return;g+=1,y=new d}}y.length()>0&&f(y,{},g)},d.prototype.transform=function(f,p){if(p=!!p,typeof f=="number")return this.transformPosition(f,p);for(var h=u.iterator(this.ops),y=u.iterator(f.ops),g=new d;h.hasNext()||y.hasNext();)if(h.peekType()==="insert"&&(p||y.peekType()!=="insert"))g.retain(u.length(h.next()));else if(y.peekType()==="insert")g.push(y.next());else{var v=Math.min(h.peekLength(),y.peekLength()),b=h.next(v),w=y.next(v);if(b.delete)continue;w.delete?g.push(w):g.retain(v,u.attributes.transform(b.attributes,w.attributes,p))}return g.chop()},d.prototype.transformPosition=function(f,p){p=!!p;for(var h=u.iterator(this.ops),y=0;h.hasNext()&&y<=f;){var g=h.peekLength(),v=h.peekType();if(h.next(),v==="delete"){f-=Math.min(g,f-y);continue}else v==="insert"&&(y<f||!p)&&(f+=g);y+=g}return f},n.exports=d},function(n,r){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},c=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var y=i.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&i.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var v;for(v in h);return typeof v=="undefined"||i.call(h,v)},d=function(h,y){o&&y.name==="__proto__"?o(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(i.call(h,y)){if(l)return l(h,y).value}else return;return h[y]};n.exports=function p(){var h,y,g,v,b,w,I=arguments[0],m=1,A=arguments.length,E=!1;for(typeof I=="boolean"&&(E=I,I=arguments[1]||{},m=2),(I==null||typeof I!="object"&&typeof I!="function")&&(I={});m<A;++m)if(h=arguments[m],h!=null)for(y in h)g=f(I,y),v=f(h,y),I!==v&&(E&&v&&(c(v)||(b=u(v)))?(b?(b=!1,w=g&&u(g)?g:[]):w=g&&c(g)?g:{},d(I,{name:y,newValue:p(E,w,v)})):typeof v!="undefined"&&d(I,{name:y,newValue:v}));return I}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var s=function(){function S(R,D){for(var L=0;L<D.length;L++){var N=D[L];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(R,N.key,N)}}return function(R,D,L){return D&&S(R.prototype,D),L&&S(R,L),R}}(),o=function S(R,D,L){R===null&&(R=Function.prototype);var N=Object.getOwnPropertyDescriptor(R,D);if(N===void 0){var H=Object.getPrototypeOf(R);return H===null?void 0:S(H,D,L)}else{if("value"in N)return N.value;var q=N.get;return q===void 0?void 0:q.call(L)}},l=i(3),u=I(l),c=i(2),d=I(c),f=i(0),p=I(f),h=i(16),y=I(h),g=i(6),v=I(g),b=i(7),w=I(b);function I(S){return S&&S.__esModule?S:{default:S}}function m(S,R){if(!(S instanceof R))throw new TypeError("Cannot call a class as a function")}function A(S,R){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:S}function E(S,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);S.prototype=Object.create(R&&R.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(S,R):S.__proto__=R)}var O=1,T=function(S){E(R,S);function R(){return m(this,R),A(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return s(R,[{key:"attach",value:function(){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"attach",this).call(this),this.attributes=new p.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,u.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(L,N){var H=p.default.query(L,p.default.Scope.BLOCK_ATTRIBUTE);H!=null&&this.attributes.attribute(H,N)}},{key:"formatAt",value:function(L,N,H,q){this.format(H,q)}},{key:"insertAt",value:function(L,N,H){if(typeof N=="string"&&N.endsWith(`
|
|
2285
|
+
`)){var q=p.default.create(x.blotName);this.parent.insertBefore(q,L===0?this:this.next),q.insertAt(0,N.slice(0,-1))}else o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,L,N,H)}}]),R}(p.default.Embed);T.scope=p.default.Scope.BLOCK_BLOT;var x=function(S){E(R,S);function R(D){m(this,R);var L=A(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D));return L.cache={},L}return s(R,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(p.default.Leaf).reduce(function(L,N){return N.length()===0?L:L.insert(N.value(),P(N))},new d.default).insert(`
|
|
2286
|
+
`,P(this))),this.cache.delta}},{key:"deleteAt",value:function(L,N){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"deleteAt",this).call(this,L,N),this.cache={}}},{key:"formatAt",value:function(L,N,H,q){N<=0||(p.default.query(H,p.default.Scope.BLOCK)?L+N===this.length()&&this.format(H,q):o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"formatAt",this).call(this,L,Math.min(N,this.length()-L-1),H,q),this.cache={})}},{key:"insertAt",value:function(L,N,H){if(H!=null)return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,L,N,H);if(N.length!==0){var q=N.split(`
|
|
2287
|
+
`),z=q.shift();z.length>0&&(L<this.length()-1||this.children.tail==null?o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,Math.min(L,this.length()-1),z):this.children.tail.insertAt(this.children.tail.length(),z),this.cache={});var U=this;q.reduce(function(F,C){return U=U.split(F,!0),U.insertAt(0,C),C.length},L+z.length)}}},{key:"insertBefore",value:function(L,N){var H=this.children.head;o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertBefore",this).call(this,L,N),H instanceof y.default&&H.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"length",this).call(this)+O),this.cache.length}},{key:"moveChildren",value:function(L,N){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"moveChildren",this).call(this,L,N),this.cache={}}},{key:"optimize",value:function(L){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,L),this.cache={}}},{key:"path",value:function(L){return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"path",this).call(this,L,!0)}},{key:"removeChild",value:function(L){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"removeChild",this).call(this,L),this.cache={}}},{key:"split",value:function(L){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(N&&(L===0||L>=this.length()-O)){var H=this.clone();return L===0?(this.parent.insertBefore(H,this),this):(this.parent.insertBefore(H,this.next),H)}else{var q=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"split",this).call(this,L,N);return this.cache={},q}}}]),R}(p.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[v.default,p.default.Embed,w.default];function P(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S==null||(typeof S.formats=="function"&&(R=(0,u.default)(R,S.formats())),S.parent==null||S.parent.blotName=="scroll"||S.parent.statics.scope!==S.statics.scope)?R:P(S.parent,R)}r.bubbleFormats=P,r.BlockEmbed=T,r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},o=function(){function U(F,C){var M=[],k=!0,B=!1,W=void 0;try{for(var $=F[Symbol.iterator](),Q;!(k=(Q=$.next()).done)&&(M.push(Q.value),!(C&&M.length===C));k=!0);}catch(Y){B=!0,W=Y}finally{try{!k&&$.return&&$.return()}finally{if(B)throw W}}return M}return function(F,C){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return U(F,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function U(F,C){for(var M=0;M<C.length;M++){var k=C[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(F,k.key,k)}}return function(F,C,M){return C&&U(F.prototype,C),M&&U(F,M),F}}();i(50);var u=i(2),c=P(u),d=i(14),f=P(d),p=i(8),h=P(p),y=i(9),g=P(y),v=i(0),b=P(v),w=i(15),I=P(w),m=i(3),A=P(m),E=i(10),O=P(E),T=i(34),x=P(T);function P(U){return U&&U.__esModule?U:{default:U}}function S(U,F,C){return F in U?Object.defineProperty(U,F,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[F]=C,U}function R(U,F){if(!(U instanceof F))throw new TypeError("Cannot call a class as a function")}var D=(0,O.default)("quill"),L=function(){l(U,null,[{key:"debug",value:function(C){C===!0&&(C="log"),O.default.level(C)}},{key:"find",value:function(C){return C.__quill||b.default.find(C)}},{key:"import",value:function(C){return this.imports[C]==null&&D.error("Cannot import "+C+". Are you sure it was registered?"),this.imports[C]}},{key:"register",value:function(C,M){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof C!="string"){var W=C.attrName||C.blotName;typeof W=="string"?this.register("formats/"+W,C,M):Object.keys(C).forEach(function($){k.register($,C[$],M)})}else this.imports[C]!=null&&!B&&D.warn("Overwriting "+C+" with",M),this.imports[C]=M,(C.startsWith("blots/")||C.startsWith("formats/"))&&M.blotName!=="abstract"?b.default.register(M):C.startsWith("modules")&&typeof M.register=="function"&&M.register()}}]);function U(F){var C=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(R(this,U),this.options=N(F,M),this.container=this.options.container,this.container==null)return D.error("Invalid Quill container",F);this.options.debug&&U.debug(this.options.debug);var k=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new h.default,this.scroll=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new I.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(h.default.events.EDITOR_CHANGE,function(W){W===h.default.events.TEXT_CHANGE&&C.root.classList.toggle("ql-blank",C.editor.isBlank())}),this.emitter.on(h.default.events.SCROLL_UPDATE,function(W,$){var Q=C.selection.lastRange,Y=Q&&Q.length===0?Q.index:void 0;H.call(C,function(){return C.editor.update(null,$,Y)},W)});var B=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+k+"<p><br></p></div>");this.setContents(B),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(U,[{key:"addContainer",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof C=="string"){var k=C;C=document.createElement("div"),C.classList.add(k)}return this.container.insertBefore(C,M),C}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(C,M,k){var B=this,W=q(C,M,k),$=o(W,4);return C=$[0],M=$[1],k=$[3],H.call(this,function(){return B.editor.deleteText(C,M)},k,C,-1*M)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(C),this.container.classList.toggle("ql-disabled",!C)}},{key:"focus",value:function(){var C=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=C,this.scrollIntoView()}},{key:"format",value:function(C,M){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;return H.call(this,function(){var W=k.getSelection(!0),$=new c.default;if(W==null)return $;if(b.default.query(C,b.default.Scope.BLOCK))$=k.editor.formatLine(W.index,W.length,S({},C,M));else{if(W.length===0)return k.selection.format(C,M),$;$=k.editor.formatText(W.index,W.length,S({},C,M))}return k.setSelection(W,h.default.sources.SILENT),$},B)}},{key:"formatLine",value:function(C,M,k,B,W){var $=this,Q=void 0,Y=q(C,M,k,B,W),X=o(Y,4);return C=X[0],M=X[1],Q=X[2],W=X[3],H.call(this,function(){return $.editor.formatLine(C,M,Q)},W,C,0)}},{key:"formatText",value:function(C,M,k,B,W){var $=this,Q=void 0,Y=q(C,M,k,B,W),X=o(Y,4);return C=X[0],M=X[1],Q=X[2],W=X[3],H.call(this,function(){return $.editor.formatText(C,M,Q)},W,C,0)}},{key:"getBounds",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=void 0;typeof C=="number"?k=this.selection.getBounds(C,M):k=this.selection.getBounds(C.index,C.length);var B=this.container.getBoundingClientRect();return{bottom:k.bottom-B.top,height:k.height,left:k.left-B.left,right:k.right-B.left,top:k.top-B.top,width:k.width}}},{key:"getContents",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,k=q(C,M),B=o(k,2);return C=B[0],M=B[1],this.editor.getContents(C,M)}},{key:"getFormat",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof C=="number"?this.editor.getFormat(C,M):this.editor.getFormat(C.index,C.length)}},{key:"getIndex",value:function(C){return C.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(C){return this.scroll.leaf(C)}},{key:"getLine",value:function(C){return this.scroll.line(C)}},{key:"getLines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof C!="number"?this.scroll.lines(C.index,C.length):this.scroll.lines(C,M)}},{key:"getModule",value:function(C){return this.theme.modules[C]}},{key:"getSelection",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return C&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,k=q(C,M),B=o(k,2);return C=B[0],M=B[1],this.editor.getText(C,M)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(C,M,k){var B=this,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:U.sources.API;return H.call(this,function(){return B.editor.insertEmbed(C,M,k)},W,C)}},{key:"insertText",value:function(C,M,k,B,W){var $=this,Q=void 0,Y=q(C,0,k,B,W),X=o(Y,4);return C=X[0],Q=X[2],W=X[3],H.call(this,function(){return $.editor.insertText(C,M,Q)},W,C,M.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(C,M,k){this.clipboard.dangerouslyPasteHTML(C,M,k)}},{key:"removeFormat",value:function(C,M,k){var B=this,W=q(C,M,k),$=o(W,4);return C=$[0],M=$[1],k=$[3],H.call(this,function(){return B.editor.removeFormat(C,M)},k,C)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(C){var M=this,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return H.call(this,function(){C=new c.default(C);var B=M.getLength(),W=M.editor.deleteText(0,B),$=M.editor.applyDelta(C),Q=$.ops[$.ops.length-1];Q!=null&&typeof Q.insert=="string"&&Q.insert[Q.insert.length-1]===`
|
|
2288
|
+
`&&(M.editor.deleteText(M.getLength()-1,1),$.delete(1));var Y=W.compose($);return Y},k)}},{key:"setSelection",value:function(C,M,k){if(C==null)this.selection.setRange(null,M||U.sources.API);else{var B=q(C,M,k),W=o(B,4);C=W[0],M=W[1],k=W[3],this.selection.setRange(new w.Range(C,M),k),k!==h.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API,k=new c.default().insert(C);return this.setContents(k,M)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.default.sources.USER,M=this.scroll.update(C);return this.selection.update(C),M}},{key:"updateContents",value:function(C){var M=this,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return H.call(this,function(){return C=new c.default(C),M.editor.applyDelta(C,k)},k,!0)}}]),U}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=h.default.events,L.sources=h.default.sources,L.version="1.3.7",L.imports={delta:c.default,parchment:b.default,"core/module":g.default,"core/theme":x.default};function N(U,F){if(F=(0,A.default)(!0,{container:U,modules:{clipboard:!0,keyboard:!0,history:!0}},F),!F.theme||F.theme===L.DEFAULTS.theme)F.theme=x.default;else if(F.theme=L.import("themes/"+F.theme),F.theme==null)throw new Error("Invalid theme "+F.theme+". Did you register it?");var C=(0,A.default)(!0,{},F.theme.DEFAULTS);[C,F].forEach(function(B){B.modules=B.modules||{},Object.keys(B.modules).forEach(function(W){B.modules[W]===!0&&(B.modules[W]={})})});var M=Object.keys(C.modules).concat(Object.keys(F.modules)),k=M.reduce(function(B,W){var $=L.import("modules/"+W);return $==null?D.error("Cannot load "+W+" module. Are you sure you registered it?"):B[W]=$.DEFAULTS||{},B},{});return F.modules!=null&&F.modules.toolbar&&F.modules.toolbar.constructor!==Object&&(F.modules.toolbar={container:F.modules.toolbar}),F=(0,A.default)(!0,{},L.DEFAULTS,{modules:k},C,F),["bounds","container","scrollingContainer"].forEach(function(B){typeof F[B]=="string"&&(F[B]=document.querySelector(F[B]))}),F.modules=Object.keys(F.modules).reduce(function(B,W){return F.modules[W]&&(B[W]=F.modules[W]),B},{}),F}function H(U,F,C,M){if(this.options.strict&&!this.isEnabled()&&F===h.default.sources.USER)return new c.default;var k=C==null?null:this.getSelection(),B=this.editor.delta,W=U();if(k!=null&&(C===!0&&(C=k.index),M==null?k=z(k,W,F):M!==0&&(k=z(k,C,M,F)),this.setSelection(k,h.default.sources.SILENT)),W.length()>0){var $,Q=[h.default.events.TEXT_CHANGE,W,B,F];if(($=this.emitter).emit.apply($,[h.default.events.EDITOR_CHANGE].concat(Q)),F!==h.default.sources.SILENT){var Y;(Y=this.emitter).emit.apply(Y,Q)}}return W}function q(U,F,C,M,k){var B={};return typeof U.index=="number"&&typeof U.length=="number"?typeof F!="number"?(k=M,M=C,C=F,F=U.length,U=U.index):(F=U.length,U=U.index):typeof F!="number"&&(k=M,M=C,C=F,F=0),(typeof C=="undefined"?"undefined":s(C))==="object"?(B=C,k=M):typeof C=="string"&&(M!=null?B[C]=M:k=C),k=k||h.default.sources.API,[U,F,B,k]}function z(U,F,C,M){if(U==null)return null;var k=void 0,B=void 0;if(F instanceof c.default){var W=[U.index,U.index+U.length].map(function(X){return F.transformPosition(X,M!==h.default.sources.USER)}),$=o(W,2);k=$[0],B=$[1]}else{var Q=[U.index,U.index+U.length].map(function(X){return X<F||X===F&&M===h.default.sources.USER?X:C>=0?X+C:Math.max(F,X+C)}),Y=o(Q,2);k=Y[0],B=Y[1]}return new w.Range(k,B-k)}r.expandConfig=N,r.overload=q,r.default=L},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(7),u=f(l),c=i(0),d=f(c);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function h(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function y(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var g=function(v){y(b,v);function b(){return p(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"formatAt",value:function(I,m,A,E){if(b.compare(this.statics.blotName,A)<0&&d.default.query(A,d.default.Scope.BLOT)){var O=this.isolate(I,m);E&&O.wrap(A,E)}else o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,I,m,A,E)}},{key:"optimize",value:function(I){if(o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,I),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var m=this.parent.isolate(this.offset(),this.length());this.moveChildren(m),m.wrap(this)}}}],[{key:"compare",value:function(I,m){var A=b.order.indexOf(I),E=b.order.indexOf(m);return A>=0||E>=0?A-E:I===m?0:I<m?-1:1}}]),b}(d.default.Inline);g.allowedChildren=[g,d.default.Embed,u.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default.Text);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function w(I,m){for(var A=0;A<m.length;A++){var E=m[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}return function(I,m,A){return m&&w(I.prototype,m),A&&w(I,A),I}}(),o=function w(I,m,A){I===null&&(I=Function.prototype);var E=Object.getOwnPropertyDescriptor(I,m);if(E===void 0){var O=Object.getPrototypeOf(I);return O===null?void 0:w(O,m,A)}else{if("value"in E)return E.value;var T=E.get;return T===void 0?void 0:T.call(A)}},l=i(54),u=f(l),c=i(10),d=f(c);function f(w){return w&&w.__esModule?w:{default:w}}function p(w,I){if(!(w instanceof I))throw new TypeError("Cannot call a class as a function")}function h(w,I){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:w}function y(w,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);w.prototype=Object.create(I&&I.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(w,I):w.__proto__=I)}var g=(0,d.default)("quill:events"),v=["selectionchange","mousedown","mouseup","click"];v.forEach(function(w){document.addEventListener(w,function(){for(var I=arguments.length,m=Array(I),A=0;A<I;A++)m[A]=arguments[A];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(E){if(E.__quill&&E.__quill.emitter){var O;(O=E.__quill.emitter).handleDOM.apply(O,m)}})})});var b=function(w){y(I,w);function I(){p(this,I);var m=h(this,(I.__proto__||Object.getPrototypeOf(I)).call(this));return m.listeners={},m.on("error",g.error),m}return s(I,[{key:"emit",value:function(){g.log.apply(g,arguments),o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(A){for(var E=arguments.length,O=Array(E>1?E-1:0),T=1;T<E;T++)O[T-1]=arguments[T];(this.listeners[A.type]||[]).forEach(function(x){var P=x.node,S=x.handler;(A.target===P||P.contains(A.target))&&S.apply(void 0,[A].concat(O))})}},{key:"listenDOM",value:function(A,E,O){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push({node:E,handler:O})}}]),I}(u.default);b.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},r.default=b},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function s(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var o=function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,l),this.quill=u,this.options=c};o.DEFAULTS={},r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=["error","warn","log","info"],o="warn";function l(c){if(s.indexOf(c)<=s.indexOf(o)){for(var d,f=arguments.length,p=Array(f>1?f-1:0),h=1;h<f;h++)p[h-1]=arguments[h];(d=console)[c].apply(d,p)}}function u(c){return s.reduce(function(d,f){return d[f]=l.bind(console,f,c),d},{})}l.level=u.level=function(c){o=c},r.default=u},function(n,r,i){var s=Array.prototype.slice,o=i(52),l=i(53),u=n.exports=function(p,h,y){return y||(y={}),p===h?!0:p instanceof Date&&h instanceof Date?p.getTime()===h.getTime():!p||!h||typeof p!="object"&&typeof h!="object"?y.strict?p===h:p==h:f(p,h,y)};function c(p){return p==null}function d(p){return!(!p||typeof p!="object"||typeof p.length!="number"||typeof p.copy!="function"||typeof p.slice!="function"||p.length>0&&typeof p[0]!="number")}function f(p,h,y){var g,v;if(c(p)||c(h)||p.prototype!==h.prototype)return!1;if(l(p))return l(h)?(p=s.call(p),h=s.call(h),u(p,h,y)):!1;if(d(p)){if(!d(h)||p.length!==h.length)return!1;for(g=0;g<p.length;g++)if(p[g]!==h[g])return!1;return!0}try{var b=o(p),w=o(h)}catch(I){return!1}if(b.length!=w.length)return!1;for(b.sort(),w.sort(),g=b.length-1;g>=0;g--)if(b[g]!=w[g])return!1;for(g=b.length-1;g>=0;g--)if(v=b[g],!u(p[v],h[v],y))return!1;return typeof p==typeof h}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=function(){function l(u,c,d){d===void 0&&(d={}),this.attrName=u,this.keyName=c;var f=s.Scope.TYPE&s.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&s.Scope.LEVEL|f:this.scope=s.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return l.keys=function(u){return[].map.call(u.attributes,function(c){return c.name})},l.prototype.add=function(u,c){return this.canAdd(u,c)?(u.setAttribute(this.keyName,c),!0):!1},l.prototype.canAdd=function(u,c){var d=s.query(u,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof c=="string"?this.whitelist.indexOf(c.replace(/["']/g,""))>-1:this.whitelist.indexOf(c)>-1},l.prototype.remove=function(u){u.removeAttribute(this.keyName)},l.prototype.value=function(u){var c=u.getAttribute(this.keyName);return this.canAdd(u,c)&&c?c:""},l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var s=function(){function T(x,P){var S=[],R=!0,D=!1,L=void 0;try{for(var N=x[Symbol.iterator](),H;!(R=(H=N.next()).done)&&(S.push(H.value),!(P&&S.length===P));R=!0);}catch(q){D=!0,L=q}finally{try{!R&&N.return&&N.return()}finally{if(D)throw L}}return S}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(x,P){for(var S=0;S<P.length;S++){var R=P[S];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(x,R.key,R)}}return function(x,P,S){return P&&T(x.prototype,P),S&&T(x,S),x}}(),l=function T(x,P,S){x===null&&(x=Function.prototype);var R=Object.getOwnPropertyDescriptor(x,P);if(R===void 0){var D=Object.getPrototypeOf(x);return D===null?void 0:T(D,P,S)}else{if("value"in R)return R.value;var L=R.get;return L===void 0?void 0:L.call(S)}},u=i(2),c=w(u),d=i(0),f=w(d),p=i(4),h=w(p),y=i(6),g=w(y),v=i(7),b=w(v);function w(T){return T&&T.__esModule?T:{default:T}}function I(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function m(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function A(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var E=function(T){A(x,T);function x(){return I(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x}(g.default);E.blotName="code",E.tagName="CODE";var O=function(T){A(x,T);function x(){return I(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,[{key:"delta",value:function(){var S=this,R=this.domNode.textContent;return R.endsWith(`
|
|
2289
|
+
`)&&(R=R.slice(0,-1)),R.split(`
|
|
2290
2290
|
`).reduce(function(D,L){return D.insert(L).insert(`
|
|
2291
|
-
`,S.formats())},new c.default)}},{key:"format",value:function(S,
|
|
2292
|
-
`)?S:S+1}},{key:"newlineIndex",value:function(S){var
|
|
2291
|
+
`,S.formats())},new c.default)}},{key:"format",value:function(S,R){if(!(S===this.statics.blotName&&R)){var D=this.descendant(b.default,this.length()-1),L=s(D,1),N=L[0];N!=null&&N.deleteAt(N.length()-1,1),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,S,R)}}},{key:"formatAt",value:function(S,R,D,L){if(R!==0&&!(f.default.query(D,f.default.Scope.BLOCK)==null||D===this.statics.blotName&&L===this.statics.formats(this.domNode))){var N=this.newlineIndex(S);if(!(N<0||N>=S+R)){var H=this.newlineIndex(S,!0)+1,q=N-H+1,z=this.isolate(H,q),U=z.next;z.format(D,L),U instanceof x&&U.formatAt(0,S-H+R-q,D,L)}}}},{key:"insertAt",value:function(S,R,D){if(D==null){var L=this.descendant(b.default,S),N=s(L,2),H=N[0],q=N[1];H.insertAt(q,R)}}},{key:"length",value:function(){var S=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
2292
|
+
`)?S:S+1}},{key:"newlineIndex",value:function(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(R)return this.domNode.textContent.slice(0,S).lastIndexOf(`
|
|
2293
2293
|
`);var D=this.domNode.textContent.slice(S).indexOf(`
|
|
2294
2294
|
`);return D>-1?S+D:-1}},{key:"optimize",value:function(S){this.domNode.textContent.endsWith(`
|
|
2295
2295
|
`)||this.appendChild(f.default.create("text",`
|
|
2296
|
-
`)),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,S);var
|
|
2296
|
+
`)),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,S);var R=this.next;R!=null&&R.prev===this&&R.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===R.statics.formats(R.domNode)&&(R.optimize(S),R.moveChildren(this),R.remove())}},{key:"replace",value:function(S){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,S),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(R){var D=f.default.find(R);D==null?R.parentNode.removeChild(R):D instanceof f.default.Embed?D.remove():D.unwrap()})}}],[{key:"create",value:function(S){var R=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S);return R.setAttribute("spellcheck",!1),R}},{key:"formats",value:function(){return!0}}]),x}(h.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",r.Code=E,r.default=O},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},o=function(){function U(F,C){var M=[],k=!0,B=!1,W=void 0;try{for(var $=F[Symbol.iterator](),Q;!(k=(Q=$.next()).done)&&(M.push(Q.value),!(C&&M.length===C));k=!0);}catch(Y){B=!0,W=Y}finally{try{!k&&$.return&&$.return()}finally{if(B)throw W}}return M}return function(F,C){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return U(F,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function U(F,C){for(var M=0;M<C.length;M++){var k=C[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(F,k.key,k)}}return function(F,C,M){return C&&U(F.prototype,C),M&&U(F,M),F}}(),u=i(2),c=R(u),d=i(20),f=R(d),p=i(0),h=R(p),y=i(13),g=R(y),v=i(24),b=R(v),w=i(4),I=R(w),m=i(16),A=R(m),E=i(21),O=R(E),T=i(11),x=R(T),P=i(3),S=R(P);function R(U){return U&&U.__esModule?U:{default:U}}function D(U,F,C){return F in U?Object.defineProperty(U,F,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[F]=C,U}function L(U,F){if(!(U instanceof F))throw new TypeError("Cannot call a class as a function")}var N=/^[ -~]*$/,H=function(){function U(F){L(this,U),this.scroll=F,this.delta=this.getDelta()}return l(U,[{key:"applyDelta",value:function(C){var M=this,k=!1;this.scroll.update();var B=this.scroll.length();return this.scroll.batchStart(),C=z(C),C.reduce(function(W,$){var Q=$.retain||$.delete||$.insert.length||1,Y=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var X=$.insert;X.endsWith(`
|
|
2297
2297
|
`)&&k&&(k=!1,X=X.slice(0,-1)),W>=B&&!X.endsWith(`
|
|
2298
|
-
`)&&(k=!0),
|
|
2298
|
+
`)&&(k=!0),M.scroll.insertAt(W,X);var ee=M.scroll.line(W),le=o(ee,2),me=le[0],ve=le[1],Ae=(0,S.default)({},(0,w.bubbleFormats)(me));if(me instanceof I.default){var Se=me.descendant(h.default.Leaf,ve),Ze=o(Se,1),Ve=Ze[0];Ae=(0,S.default)(Ae,(0,w.bubbleFormats)(Ve))}Y=f.default.attributes.diff(Ae,Y)||{}}else if(s($.insert)==="object"){var te=Object.keys($.insert)[0];if(te==null)return W;M.scroll.insertAt(W,te,$.insert[te])}B+=Q}return Object.keys(Y).forEach(function(re){M.scroll.formatAt(W,Q,re,Y[re])}),W+Q},0),C.reduce(function(W,$){return typeof $.delete=="number"?(M.scroll.deleteAt(W,$.delete),W):W+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(C)}},{key:"deleteText",value:function(C,M){return this.scroll.deleteAt(C,M),this.update(new c.default().retain(C).delete(M))}},{key:"formatLine",value:function(C,M){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(B).forEach(function(W){if(!(k.scroll.whitelist!=null&&!k.scroll.whitelist[W])){var $=k.scroll.lines(C,Math.max(M,1)),Q=M;$.forEach(function(Y){var X=Y.length();if(!(Y instanceof g.default))Y.format(W,B[W]);else{var ee=C-Y.offset(k.scroll),le=Y.newlineIndex(ee+Q)-ee+1;Y.formatAt(ee,le,W,B[W])}Q-=X})}}),this.scroll.optimize(),this.update(new c.default().retain(C).retain(M,(0,O.default)(B)))}},{key:"formatText",value:function(C,M){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(B).forEach(function(W){k.scroll.formatAt(C,M,W,B[W])}),this.update(new c.default().retain(C).retain(M,(0,O.default)(B)))}},{key:"getContents",value:function(C,M){return this.delta.slice(C,C+M)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(C,M){return C.concat(M.delta())},new c.default)}},{key:"getFormat",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=[],B=[];M===0?this.scroll.path(C).forEach(function($){var Q=o($,1),Y=Q[0];Y instanceof I.default?k.push(Y):Y instanceof h.default.Leaf&&B.push(Y)}):(k=this.scroll.lines(C,M),B=this.scroll.descendants(h.default.Leaf,C,M));var W=[k,B].map(function($){if($.length===0)return{};for(var Q=(0,w.bubbleFormats)($.shift());Object.keys(Q).length>0;){var Y=$.shift();if(Y==null)return Q;Q=q((0,w.bubbleFormats)(Y),Q)}return Q});return S.default.apply(S.default,W)}},{key:"getText",value:function(C,M){return this.getContents(C,M).filter(function(k){return typeof k.insert=="string"}).map(function(k){return k.insert}).join("")}},{key:"insertEmbed",value:function(C,M,k){return this.scroll.insertAt(C,M,k),this.update(new c.default().retain(C).insert(D({},M,k)))}},{key:"insertText",value:function(C,M){var k=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return M=M.replace(/\r\n/g,`
|
|
2299
2299
|
`).replace(/\r/g,`
|
|
2300
|
-
`),this.scroll.insertAt(C,
|
|
2301
|
-
`));var ee=this.getContents(C,
|
|
2300
|
+
`),this.scroll.insertAt(C,M),Object.keys(B).forEach(function(W){k.scroll.formatAt(C,M.length,W,B[W])}),this.update(new c.default().retain(C).insert(M,(0,O.default)(B)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var C=this.scroll.children.head;return C.statics.blotName!==I.default.blotName||C.children.length>1?!1:C.children.head instanceof A.default}},{key:"removeFormat",value:function(C,M){var k=this.getText(C,M),B=this.scroll.line(C+M),W=o(B,2),$=W[0],Q=W[1],Y=0,X=new c.default;$!=null&&($ instanceof g.default?Y=$.newlineIndex(Q)-Q+1:Y=$.length()-Q,X=$.delta().slice(Q,Q+Y-1).insert(`
|
|
2301
|
+
`));var ee=this.getContents(C,M+Y),le=ee.diff(new c.default().insert(k).concat(X)),me=new c.default().retain(C).concat(le);return this.applyDelta(me)}},{key:"update",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,B=this.delta;if(M.length===1&&M[0].type==="characterData"&&M[0].target.data.match(N)&&h.default.find(M[0].target)){var W=h.default.find(M[0].target),$=(0,w.bubbleFormats)(W),Q=W.offset(this.scroll),Y=M[0].oldValue.replace(b.default.CONTENTS,""),X=new c.default().insert(Y),ee=new c.default().insert(W.value()),le=new c.default().retain(Q).concat(X.diff(ee,k));C=le.reduce(function(me,ve){return ve.insert?me.insert(ve.insert,$):me.push(ve)},new c.default),this.delta=B.compose(C)}else this.delta=this.getDelta(),(!C||!(0,x.default)(B.compose(C),this.delta))&&(C=B.diff(this.delta,k));return C}}]),U}();function q(U,F){return Object.keys(F).reduce(function(C,M){return U[M]==null||(F[M]===U[M]?C[M]=F[M]:Array.isArray(F[M])?F[M].indexOf(U[M])<0&&(C[M]=F[M].concat([U[M]])):C[M]=[F[M],U[M]]),C},{})}function z(U){return U.reduce(function(F,C){if(C.insert===1){var M=(0,O.default)(C.attributes);return delete M.image,F.insert({image:C.attributes.image},M)}if(C.attributes!=null&&(C.attributes.list===!0||C.attributes.bullet===!0)&&(C=(0,O.default)(C),C.attributes.list?C.attributes.list="ordered":(C.attributes.list="bullet",delete C.attributes.bullet)),typeof C.insert=="string"){var k=C.insert.replace(/\r\n/g,`
|
|
2302
2302
|
`).replace(/\r/g,`
|
|
2303
|
-
`);return N.insert(k,C.attributes)}return N.push(C)},new c.default)}r.default=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var s=function(){function T(x,P){var S=[],M=!0,D=!1,L=void 0;try{for(var F=x[Symbol.iterator](),H;!(M=(H=F.next()).done)&&(S.push(H.value),!(P&&S.length===P));M=!0);}catch(q){D=!0,L=q}finally{try{!M&&F.return&&F.return()}finally{if(D)throw L}}return S}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(x,P){for(var S=0;S<P.length;S++){var M=P[S];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(x,M.key,M)}}return function(x,P,S){return P&&T(x.prototype,P),S&&T(x,S),x}}(),l=i(0),u=b(l),c=i(21),d=b(c),f=i(11),p=b(f),h=i(8),y=b(h),g=i(10),v=b(g);function b(T){return T&&T.__esModule?T:{default:T}}function w(T){if(Array.isArray(T)){for(var x=0,P=Array(T.length);x<T.length;x++)P[x]=T[x];return P}else return Array.from(T)}function I(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}var m=(0,v.default)("quill:selection"),A=function T(x){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;I(this,T),this.index=x,this.length=P},E=function(){function T(x,P){var S=this;I(this,T),this.emitter=P,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new A(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){S.mouseDown||setTimeout(S.update.bind(S,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(M,D){M===y.default.events.TEXT_CHANGE&&D.length()>0&&S.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!S.hasFocus()){var M=S.getNativeRange();M!=null&&M.start.node!==S.cursor.textNode&&S.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{S.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch(D){}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(M,D){if(D.range){var L=D.range,F=L.startNode,H=L.startOffset,q=L.endNode,z=L.endOffset;S.setNativeRange(F,H,q,z)}}),this.update(y.default.sources.SILENT)}return o(T,[{key:"handleComposition",value:function(){var P=this;this.root.addEventListener("compositionstart",function(){P.composing=!0}),this.root.addEventListener("compositionend",function(){if(P.composing=!1,P.cursor.parent){var S=P.cursor.restore();if(!S)return;setTimeout(function(){P.setNativeRange(S.startNode,S.startOffset,S.endNode,S.endOffset)},1)}})}},{key:"handleDragging",value:function(){var P=this;this.emitter.listenDOM("mousedown",document.body,function(){P.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){P.mouseDown=!1,P.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(P,S){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[P])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||u.default.query(P,u.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var D=u.default.find(M.start.node,!1);if(D==null)return;if(D instanceof u.default.Leaf){var L=D.split(M.start.offset);D.parent.insertBefore(this.cursor,L)}else D.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(P,S),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(P){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();P=Math.min(P,M-1),S=Math.min(P+S,M-1)-P;var D=void 0,L=this.scroll.leaf(P),F=s(L,2),H=F[0],q=F[1];if(H==null)return null;var z=H.position(q,!0),U=s(z,2);D=U[0],q=U[1];var N=document.createRange();if(S>0){N.setStart(D,q);var C=this.scroll.leaf(P+S),R=s(C,2);if(H=R[0],q=R[1],H==null)return null;var k=H.position(q,!0),B=s(k,2);return D=B[0],q=B[1],N.setEnd(D,q),N.getBoundingClientRect()}else{var W="left",$=void 0;return D instanceof Text?(q<D.data.length?(N.setStart(D,q),N.setEnd(D,q+1)):(N.setStart(D,q-1),N.setEnd(D,q),W="right"),$=N.getBoundingClientRect()):($=H.domNode.getBoundingClientRect(),q>0&&(W="right")),{bottom:$.top+$.height,height:$.height,left:$[W],right:$[W],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var P=document.getSelection();if(P==null||P.rangeCount<=0)return null;var S=P.getRangeAt(0);if(S==null)return null;var M=this.normalizeNative(S);return m.info("getNativeRange",M),M}},{key:"getRange",value:function(){var P=this.getNativeRange();if(P==null)return[null,null];var S=this.normalizedToRange(P);return[S,P]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(P){var S=this,M=[[P.start.node,P.start.offset]];P.native.collapsed||M.push([P.end.node,P.end.offset]);var D=M.map(function(H){var q=s(H,2),z=q[0],U=q[1],N=u.default.find(z,!0),C=N.offset(S.scroll);return U===0?C:N instanceof u.default.Container?C+N.length():C+N.index(z,U)}),L=Math.min(Math.max.apply(Math,w(D)),this.scroll.length()-1),F=Math.min.apply(Math,[L].concat(w(D)));return new A(F,L-F)}},{key:"normalizeNative",value:function(P){if(!O(this.root,P.startContainer)||!P.collapsed&&!O(this.root,P.endContainer))return null;var S={start:{node:P.startContainer,offset:P.startOffset},end:{node:P.endContainer,offset:P.endOffset},native:P};return[S.start,S.end].forEach(function(M){for(var D=M.node,L=M.offset;!(D instanceof Text)&&D.childNodes.length>0;)if(D.childNodes.length>L)D=D.childNodes[L],L=0;else if(D.childNodes.length===L)D=D.lastChild,L=D instanceof Text?D.data.length:D.childNodes.length+1;else break;M.node=D,M.offset=L}),S}},{key:"rangeToNative",value:function(P){var S=this,M=P.collapsed?[P.index]:[P.index,P.index+P.length],D=[],L=this.scroll.length();return M.forEach(function(F,H){F=Math.min(L-1,F);var q=void 0,z=S.scroll.leaf(F),U=s(z,2),N=U[0],C=U[1],R=N.position(C,H!==0),k=s(R,2);q=k[0],C=k[1],D.push(q,C)}),D.length<2&&(D=D.concat(D)),D}},{key:"scrollIntoView",value:function(P){var S=this.lastRange;if(S!=null){var M=this.getBounds(S.index,S.length);if(M!=null){var D=this.scroll.length()-1,L=this.scroll.line(Math.min(S.index,D)),F=s(L,1),H=F[0],q=H;if(S.length>0){var z=this.scroll.line(Math.min(S.index+S.length,D)),U=s(z,1);q=U[0]}if(!(H==null||q==null)){var N=P.getBoundingClientRect();M.top<N.top?P.scrollTop-=N.top-M.top:M.bottom>N.bottom&&(P.scrollTop+=M.bottom-N.bottom)}}}}},{key:"setNativeRange",value:function(P,S){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:S,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(m.info("setNativeRange",P,S,M,D),!(P!=null&&(this.root.parentNode==null||P.parentNode==null||M.parentNode==null))){var F=document.getSelection();if(F!=null)if(P!=null){this.hasFocus()||this.root.focus();var H=(this.getNativeRange()||{}).native;if(H==null||L||P!==H.startContainer||S!==H.startOffset||M!==H.endContainer||D!==H.endOffset){P.tagName=="BR"&&(S=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode),M.tagName=="BR"&&(D=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var q=document.createRange();q.setStart(P,S),q.setEnd(M,D),F.removeAllRanges(),F.addRange(q)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(P){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof S=="string"&&(M=S,S=!1),m.info("setRange",P),P!=null){var D=this.rangeToNative(P);this.setNativeRange.apply(this,w(D).concat([S]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,S=this.lastRange,M=this.getRange(),D=s(M,2),L=D[0],F=D[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,p.default)(S,this.lastRange)){var H;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var q=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(S),P];if((H=this.emitter).emit.apply(H,[y.default.events.EDITOR_CHANGE].concat(q)),P!==y.default.sources.SILENT){var z;(z=this.emitter).emit.apply(z,q)}}}}]),T}();function O(T,x){try{x.parentNode}catch(P){return!1}return x instanceof Text&&(x=x.parentNode),T.contains(x)}r.Range=A,r.default=E},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(0),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"insertInto",value:function(b,w){b.children.length===0?o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,b,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(u.default.Embed);h.blotName="break",h.tagName="BR",r.default=h},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),l=i(30),u=i(1),c=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.build(),y}return p.prototype.appendChild=function(h){this.insertBefore(h)},p.prototype.attach=function(){f.prototype.attach.call(this),this.children.forEach(function(h){h.attach()})},p.prototype.build=function(){var h=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var g=d(y);h.insertBefore(g,h.children.head||void 0)}catch(v){if(v instanceof u.ParchmentError)return;throw v}})},p.prototype.deleteAt=function(h,y){if(h===0&&y===this.length())return this.remove();this.children.forEachAt(h,y,function(g,v,b){g.deleteAt(v,b)})},p.prototype.descendant=function(h,y){var g=this.children.find(y),v=g[0],b=g[1];return h.blotName==null&&h(v)||h.blotName!=null&&v instanceof h?[v,b]:v instanceof p?v.descendant(h,b):[null,-1]},p.prototype.descendants=function(h,y,g){y===void 0&&(y=0),g===void 0&&(g=Number.MAX_VALUE);var v=[],b=g;return this.children.forEachAt(y,g,function(w,I,m){(h.blotName==null&&h(w)||h.blotName!=null&&w instanceof h)&&v.push(w),w instanceof p&&(v=v.concat(w.descendants(h,I,b))),b-=m}),v},p.prototype.detach=function(){this.children.forEach(function(h){h.detach()}),f.prototype.detach.call(this)},p.prototype.formatAt=function(h,y,g,v){this.children.forEachAt(h,y,function(b,w,I){b.formatAt(w,I,g,v)})},p.prototype.insertAt=function(h,y,g){var v=this.children.find(h),b=v[0],w=v[1];if(b)b.insertAt(w,y,g);else{var I=g==null?u.create("text",y):u.create(y,g);this.appendChild(I)}},p.prototype.insertBefore=function(h,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return h instanceof g}))throw new u.ParchmentError("Cannot insert "+h.statics.blotName+" into "+this.statics.blotName);h.insertInto(this,y)},p.prototype.length=function(){return this.children.reduce(function(h,y){return h+y.length()},0)},p.prototype.moveChildren=function(h,y){this.children.forEach(function(g){h.insertBefore(g,y)})},p.prototype.optimize=function(h){if(f.prototype.optimize.call(this,h),this.children.length===0)if(this.statics.defaultChild!=null){var y=u.create(this.statics.defaultChild);this.appendChild(y),y.optimize(h)}else this.remove()},p.prototype.path=function(h,y){y===void 0&&(y=!1);var g=this.children.find(h,y),v=g[0],b=g[1],w=[[this,h]];return v instanceof p?w.concat(v.path(b,y)):(v!=null&&w.push([v,b]),w)},p.prototype.removeChild=function(h){this.children.remove(h)},p.prototype.replace=function(h){h instanceof p&&h.moveChildren(this),f.prototype.replace.call(this,h)},p.prototype.split=function(h,y){if(y===void 0&&(y=!1),!y){if(h===0)return this;if(h===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(h,this.length(),function(v,b,w){v=v.split(b,y),g.appendChild(v)}),g},p.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},p.prototype.update=function(h,y){var g=this,v=[],b=[];h.forEach(function(w){w.target===g.domNode&&w.type==="childList"&&(v.push.apply(v,w.addedNodes),b.push.apply(b,w.removedNodes))}),b.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var I=u.find(w);I!=null&&(I.domNode.parentNode==null||I.domNode.parentNode===g.domNode)&&I.detach()}}),v.filter(function(w){return w.parentNode==g.domNode}).sort(function(w,I){return w===I?0:w.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var I=null;w.nextSibling!=null&&(I=u.find(w.nextSibling));var m=d(w);(m.next!=I||m.next==null)&&(m.parent!=null&&m.parent.removeChild(g),g.insertBefore(m,I||void 0))})},p}(l.default);function d(f){var p=u.find(f);if(p==null)try{p=u.create(f)}catch(h){p=u.create(u.Scope.INLINE),[].slice.call(f.childNodes).forEach(function(y){p.domNode.appendChild(y)}),f.parentNode&&f.parentNode.replaceChild(p.domNode,f),p.attach()}return p}r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),l=i(31),u=i(17),c=i(1),d=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.attributes=new l.default(y.domNode),y}return p.formats=function(h){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return h.tagName.toLowerCase()},p.prototype.format=function(h,y){var g=c.query(h);g instanceof o.default?this.attributes.attribute(g,y):y&&g!=null&&(h!==this.statics.blotName||this.formats()[h]!==y)&&this.replaceWith(h,y)},p.prototype.formats=function(){var h=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(h[this.statics.blotName]=y),h},p.prototype.replaceWith=function(h,y){var g=f.prototype.replaceWith.call(this,h,y);return this.attributes.copy(g),g},p.prototype.update=function(h,y){var g=this;f.prototype.update.call(this,h,y),h.some(function(v){return v.target===g.domNode&&v.type==="attributes"})&&this.attributes.build()},p.prototype.wrap=function(h,y){var g=f.prototype.wrap.call(this,h,y);return g instanceof p&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},p}(u.default);r.default=d},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),l=i(1),u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.value=function(f){return!0},d.prototype.index=function(f,p){return this.domNode===f||this.domNode.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(p,1):-1},d.prototype.position=function(f,p){var h=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return f>0&&(h+=1),[this.parent.domNode,h]},d.prototype.value=function(){var f;return f={},f[this.statics.blotName]=this.statics.value(this.domNode)||!0,f},d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=u},function(n,r,i){var s=i(11),o=i(3),l={attributes:{compose:function(c,d,f){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var p=o(!0,{},d);f||(p=Object.keys(p).reduce(function(y,g){return p[g]!=null&&(y[g]=p[g]),y},{}));for(var h in c)c[h]!==void 0&&d[h]===void 0&&(p[h]=c[h]);return Object.keys(p).length>0?p:void 0},diff:function(c,d){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var f=Object.keys(c).concat(Object.keys(d)).reduce(function(p,h){return s(c[h],d[h])||(p[h]=d[h]===void 0?null:d[h]),p},{});return Object.keys(f).length>0?f:void 0},transform:function(c,d,f){if(typeof c!="object")return d;if(typeof d=="object"){if(!f)return d;var p=Object.keys(d).reduce(function(h,y){return c[y]===void 0&&(h[y]=d[y]),h},{});return Object.keys(p).length>0?p:void 0}}},iterator:function(c){return new u(c)},length:function(c){return typeof c.delete=="number"?c.delete:typeof c.retain=="number"?c.retain:typeof c.insert=="string"?c.insert.length:1}};function u(c){this.ops=c,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(c){c||(c=1/0);var d=this.ops[this.index];if(d){var f=this.offset,p=l.length(d);if(c>=p-f?(c=p-f,this.index+=1,this.offset=0):this.offset+=c,typeof d.delete=="number")return{delete:c};var h={};return d.attributes&&(h.attributes=d.attributes),typeof d.retain=="number"?h.retain=c:typeof d.insert=="string"?h.insert=d.insert.substr(f,c):h.insert=d.insert,h}else return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},u.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,d=this.index,f=this.next(),p=this.ops.slice(this.index);return this.offset=c,this.index=d,[f].concat(p)}else return[]},n.exports=l},function(n,r){var i=function(){function s(g,v){return v!=null&&g instanceof v}var o;try{o=Map}catch(g){o=function(){}}var l;try{l=Set}catch(g){l=function(){}}var u;try{u=Promise}catch(g){u=function(){}}function c(g,v,b,w,I){typeof v=="object"&&(b=v.depth,w=v.prototype,I=v.includeNonEnumerable,v=v.circular);var m=[],A=[],E=typeof Buffer!="undefined";typeof v=="undefined"&&(v=!0),typeof b=="undefined"&&(b=1/0);function O(T,x){if(T===null)return null;if(x===0)return T;var P,S;if(typeof T!="object")return T;if(s(T,o))P=new o;else if(s(T,l))P=new l;else if(s(T,u))P=new u(function(N,C){T.then(function(R){N(O(R,x-1))},function(R){C(O(R,x-1))})});else if(c.__isArray(T))P=[];else if(c.__isRegExp(T))P=new RegExp(T.source,y(T)),T.lastIndex&&(P.lastIndex=T.lastIndex);else if(c.__isDate(T))P=new Date(T.getTime());else{if(E&&Buffer.isBuffer(T))return Buffer.allocUnsafe?P=Buffer.allocUnsafe(T.length):P=new Buffer(T.length),T.copy(P),P;s(T,Error)?P=Object.create(T):typeof w=="undefined"?(S=Object.getPrototypeOf(T),P=Object.create(S)):(P=Object.create(w),S=w)}if(v){var M=m.indexOf(T);if(M!=-1)return A[M];m.push(T),A.push(P)}s(T,o)&&T.forEach(function(N,C){var R=O(C,x-1),k=O(N,x-1);P.set(R,k)}),s(T,l)&&T.forEach(function(N){var C=O(N,x-1);P.add(C)});for(var D in T){var L;S&&(L=Object.getOwnPropertyDescriptor(S,D)),!(L&&L.set==null)&&(P[D]=O(T[D],x-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(T),D=0;D<F.length;D++){var H=F[D],q=Object.getOwnPropertyDescriptor(T,H);q&&!q.enumerable&&!I||(P[H]=O(T[H],x-1),q.enumerable||Object.defineProperty(P,H,{enumerable:!1}))}if(I)for(var z=Object.getOwnPropertyNames(T),D=0;D<z.length;D++){var U=z[D],q=Object.getOwnPropertyDescriptor(T,U);q&&q.enumerable||(P[U]=O(T[U],x-1),Object.defineProperty(P,U,{enumerable:!1}))}return P}return O(g,b)}c.clonePrototype=function(v){if(v===null)return null;var b=function(){};return b.prototype=v,new b};function d(g){return Object.prototype.toString.call(g)}c.__objToStr=d;function f(g){return typeof g=="object"&&d(g)==="[object Date]"}c.__isDate=f;function p(g){return typeof g=="object"&&d(g)==="[object Array]"}c.__isArray=p;function h(g){return typeof g=="object"&&d(g)==="[object RegExp]"}c.__isRegExp=h;function y(g){var v="";return g.global&&(v+="g"),g.ignoreCase&&(v+="i"),g.multiline&&(v+="m"),v}return c.__getRegExpFlags=y,c}();typeof n=="object"&&n.exports&&(n.exports=i)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function P(S,M){var D=[],L=!0,F=!1,H=void 0;try{for(var q=S[Symbol.iterator](),z;!(L=(z=q.next()).done)&&(D.push(z.value),!(M&&D.length===M));L=!0);}catch(U){F=!0,H=U}finally{try{!L&&q.return&&q.return()}finally{if(F)throw H}}return D}return function(S,M){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return P(S,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function P(S,M){for(var D=0;D<M.length;D++){var L=M[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(S,L.key,L)}}return function(S,M,D){return M&&P(S.prototype,M),D&&P(S,D),S}}(),l=function P(S,M,D){S===null&&(S=Function.prototype);var L=Object.getOwnPropertyDescriptor(S,M);if(L===void 0){var F=Object.getPrototypeOf(S);return F===null?void 0:P(F,M,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},u=i(0),c=m(u),d=i(8),f=m(d),p=i(4),h=m(p),y=i(16),g=m(y),v=i(13),b=m(v),w=i(25),I=m(w);function m(P){return P&&P.__esModule?P:{default:P}}function A(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function E(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function O(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}function T(P){return P instanceof h.default||P instanceof p.BlockEmbed}var x=function(P){O(S,P);function S(M,D){A(this,S);var L=E(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,M));return L.emitter=D.emitter,Array.isArray(D.whitelist)&&(L.whitelist=D.whitelist.reduce(function(F,H){return F[H]=!0,F},{})),L.domNode.addEventListener("DOMNodeInserted",function(){}),L.optimize(),L.enable(),L}return o(S,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(D,L){var F=this.line(D),H=s(F,2),q=H[0],z=H[1],U=this.line(D+L),N=s(U,1),C=N[0];if(l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"deleteAt",this).call(this,D,L),C!=null&&q!==C&&z>0){if(q instanceof p.BlockEmbed||C instanceof p.BlockEmbed){this.optimize();return}if(q instanceof b.default){var R=q.newlineIndex(q.length(),!0);if(R>-1&&(q=q.split(R+1),q===C)){this.optimize();return}}else if(C instanceof b.default){var k=C.newlineIndex(0);k>-1&&C.split(k+1)}var B=C.children.head instanceof g.default?null:C.children.head;q.moveChildren(C,B),q.remove()}this.optimize()}},{key:"enable",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",D)}},{key:"formatAt",value:function(D,L,F,H){this.whitelist!=null&&!this.whitelist[F]||(l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"formatAt",this).call(this,D,L,F,H),this.optimize())}},{key:"insertAt",value:function(D,L,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[L])){if(D>=this.length())if(F==null||c.default.query(L,c.default.Scope.BLOCK)==null){var H=c.default.create(this.statics.defaultChild);this.appendChild(H),F==null&&L.endsWith(`
|
|
2304
|
-
`)&&(L=L.slice(0,-1)),H.insertAt(0,L,
|
|
2303
|
+
`);return F.insert(k,C.attributes)}return F.push(C)},new c.default)}r.default=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var s=function(){function T(x,P){var S=[],R=!0,D=!1,L=void 0;try{for(var N=x[Symbol.iterator](),H;!(R=(H=N.next()).done)&&(S.push(H.value),!(P&&S.length===P));R=!0);}catch(q){D=!0,L=q}finally{try{!R&&N.return&&N.return()}finally{if(D)throw L}}return S}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(x,P){for(var S=0;S<P.length;S++){var R=P[S];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(x,R.key,R)}}return function(x,P,S){return P&&T(x.prototype,P),S&&T(x,S),x}}(),l=i(0),u=b(l),c=i(21),d=b(c),f=i(11),p=b(f),h=i(8),y=b(h),g=i(10),v=b(g);function b(T){return T&&T.__esModule?T:{default:T}}function w(T){if(Array.isArray(T)){for(var x=0,P=Array(T.length);x<T.length;x++)P[x]=T[x];return P}else return Array.from(T)}function I(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}var m=(0,v.default)("quill:selection"),A=function T(x){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;I(this,T),this.index=x,this.length=P},E=function(){function T(x,P){var S=this;I(this,T),this.emitter=P,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new A(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){S.mouseDown||setTimeout(S.update.bind(S,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(R,D){R===y.default.events.TEXT_CHANGE&&D.length()>0&&S.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!S.hasFocus()){var R=S.getNativeRange();R!=null&&R.start.node!==S.cursor.textNode&&S.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{S.setNativeRange(R.start.node,R.start.offset,R.end.node,R.end.offset)}catch(D){}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(R,D){if(D.range){var L=D.range,N=L.startNode,H=L.startOffset,q=L.endNode,z=L.endOffset;S.setNativeRange(N,H,q,z)}}),this.update(y.default.sources.SILENT)}return o(T,[{key:"handleComposition",value:function(){var P=this;this.root.addEventListener("compositionstart",function(){P.composing=!0}),this.root.addEventListener("compositionend",function(){if(P.composing=!1,P.cursor.parent){var S=P.cursor.restore();if(!S)return;setTimeout(function(){P.setNativeRange(S.startNode,S.startOffset,S.endNode,S.endOffset)},1)}})}},{key:"handleDragging",value:function(){var P=this;this.emitter.listenDOM("mousedown",document.body,function(){P.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){P.mouseDown=!1,P.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(P,S){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[P])){this.scroll.update();var R=this.getNativeRange();if(!(R==null||!R.native.collapsed||u.default.query(P,u.default.Scope.BLOCK))){if(R.start.node!==this.cursor.textNode){var D=u.default.find(R.start.node,!1);if(D==null)return;if(D instanceof u.default.Leaf){var L=D.split(R.start.offset);D.parent.insertBefore(this.cursor,L)}else D.insertBefore(this.cursor,R.start.node);this.cursor.attach()}this.cursor.format(P,S),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(P){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=this.scroll.length();P=Math.min(P,R-1),S=Math.min(P+S,R-1)-P;var D=void 0,L=this.scroll.leaf(P),N=s(L,2),H=N[0],q=N[1];if(H==null)return null;var z=H.position(q,!0),U=s(z,2);D=U[0],q=U[1];var F=document.createRange();if(S>0){F.setStart(D,q);var C=this.scroll.leaf(P+S),M=s(C,2);if(H=M[0],q=M[1],H==null)return null;var k=H.position(q,!0),B=s(k,2);return D=B[0],q=B[1],F.setEnd(D,q),F.getBoundingClientRect()}else{var W="left",$=void 0;return D instanceof Text?(q<D.data.length?(F.setStart(D,q),F.setEnd(D,q+1)):(F.setStart(D,q-1),F.setEnd(D,q),W="right"),$=F.getBoundingClientRect()):($=H.domNode.getBoundingClientRect(),q>0&&(W="right")),{bottom:$.top+$.height,height:$.height,left:$[W],right:$[W],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var P=document.getSelection();if(P==null||P.rangeCount<=0)return null;var S=P.getRangeAt(0);if(S==null)return null;var R=this.normalizeNative(S);return m.info("getNativeRange",R),R}},{key:"getRange",value:function(){var P=this.getNativeRange();if(P==null)return[null,null];var S=this.normalizedToRange(P);return[S,P]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(P){var S=this,R=[[P.start.node,P.start.offset]];P.native.collapsed||R.push([P.end.node,P.end.offset]);var D=R.map(function(H){var q=s(H,2),z=q[0],U=q[1],F=u.default.find(z,!0),C=F.offset(S.scroll);return U===0?C:F instanceof u.default.Container?C+F.length():C+F.index(z,U)}),L=Math.min(Math.max.apply(Math,w(D)),this.scroll.length()-1),N=Math.min.apply(Math,[L].concat(w(D)));return new A(N,L-N)}},{key:"normalizeNative",value:function(P){if(!O(this.root,P.startContainer)||!P.collapsed&&!O(this.root,P.endContainer))return null;var S={start:{node:P.startContainer,offset:P.startOffset},end:{node:P.endContainer,offset:P.endOffset},native:P};return[S.start,S.end].forEach(function(R){for(var D=R.node,L=R.offset;!(D instanceof Text)&&D.childNodes.length>0;)if(D.childNodes.length>L)D=D.childNodes[L],L=0;else if(D.childNodes.length===L)D=D.lastChild,L=D instanceof Text?D.data.length:D.childNodes.length+1;else break;R.node=D,R.offset=L}),S}},{key:"rangeToNative",value:function(P){var S=this,R=P.collapsed?[P.index]:[P.index,P.index+P.length],D=[],L=this.scroll.length();return R.forEach(function(N,H){N=Math.min(L-1,N);var q=void 0,z=S.scroll.leaf(N),U=s(z,2),F=U[0],C=U[1],M=F.position(C,H!==0),k=s(M,2);q=k[0],C=k[1],D.push(q,C)}),D.length<2&&(D=D.concat(D)),D}},{key:"scrollIntoView",value:function(P){var S=this.lastRange;if(S!=null){var R=this.getBounds(S.index,S.length);if(R!=null){var D=this.scroll.length()-1,L=this.scroll.line(Math.min(S.index,D)),N=s(L,1),H=N[0],q=H;if(S.length>0){var z=this.scroll.line(Math.min(S.index+S.length,D)),U=s(z,1);q=U[0]}if(!(H==null||q==null)){var F=P.getBoundingClientRect();R.top<F.top?P.scrollTop-=F.top-R.top:R.bottom>F.bottom&&(P.scrollTop+=R.bottom-F.bottom)}}}}},{key:"setNativeRange",value:function(P,S){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:S,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(m.info("setNativeRange",P,S,R,D),!(P!=null&&(this.root.parentNode==null||P.parentNode==null||R.parentNode==null))){var N=document.getSelection();if(N!=null)if(P!=null){this.hasFocus()||this.root.focus();var H=(this.getNativeRange()||{}).native;if(H==null||L||P!==H.startContainer||S!==H.startOffset||R!==H.endContainer||D!==H.endOffset){P.tagName=="BR"&&(S=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode),R.tagName=="BR"&&(D=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode);var q=document.createRange();q.setStart(P,S),q.setEnd(R,D),N.removeAllRanges(),N.addRange(q)}}else N.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(P){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof S=="string"&&(R=S,S=!1),m.info("setRange",P),P!=null){var D=this.rangeToNative(P);this.setNativeRange.apply(this,w(D).concat([S]))}else this.setNativeRange(null);this.update(R)}},{key:"update",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,S=this.lastRange,R=this.getRange(),D=s(R,2),L=D[0],N=D[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,p.default)(S,this.lastRange)){var H;!this.composing&&N!=null&&N.native.collapsed&&N.start.node!==this.cursor.textNode&&this.cursor.restore();var q=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(S),P];if((H=this.emitter).emit.apply(H,[y.default.events.EDITOR_CHANGE].concat(q)),P!==y.default.sources.SILENT){var z;(z=this.emitter).emit.apply(z,q)}}}}]),T}();function O(T,x){try{x.parentNode}catch(P){return!1}return x instanceof Text&&(x=x.parentNode),T.contains(x)}r.Range=A,r.default=E},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(0),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"insertInto",value:function(b,w){b.children.length===0?o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,b,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(u.default.Embed);h.blotName="break",h.tagName="BR",r.default=h},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),l=i(30),u=i(1),c=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.build(),y}return p.prototype.appendChild=function(h){this.insertBefore(h)},p.prototype.attach=function(){f.prototype.attach.call(this),this.children.forEach(function(h){h.attach()})},p.prototype.build=function(){var h=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var g=d(y);h.insertBefore(g,h.children.head||void 0)}catch(v){if(v instanceof u.ParchmentError)return;throw v}})},p.prototype.deleteAt=function(h,y){if(h===0&&y===this.length())return this.remove();this.children.forEachAt(h,y,function(g,v,b){g.deleteAt(v,b)})},p.prototype.descendant=function(h,y){var g=this.children.find(y),v=g[0],b=g[1];return h.blotName==null&&h(v)||h.blotName!=null&&v instanceof h?[v,b]:v instanceof p?v.descendant(h,b):[null,-1]},p.prototype.descendants=function(h,y,g){y===void 0&&(y=0),g===void 0&&(g=Number.MAX_VALUE);var v=[],b=g;return this.children.forEachAt(y,g,function(w,I,m){(h.blotName==null&&h(w)||h.blotName!=null&&w instanceof h)&&v.push(w),w instanceof p&&(v=v.concat(w.descendants(h,I,b))),b-=m}),v},p.prototype.detach=function(){this.children.forEach(function(h){h.detach()}),f.prototype.detach.call(this)},p.prototype.formatAt=function(h,y,g,v){this.children.forEachAt(h,y,function(b,w,I){b.formatAt(w,I,g,v)})},p.prototype.insertAt=function(h,y,g){var v=this.children.find(h),b=v[0],w=v[1];if(b)b.insertAt(w,y,g);else{var I=g==null?u.create("text",y):u.create(y,g);this.appendChild(I)}},p.prototype.insertBefore=function(h,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return h instanceof g}))throw new u.ParchmentError("Cannot insert "+h.statics.blotName+" into "+this.statics.blotName);h.insertInto(this,y)},p.prototype.length=function(){return this.children.reduce(function(h,y){return h+y.length()},0)},p.prototype.moveChildren=function(h,y){this.children.forEach(function(g){h.insertBefore(g,y)})},p.prototype.optimize=function(h){if(f.prototype.optimize.call(this,h),this.children.length===0)if(this.statics.defaultChild!=null){var y=u.create(this.statics.defaultChild);this.appendChild(y),y.optimize(h)}else this.remove()},p.prototype.path=function(h,y){y===void 0&&(y=!1);var g=this.children.find(h,y),v=g[0],b=g[1],w=[[this,h]];return v instanceof p?w.concat(v.path(b,y)):(v!=null&&w.push([v,b]),w)},p.prototype.removeChild=function(h){this.children.remove(h)},p.prototype.replace=function(h){h instanceof p&&h.moveChildren(this),f.prototype.replace.call(this,h)},p.prototype.split=function(h,y){if(y===void 0&&(y=!1),!y){if(h===0)return this;if(h===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(h,this.length(),function(v,b,w){v=v.split(b,y),g.appendChild(v)}),g},p.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},p.prototype.update=function(h,y){var g=this,v=[],b=[];h.forEach(function(w){w.target===g.domNode&&w.type==="childList"&&(v.push.apply(v,w.addedNodes),b.push.apply(b,w.removedNodes))}),b.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var I=u.find(w);I!=null&&(I.domNode.parentNode==null||I.domNode.parentNode===g.domNode)&&I.detach()}}),v.filter(function(w){return w.parentNode==g.domNode}).sort(function(w,I){return w===I?0:w.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var I=null;w.nextSibling!=null&&(I=u.find(w.nextSibling));var m=d(w);(m.next!=I||m.next==null)&&(m.parent!=null&&m.parent.removeChild(g),g.insertBefore(m,I||void 0))})},p}(l.default);function d(f){var p=u.find(f);if(p==null)try{p=u.create(f)}catch(h){p=u.create(u.Scope.INLINE),[].slice.call(f.childNodes).forEach(function(y){p.domNode.appendChild(y)}),f.parentNode&&f.parentNode.replaceChild(p.domNode,f),p.attach()}return p}r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),l=i(31),u=i(17),c=i(1),d=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.attributes=new l.default(y.domNode),y}return p.formats=function(h){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return h.tagName.toLowerCase()},p.prototype.format=function(h,y){var g=c.query(h);g instanceof o.default?this.attributes.attribute(g,y):y&&g!=null&&(h!==this.statics.blotName||this.formats()[h]!==y)&&this.replaceWith(h,y)},p.prototype.formats=function(){var h=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(h[this.statics.blotName]=y),h},p.prototype.replaceWith=function(h,y){var g=f.prototype.replaceWith.call(this,h,y);return this.attributes.copy(g),g},p.prototype.update=function(h,y){var g=this;f.prototype.update.call(this,h,y),h.some(function(v){return v.target===g.domNode&&v.type==="attributes"})&&this.attributes.build()},p.prototype.wrap=function(h,y){var g=f.prototype.wrap.call(this,h,y);return g instanceof p&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},p}(u.default);r.default=d},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),l=i(1),u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.value=function(f){return!0},d.prototype.index=function(f,p){return this.domNode===f||this.domNode.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(p,1):-1},d.prototype.position=function(f,p){var h=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return f>0&&(h+=1),[this.parent.domNode,h]},d.prototype.value=function(){var f;return f={},f[this.statics.blotName]=this.statics.value(this.domNode)||!0,f},d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=u},function(n,r,i){var s=i(11),o=i(3),l={attributes:{compose:function(c,d,f){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var p=o(!0,{},d);f||(p=Object.keys(p).reduce(function(y,g){return p[g]!=null&&(y[g]=p[g]),y},{}));for(var h in c)c[h]!==void 0&&d[h]===void 0&&(p[h]=c[h]);return Object.keys(p).length>0?p:void 0},diff:function(c,d){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var f=Object.keys(c).concat(Object.keys(d)).reduce(function(p,h){return s(c[h],d[h])||(p[h]=d[h]===void 0?null:d[h]),p},{});return Object.keys(f).length>0?f:void 0},transform:function(c,d,f){if(typeof c!="object")return d;if(typeof d=="object"){if(!f)return d;var p=Object.keys(d).reduce(function(h,y){return c[y]===void 0&&(h[y]=d[y]),h},{});return Object.keys(p).length>0?p:void 0}}},iterator:function(c){return new u(c)},length:function(c){return typeof c.delete=="number"?c.delete:typeof c.retain=="number"?c.retain:typeof c.insert=="string"?c.insert.length:1}};function u(c){this.ops=c,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(c){c||(c=1/0);var d=this.ops[this.index];if(d){var f=this.offset,p=l.length(d);if(c>=p-f?(c=p-f,this.index+=1,this.offset=0):this.offset+=c,typeof d.delete=="number")return{delete:c};var h={};return d.attributes&&(h.attributes=d.attributes),typeof d.retain=="number"?h.retain=c:typeof d.insert=="string"?h.insert=d.insert.substr(f,c):h.insert=d.insert,h}else return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},u.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,d=this.index,f=this.next(),p=this.ops.slice(this.index);return this.offset=c,this.index=d,[f].concat(p)}else return[]},n.exports=l},function(n,r){var i=function(){function s(g,v){return v!=null&&g instanceof v}var o;try{o=Map}catch(g){o=function(){}}var l;try{l=Set}catch(g){l=function(){}}var u;try{u=Promise}catch(g){u=function(){}}function c(g,v,b,w,I){typeof v=="object"&&(b=v.depth,w=v.prototype,I=v.includeNonEnumerable,v=v.circular);var m=[],A=[],E=typeof Buffer!="undefined";typeof v=="undefined"&&(v=!0),typeof b=="undefined"&&(b=1/0);function O(T,x){if(T===null)return null;if(x===0)return T;var P,S;if(typeof T!="object")return T;if(s(T,o))P=new o;else if(s(T,l))P=new l;else if(s(T,u))P=new u(function(F,C){T.then(function(M){F(O(M,x-1))},function(M){C(O(M,x-1))})});else if(c.__isArray(T))P=[];else if(c.__isRegExp(T))P=new RegExp(T.source,y(T)),T.lastIndex&&(P.lastIndex=T.lastIndex);else if(c.__isDate(T))P=new Date(T.getTime());else{if(E&&Buffer.isBuffer(T))return Buffer.allocUnsafe?P=Buffer.allocUnsafe(T.length):P=new Buffer(T.length),T.copy(P),P;s(T,Error)?P=Object.create(T):typeof w=="undefined"?(S=Object.getPrototypeOf(T),P=Object.create(S)):(P=Object.create(w),S=w)}if(v){var R=m.indexOf(T);if(R!=-1)return A[R];m.push(T),A.push(P)}s(T,o)&&T.forEach(function(F,C){var M=O(C,x-1),k=O(F,x-1);P.set(M,k)}),s(T,l)&&T.forEach(function(F){var C=O(F,x-1);P.add(C)});for(var D in T){var L;S&&(L=Object.getOwnPropertyDescriptor(S,D)),!(L&&L.set==null)&&(P[D]=O(T[D],x-1))}if(Object.getOwnPropertySymbols)for(var N=Object.getOwnPropertySymbols(T),D=0;D<N.length;D++){var H=N[D],q=Object.getOwnPropertyDescriptor(T,H);q&&!q.enumerable&&!I||(P[H]=O(T[H],x-1),q.enumerable||Object.defineProperty(P,H,{enumerable:!1}))}if(I)for(var z=Object.getOwnPropertyNames(T),D=0;D<z.length;D++){var U=z[D],q=Object.getOwnPropertyDescriptor(T,U);q&&q.enumerable||(P[U]=O(T[U],x-1),Object.defineProperty(P,U,{enumerable:!1}))}return P}return O(g,b)}c.clonePrototype=function(v){if(v===null)return null;var b=function(){};return b.prototype=v,new b};function d(g){return Object.prototype.toString.call(g)}c.__objToStr=d;function f(g){return typeof g=="object"&&d(g)==="[object Date]"}c.__isDate=f;function p(g){return typeof g=="object"&&d(g)==="[object Array]"}c.__isArray=p;function h(g){return typeof g=="object"&&d(g)==="[object RegExp]"}c.__isRegExp=h;function y(g){var v="";return g.global&&(v+="g"),g.ignoreCase&&(v+="i"),g.multiline&&(v+="m"),v}return c.__getRegExpFlags=y,c}();typeof n=="object"&&n.exports&&(n.exports=i)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function P(S,R){var D=[],L=!0,N=!1,H=void 0;try{for(var q=S[Symbol.iterator](),z;!(L=(z=q.next()).done)&&(D.push(z.value),!(R&&D.length===R));L=!0);}catch(U){N=!0,H=U}finally{try{!L&&q.return&&q.return()}finally{if(N)throw H}}return D}return function(S,R){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return P(S,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function P(S,R){for(var D=0;D<R.length;D++){var L=R[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(S,L.key,L)}}return function(S,R,D){return R&&P(S.prototype,R),D&&P(S,D),S}}(),l=function P(S,R,D){S===null&&(S=Function.prototype);var L=Object.getOwnPropertyDescriptor(S,R);if(L===void 0){var N=Object.getPrototypeOf(S);return N===null?void 0:P(N,R,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},u=i(0),c=m(u),d=i(8),f=m(d),p=i(4),h=m(p),y=i(16),g=m(y),v=i(13),b=m(v),w=i(25),I=m(w);function m(P){return P&&P.__esModule?P:{default:P}}function A(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function E(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function O(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}function T(P){return P instanceof h.default||P instanceof p.BlockEmbed}var x=function(P){O(S,P);function S(R,D){A(this,S);var L=E(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,R));return L.emitter=D.emitter,Array.isArray(D.whitelist)&&(L.whitelist=D.whitelist.reduce(function(N,H){return N[H]=!0,N},{})),L.domNode.addEventListener("DOMNodeInserted",function(){}),L.optimize(),L.enable(),L}return o(S,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(D,L){var N=this.line(D),H=s(N,2),q=H[0],z=H[1],U=this.line(D+L),F=s(U,1),C=F[0];if(l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"deleteAt",this).call(this,D,L),C!=null&&q!==C&&z>0){if(q instanceof p.BlockEmbed||C instanceof p.BlockEmbed){this.optimize();return}if(q instanceof b.default){var M=q.newlineIndex(q.length(),!0);if(M>-1&&(q=q.split(M+1),q===C)){this.optimize();return}}else if(C instanceof b.default){var k=C.newlineIndex(0);k>-1&&C.split(k+1)}var B=C.children.head instanceof g.default?null:C.children.head;q.moveChildren(C,B),q.remove()}this.optimize()}},{key:"enable",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",D)}},{key:"formatAt",value:function(D,L,N,H){this.whitelist!=null&&!this.whitelist[N]||(l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"formatAt",this).call(this,D,L,N,H),this.optimize())}},{key:"insertAt",value:function(D,L,N){if(!(N!=null&&this.whitelist!=null&&!this.whitelist[L])){if(D>=this.length())if(N==null||c.default.query(L,c.default.Scope.BLOCK)==null){var H=c.default.create(this.statics.defaultChild);this.appendChild(H),N==null&&L.endsWith(`
|
|
2304
|
+
`)&&(L=L.slice(0,-1)),H.insertAt(0,L,N)}else{var q=c.default.create(L,N);this.appendChild(q)}else l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,D,L,N);this.optimize()}}},{key:"insertBefore",value:function(D,L){if(D.statics.scope===c.default.Scope.INLINE_BLOT){var N=c.default.create(this.statics.defaultChild);N.appendChild(D),D=N}l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,D,L)}},{key:"leaf",value:function(D){return this.path(D).pop()||[null,-1]}},{key:"line",value:function(D){return D===this.length()?this.line(D-1):this.descendant(T,D)}},{key:"lines",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,N=function H(q,z,U){var F=[],C=U;return q.children.forEachAt(z,U,function(M,k,B){T(M)?F.push(M):M instanceof c.default.Container&&(F=F.concat(H(M,k,C))),C-=B}),F};return N(this,D,L)}},{key:"optimize",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,D,L),D.length>0&&this.emitter.emit(f.default.events.SCROLL_OPTIMIZE,D,L))}},{key:"path",value:function(D){return l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"path",this).call(this,D).slice(1)}},{key:"update",value:function(D){if(this.batch!==!0){var L=f.default.sources.USER;typeof D=="string"&&(L=D),Array.isArray(D)||(D=this.observer.takeRecords()),D.length>0&&this.emitter.emit(f.default.events.SCROLL_BEFORE_UPDATE,L,D),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"update",this).call(this,D.concat([])),D.length>0&&this.emitter.emit(f.default.events.SCROLL_UPDATE,L,D)}}}]),S}(c.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[h.default,p.BlockEmbed,I.default],r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},o=function(){function $(Q,Y){var X=[],ee=!0,le=!1,me=void 0;try{for(var ve=Q[Symbol.iterator](),Ae;!(ee=(Ae=ve.next()).done)&&(X.push(Ae.value),!(Y&&X.length===Y));ee=!0);}catch(Se){le=!0,me=Se}finally{try{!ee&&ve.return&&ve.return()}finally{if(le)throw me}}return X}return function(Q,Y){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return $(Q,Y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function $(Q,Y){for(var X=0;X<Y.length;X++){var ee=Y[X];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Q,ee.key,ee)}}return function(Q,Y,X){return Y&&$(Q.prototype,Y),X&&$(Q,X),Q}}(),u=i(21),c=P(u),d=i(11),f=P(d),p=i(3),h=P(p),y=i(2),g=P(y),v=i(20),b=P(v),w=i(0),I=P(w),m=i(5),A=P(m),E=i(10),O=P(E),T=i(9),x=P(T);function P($){return $&&$.__esModule?$:{default:$}}function S($,Q,Y){return Q in $?Object.defineProperty($,Q,{value:Y,enumerable:!0,configurable:!0,writable:!0}):$[Q]=Y,$}function R($,Q){if(!($ instanceof Q))throw new TypeError("Cannot call a class as a function")}function D($,Q){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q&&(typeof Q=="object"||typeof Q=="function")?Q:$}function L($,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Q);$.prototype=Object.create(Q&&Q.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf($,Q):$.__proto__=Q)}var N=(0,O.default)("quill:keyboard"),H=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",q=function($){L(Q,$),l(Q,null,[{key:"match",value:function(X,ee){return ee=W(ee),["altKey","ctrlKey","metaKey","shiftKey"].some(function(le){return!!ee[le]!==X[le]&&ee[le]!==null})?!1:ee.key===(X.which||X.keyCode)}}]);function Q(Y,X){R(this,Q);var ee=D(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this,Y,X));return ee.bindings={},Object.keys(ee.options.bindings).forEach(function(le){le==="list autofill"&&Y.scroll.whitelist!=null&&!Y.scroll.whitelist.list||ee.options.bindings[le]&&ee.addBinding(ee.options.bindings[le])}),ee.addBinding({key:Q.keys.ENTER,shiftKey:null},M),ee.addBinding({key:Q.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ee.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0},U),ee.addBinding({key:Q.keys.DELETE},{collapsed:!0},F)):(ee.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},U),ee.addBinding({key:Q.keys.DELETE},{collapsed:!0,suffix:/^.?$/},F)),ee.addBinding({key:Q.keys.BACKSPACE},{collapsed:!1},C),ee.addBinding({key:Q.keys.DELETE},{collapsed:!1},C),ee.addBinding({key:Q.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},U),ee.listen(),ee}return l(Q,[{key:"addBinding",value:function(X){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},me=W(X);if(me==null||me.key==null)return N.warn("Attempted to add invalid keyboard binding",me);typeof ee=="function"&&(ee={handler:ee}),typeof le=="function"&&(le={handler:le}),me=(0,h.default)(me,ee,le),this.bindings[me.key]=this.bindings[me.key]||[],this.bindings[me.key].push(me)}},{key:"listen",value:function(){var X=this;this.quill.root.addEventListener("keydown",function(ee){if(!ee.defaultPrevented){var le=ee.which||ee.keyCode,me=(X.bindings[le]||[]).filter(function(et){return Q.match(ee,et)});if(me.length!==0){var ve=X.quill.getSelection();if(!(ve==null||!X.quill.hasFocus())){var Ae=X.quill.getLine(ve.index),Se=o(Ae,2),Ze=Se[0],Ve=Se[1],te=X.quill.getLeaf(ve.index),re=o(te,2),ue=re[0],he=re[1],oe=ve.length===0?[ue,he]:X.quill.getLeaf(ve.index+ve.length),_e=o(oe,2),Oe=_e[0],Te=_e[1],mt=ue instanceof I.default.Text?ue.value().slice(0,he):"",_t=Oe instanceof I.default.Text?Oe.value().slice(Te):"",qe={collapsed:ve.length===0,empty:ve.length===0&&Ze.length()<=1,format:X.quill.getFormat(ve),offset:Ve,prefix:mt,suffix:_t},Ii=me.some(function(et){if(et.collapsed!=null&&et.collapsed!==qe.collapsed||et.empty!=null&&et.empty!==qe.empty||et.offset!=null&&et.offset!==qe.offset)return!1;if(Array.isArray(et.format)){if(et.format.every(function(en){return qe.format[en]==null}))return!1}else if(s(et.format)==="object"&&!Object.keys(et.format).every(function(en){return et.format[en]===!0?qe.format[en]!=null:et.format[en]===!1?qe.format[en]==null:(0,f.default)(et.format[en],qe.format[en])}))return!1;return et.prefix!=null&&!et.prefix.test(qe.prefix)||et.suffix!=null&&!et.suffix.test(qe.suffix)?!1:et.handler.call(X,ve,qe)!==!0});Ii&&ee.preventDefault()}}}})}}]),Q}(x.default);q.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},q.DEFAULTS={bindings:{bold:B("bold"),italic:B("italic"),underline:B("underline"),indent:{key:q.keys.TAB,format:["blockquote","indent","list"],handler:function(Q,Y){if(Y.collapsed&&Y.offset!==0)return!0;this.quill.format("indent","+1",A.default.sources.USER)}},outdent:{key:q.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Q,Y){if(Y.collapsed&&Y.offset!==0)return!0;this.quill.format("indent","-1",A.default.sources.USER)}},"outdent backspace":{key:q.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Q,Y){Y.format.indent!=null?this.quill.format("indent","-1",A.default.sources.USER):Y.format.list!=null&&this.quill.format("list",!1,A.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:q.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Q){this.quill.deleteText(Q.index-1,1,A.default.sources.USER)}},tab:{key:q.keys.TAB,handler:function(Q){this.quill.history.cutoff();var Y=new g.default().retain(Q.index).delete(Q.length).insert(" ");this.quill.updateContents(Y,A.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index+1,A.default.sources.SILENT)}},"list empty enter":{key:q.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Q,Y){this.quill.format("list",!1,A.default.sources.USER),Y.format.indent&&this.quill.format("indent",!1,A.default.sources.USER)}},"checklist enter":{key:q.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Q){var Y=this.quill.getLine(Q.index),X=o(Y,2),ee=X[0],le=X[1],me=(0,h.default)({},ee.formats(),{list:"checked"}),ve=new g.default().retain(Q.index).insert(`
|
|
2305
2305
|
`,me).retain(ee.length()-le-1).retain(1,{list:"unchecked"});this.quill.updateContents(ve,A.default.sources.USER),this.quill.setSelection(Q.index+1,A.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:q.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Q,Y){var X=this.quill.getLine(Q.index),ee=o(X,2),le=ee[0],me=ee[1],ve=new g.default().retain(Q.index).insert(`
|
|
2306
|
-
`,Y.format).retain(le.length()-me-1).retain(1,{header:null});this.quill.updateContents(ve,A.default.sources.USER),this.quill.setSelection(Q.index+1,A.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Q,Y){var X=Y.prefix.length,ee=this.quill.getLine(Q.index),le=o(ee,2),me=le[0],ve=le[1];if(ve>X)return!0;var Ae=void 0;switch(Y.prefix.trim()){case"[]":case"[ ]":Ae="unchecked";break;case"[x]":Ae="checked";break;case"-":case"*":Ae="bullet";break;default:Ae="ordered"}this.quill.insertText(Q.index," ",A.default.sources.USER),this.quill.history.cutoff();var Se=new g.default().retain(Q.index-ve).delete(X+1).retain(me.length()-2-ve).retain(1,{list:Ae});this.quill.updateContents(Se,A.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index-X,A.default.sources.SILENT)}},"code exit":{key:q.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Q){var Y=this.quill.getLine(Q.index),X=o(Y,2),ee=X[0],le=X[1],me=new g.default().retain(Q.index+ee.length()-le-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(me,A.default.sources.USER)}},"embed left":z(q.keys.LEFT,!1),"embed left shift":z(q.keys.LEFT,!0),"embed right":z(q.keys.RIGHT,!1),"embed right shift":z(q.keys.RIGHT,!0)}};function z($,Q){var Y,X=$===q.keys.LEFT?"prefix":"suffix";return Y={key:$,shiftKey:Q,altKey:null},S(Y,X,/^$/),S(Y,"handler",function(le){var me=le.index;$===q.keys.RIGHT&&(me+=le.length+1);var ve=this.quill.getLeaf(me),Ae=o(ve,1),Se=Ae[0];return Se instanceof I.default.Embed?($===q.keys.LEFT?Q?this.quill.setSelection(le.index-1,le.length+1,A.default.sources.USER):this.quill.setSelection(le.index-1,A.default.sources.USER):Q?this.quill.setSelection(le.index,le.length+1,A.default.sources.USER):this.quill.setSelection(le.index+le.length+1,A.default.sources.USER),!1):!0}),Y}function U($,Q){if(!($.index===0||this.quill.getLength()<=1)){var Y=this.quill.getLine($.index),X=o(Y,1),ee=X[0],le={};if(Q.offset===0){var me=this.quill.getLine($.index-1),ve=o(me,1),Ae=ve[0];if(Ae!=null&&Ae.length()>1){var Se=ee.formats(),Ze=this.quill.getFormat($.index-1,1);le=b.default.attributes.diff(Se,Ze)||{}}}var Ve=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Q.prefix)?2:1;this.quill.deleteText($.index-Ve,Ve,A.default.sources.USER),Object.keys(le).length>0&&this.quill.formatLine($.index-Ve,Ve,le,A.default.sources.USER),this.quill.focus()}}function
|
|
2306
|
+
`,Y.format).retain(le.length()-me-1).retain(1,{header:null});this.quill.updateContents(ve,A.default.sources.USER),this.quill.setSelection(Q.index+1,A.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Q,Y){var X=Y.prefix.length,ee=this.quill.getLine(Q.index),le=o(ee,2),me=le[0],ve=le[1];if(ve>X)return!0;var Ae=void 0;switch(Y.prefix.trim()){case"[]":case"[ ]":Ae="unchecked";break;case"[x]":Ae="checked";break;case"-":case"*":Ae="bullet";break;default:Ae="ordered"}this.quill.insertText(Q.index," ",A.default.sources.USER),this.quill.history.cutoff();var Se=new g.default().retain(Q.index-ve).delete(X+1).retain(me.length()-2-ve).retain(1,{list:Ae});this.quill.updateContents(Se,A.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index-X,A.default.sources.SILENT)}},"code exit":{key:q.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Q){var Y=this.quill.getLine(Q.index),X=o(Y,2),ee=X[0],le=X[1],me=new g.default().retain(Q.index+ee.length()-le-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(me,A.default.sources.USER)}},"embed left":z(q.keys.LEFT,!1),"embed left shift":z(q.keys.LEFT,!0),"embed right":z(q.keys.RIGHT,!1),"embed right shift":z(q.keys.RIGHT,!0)}};function z($,Q){var Y,X=$===q.keys.LEFT?"prefix":"suffix";return Y={key:$,shiftKey:Q,altKey:null},S(Y,X,/^$/),S(Y,"handler",function(le){var me=le.index;$===q.keys.RIGHT&&(me+=le.length+1);var ve=this.quill.getLeaf(me),Ae=o(ve,1),Se=Ae[0];return Se instanceof I.default.Embed?($===q.keys.LEFT?Q?this.quill.setSelection(le.index-1,le.length+1,A.default.sources.USER):this.quill.setSelection(le.index-1,A.default.sources.USER):Q?this.quill.setSelection(le.index,le.length+1,A.default.sources.USER):this.quill.setSelection(le.index+le.length+1,A.default.sources.USER),!1):!0}),Y}function U($,Q){if(!($.index===0||this.quill.getLength()<=1)){var Y=this.quill.getLine($.index),X=o(Y,1),ee=X[0],le={};if(Q.offset===0){var me=this.quill.getLine($.index-1),ve=o(me,1),Ae=ve[0];if(Ae!=null&&Ae.length()>1){var Se=ee.formats(),Ze=this.quill.getFormat($.index-1,1);le=b.default.attributes.diff(Se,Ze)||{}}}var Ve=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Q.prefix)?2:1;this.quill.deleteText($.index-Ve,Ve,A.default.sources.USER),Object.keys(le).length>0&&this.quill.formatLine($.index-Ve,Ve,le,A.default.sources.USER),this.quill.focus()}}function F($,Q){var Y=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Q.suffix)?2:1;if(!($.index>=this.quill.getLength()-Y)){var X={},ee=0,le=this.quill.getLine($.index),me=o(le,1),ve=me[0];if(Q.offset>=ve.length()-1){var Ae=this.quill.getLine($.index+1),Se=o(Ae,1),Ze=Se[0];if(Ze){var Ve=ve.formats(),te=this.quill.getFormat($.index,1);X=b.default.attributes.diff(Ve,te)||{},ee=Ze.length()}}this.quill.deleteText($.index,Y,A.default.sources.USER),Object.keys(X).length>0&&this.quill.formatLine($.index+ee-1,Y,X,A.default.sources.USER)}}function C($){var Q=this.quill.getLines($),Y={};if(Q.length>1){var X=Q[0].formats(),ee=Q[Q.length-1].formats();Y=b.default.attributes.diff(ee,X)||{}}this.quill.deleteText($,A.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine($.index,1,Y,A.default.sources.USER),this.quill.setSelection($.index,A.default.sources.SILENT),this.quill.focus()}function M($,Q){var Y=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var X=Object.keys(Q.format).reduce(function(ee,le){return I.default.query(le,I.default.Scope.BLOCK)&&!Array.isArray(Q.format[le])&&(ee[le]=Q.format[le]),ee},{});this.quill.insertText($.index,`
|
|
2307
2307
|
`,X,A.default.sources.USER),this.quill.setSelection($.index+1,A.default.sources.SILENT),this.quill.focus(),Object.keys(Q.format).forEach(function(ee){X[ee]==null&&(Array.isArray(Q.format[ee])||ee!=="link"&&Y.quill.format(ee,Q.format[ee],A.default.sources.USER))})}function k($){return{key:q.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(Y){var X=I.default.query("code-block"),ee=Y.index,le=Y.length,me=this.quill.scroll.descendant(X,ee),ve=o(me,2),Ae=ve[0],Se=ve[1];if(Ae!=null){var Ze=this.quill.getIndex(Ae),Ve=Ae.newlineIndex(Se,!0)+1,te=Ae.newlineIndex(Ze+Se+le),re=Ae.domNode.textContent.slice(Ve,te).split(`
|
|
2308
|
-
`);Se=0,re.forEach(function(ue,he){$?(Ae.insertAt(Ve+Se,X.TAB),Se+=X.TAB.length,he===0?ee+=X.TAB.length:le+=X.TAB.length):ue.startsWith(X.TAB)&&(Ae.deleteAt(Ve+Se,X.TAB.length),Se-=X.TAB.length,he===0?ee-=X.TAB.length:le-=X.TAB.length),Se+=ue.length+1}),this.quill.update(A.default.sources.USER),this.quill.setSelection(ee,le,A.default.sources.SILENT)}}}}function B($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(Y,X){this.quill.format($,!X.format[$],A.default.sources.USER)}}}function W($){if(typeof $=="string"||typeof $=="number")return W({key:$});if((typeof $=="undefined"?"undefined":s($))==="object"&&($=(0,c.default)($,!1)),typeof $.key=="string")if(q.keys[$.key.toUpperCase()]!=null)$.key=q.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[H]=$.shortKey,delete $.shortKey),$}r.default=q,r.SHORTKEY=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function b(w,I){var m=[],A=!0,E=!1,O=void 0;try{for(var T=w[Symbol.iterator](),x;!(A=(x=T.next()).done)&&(m.push(x.value),!(I&&m.length===I));A=!0);}catch(P){E=!0,O=P}finally{try{!A&&T.return&&T.return()}finally{if(E)throw O}}return m}return function(w,I){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return b(w,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),u=i(0),c=p(u),d=i(7),f=p(d);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function y(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function g(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var v=function(b){g(w,b),l(w,null,[{key:"value",value:function(){}}]);function w(I,m){h(this,w);var A=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,I));return A.selection=m,A.textNode=document.createTextNode(w.CONTENTS),A.domNode.appendChild(A.textNode),A._length=0,A}return l(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(m,A){if(this._length!==0)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,m,A);for(var E=this,O=0;E!=null&&E.statics.scope!==c.default.Scope.BLOCK_BLOT;)O+=E.offset(E.parent),E=E.parent;E!=null&&(this._length=w.CONTENTS.length,E.optimize(),E.formatAt(O,w.CONTENTS.length,m,A),this._length=0)}},{key:"index",value:function(m,A){return m===this.textNode?0:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,A)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var m=this.textNode,A=this.selection.getNativeRange(),E=void 0,O=void 0,T=void 0;if(A!=null&&A.start.node===m&&A.end.node===m){var x=[m,A.start.offset,A.end.offset];E=x[0],O=x[1],T=x[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var P=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof f.default?(E=this.next.domNode,this.next.insertAt(0,P),this.textNode.data=w.CONTENTS):(this.textNode.data=P,this.parent.insertBefore(c.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),O!=null){var S=[O,T].map(function(D){return Math.max(0,Math.min(E.data.length,D-1))}),M=s(S,2);return O=M[0],T=M[1],{startNode:E,startOffset:O,endNode:E,endOffset:T}}}}},{key:"update",value:function(m,A){var E=this;if(m.some(function(T){return T.type==="characterData"&&T.target===E.textNode})){var O=this.restore();O&&(A.range=O)}}},{key:"value",value:function(){return""}}]),w}(c.default.Embed);v.blotName="cursor",v.className="ql-cursor",v.tagName="span",v.CONTENTS="\uFEFF",r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=c(s),l=i(4),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(o.default.Container);h.allowedChildren=[u.default,l.BlockEmbed,h],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(0),u=c(l);function c(v){return v&&v.__esModule?v:{default:v}}function d(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function f(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function p(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var h=function(v){p(b,v);function b(){return d(this,b),f(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(I){var m=o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,I);return m.startsWith("rgb(")?(m=m.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+m.split(",").map(function(A){return("00"+parseInt(A).toString(16)).slice(-2)}).join("")):m}}]),b}(u.default.Attributor.Style),y=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),g=new h("color","color",{scope:u.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=y,r.ColorStyle=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var s=function(){function g(v,b){for(var w=0;w<b.length;w++){var I=b[w];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(v,I.key,I)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var I=Object.getOwnPropertyDescriptor(v,b);if(I===void 0){var m=Object.getPrototypeOf(v);return m===null?void 0:g(m,b,w)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(w)}},l=i(6),u=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function f(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function p(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var h=function(g){p(v,g);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"format",value:function(w,I){if(w!==this.statics.blotName||!I)return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,I);I=this.constructor.sanitize(I),this.domNode.setAttribute("href",I)}}],[{key:"create",value:function(w){var I=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,w);return w=this.sanitize(w),I.setAttribute("href",w),I.setAttribute("rel","noopener noreferrer"),I.setAttribute("target","_blank"),I}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),v}(u.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(g,v){var b=document.createElement("a");b.href=g;var w=b.href.slice(0,b.href.indexOf(":"));return v.indexOf(w)>-1}r.default=h,r.sanitize=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},o=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),l=i(23),u=f(l),c=i(107),d=f(c);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}var h=0;function y(v,b){v.setAttribute(b,v.getAttribute(b)!=="true")}var g=function(){function v(b){var w=this;p(this,v),this.select=b,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(I){switch(I.keyCode){case u.default.keys.ENTER:w.togglePicker();break;case u.default.keys.ESCAPE:w.escape(),I.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(v,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var I=this,m=document.createElement("span");return m.tabIndex="0",m.setAttribute("role","button"),m.classList.add("ql-picker-item"),w.hasAttribute("value")&&m.setAttribute("data-value",w.getAttribute("value")),w.textContent&&m.setAttribute("data-label",w.textContent),m.addEventListener("click",function(){I.selectItem(m,!0)}),m.addEventListener("keydown",function(A){switch(A.keyCode){case u.default.keys.ENTER:I.selectItem(m,!0),A.preventDefault();break;case u.default.keys.ESCAPE:I.escape(),A.preventDefault();break}}),m}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,I=document.createElement("span");I.classList.add("ql-picker-options"),I.setAttribute("aria-hidden","true"),I.tabIndex="-1",I.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",I.id),this.options=I,[].slice.call(this.select.options).forEach(function(m){var A=w.buildItem(m);I.appendChild(A),m.selected===!0&&w.selectItem(A)}),this.container.appendChild(I)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(I){w.container.setAttribute(I.name,I.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=this.container.querySelector(".ql-selected");if(w!==m&&(m!=null&&m.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),I))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":s(Event))==="object"){var A=document.createEvent("Event");A.initEvent("change",!0,!0),this.select.dispatchEvent(A)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var I=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(I)}else this.selectItem(null);var m=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",m)}}]),v}();r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=F(s),l=i(5),u=F(l),c=i(4),d=F(c),f=i(16),p=F(f),h=i(25),y=F(h),g=i(24),v=F(g),b=i(35),w=F(b),I=i(6),m=F(I),A=i(22),E=F(A),O=i(7),T=F(O),x=i(55),P=F(x),S=i(42),M=F(S),D=i(23),L=F(D);function F(H){return H&&H.__esModule?H:{default:H}}u.default.register({"blots/block":d.default,"blots/block/embed":c.BlockEmbed,"blots/break":p.default,"blots/container":y.default,"blots/cursor":v.default,"blots/embed":w.default,"blots/inline":m.default,"blots/scroll":E.default,"blots/text":T.default,"modules/clipboard":P.default,"modules/history":M.default,"modules/keyboard":L.default}),o.default.register(d.default,p.default,v.default,m.default,E.default,T.default),r.default=u.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=function(){function l(u){this.domNode=u,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(u){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var c;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?c=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?c=document.createElement(u):c=document.createElement(this.tagName[0])):c=document.createElement(this.tagName),this.className&&c.classList.add(this.className),c},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return s.create(u)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},l.prototype.deleteAt=function(u,c){var d=this.isolate(u,c);d.remove()},l.prototype.formatAt=function(u,c,d,f){var p=this.isolate(u,c);if(s.query(d,s.Scope.BLOT)!=null&&f)p.wrap(d,f);else if(s.query(d,s.Scope.ATTRIBUTE)!=null){var h=s.create(this.statics.scope);p.wrap(h),h.format(d,f)}},l.prototype.insertAt=function(u,c,d){var f=d==null?s.create("text",c):s.create(c,d),p=this.split(u);this.parent.insertBefore(f,p)},l.prototype.insertInto=function(u,c){c===void 0&&(c=null),this.parent!=null&&this.parent.children.remove(this);var d=null;u.children.insertBefore(this,c),c!=null&&(d=c.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=d)&&u.domNode.insertBefore(this.domNode,d),this.parent=u,this.attach()},l.prototype.isolate=function(u,c){var d=this.split(u);return d.split(c),d},l.prototype.length=function(){return 1},l.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},l.prototype.optimize=function(u){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},l.prototype.replaceWith=function(u,c){var d=typeof u=="string"?s.create(u,c):u;return d.replace(this),d},l.prototype.split=function(u,c){return u===0?this:this.next},l.prototype.update=function(u,c){},l.prototype.wrap=function(u,c){var d=typeof u=="string"?s.create(u,c):u;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},l.blotName="abstract",l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(12),o=i(32),l=i(33),u=i(1),c=function(){function d(f){this.attributes={},this.domNode=f,this.build()}return d.prototype.attribute=function(f,p){p?f.add(this.domNode,p)&&(f.value(this.domNode)!=null?this.attributes[f.attrName]=f:delete this.attributes[f.attrName]):(f.remove(this.domNode),delete this.attributes[f.attrName])},d.prototype.build=function(){var f=this;this.attributes={};var p=s.default.keys(this.domNode),h=o.default.keys(this.domNode),y=l.default.keys(this.domNode);p.concat(h).concat(y).forEach(function(g){var v=u.query(g,u.Scope.ATTRIBUTE);v instanceof s.default&&(f.attributes[v.attrName]=v)})},d.prototype.copy=function(f){var p=this;Object.keys(this.attributes).forEach(function(h){var y=p.attributes[h].value(p.domNode);f.format(h,y)})},d.prototype.move=function(f){var p=this;this.copy(f),Object.keys(this.attributes).forEach(function(h){p.attributes[h].remove(p.domNode)}),this.attributes={}},d.prototype.values=function(){var f=this;return Object.keys(this.attributes).reduce(function(p,h){return p[h]=f.attributes[h].value(f.domNode),p},{})},d}();r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c,d){var f=c.getAttribute("class")||"";return f.split(/\s+/).filter(function(p){return p.indexOf(d+"-")===0})}var u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("class")||"").split(/\s+/).map(function(p){return p.split("-").slice(0,-1).join("-")})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(this.remove(f),f.classList.add(this.keyName+"-"+p),!0):!1},d.prototype.remove=function(f){var p=l(f,this.keyName);p.forEach(function(h){f.classList.remove(h)}),f.classList.length===0&&f.removeAttribute("class")},d.prototype.value=function(f){var p=l(f,this.keyName)[0]||"",h=p.slice(this.keyName.length+1);return this.canAdd(f,h)?h:""},d}(o.default);r.default=u},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c){var d=c.split("-"),f=d.slice(1).map(function(p){return p[0].toUpperCase()+p.slice(1)}).join("");return d[0]+f}var u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("style")||"").split(";").map(function(p){var h=p.split(":");return h[0].trim()})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(f.style[l(this.keyName)]=p,!0):!1},d.prototype.remove=function(f){f.style[l(this.keyName)]="",f.getAttribute("style")||f.removeAttribute("style")},d.prototype.value=function(f){var p=f.style[l(this.keyName)];return this.canAdd(f,p)?p:""},d}(o.default);r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function u(c,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,f){return d&&u(c.prototype,d),f&&u(c,f),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,d){o(this,u),this.quill=c,this.options=d,this.modules={}}return s(u,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(f){d.modules[f]==null&&d.addModule(f)})}},{key:"addModule",value:function(d){var f=this.quill.constructor.import("modules/"+d);return this.modules[d]=new f(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),u}();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=i(0),u=f(l),c=i(7),d=f(c);function f(b){return b&&b.__esModule?b:{default:b}}function p(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function h(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function y(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var g="\uFEFF",v=function(b){y(w,b);function w(I){p(this,w);var m=h(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,I));return m.contentNode=document.createElement("span"),m.contentNode.setAttribute("contenteditable",!1),[].slice.call(m.domNode.childNodes).forEach(function(A){m.contentNode.appendChild(A)}),m.leftGuard=document.createTextNode(g),m.rightGuard=document.createTextNode(g),m.domNode.appendChild(m.leftGuard),m.domNode.appendChild(m.contentNode),m.domNode.appendChild(m.rightGuard),m}return s(w,[{key:"index",value:function(m,A){return m===this.leftGuard?0:m===this.rightGuard?1:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,A)}},{key:"restore",value:function(m){var A=void 0,E=void 0,O=m.data.split(g).join("");if(m===this.leftGuard)if(this.prev instanceof d.default){var T=this.prev.length();this.prev.insertAt(T,O),A={startNode:this.prev.domNode,startOffset:T+O.length}}else E=document.createTextNode(O),this.parent.insertBefore(u.default.create(E),this),A={startNode:E,startOffset:O.length};else m===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,O),A={startNode:this.next.domNode,startOffset:O.length}):(E=document.createTextNode(O),this.parent.insertBefore(u.default.create(E),this.next),A={startNode:E,startOffset:O.length}));return m.data=g,A}},{key:"update",value:function(m,A){var E=this;m.forEach(function(O){if(O.type==="characterData"&&(O.target===E.leftGuard||O.target===E.rightGuard)){var T=E.restore(O.target);T&&(A.range=T)}})}}]),w}(u.default.Embed);r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var u={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},c=new o.default.Attributor.Attribute("align","align",u),d=new o.default.Attributor.Class("align","ql-align",u),f=new o.default.Attributor.Style("align","text-align",u);r.AlignAttribute=c,r.AlignClass=d,r.AlignStyle=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var s=i(0),o=u(s),l=i(26);function u(f){return f&&f.__esModule?f:{default:f}}var c=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=c,r.BackgroundStyle=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var u={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},c=new o.default.Attributor.Attribute("direction","dir",u),d=new o.default.Attributor.Class("direction","ql-direction",u),f=new o.default.Attributor.Style("direction","direction",u);r.DirectionAttribute=c,r.DirectionClass=d,r.DirectionStyle=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var s=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=i(0),u=c(l);function c(b){return b&&b.__esModule?b:{default:b}}function d(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function f(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function p(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var h={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new u.default.Attributor.Class("font","ql-font",h),g=function(b){p(w,b);function w(){return d(this,w),f(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(m){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,m).replace(/["']/g,"")}}]),w}(u.default.Attributor.Style),v=new g("font","font-family",h);r.FontStyle=v,r.FontClass=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var s=i(0),o=l(s);function l(d){return d&&d.__esModule?d:{default:d}}var u=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),c=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=u,r.SizeStyle=c},function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var s=function(){function I(m,A){for(var E=0;E<A.length;E++){var O=A[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,A,E){return A&&I(m.prototype,A),E&&I(m,E),m}}(),o=i(0),l=p(o),u=i(5),c=p(u),d=i(9),f=p(d);function p(I){return I&&I.__esModule?I:{default:I}}function h(I,m){if(!(I instanceof m))throw new TypeError("Cannot call a class as a function")}function y(I,m){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:I}function g(I,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);I.prototype=Object.create(m&&m.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(I,m):I.__proto__=m)}var v=function(I){g(m,I);function m(A,E){h(this,m);var O=y(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,A,E));return O.lastRecorded=0,O.ignoreChange=!1,O.clear(),O.quill.on(c.default.events.EDITOR_CHANGE,function(T,x,P,S){T!==c.default.events.TEXT_CHANGE||O.ignoreChange||(!O.options.userOnly||S===c.default.sources.USER?O.record(x,P):O.transform(x))}),O.quill.keyboard.addBinding({key:"Z",shortKey:!0},O.undo.bind(O)),O.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},O.redo.bind(O)),/Win/i.test(navigator.platform)&&O.quill.keyboard.addBinding({key:"Y",shortKey:!0},O.redo.bind(O)),O}return s(m,[{key:"change",value:function(E,O){if(this.stack[E].length!==0){var T=this.stack[E].pop();this.stack[O].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[E],c.default.sources.USER),this.ignoreChange=!1;var x=w(T[E]);this.quill.setSelection(x)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(E,O){if(E.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(O),x=Date.now();if(this.lastRecorded+this.options.delay>x&&this.stack.undo.length>0){var P=this.stack.undo.pop();T=T.compose(P.undo),E=P.redo.compose(E)}else this.lastRecorded=x;this.stack.undo.push({redo:E,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(O){O.undo=E.transform(O.undo,!0),O.redo=E.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=E.transform(O.undo,!0),O.redo=E.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),m}(f.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(I){var m=I.ops[I.ops.length-1];return m==null?!1:m.insert!=null?typeof m.insert=="string"&&m.insert.endsWith(`
|
|
2309
|
-
`):m.attributes!=null?Object.keys(m.attributes).some(function(A){return l.default.query(A,l.default.Scope.BLOCK)!=null}):!1}function w(I){var m=I.reduce(function(E,O){return E+=O.delete||0,E},0),A=I.length()-m;return b(I)&&(A-=1),A}r.default=v,r.getLastChangeIndex=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var s=function(){function R(k,B){for(var W=0;W<B.length;W++){var $=B[W];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(k,$.key,$)}}return function(k,B,W){return B&&R(k.prototype,B),W&&R(k,W),k}}(),o=function R(k,B,W){k===null&&(k=Function.prototype);var $=Object.getOwnPropertyDescriptor(k,B);if($===void 0){var Q=Object.getPrototypeOf(k);return Q===null?void 0:R(Q,B,W)}else{if("value"in $)return $.value;var Y=$.get;return Y===void 0?void 0:Y.call(W)}},l=i(3),u=x(l),c=i(2),d=x(c),f=i(8),p=x(f),h=i(23),y=x(h),g=i(34),v=x(g),b=i(59),w=x(b),I=i(60),m=x(I),A=i(28),E=x(A),O=i(61),T=x(O);function x(R){return R&&R.__esModule?R:{default:R}}function P(R,k){if(!(R instanceof k))throw new TypeError("Cannot call a class as a function")}function S(R,k){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:R}function M(R,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);R.prototype=Object.create(k&&k.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(R,k):R.__proto__=k)}var D=[!1,"center","right","justify"],L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],F=[!1,"serif","monospace"],H=["1","2","3",!1],q=["small",!1,"large","huge"],z=function(R){M(k,R);function k(B,W){P(this,k);var $=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,B,W)),Q=function Y(X){if(!document.body.contains(B.root))return document.body.removeEventListener("click",Y);$.tooltip!=null&&!$.tooltip.root.contains(X.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(ee){ee.container.contains(X.target)||ee.close()})};return B.emitter.listenDOM("click",document.body,Q),$}return s(k,[{key:"addModule",value:function(W){var $=o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"addModule",this).call(this,W);return W==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(W,$){W.forEach(function(Q){var Y=Q.getAttribute("class")||"";Y.split(/\s+/).forEach(function(X){if(!!X.startsWith("ql-")&&(X=X.slice(3),$[X]!=null))if(X==="direction")Q.innerHTML=$[X][""]+$[X].rtl;else if(typeof $[X]=="string")Q.innerHTML=$[X];else{var ee=Q.value||"";ee!=null&&$[X][ee]&&(Q.innerHTML=$[X][ee])}})})}},{key:"buildPickers",value:function(W,$){var Q=this;this.pickers=W.map(function(X){if(X.classList.contains("ql-align"))return X.querySelector("option")==null&&C(X,D),new m.default(X,$.align);if(X.classList.contains("ql-background")||X.classList.contains("ql-color")){var ee=X.classList.contains("ql-background")?"background":"color";return X.querySelector("option")==null&&C(X,L,ee==="background"?"#ffffff":"#000000"),new w.default(X,$[ee])}else return X.querySelector("option")==null&&(X.classList.contains("ql-font")?C(X,F):X.classList.contains("ql-header")?C(X,H):X.classList.contains("ql-size")&&C(X,q)),new E.default(X)});var Y=function(){Q.pickers.forEach(function(ee){ee.update()})};this.quill.on(p.default.events.EDITOR_CHANGE,Y)}}]),k}(v.default);z.DEFAULTS=(0,u.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var k=this,B=this.container.querySelector("input.ql-image[type=file]");B==null&&(B=document.createElement("input"),B.setAttribute("type","file"),B.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),B.classList.add("ql-image"),B.addEventListener("change",function(){if(B.files!=null&&B.files[0]!=null){var W=new FileReader;W.onload=function($){var Q=k.quill.getSelection(!0);k.quill.updateContents(new d.default().retain(Q.index).delete(Q.length).insert({image:$.target.result}),p.default.sources.USER),k.quill.setSelection(Q.index+1,p.default.sources.SILENT),B.value=""},W.readAsDataURL(B.files[0])}}),this.container.appendChild(B)),B.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var U=function(R){M(k,R);function k(B,W){P(this,k);var $=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,B,W));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return s(k,[{key:"listen",value:function(){var W=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(W.save(),$.preventDefault()):y.default.match($,"escape")&&(W.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:W!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+W)||""),this.root.setAttribute("data-mode",W)}},{key:"restoreFocus",value:function(){var W=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=W}},{key:"save",value:function(){var W=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",W,p.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",W,p.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":W=N(W);case"formula":{if(!W)break;var Q=this.quill.getSelection(!0);if(Q!=null){var Y=Q.index+Q.length;this.quill.insertEmbed(Y,this.root.getAttribute("data-mode"),W,p.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(Y+1," ",p.default.sources.USER),this.quill.setSelection(Y+2,p.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),k}(T.default);function N(R){var k=R.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||R.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return k?(k[1]||"https")+"://www.youtube.com/embed/"+k[2]+"?showinfo=0":(k=R.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(k[1]||"https")+"://player.vimeo.com/video/"+k[2]+"/":R}function C(R,k){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;k.forEach(function(W){var $=document.createElement("option");W===B?$.setAttribute("selected","selected"):$.setAttribute("value",W),R.appendChild($)})}r.BaseTooltip=U,r.default=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var u,c=this.iterator();u=c();)if(u===l)return!0;return!1},o.prototype.insertBefore=function(l,u){!l||(l.next=u,u!=null?(l.prev=u.prev,u.prev!=null&&(u.prev.next=l),u.prev=l,u===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var u=0,c=this.head;c!=null;){if(c===l)return u;u+=c.length(),c=c.next}return-1},o.prototype.remove=function(l){!this.contains(l)||(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var u=l;return l!=null&&(l=l.next),u}},o.prototype.find=function(l,u){u===void 0&&(u=!1);for(var c,d=this.iterator();c=d();){var f=c.length();if(l<f||u&&l===f&&(c.next==null||c.next.length()!==0))return[c,l];l-=f}return[null,0]},o.prototype.forEach=function(l){for(var u,c=this.iterator();u=c();)l(u)},o.prototype.forEachAt=function(l,u,c){if(!(u<=0))for(var d=this.find(l),f=d[0],p=d[1],h,y=l-p,g=this.iterator(f);(h=g())&&y<l+u;){var v=h.length();l>y?c(h,l-y,Math.min(u,y+v-l)):c(h,0,Math.min(v,l+u-y)),y+=v}},o.prototype.map=function(l){return this.reduce(function(u,c){return u.push(l(c)),u},[])},o.prototype.reduce=function(l,u){for(var c,d=this.iterator();c=d();)u=l(u,c);return u},o}();r.default=s},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),l=i(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},c=100,d=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.scroll=y,y.observer=new MutationObserver(function(g){y.update(g)}),y.observer.observe(y.domNode,u),y.attach(),y}return p.prototype.detach=function(){f.prototype.detach.call(this),this.observer.disconnect()},p.prototype.deleteAt=function(h,y){this.update(),h===0&&y===this.length()?this.children.forEach(function(g){g.remove()}):f.prototype.deleteAt.call(this,h,y)},p.prototype.formatAt=function(h,y,g,v){this.update(),f.prototype.formatAt.call(this,h,y,g,v)},p.prototype.insertAt=function(h,y,g){this.update(),f.prototype.insertAt.call(this,h,y,g)},p.prototype.optimize=function(h,y){var g=this;h===void 0&&(h=[]),y===void 0&&(y={}),f.prototype.optimize.call(this,y);for(var v=[].slice.call(this.observer.takeRecords());v.length>0;)h.push(v.pop());for(var b=function(A,E){E===void 0&&(E=!0),!(A==null||A===g)&&A.domNode.parentNode!=null&&(A.domNode[l.DATA_KEY].mutations==null&&(A.domNode[l.DATA_KEY].mutations=[]),E&&b(A.parent))},w=function(A){A.domNode[l.DATA_KEY]==null||A.domNode[l.DATA_KEY].mutations==null||(A instanceof o.default&&A.children.forEach(w),A.optimize(y))},I=h,m=0;I.length>0;m+=1){if(m>=c)throw new Error("[Parchment] Maximum optimize iterations reached");for(I.forEach(function(A){var E=l.find(A.target,!0);E!=null&&(E.domNode===A.target&&(A.type==="childList"?(b(l.find(A.previousSibling,!1)),[].forEach.call(A.addedNodes,function(O){var T=l.find(O,!1);b(T,!1),T instanceof o.default&&T.children.forEach(function(x){b(x,!1)})})):A.type==="attributes"&&b(E.prev)),b(E))}),this.children.forEach(w),I=[].slice.call(this.observer.takeRecords()),v=I.slice();v.length>0;)h.push(v.pop())}},p.prototype.update=function(h,y){var g=this;y===void 0&&(y={}),h=h||this.observer.takeRecords(),h.map(function(v){var b=l.find(v.target,!0);return b==null?null:b.domNode[l.DATA_KEY].mutations==null?(b.domNode[l.DATA_KEY].mutations=[v],b):(b.domNode[l.DATA_KEY].mutations.push(v),null)}).forEach(function(v){v==null||v===g||v.domNode[l.DATA_KEY]==null||v.update(v.domNode[l.DATA_KEY].mutations||[],y)}),this.domNode[l.DATA_KEY].mutations!=null&&f.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,y),this.optimize(h,y)},p.blotName="scroll",p.defaultChild="block",p.scope=l.Scope.BLOCK_BLOT,p.tagName="DIV",p}(o.default);r.default=d},function(n,r,i){var s=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var h in p)p.hasOwnProperty(h)&&(f[h]=p[h])};return function(f,p){d(f,p);function h(){this.constructor=f}f.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1);function u(d,f){if(Object.keys(d).length!==Object.keys(f).length)return!1;for(var p in d)if(d[p]!==f[p])return!1;return!0}var c=function(d){s(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.formats=function(p){if(p.tagName!==f.tagName)return d.formats.call(this,p)},f.prototype.format=function(p,h){var y=this;p===this.statics.blotName&&!h?(this.children.forEach(function(g){g instanceof o.default||(g=g.wrap(f.blotName,!0)),y.attributes.copy(g)}),this.unwrap()):d.prototype.format.call(this,p,h)},f.prototype.formatAt=function(p,h,y,g){if(this.formats()[y]!=null||l.query(y,l.Scope.ATTRIBUTE)){var v=this.isolate(p,h);v.format(y,g)}else d.prototype.formatAt.call(this,p,h,y,g)},f.prototype.optimize=function(p){d.prototype.optimize.call(this,p);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var y=this.next;y instanceof f&&y.prev===this&&u(h,y.formats())&&(y.moveChildren(this),y.remove())},f.blotName="inline",f.scope=l.Scope.INLINE_BLOT,f.tagName="SPAN",f}(o.default);r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1),u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.formats=function(f){var p=l.query(d.blotName).tagName;if(f.tagName!==p)return c.formats.call(this,f)},d.prototype.format=function(f,p){l.query(f,l.Scope.BLOCK)!=null&&(f===this.statics.blotName&&!p?this.replaceWith(d.blotName):c.prototype.format.call(this,f,p))},d.prototype.formatAt=function(f,p,h,y){l.query(h,l.Scope.BLOCK)!=null?this.format(h,y):c.prototype.formatAt.call(this,f,p,h,y)},d.prototype.insertAt=function(f,p,h){if(h==null||l.query(p,l.Scope.INLINE)!=null)c.prototype.insertAt.call(this,f,p,h);else{var y=this.split(f),g=l.create(p,h);y.parent.insertBefore(g,y)}},d.prototype.update=function(f,p){navigator.userAgent.match(/Trident/)?this.build():c.prototype.update.call(this,f,p)},d.blotName="block",d.scope=l.Scope.BLOCK_BLOT,d.tagName="P",d}(o.default);r.default=u},function(n,r,i){var s=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])};return function(c,d){u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=function(u){s(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.formats=function(d){},c.prototype.format=function(d,f){u.prototype.formatAt.call(this,0,this.length(),d,f)},c.prototype.formatAt=function(d,f,p,h){d===0&&f===this.length()?this.format(p,h):u.prototype.formatAt.call(this,d,f,p,h)},c.prototype.formats=function(){return this.statics.formats(this.domNode)},c}(o.default);r.default=l},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=i(1),u=function(c){s(d,c);function d(f){var p=c.call(this,f)||this;return p.text=p.statics.value(p.domNode),p}return d.create=function(f){return document.createTextNode(f)},d.value=function(f){var p=f.data;return p.normalize&&(p=p.normalize()),p},d.prototype.deleteAt=function(f,p){this.domNode.data=this.text=this.text.slice(0,f)+this.text.slice(f+p)},d.prototype.index=function(f,p){return this.domNode===f?p:-1},d.prototype.insertAt=function(f,p,h){h==null?(this.text=this.text.slice(0,f)+p+this.text.slice(f),this.domNode.data=this.text):c.prototype.insertAt.call(this,f,p,h)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(f){c.prototype.optimize.call(this,f),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(f,p){return[this.domNode,f]},d.prototype.split=function(f,p){if(p===void 0&&(p=!1),!p){if(f===0)return this;if(f===this.length())return this.next}var h=l.create(this.domNode.splitText(f));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},d.prototype.update=function(f,p){var h=this;f.some(function(y){return y.type==="characterData"&&y.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=u},function(n,r,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,u){return arguments.length>1&&!this.contains(l)==!u?u:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,u){return u=u||0,this.substr(u,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,u){var c=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>c.length)&&(u=c.length),u-=l.length;var d=c.indexOf(l,u);return d!==-1&&d===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var c=Object(this),d=c.length>>>0,f=arguments[1],p,h=0;h<d;h++)if(p=c[h],u.call(f,p,h,c))return p}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var i=-1,s=1,o=0;function l(m,A,E){if(m==A)return m?[[o,m]]:[];(E<0||m.length<E)&&(E=null);var O=f(m,A),T=m.substring(0,O);m=m.substring(O),A=A.substring(O),O=p(m,A);var x=m.substring(m.length-O);m=m.substring(0,m.length-O),A=A.substring(0,A.length-O);var P=u(m,A);return T&&P.unshift([o,T]),x&&P.push([o,x]),y(P),E!=null&&(P=b(P,E)),P=w(P),P}function u(m,A){var E;if(!m)return[[s,A]];if(!A)return[[i,m]];var O=m.length>A.length?m:A,T=m.length>A.length?A:m,x=O.indexOf(T);if(x!=-1)return E=[[s,O.substring(0,x)],[o,T],[s,O.substring(x+T.length)]],m.length>A.length&&(E[0][0]=E[2][0]=i),E;if(T.length==1)return[[i,m],[s,A]];var P=h(m,A);if(P){var S=P[0],M=P[1],D=P[2],L=P[3],F=P[4],H=l(S,D),q=l(M,L);return H.concat([[o,F]],q)}return c(m,A)}function c(m,A){for(var E=m.length,O=A.length,T=Math.ceil((E+O)/2),x=T,P=2*T,S=new Array(P),M=new Array(P),D=0;D<P;D++)S[D]=-1,M[D]=-1;S[x+1]=0,M[x+1]=0;for(var L=E-O,F=L%2!=0,H=0,q=0,z=0,U=0,N=0;N<T;N++){for(var C=-N+H;C<=N-q;C+=2){var R=x+C,k;C==-N||C!=N&&S[R-1]<S[R+1]?k=S[R+1]:k=S[R-1]+1;for(var B=k-C;k<E&&B<O&&m.charAt(k)==A.charAt(B);)k++,B++;if(S[R]=k,k>E)q+=2;else if(B>O)H+=2;else if(F){var W=x+L-C;if(W>=0&&W<P&&M[W]!=-1){var $=E-M[W];if(k>=$)return d(m,A,k,B)}}}for(var Q=-N+z;Q<=N-U;Q+=2){var W=x+Q,$;Q==-N||Q!=N&&M[W-1]<M[W+1]?$=M[W+1]:$=M[W-1]+1;for(var Y=$-Q;$<E&&Y<O&&m.charAt(E-$-1)==A.charAt(O-Y-1);)$++,Y++;if(M[W]=$,$>E)U+=2;else if(Y>O)z+=2;else if(!F){var R=x+L-Q;if(R>=0&&R<P&&S[R]!=-1){var k=S[R],B=x+k-R;if($=E-$,k>=$)return d(m,A,k,B)}}}}return[[i,m],[s,A]]}function d(m,A,E,O){var T=m.substring(0,E),x=A.substring(0,O),P=m.substring(E),S=A.substring(O),M=l(T,x),D=l(P,S);return M.concat(D)}function f(m,A){if(!m||!A||m.charAt(0)!=A.charAt(0))return 0;for(var E=0,O=Math.min(m.length,A.length),T=O,x=0;E<T;)m.substring(x,T)==A.substring(x,T)?(E=T,x=E):O=T,T=Math.floor((O-E)/2+E);return T}function p(m,A){if(!m||!A||m.charAt(m.length-1)!=A.charAt(A.length-1))return 0;for(var E=0,O=Math.min(m.length,A.length),T=O,x=0;E<T;)m.substring(m.length-T,m.length-x)==A.substring(A.length-T,A.length-x)?(E=T,x=E):O=T,T=Math.floor((O-E)/2+E);return T}function h(m,A){var E=m.length>A.length?m:A,O=m.length>A.length?A:m;if(E.length<4||O.length*2<E.length)return null;function T(q,z,U){for(var N=q.substring(U,U+Math.floor(q.length/4)),C=-1,R="",k,B,W,$;(C=z.indexOf(N,C+1))!=-1;){var Q=f(q.substring(U),z.substring(C)),Y=p(q.substring(0,U),z.substring(0,C));R.length<Y+Q&&(R=z.substring(C-Y,C)+z.substring(C,C+Q),k=q.substring(0,U-Y),B=q.substring(U+Q),W=z.substring(0,C-Y),$=z.substring(C+Q))}return R.length*2>=q.length?[k,B,W,$,R]:null}var x=T(E,O,Math.ceil(E.length/4)),P=T(E,O,Math.ceil(E.length/2)),S;if(!x&&!P)return null;P?x?S=x[4].length>P[4].length?x:P:S=P:S=x;var M,D,L,F;m.length>A.length?(M=S[0],D=S[1],L=S[2],F=S[3]):(L=S[0],F=S[1],M=S[2],D=S[3]);var H=S[4];return[M,D,L,F,H]}function y(m){m.push([o,""]);for(var A=0,E=0,O=0,T="",x="",P;A<m.length;)switch(m[A][0]){case s:O++,x+=m[A][1],A++;break;case i:E++,T+=m[A][1],A++;break;case o:E+O>1?(E!==0&&O!==0&&(P=f(x,T),P!==0&&(A-E-O>0&&m[A-E-O-1][0]==o?m[A-E-O-1][1]+=x.substring(0,P):(m.splice(0,0,[o,x.substring(0,P)]),A++),x=x.substring(P),T=T.substring(P)),P=p(x,T),P!==0&&(m[A][1]=x.substring(x.length-P)+m[A][1],x=x.substring(0,x.length-P),T=T.substring(0,T.length-P))),E===0?m.splice(A-O,E+O,[s,x]):O===0?m.splice(A-E,E+O,[i,T]):m.splice(A-E-O,E+O,[i,T],[s,x]),A=A-E-O+(E?1:0)+(O?1:0)+1):A!==0&&m[A-1][0]==o?(m[A-1][1]+=m[A][1],m.splice(A,1)):A++,O=0,E=0,T="",x="";break}m[m.length-1][1]===""&&m.pop();var S=!1;for(A=1;A<m.length-1;)m[A-1][0]==o&&m[A+1][0]==o&&(m[A][1].substring(m[A][1].length-m[A-1][1].length)==m[A-1][1]?(m[A][1]=m[A-1][1]+m[A][1].substring(0,m[A][1].length-m[A-1][1].length),m[A+1][1]=m[A-1][1]+m[A+1][1],m.splice(A-1,1),S=!0):m[A][1].substring(0,m[A+1][1].length)==m[A+1][1]&&(m[A-1][1]+=m[A+1][1],m[A][1]=m[A][1].substring(m[A+1][1].length)+m[A+1][1],m.splice(A+1,1),S=!0)),A++;S&&y(m)}var g=l;g.INSERT=s,g.DELETE=i,g.EQUAL=o,n.exports=g;function v(m,A){if(A===0)return[o,m];for(var E=0,O=0;O<m.length;O++){var T=m[O];if(T[0]===i||T[0]===o){var x=E+T[1].length;if(A===x)return[O+1,m];if(A<x){m=m.slice();var P=A-E,S=[T[0],T[1].slice(0,P)],M=[T[0],T[1].slice(P)];return m.splice(O,1,S,M),[O+1,m]}else E=x}}throw new Error("cursor_pos is out of bounds!")}function b(m,A){var E=v(m,A),O=E[1],T=E[0],x=O[T],P=O[T+1];if(x==null)return m;if(x[0]!==o)return m;if(P!=null&&x[1]+P[1]===P[1]+x[1])return O.splice(T,2,P,x),I(O,T,2);if(P!=null&&P[1].indexOf(x[1])===0){O.splice(T,2,[P[0],x[1]],[0,x[1]]);var S=P[1].slice(x[1].length);return S.length>0&&O.splice(T+2,0,[P[0],S]),I(O,T,3)}else return m}function w(m){for(var A=!1,E=function(P){return P.charCodeAt(0)>=56320&&P.charCodeAt(0)<=57343},O=function(P){return P.charCodeAt(P.length-1)>=55296&&P.charCodeAt(P.length-1)<=56319},T=2;T<m.length;T+=1)m[T-2][0]===o&&O(m[T-2][1])&&m[T-1][0]===i&&E(m[T-1][1])&&m[T][0]===s&&E(m[T][1])&&(A=!0,m[T-1][1]=m[T-2][1].slice(-1)+m[T-1][1],m[T][1]=m[T-2][1].slice(-1)+m[T][1],m[T-2][1]=m[T-2][1].slice(0,-1));if(!A)return m;for(var x=[],T=0;T<m.length;T+=1)m[T][1].length>0&&x.push(m[T]);return x}function I(m,A,E){for(var O=A+E-1;O>=0&&O>=A-1;O--)if(O+1<m.length){var T=m[O],x=m[O+1];T[0]===x[1]&&m.splice(O,2,[T[0],T[1]+x[1]])}return m}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(s){var o=[];for(var l in s)o.push(l);return o}},function(n,r){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=i?s:o,r.supported=s;function s(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(n,r){var i=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function l(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function u(){this._events=new o,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],f,p;if(this._eventsCount===0)return d;for(p in f=this._events)i.call(f,p)&&d.push(s?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},u.prototype.listeners=function(d,f){var p=s?s+d:d,h=this._events[p];if(f)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var y=0,g=h.length,v=new Array(g);y<g;y++)v[y]=h[y].fn;return v},u.prototype.emit=function(d,f,p,h,y,g){var v=s?s+d:d;if(!this._events[v])return!1;var b=this._events[v],w=arguments.length,I,m;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,f),!0;case 3:return b.fn.call(b.context,f,p),!0;case 4:return b.fn.call(b.context,f,p,h),!0;case 5:return b.fn.call(b.context,f,p,h,y),!0;case 6:return b.fn.call(b.context,f,p,h,y,g),!0}for(m=1,I=new Array(w-1);m<w;m++)I[m-1]=arguments[m];b.fn.apply(b.context,I)}else{var A=b.length,E;for(m=0;m<A;m++)switch(b[m].once&&this.removeListener(d,b[m].fn,void 0,!0),w){case 1:b[m].fn.call(b[m].context);break;case 2:b[m].fn.call(b[m].context,f);break;case 3:b[m].fn.call(b[m].context,f,p);break;case 4:b[m].fn.call(b[m].context,f,p,h);break;default:if(!I)for(E=1,I=new Array(w-1);E<w;E++)I[E-1]=arguments[E];b[m].fn.apply(b[m].context,I)}}return!0},u.prototype.on=function(d,f,p){var h=new l(f,p||this),y=s?s+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],h]:this._events[y].push(h):(this._events[y]=h,this._eventsCount++),this},u.prototype.once=function(d,f,p){var h=new l(f,p||this,!0),y=s?s+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],h]:this._events[y].push(h):(this._events[y]=h,this._eventsCount++),this},u.prototype.removeListener=function(d,f,p,h){var y=s?s+d:d;if(!this._events[y])return this;if(!f)return--this._eventsCount===0?this._events=new o:delete this._events[y],this;var g=this._events[y];if(g.fn)g.fn===f&&(!h||g.once)&&(!p||g.context===p)&&(--this._eventsCount===0?this._events=new o:delete this._events[y]);else{for(var v=0,b=[],w=g.length;v<w;v++)(g[v].fn!==f||h&&!g[v].once||p&&g[v].context!==p)&&b.push(g[v]);b.length?this._events[y]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new o:delete this._events[y]}return this},u.prototype.removeAllListeners=function(d){var f;return d?(f=s?s+d:d,this._events[f]&&(--this._eventsCount===0?this._events=new o:delete this._events[f])):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=s,u.EventEmitter=u,typeof n!="undefined"&&(n.exports=u)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o=function(){function te(re,ue){var he=[],oe=!0,_e=!1,Oe=void 0;try{for(var Te=re[Symbol.iterator](),mt;!(oe=(mt=Te.next()).done)&&(he.push(mt.value),!(ue&&he.length===ue));oe=!0);}catch(_t){_e=!0,Oe=_t}finally{try{!oe&&Te.return&&Te.return()}finally{if(_e)throw Oe}}return he}return function(re,ue){if(Array.isArray(re))return re;if(Symbol.iterator in Object(re))return te(re,ue);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function te(re,ue){for(var he=0;he<ue.length;he++){var oe=ue[he];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(re,oe.key,oe)}}return function(re,ue,he){return ue&&te(re.prototype,ue),he&&te(re,he),re}}(),u=i(3),c=M(u),d=i(2),f=M(d),p=i(0),h=M(p),y=i(5),g=M(y),v=i(10),b=M(v),w=i(9),I=M(w),m=i(36),A=i(37),E=i(13),O=M(E),T=i(26),x=i(38),P=i(39),S=i(40);function M(te){return te&&te.__esModule?te:{default:te}}function D(te,re,ue){return re in te?Object.defineProperty(te,re,{value:ue,enumerable:!0,configurable:!0,writable:!0}):te[re]=ue,te}function L(te,re){if(!(te instanceof re))throw new TypeError("Cannot call a class as a function")}function F(te,re){if(!te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:te}function H(te,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);te.prototype=Object.create(re&&re.prototype,{constructor:{value:te,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(te,re):te.__proto__=re)}var q=(0,b.default)("quill:clipboard"),z="__ql-matcher",U=[[Node.TEXT_NODE,Ve],[Node.TEXT_NODE,Ae],["br",le],[Node.ELEMENT_NODE,Ae],[Node.ELEMENT_NODE,ee],[Node.ELEMENT_NODE,Se],[Node.ELEMENT_NODE,X],[Node.ELEMENT_NODE,Ze],["li",ve],["b",Y.bind(Y,"bold")],["i",Y.bind(Y,"italic")],["style",me]],N=[m.AlignAttribute,x.DirectionAttribute].reduce(function(te,re){return te[re.keyName]=re,te},{}),C=[m.AlignStyle,A.BackgroundStyle,T.ColorStyle,x.DirectionStyle,P.FontStyle,S.SizeStyle].reduce(function(te,re){return te[re.keyName]=re,te},{}),R=function(te){H(re,te);function re(ue,he){L(this,re);var oe=F(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,ue,he));return oe.quill.root.addEventListener("paste",oe.onPaste.bind(oe)),oe.container=oe.quill.addContainer("ql-clipboard"),oe.container.setAttribute("contenteditable",!0),oe.container.setAttribute("tabindex",-1),oe.matchers=[],U.concat(oe.options.matchers).forEach(function(_e){var Oe=o(_e,2),Te=Oe[0],mt=Oe[1];!he.matchVisual&&mt===Se||oe.addMatcher(Te,mt)}),oe}return l(re,[{key:"addMatcher",value:function(he,oe){this.matchers.push([he,oe])}},{key:"convert",value:function(he){if(typeof he=="string")return this.container.innerHTML=he.replace(/\>\r?\n +\</g,"><"),this.convert();var oe=this.quill.getFormat(this.quill.selection.savedRange.index);if(oe[O.default.blotName]){var _e=this.container.innerText;return this.container.innerHTML="",new f.default().insert(_e,D({},O.default.blotName,oe[O.default.blotName]))}var Oe=this.prepareMatching(),Te=o(Oe,2),mt=Te[0],_t=Te[1],qe=Q(this.container,mt,_t);return W(qe,`
|
|
2310
|
-
`)&&qe.ops[qe.ops.length-1].attributes==null&&(qe=qe.compose(new f.default().retain(qe.length()-1).delete(1))),q.log("convert",this.container.innerHTML,qe),this.container.innerHTML="",qe}},{key:"dangerouslyPasteHTML",value:function(he,oe){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof he=="string")this.quill.setContents(this.convert(he),oe),this.quill.setSelection(0,g.default.sources.SILENT);else{var Oe=this.convert(oe);this.quill.updateContents(new f.default().retain(he).concat(Oe),_e),this.quill.setSelection(he+Oe.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(he){var oe=this;if(!(he.defaultPrevented||!this.quill.isEnabled())){var _e=this.quill.getSelection(),Oe=new f.default().retain(_e.index),Te=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){Oe=Oe.concat(oe.convert()).delete(_e.length),oe.quill.updateContents(Oe,g.default.sources.USER),oe.quill.setSelection(Oe.length()-_e.length,g.default.sources.SILENT),oe.quill.scrollingContainer.scrollTop=Te,oe.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var he=this,oe=[],_e=[];return this.matchers.forEach(function(Oe){var Te=o(Oe,2),mt=Te[0],_t=Te[1];switch(mt){case Node.TEXT_NODE:_e.push(_t);break;case Node.ELEMENT_NODE:oe.push(_t);break;default:[].forEach.call(he.container.querySelectorAll(mt),function(qe){qe[z]=qe[z]||[],qe[z].push(_t)});break}}),[oe,_e]}}]),re}(I.default);
|
|
2308
|
+
`);Se=0,re.forEach(function(ue,he){$?(Ae.insertAt(Ve+Se,X.TAB),Se+=X.TAB.length,he===0?ee+=X.TAB.length:le+=X.TAB.length):ue.startsWith(X.TAB)&&(Ae.deleteAt(Ve+Se,X.TAB.length),Se-=X.TAB.length,he===0?ee-=X.TAB.length:le-=X.TAB.length),Se+=ue.length+1}),this.quill.update(A.default.sources.USER),this.quill.setSelection(ee,le,A.default.sources.SILENT)}}}}function B($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(Y,X){this.quill.format($,!X.format[$],A.default.sources.USER)}}}function W($){if(typeof $=="string"||typeof $=="number")return W({key:$});if((typeof $=="undefined"?"undefined":s($))==="object"&&($=(0,c.default)($,!1)),typeof $.key=="string")if(q.keys[$.key.toUpperCase()]!=null)$.key=q.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[H]=$.shortKey,delete $.shortKey),$}r.default=q,r.SHORTKEY=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function b(w,I){var m=[],A=!0,E=!1,O=void 0;try{for(var T=w[Symbol.iterator](),x;!(A=(x=T.next()).done)&&(m.push(x.value),!(I&&m.length===I));A=!0);}catch(P){E=!0,O=P}finally{try{!A&&T.return&&T.return()}finally{if(E)throw O}}return m}return function(w,I){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return b(w,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),u=i(0),c=p(u),d=i(7),f=p(d);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function y(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function g(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var v=function(b){g(w,b),l(w,null,[{key:"value",value:function(){}}]);function w(I,m){h(this,w);var A=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,I));return A.selection=m,A.textNode=document.createTextNode(w.CONTENTS),A.domNode.appendChild(A.textNode),A._length=0,A}return l(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(m,A){if(this._length!==0)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,m,A);for(var E=this,O=0;E!=null&&E.statics.scope!==c.default.Scope.BLOCK_BLOT;)O+=E.offset(E.parent),E=E.parent;E!=null&&(this._length=w.CONTENTS.length,E.optimize(),E.formatAt(O,w.CONTENTS.length,m,A),this._length=0)}},{key:"index",value:function(m,A){return m===this.textNode?0:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,A)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var m=this.textNode,A=this.selection.getNativeRange(),E=void 0,O=void 0,T=void 0;if(A!=null&&A.start.node===m&&A.end.node===m){var x=[m,A.start.offset,A.end.offset];E=x[0],O=x[1],T=x[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var P=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof f.default?(E=this.next.domNode,this.next.insertAt(0,P),this.textNode.data=w.CONTENTS):(this.textNode.data=P,this.parent.insertBefore(c.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),O!=null){var S=[O,T].map(function(D){return Math.max(0,Math.min(E.data.length,D-1))}),R=s(S,2);return O=R[0],T=R[1],{startNode:E,startOffset:O,endNode:E,endOffset:T}}}}},{key:"update",value:function(m,A){var E=this;if(m.some(function(T){return T.type==="characterData"&&T.target===E.textNode})){var O=this.restore();O&&(A.range=O)}}},{key:"value",value:function(){return""}}]),w}(c.default.Embed);v.blotName="cursor",v.className="ql-cursor",v.tagName="span",v.CONTENTS="\uFEFF",r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=c(s),l=i(4),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(o.default.Container);h.allowedChildren=[u.default,l.BlockEmbed,h],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(0),u=c(l);function c(v){return v&&v.__esModule?v:{default:v}}function d(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function f(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function p(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var h=function(v){p(b,v);function b(){return d(this,b),f(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(I){var m=o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,I);return m.startsWith("rgb(")?(m=m.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+m.split(",").map(function(A){return("00"+parseInt(A).toString(16)).slice(-2)}).join("")):m}}]),b}(u.default.Attributor.Style),y=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),g=new h("color","color",{scope:u.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=y,r.ColorStyle=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var s=function(){function g(v,b){for(var w=0;w<b.length;w++){var I=b[w];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(v,I.key,I)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var I=Object.getOwnPropertyDescriptor(v,b);if(I===void 0){var m=Object.getPrototypeOf(v);return m===null?void 0:g(m,b,w)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(w)}},l=i(6),u=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function f(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function p(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var h=function(g){p(v,g);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"format",value:function(w,I){if(w!==this.statics.blotName||!I)return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,I);I=this.constructor.sanitize(I),this.domNode.setAttribute("href",I)}}],[{key:"create",value:function(w){var I=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,w);return w=this.sanitize(w),I.setAttribute("href",w),I.setAttribute("rel","noopener noreferrer"),I.setAttribute("target","_blank"),I}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),v}(u.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(g,v){var b=document.createElement("a");b.href=g;var w=b.href.slice(0,b.href.indexOf(":"));return v.indexOf(w)>-1}r.default=h,r.sanitize=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},o=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),l=i(23),u=f(l),c=i(107),d=f(c);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}var h=0;function y(v,b){v.setAttribute(b,v.getAttribute(b)!=="true")}var g=function(){function v(b){var w=this;p(this,v),this.select=b,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(I){switch(I.keyCode){case u.default.keys.ENTER:w.togglePicker();break;case u.default.keys.ESCAPE:w.escape(),I.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(v,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var I=this,m=document.createElement("span");return m.tabIndex="0",m.setAttribute("role","button"),m.classList.add("ql-picker-item"),w.hasAttribute("value")&&m.setAttribute("data-value",w.getAttribute("value")),w.textContent&&m.setAttribute("data-label",w.textContent),m.addEventListener("click",function(){I.selectItem(m,!0)}),m.addEventListener("keydown",function(A){switch(A.keyCode){case u.default.keys.ENTER:I.selectItem(m,!0),A.preventDefault();break;case u.default.keys.ESCAPE:I.escape(),A.preventDefault();break}}),m}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,I=document.createElement("span");I.classList.add("ql-picker-options"),I.setAttribute("aria-hidden","true"),I.tabIndex="-1",I.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",I.id),this.options=I,[].slice.call(this.select.options).forEach(function(m){var A=w.buildItem(m);I.appendChild(A),m.selected===!0&&w.selectItem(A)}),this.container.appendChild(I)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(I){w.container.setAttribute(I.name,I.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=this.container.querySelector(".ql-selected");if(w!==m&&(m!=null&&m.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),I))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":s(Event))==="object"){var A=document.createEvent("Event");A.initEvent("change",!0,!0),this.select.dispatchEvent(A)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var I=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(I)}else this.selectItem(null);var m=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",m)}}]),v}();r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=N(s),l=i(5),u=N(l),c=i(4),d=N(c),f=i(16),p=N(f),h=i(25),y=N(h),g=i(24),v=N(g),b=i(35),w=N(b),I=i(6),m=N(I),A=i(22),E=N(A),O=i(7),T=N(O),x=i(55),P=N(x),S=i(42),R=N(S),D=i(23),L=N(D);function N(H){return H&&H.__esModule?H:{default:H}}u.default.register({"blots/block":d.default,"blots/block/embed":c.BlockEmbed,"blots/break":p.default,"blots/container":y.default,"blots/cursor":v.default,"blots/embed":w.default,"blots/inline":m.default,"blots/scroll":E.default,"blots/text":T.default,"modules/clipboard":P.default,"modules/history":R.default,"modules/keyboard":L.default}),o.default.register(d.default,p.default,v.default,m.default,E.default,T.default),r.default=u.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=function(){function l(u){this.domNode=u,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(u){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var c;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?c=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?c=document.createElement(u):c=document.createElement(this.tagName[0])):c=document.createElement(this.tagName),this.className&&c.classList.add(this.className),c},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return s.create(u)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},l.prototype.deleteAt=function(u,c){var d=this.isolate(u,c);d.remove()},l.prototype.formatAt=function(u,c,d,f){var p=this.isolate(u,c);if(s.query(d,s.Scope.BLOT)!=null&&f)p.wrap(d,f);else if(s.query(d,s.Scope.ATTRIBUTE)!=null){var h=s.create(this.statics.scope);p.wrap(h),h.format(d,f)}},l.prototype.insertAt=function(u,c,d){var f=d==null?s.create("text",c):s.create(c,d),p=this.split(u);this.parent.insertBefore(f,p)},l.prototype.insertInto=function(u,c){c===void 0&&(c=null),this.parent!=null&&this.parent.children.remove(this);var d=null;u.children.insertBefore(this,c),c!=null&&(d=c.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=d)&&u.domNode.insertBefore(this.domNode,d),this.parent=u,this.attach()},l.prototype.isolate=function(u,c){var d=this.split(u);return d.split(c),d},l.prototype.length=function(){return 1},l.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},l.prototype.optimize=function(u){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},l.prototype.replaceWith=function(u,c){var d=typeof u=="string"?s.create(u,c):u;return d.replace(this),d},l.prototype.split=function(u,c){return u===0?this:this.next},l.prototype.update=function(u,c){},l.prototype.wrap=function(u,c){var d=typeof u=="string"?s.create(u,c):u;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},l.blotName="abstract",l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(12),o=i(32),l=i(33),u=i(1),c=function(){function d(f){this.attributes={},this.domNode=f,this.build()}return d.prototype.attribute=function(f,p){p?f.add(this.domNode,p)&&(f.value(this.domNode)!=null?this.attributes[f.attrName]=f:delete this.attributes[f.attrName]):(f.remove(this.domNode),delete this.attributes[f.attrName])},d.prototype.build=function(){var f=this;this.attributes={};var p=s.default.keys(this.domNode),h=o.default.keys(this.domNode),y=l.default.keys(this.domNode);p.concat(h).concat(y).forEach(function(g){var v=u.query(g,u.Scope.ATTRIBUTE);v instanceof s.default&&(f.attributes[v.attrName]=v)})},d.prototype.copy=function(f){var p=this;Object.keys(this.attributes).forEach(function(h){var y=p.attributes[h].value(p.domNode);f.format(h,y)})},d.prototype.move=function(f){var p=this;this.copy(f),Object.keys(this.attributes).forEach(function(h){p.attributes[h].remove(p.domNode)}),this.attributes={}},d.prototype.values=function(){var f=this;return Object.keys(this.attributes).reduce(function(p,h){return p[h]=f.attributes[h].value(f.domNode),p},{})},d}();r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c,d){var f=c.getAttribute("class")||"";return f.split(/\s+/).filter(function(p){return p.indexOf(d+"-")===0})}var u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("class")||"").split(/\s+/).map(function(p){return p.split("-").slice(0,-1).join("-")})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(this.remove(f),f.classList.add(this.keyName+"-"+p),!0):!1},d.prototype.remove=function(f){var p=l(f,this.keyName);p.forEach(function(h){f.classList.remove(h)}),f.classList.length===0&&f.removeAttribute("class")},d.prototype.value=function(f){var p=l(f,this.keyName)[0]||"",h=p.slice(this.keyName.length+1);return this.canAdd(f,h)?h:""},d}(o.default);r.default=u},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c){var d=c.split("-"),f=d.slice(1).map(function(p){return p[0].toUpperCase()+p.slice(1)}).join("");return d[0]+f}var u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("style")||"").split(";").map(function(p){var h=p.split(":");return h[0].trim()})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(f.style[l(this.keyName)]=p,!0):!1},d.prototype.remove=function(f){f.style[l(this.keyName)]="",f.getAttribute("style")||f.removeAttribute("style")},d.prototype.value=function(f){var p=f.style[l(this.keyName)];return this.canAdd(f,p)?p:""},d}(o.default);r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function u(c,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,f){return d&&u(c.prototype,d),f&&u(c,f),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,d){o(this,u),this.quill=c,this.options=d,this.modules={}}return s(u,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(f){d.modules[f]==null&&d.addModule(f)})}},{key:"addModule",value:function(d){var f=this.quill.constructor.import("modules/"+d);return this.modules[d]=new f(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),u}();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=i(0),u=f(l),c=i(7),d=f(c);function f(b){return b&&b.__esModule?b:{default:b}}function p(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function h(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function y(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var g="\uFEFF",v=function(b){y(w,b);function w(I){p(this,w);var m=h(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,I));return m.contentNode=document.createElement("span"),m.contentNode.setAttribute("contenteditable",!1),[].slice.call(m.domNode.childNodes).forEach(function(A){m.contentNode.appendChild(A)}),m.leftGuard=document.createTextNode(g),m.rightGuard=document.createTextNode(g),m.domNode.appendChild(m.leftGuard),m.domNode.appendChild(m.contentNode),m.domNode.appendChild(m.rightGuard),m}return s(w,[{key:"index",value:function(m,A){return m===this.leftGuard?0:m===this.rightGuard?1:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,A)}},{key:"restore",value:function(m){var A=void 0,E=void 0,O=m.data.split(g).join("");if(m===this.leftGuard)if(this.prev instanceof d.default){var T=this.prev.length();this.prev.insertAt(T,O),A={startNode:this.prev.domNode,startOffset:T+O.length}}else E=document.createTextNode(O),this.parent.insertBefore(u.default.create(E),this),A={startNode:E,startOffset:O.length};else m===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,O),A={startNode:this.next.domNode,startOffset:O.length}):(E=document.createTextNode(O),this.parent.insertBefore(u.default.create(E),this.next),A={startNode:E,startOffset:O.length}));return m.data=g,A}},{key:"update",value:function(m,A){var E=this;m.forEach(function(O){if(O.type==="characterData"&&(O.target===E.leftGuard||O.target===E.rightGuard)){var T=E.restore(O.target);T&&(A.range=T)}})}}]),w}(u.default.Embed);r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var u={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},c=new o.default.Attributor.Attribute("align","align",u),d=new o.default.Attributor.Class("align","ql-align",u),f=new o.default.Attributor.Style("align","text-align",u);r.AlignAttribute=c,r.AlignClass=d,r.AlignStyle=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var s=i(0),o=u(s),l=i(26);function u(f){return f&&f.__esModule?f:{default:f}}var c=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=c,r.BackgroundStyle=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var u={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},c=new o.default.Attributor.Attribute("direction","dir",u),d=new o.default.Attributor.Class("direction","ql-direction",u),f=new o.default.Attributor.Style("direction","direction",u);r.DirectionAttribute=c,r.DirectionClass=d,r.DirectionStyle=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var s=function(){function b(w,I){for(var m=0;m<I.length;m++){var A=I[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,I,m){return I&&b(w.prototype,I),m&&b(w,m),w}}(),o=function b(w,I,m){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,I);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,I,m)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(m)}},l=i(0),u=c(l);function c(b){return b&&b.__esModule?b:{default:b}}function d(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function f(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function p(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var h={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new u.default.Attributor.Class("font","ql-font",h),g=function(b){p(w,b);function w(){return d(this,w),f(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(m){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,m).replace(/["']/g,"")}}]),w}(u.default.Attributor.Style),v=new g("font","font-family",h);r.FontStyle=v,r.FontClass=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var s=i(0),o=l(s);function l(d){return d&&d.__esModule?d:{default:d}}var u=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),c=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=u,r.SizeStyle=c},function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var s=function(){function I(m,A){for(var E=0;E<A.length;E++){var O=A[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,A,E){return A&&I(m.prototype,A),E&&I(m,E),m}}(),o=i(0),l=p(o),u=i(5),c=p(u),d=i(9),f=p(d);function p(I){return I&&I.__esModule?I:{default:I}}function h(I,m){if(!(I instanceof m))throw new TypeError("Cannot call a class as a function")}function y(I,m){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:I}function g(I,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);I.prototype=Object.create(m&&m.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(I,m):I.__proto__=m)}var v=function(I){g(m,I);function m(A,E){h(this,m);var O=y(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,A,E));return O.lastRecorded=0,O.ignoreChange=!1,O.clear(),O.quill.on(c.default.events.EDITOR_CHANGE,function(T,x,P,S){T!==c.default.events.TEXT_CHANGE||O.ignoreChange||(!O.options.userOnly||S===c.default.sources.USER?O.record(x,P):O.transform(x))}),O.quill.keyboard.addBinding({key:"Z",shortKey:!0},O.undo.bind(O)),O.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},O.redo.bind(O)),/Win/i.test(navigator.platform)&&O.quill.keyboard.addBinding({key:"Y",shortKey:!0},O.redo.bind(O)),O}return s(m,[{key:"change",value:function(E,O){if(this.stack[E].length!==0){var T=this.stack[E].pop();this.stack[O].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[E],c.default.sources.USER),this.ignoreChange=!1;var x=w(T[E]);this.quill.setSelection(x)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(E,O){if(E.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(O),x=Date.now();if(this.lastRecorded+this.options.delay>x&&this.stack.undo.length>0){var P=this.stack.undo.pop();T=T.compose(P.undo),E=P.redo.compose(E)}else this.lastRecorded=x;this.stack.undo.push({redo:E,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(O){O.undo=E.transform(O.undo,!0),O.redo=E.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=E.transform(O.undo,!0),O.redo=E.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),m}(f.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(I){var m=I.ops[I.ops.length-1];return m==null?!1:m.insert!=null?typeof m.insert=="string"&&m.insert.endsWith(`
|
|
2309
|
+
`):m.attributes!=null?Object.keys(m.attributes).some(function(A){return l.default.query(A,l.default.Scope.BLOCK)!=null}):!1}function w(I){var m=I.reduce(function(E,O){return E+=O.delete||0,E},0),A=I.length()-m;return b(I)&&(A-=1),A}r.default=v,r.getLastChangeIndex=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var s=function(){function M(k,B){for(var W=0;W<B.length;W++){var $=B[W];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(k,$.key,$)}}return function(k,B,W){return B&&M(k.prototype,B),W&&M(k,W),k}}(),o=function M(k,B,W){k===null&&(k=Function.prototype);var $=Object.getOwnPropertyDescriptor(k,B);if($===void 0){var Q=Object.getPrototypeOf(k);return Q===null?void 0:M(Q,B,W)}else{if("value"in $)return $.value;var Y=$.get;return Y===void 0?void 0:Y.call(W)}},l=i(3),u=x(l),c=i(2),d=x(c),f=i(8),p=x(f),h=i(23),y=x(h),g=i(34),v=x(g),b=i(59),w=x(b),I=i(60),m=x(I),A=i(28),E=x(A),O=i(61),T=x(O);function x(M){return M&&M.__esModule?M:{default:M}}function P(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function S(M,k){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:M}function R(M,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);M.prototype=Object.create(k&&k.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(M,k):M.__proto__=k)}var D=[!1,"center","right","justify"],L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],N=[!1,"serif","monospace"],H=["1","2","3",!1],q=["small",!1,"large","huge"],z=function(M){R(k,M);function k(B,W){P(this,k);var $=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,B,W)),Q=function Y(X){if(!document.body.contains(B.root))return document.body.removeEventListener("click",Y);$.tooltip!=null&&!$.tooltip.root.contains(X.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(ee){ee.container.contains(X.target)||ee.close()})};return B.emitter.listenDOM("click",document.body,Q),$}return s(k,[{key:"addModule",value:function(W){var $=o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"addModule",this).call(this,W);return W==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(W,$){W.forEach(function(Q){var Y=Q.getAttribute("class")||"";Y.split(/\s+/).forEach(function(X){if(!!X.startsWith("ql-")&&(X=X.slice(3),$[X]!=null))if(X==="direction")Q.innerHTML=$[X][""]+$[X].rtl;else if(typeof $[X]=="string")Q.innerHTML=$[X];else{var ee=Q.value||"";ee!=null&&$[X][ee]&&(Q.innerHTML=$[X][ee])}})})}},{key:"buildPickers",value:function(W,$){var Q=this;this.pickers=W.map(function(X){if(X.classList.contains("ql-align"))return X.querySelector("option")==null&&C(X,D),new m.default(X,$.align);if(X.classList.contains("ql-background")||X.classList.contains("ql-color")){var ee=X.classList.contains("ql-background")?"background":"color";return X.querySelector("option")==null&&C(X,L,ee==="background"?"#ffffff":"#000000"),new w.default(X,$[ee])}else return X.querySelector("option")==null&&(X.classList.contains("ql-font")?C(X,N):X.classList.contains("ql-header")?C(X,H):X.classList.contains("ql-size")&&C(X,q)),new E.default(X)});var Y=function(){Q.pickers.forEach(function(ee){ee.update()})};this.quill.on(p.default.events.EDITOR_CHANGE,Y)}}]),k}(v.default);z.DEFAULTS=(0,u.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var k=this,B=this.container.querySelector("input.ql-image[type=file]");B==null&&(B=document.createElement("input"),B.setAttribute("type","file"),B.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),B.classList.add("ql-image"),B.addEventListener("change",function(){if(B.files!=null&&B.files[0]!=null){var W=new FileReader;W.onload=function($){var Q=k.quill.getSelection(!0);k.quill.updateContents(new d.default().retain(Q.index).delete(Q.length).insert({image:$.target.result}),p.default.sources.USER),k.quill.setSelection(Q.index+1,p.default.sources.SILENT),B.value=""},W.readAsDataURL(B.files[0])}}),this.container.appendChild(B)),B.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var U=function(M){R(k,M);function k(B,W){P(this,k);var $=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,B,W));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return s(k,[{key:"listen",value:function(){var W=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(W.save(),$.preventDefault()):y.default.match($,"escape")&&(W.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:W!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+W)||""),this.root.setAttribute("data-mode",W)}},{key:"restoreFocus",value:function(){var W=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=W}},{key:"save",value:function(){var W=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",W,p.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",W,p.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":W=F(W);case"formula":{if(!W)break;var Q=this.quill.getSelection(!0);if(Q!=null){var Y=Q.index+Q.length;this.quill.insertEmbed(Y,this.root.getAttribute("data-mode"),W,p.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(Y+1," ",p.default.sources.USER),this.quill.setSelection(Y+2,p.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),k}(T.default);function F(M){var k=M.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||M.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return k?(k[1]||"https")+"://www.youtube.com/embed/"+k[2]+"?showinfo=0":(k=M.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(k[1]||"https")+"://player.vimeo.com/video/"+k[2]+"/":M}function C(M,k){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;k.forEach(function(W){var $=document.createElement("option");W===B?$.setAttribute("selected","selected"):$.setAttribute("value",W),M.appendChild($)})}r.BaseTooltip=U,r.default=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var u,c=this.iterator();u=c();)if(u===l)return!0;return!1},o.prototype.insertBefore=function(l,u){!l||(l.next=u,u!=null?(l.prev=u.prev,u.prev!=null&&(u.prev.next=l),u.prev=l,u===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var u=0,c=this.head;c!=null;){if(c===l)return u;u+=c.length(),c=c.next}return-1},o.prototype.remove=function(l){!this.contains(l)||(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var u=l;return l!=null&&(l=l.next),u}},o.prototype.find=function(l,u){u===void 0&&(u=!1);for(var c,d=this.iterator();c=d();){var f=c.length();if(l<f||u&&l===f&&(c.next==null||c.next.length()!==0))return[c,l];l-=f}return[null,0]},o.prototype.forEach=function(l){for(var u,c=this.iterator();u=c();)l(u)},o.prototype.forEachAt=function(l,u,c){if(!(u<=0))for(var d=this.find(l),f=d[0],p=d[1],h,y=l-p,g=this.iterator(f);(h=g())&&y<l+u;){var v=h.length();l>y?c(h,l-y,Math.min(u,y+v-l)):c(h,0,Math.min(v,l+u-y)),y+=v}},o.prototype.map=function(l){return this.reduce(function(u,c){return u.push(l(c)),u},[])},o.prototype.reduce=function(l,u){for(var c,d=this.iterator();c=d();)u=l(u,c);return u},o}();r.default=s},function(n,r,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])};return function(p,h){f(p,h);function y(){this.constructor=p}p.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),l=i(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},c=100,d=function(f){s(p,f);function p(h){var y=f.call(this,h)||this;return y.scroll=y,y.observer=new MutationObserver(function(g){y.update(g)}),y.observer.observe(y.domNode,u),y.attach(),y}return p.prototype.detach=function(){f.prototype.detach.call(this),this.observer.disconnect()},p.prototype.deleteAt=function(h,y){this.update(),h===0&&y===this.length()?this.children.forEach(function(g){g.remove()}):f.prototype.deleteAt.call(this,h,y)},p.prototype.formatAt=function(h,y,g,v){this.update(),f.prototype.formatAt.call(this,h,y,g,v)},p.prototype.insertAt=function(h,y,g){this.update(),f.prototype.insertAt.call(this,h,y,g)},p.prototype.optimize=function(h,y){var g=this;h===void 0&&(h=[]),y===void 0&&(y={}),f.prototype.optimize.call(this,y);for(var v=[].slice.call(this.observer.takeRecords());v.length>0;)h.push(v.pop());for(var b=function(A,E){E===void 0&&(E=!0),!(A==null||A===g)&&A.domNode.parentNode!=null&&(A.domNode[l.DATA_KEY].mutations==null&&(A.domNode[l.DATA_KEY].mutations=[]),E&&b(A.parent))},w=function(A){A.domNode[l.DATA_KEY]==null||A.domNode[l.DATA_KEY].mutations==null||(A instanceof o.default&&A.children.forEach(w),A.optimize(y))},I=h,m=0;I.length>0;m+=1){if(m>=c)throw new Error("[Parchment] Maximum optimize iterations reached");for(I.forEach(function(A){var E=l.find(A.target,!0);E!=null&&(E.domNode===A.target&&(A.type==="childList"?(b(l.find(A.previousSibling,!1)),[].forEach.call(A.addedNodes,function(O){var T=l.find(O,!1);b(T,!1),T instanceof o.default&&T.children.forEach(function(x){b(x,!1)})})):A.type==="attributes"&&b(E.prev)),b(E))}),this.children.forEach(w),I=[].slice.call(this.observer.takeRecords()),v=I.slice();v.length>0;)h.push(v.pop())}},p.prototype.update=function(h,y){var g=this;y===void 0&&(y={}),h=h||this.observer.takeRecords(),h.map(function(v){var b=l.find(v.target,!0);return b==null?null:b.domNode[l.DATA_KEY].mutations==null?(b.domNode[l.DATA_KEY].mutations=[v],b):(b.domNode[l.DATA_KEY].mutations.push(v),null)}).forEach(function(v){v==null||v===g||v.domNode[l.DATA_KEY]==null||v.update(v.domNode[l.DATA_KEY].mutations||[],y)}),this.domNode[l.DATA_KEY].mutations!=null&&f.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,y),this.optimize(h,y)},p.blotName="scroll",p.defaultChild="block",p.scope=l.Scope.BLOCK_BLOT,p.tagName="DIV",p}(o.default);r.default=d},function(n,r,i){var s=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var h in p)p.hasOwnProperty(h)&&(f[h]=p[h])};return function(f,p){d(f,p);function h(){this.constructor=f}f.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1);function u(d,f){if(Object.keys(d).length!==Object.keys(f).length)return!1;for(var p in d)if(d[p]!==f[p])return!1;return!0}var c=function(d){s(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.formats=function(p){if(p.tagName!==f.tagName)return d.formats.call(this,p)},f.prototype.format=function(p,h){var y=this;p===this.statics.blotName&&!h?(this.children.forEach(function(g){g instanceof o.default||(g=g.wrap(f.blotName,!0)),y.attributes.copy(g)}),this.unwrap()):d.prototype.format.call(this,p,h)},f.prototype.formatAt=function(p,h,y,g){if(this.formats()[y]!=null||l.query(y,l.Scope.ATTRIBUTE)){var v=this.isolate(p,h);v.format(y,g)}else d.prototype.formatAt.call(this,p,h,y,g)},f.prototype.optimize=function(p){d.prototype.optimize.call(this,p);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var y=this.next;y instanceof f&&y.prev===this&&u(h,y.formats())&&(y.moveChildren(this),y.remove())},f.blotName="inline",f.scope=l.Scope.INLINE_BLOT,f.tagName="SPAN",f}(o.default);r.default=c},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1),u=function(c){s(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.formats=function(f){var p=l.query(d.blotName).tagName;if(f.tagName!==p)return c.formats.call(this,f)},d.prototype.format=function(f,p){l.query(f,l.Scope.BLOCK)!=null&&(f===this.statics.blotName&&!p?this.replaceWith(d.blotName):c.prototype.format.call(this,f,p))},d.prototype.formatAt=function(f,p,h,y){l.query(h,l.Scope.BLOCK)!=null?this.format(h,y):c.prototype.formatAt.call(this,f,p,h,y)},d.prototype.insertAt=function(f,p,h){if(h==null||l.query(p,l.Scope.INLINE)!=null)c.prototype.insertAt.call(this,f,p,h);else{var y=this.split(f),g=l.create(p,h);y.parent.insertBefore(g,y)}},d.prototype.update=function(f,p){navigator.userAgent.match(/Trident/)?this.build():c.prototype.update.call(this,f,p)},d.blotName="block",d.scope=l.Scope.BLOCK_BLOT,d.tagName="P",d}(o.default);r.default=u},function(n,r,i){var s=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])};return function(c,d){u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=function(u){s(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.formats=function(d){},c.prototype.format=function(d,f){u.prototype.formatAt.call(this,0,this.length(),d,f)},c.prototype.formatAt=function(d,f,p,h){d===0&&f===this.length()?this.format(p,h):u.prototype.formatAt.call(this,d,f,p,h)},c.prototype.formats=function(){return this.statics.formats(this.domNode)},c}(o.default);r.default=l},function(n,r,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){c(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=i(1),u=function(c){s(d,c);function d(f){var p=c.call(this,f)||this;return p.text=p.statics.value(p.domNode),p}return d.create=function(f){return document.createTextNode(f)},d.value=function(f){var p=f.data;return p.normalize&&(p=p.normalize()),p},d.prototype.deleteAt=function(f,p){this.domNode.data=this.text=this.text.slice(0,f)+this.text.slice(f+p)},d.prototype.index=function(f,p){return this.domNode===f?p:-1},d.prototype.insertAt=function(f,p,h){h==null?(this.text=this.text.slice(0,f)+p+this.text.slice(f),this.domNode.data=this.text):c.prototype.insertAt.call(this,f,p,h)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(f){c.prototype.optimize.call(this,f),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(f,p){return[this.domNode,f]},d.prototype.split=function(f,p){if(p===void 0&&(p=!1),!p){if(f===0)return this;if(f===this.length())return this.next}var h=l.create(this.domNode.splitText(f));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},d.prototype.update=function(f,p){var h=this;f.some(function(y){return y.type==="characterData"&&y.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=u},function(n,r,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,u){return arguments.length>1&&!this.contains(l)==!u?u:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,u){return u=u||0,this.substr(u,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,u){var c=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>c.length)&&(u=c.length),u-=l.length;var d=c.indexOf(l,u);return d!==-1&&d===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var c=Object(this),d=c.length>>>0,f=arguments[1],p,h=0;h<d;h++)if(p=c[h],u.call(f,p,h,c))return p}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var i=-1,s=1,o=0;function l(m,A,E){if(m==A)return m?[[o,m]]:[];(E<0||m.length<E)&&(E=null);var O=f(m,A),T=m.substring(0,O);m=m.substring(O),A=A.substring(O),O=p(m,A);var x=m.substring(m.length-O);m=m.substring(0,m.length-O),A=A.substring(0,A.length-O);var P=u(m,A);return T&&P.unshift([o,T]),x&&P.push([o,x]),y(P),E!=null&&(P=b(P,E)),P=w(P),P}function u(m,A){var E;if(!m)return[[s,A]];if(!A)return[[i,m]];var O=m.length>A.length?m:A,T=m.length>A.length?A:m,x=O.indexOf(T);if(x!=-1)return E=[[s,O.substring(0,x)],[o,T],[s,O.substring(x+T.length)]],m.length>A.length&&(E[0][0]=E[2][0]=i),E;if(T.length==1)return[[i,m],[s,A]];var P=h(m,A);if(P){var S=P[0],R=P[1],D=P[2],L=P[3],N=P[4],H=l(S,D),q=l(R,L);return H.concat([[o,N]],q)}return c(m,A)}function c(m,A){for(var E=m.length,O=A.length,T=Math.ceil((E+O)/2),x=T,P=2*T,S=new Array(P),R=new Array(P),D=0;D<P;D++)S[D]=-1,R[D]=-1;S[x+1]=0,R[x+1]=0;for(var L=E-O,N=L%2!=0,H=0,q=0,z=0,U=0,F=0;F<T;F++){for(var C=-F+H;C<=F-q;C+=2){var M=x+C,k;C==-F||C!=F&&S[M-1]<S[M+1]?k=S[M+1]:k=S[M-1]+1;for(var B=k-C;k<E&&B<O&&m.charAt(k)==A.charAt(B);)k++,B++;if(S[M]=k,k>E)q+=2;else if(B>O)H+=2;else if(N){var W=x+L-C;if(W>=0&&W<P&&R[W]!=-1){var $=E-R[W];if(k>=$)return d(m,A,k,B)}}}for(var Q=-F+z;Q<=F-U;Q+=2){var W=x+Q,$;Q==-F||Q!=F&&R[W-1]<R[W+1]?$=R[W+1]:$=R[W-1]+1;for(var Y=$-Q;$<E&&Y<O&&m.charAt(E-$-1)==A.charAt(O-Y-1);)$++,Y++;if(R[W]=$,$>E)U+=2;else if(Y>O)z+=2;else if(!N){var M=x+L-Q;if(M>=0&&M<P&&S[M]!=-1){var k=S[M],B=x+k-M;if($=E-$,k>=$)return d(m,A,k,B)}}}}return[[i,m],[s,A]]}function d(m,A,E,O){var T=m.substring(0,E),x=A.substring(0,O),P=m.substring(E),S=A.substring(O),R=l(T,x),D=l(P,S);return R.concat(D)}function f(m,A){if(!m||!A||m.charAt(0)!=A.charAt(0))return 0;for(var E=0,O=Math.min(m.length,A.length),T=O,x=0;E<T;)m.substring(x,T)==A.substring(x,T)?(E=T,x=E):O=T,T=Math.floor((O-E)/2+E);return T}function p(m,A){if(!m||!A||m.charAt(m.length-1)!=A.charAt(A.length-1))return 0;for(var E=0,O=Math.min(m.length,A.length),T=O,x=0;E<T;)m.substring(m.length-T,m.length-x)==A.substring(A.length-T,A.length-x)?(E=T,x=E):O=T,T=Math.floor((O-E)/2+E);return T}function h(m,A){var E=m.length>A.length?m:A,O=m.length>A.length?A:m;if(E.length<4||O.length*2<E.length)return null;function T(q,z,U){for(var F=q.substring(U,U+Math.floor(q.length/4)),C=-1,M="",k,B,W,$;(C=z.indexOf(F,C+1))!=-1;){var Q=f(q.substring(U),z.substring(C)),Y=p(q.substring(0,U),z.substring(0,C));M.length<Y+Q&&(M=z.substring(C-Y,C)+z.substring(C,C+Q),k=q.substring(0,U-Y),B=q.substring(U+Q),W=z.substring(0,C-Y),$=z.substring(C+Q))}return M.length*2>=q.length?[k,B,W,$,M]:null}var x=T(E,O,Math.ceil(E.length/4)),P=T(E,O,Math.ceil(E.length/2)),S;if(!x&&!P)return null;P?x?S=x[4].length>P[4].length?x:P:S=P:S=x;var R,D,L,N;m.length>A.length?(R=S[0],D=S[1],L=S[2],N=S[3]):(L=S[0],N=S[1],R=S[2],D=S[3]);var H=S[4];return[R,D,L,N,H]}function y(m){m.push([o,""]);for(var A=0,E=0,O=0,T="",x="",P;A<m.length;)switch(m[A][0]){case s:O++,x+=m[A][1],A++;break;case i:E++,T+=m[A][1],A++;break;case o:E+O>1?(E!==0&&O!==0&&(P=f(x,T),P!==0&&(A-E-O>0&&m[A-E-O-1][0]==o?m[A-E-O-1][1]+=x.substring(0,P):(m.splice(0,0,[o,x.substring(0,P)]),A++),x=x.substring(P),T=T.substring(P)),P=p(x,T),P!==0&&(m[A][1]=x.substring(x.length-P)+m[A][1],x=x.substring(0,x.length-P),T=T.substring(0,T.length-P))),E===0?m.splice(A-O,E+O,[s,x]):O===0?m.splice(A-E,E+O,[i,T]):m.splice(A-E-O,E+O,[i,T],[s,x]),A=A-E-O+(E?1:0)+(O?1:0)+1):A!==0&&m[A-1][0]==o?(m[A-1][1]+=m[A][1],m.splice(A,1)):A++,O=0,E=0,T="",x="";break}m[m.length-1][1]===""&&m.pop();var S=!1;for(A=1;A<m.length-1;)m[A-1][0]==o&&m[A+1][0]==o&&(m[A][1].substring(m[A][1].length-m[A-1][1].length)==m[A-1][1]?(m[A][1]=m[A-1][1]+m[A][1].substring(0,m[A][1].length-m[A-1][1].length),m[A+1][1]=m[A-1][1]+m[A+1][1],m.splice(A-1,1),S=!0):m[A][1].substring(0,m[A+1][1].length)==m[A+1][1]&&(m[A-1][1]+=m[A+1][1],m[A][1]=m[A][1].substring(m[A+1][1].length)+m[A+1][1],m.splice(A+1,1),S=!0)),A++;S&&y(m)}var g=l;g.INSERT=s,g.DELETE=i,g.EQUAL=o,n.exports=g;function v(m,A){if(A===0)return[o,m];for(var E=0,O=0;O<m.length;O++){var T=m[O];if(T[0]===i||T[0]===o){var x=E+T[1].length;if(A===x)return[O+1,m];if(A<x){m=m.slice();var P=A-E,S=[T[0],T[1].slice(0,P)],R=[T[0],T[1].slice(P)];return m.splice(O,1,S,R),[O+1,m]}else E=x}}throw new Error("cursor_pos is out of bounds!")}function b(m,A){var E=v(m,A),O=E[1],T=E[0],x=O[T],P=O[T+1];if(x==null)return m;if(x[0]!==o)return m;if(P!=null&&x[1]+P[1]===P[1]+x[1])return O.splice(T,2,P,x),I(O,T,2);if(P!=null&&P[1].indexOf(x[1])===0){O.splice(T,2,[P[0],x[1]],[0,x[1]]);var S=P[1].slice(x[1].length);return S.length>0&&O.splice(T+2,0,[P[0],S]),I(O,T,3)}else return m}function w(m){for(var A=!1,E=function(P){return P.charCodeAt(0)>=56320&&P.charCodeAt(0)<=57343},O=function(P){return P.charCodeAt(P.length-1)>=55296&&P.charCodeAt(P.length-1)<=56319},T=2;T<m.length;T+=1)m[T-2][0]===o&&O(m[T-2][1])&&m[T-1][0]===i&&E(m[T-1][1])&&m[T][0]===s&&E(m[T][1])&&(A=!0,m[T-1][1]=m[T-2][1].slice(-1)+m[T-1][1],m[T][1]=m[T-2][1].slice(-1)+m[T][1],m[T-2][1]=m[T-2][1].slice(0,-1));if(!A)return m;for(var x=[],T=0;T<m.length;T+=1)m[T][1].length>0&&x.push(m[T]);return x}function I(m,A,E){for(var O=A+E-1;O>=0&&O>=A-1;O--)if(O+1<m.length){var T=m[O],x=m[O+1];T[0]===x[1]&&m.splice(O,2,[T[0],T[1]+x[1]])}return m}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(s){var o=[];for(var l in s)o.push(l);return o}},function(n,r){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=i?s:o,r.supported=s;function s(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(n,r){var i=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function l(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function u(){this._events=new o,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],f,p;if(this._eventsCount===0)return d;for(p in f=this._events)i.call(f,p)&&d.push(s?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},u.prototype.listeners=function(d,f){var p=s?s+d:d,h=this._events[p];if(f)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var y=0,g=h.length,v=new Array(g);y<g;y++)v[y]=h[y].fn;return v},u.prototype.emit=function(d,f,p,h,y,g){var v=s?s+d:d;if(!this._events[v])return!1;var b=this._events[v],w=arguments.length,I,m;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,f),!0;case 3:return b.fn.call(b.context,f,p),!0;case 4:return b.fn.call(b.context,f,p,h),!0;case 5:return b.fn.call(b.context,f,p,h,y),!0;case 6:return b.fn.call(b.context,f,p,h,y,g),!0}for(m=1,I=new Array(w-1);m<w;m++)I[m-1]=arguments[m];b.fn.apply(b.context,I)}else{var A=b.length,E;for(m=0;m<A;m++)switch(b[m].once&&this.removeListener(d,b[m].fn,void 0,!0),w){case 1:b[m].fn.call(b[m].context);break;case 2:b[m].fn.call(b[m].context,f);break;case 3:b[m].fn.call(b[m].context,f,p);break;case 4:b[m].fn.call(b[m].context,f,p,h);break;default:if(!I)for(E=1,I=new Array(w-1);E<w;E++)I[E-1]=arguments[E];b[m].fn.apply(b[m].context,I)}}return!0},u.prototype.on=function(d,f,p){var h=new l(f,p||this),y=s?s+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],h]:this._events[y].push(h):(this._events[y]=h,this._eventsCount++),this},u.prototype.once=function(d,f,p){var h=new l(f,p||this,!0),y=s?s+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],h]:this._events[y].push(h):(this._events[y]=h,this._eventsCount++),this},u.prototype.removeListener=function(d,f,p,h){var y=s?s+d:d;if(!this._events[y])return this;if(!f)return--this._eventsCount===0?this._events=new o:delete this._events[y],this;var g=this._events[y];if(g.fn)g.fn===f&&(!h||g.once)&&(!p||g.context===p)&&(--this._eventsCount===0?this._events=new o:delete this._events[y]);else{for(var v=0,b=[],w=g.length;v<w;v++)(g[v].fn!==f||h&&!g[v].once||p&&g[v].context!==p)&&b.push(g[v]);b.length?this._events[y]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new o:delete this._events[y]}return this},u.prototype.removeAllListeners=function(d){var f;return d?(f=s?s+d:d,this._events[f]&&(--this._eventsCount===0?this._events=new o:delete this._events[f])):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=s,u.EventEmitter=u,typeof n!="undefined"&&(n.exports=u)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o=function(){function te(re,ue){var he=[],oe=!0,_e=!1,Oe=void 0;try{for(var Te=re[Symbol.iterator](),mt;!(oe=(mt=Te.next()).done)&&(he.push(mt.value),!(ue&&he.length===ue));oe=!0);}catch(_t){_e=!0,Oe=_t}finally{try{!oe&&Te.return&&Te.return()}finally{if(_e)throw Oe}}return he}return function(re,ue){if(Array.isArray(re))return re;if(Symbol.iterator in Object(re))return te(re,ue);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function te(re,ue){for(var he=0;he<ue.length;he++){var oe=ue[he];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(re,oe.key,oe)}}return function(re,ue,he){return ue&&te(re.prototype,ue),he&&te(re,he),re}}(),u=i(3),c=R(u),d=i(2),f=R(d),p=i(0),h=R(p),y=i(5),g=R(y),v=i(10),b=R(v),w=i(9),I=R(w),m=i(36),A=i(37),E=i(13),O=R(E),T=i(26),x=i(38),P=i(39),S=i(40);function R(te){return te&&te.__esModule?te:{default:te}}function D(te,re,ue){return re in te?Object.defineProperty(te,re,{value:ue,enumerable:!0,configurable:!0,writable:!0}):te[re]=ue,te}function L(te,re){if(!(te instanceof re))throw new TypeError("Cannot call a class as a function")}function N(te,re){if(!te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:te}function H(te,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);te.prototype=Object.create(re&&re.prototype,{constructor:{value:te,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(te,re):te.__proto__=re)}var q=(0,b.default)("quill:clipboard"),z="__ql-matcher",U=[[Node.TEXT_NODE,Ve],[Node.TEXT_NODE,Ae],["br",le],[Node.ELEMENT_NODE,Ae],[Node.ELEMENT_NODE,ee],[Node.ELEMENT_NODE,Se],[Node.ELEMENT_NODE,X],[Node.ELEMENT_NODE,Ze],["li",ve],["b",Y.bind(Y,"bold")],["i",Y.bind(Y,"italic")],["style",me]],F=[m.AlignAttribute,x.DirectionAttribute].reduce(function(te,re){return te[re.keyName]=re,te},{}),C=[m.AlignStyle,A.BackgroundStyle,T.ColorStyle,x.DirectionStyle,P.FontStyle,S.SizeStyle].reduce(function(te,re){return te[re.keyName]=re,te},{}),M=function(te){H(re,te);function re(ue,he){L(this,re);var oe=N(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,ue,he));return oe.quill.root.addEventListener("paste",oe.onPaste.bind(oe)),oe.container=oe.quill.addContainer("ql-clipboard"),oe.container.setAttribute("contenteditable",!0),oe.container.setAttribute("tabindex",-1),oe.matchers=[],U.concat(oe.options.matchers).forEach(function(_e){var Oe=o(_e,2),Te=Oe[0],mt=Oe[1];!he.matchVisual&&mt===Se||oe.addMatcher(Te,mt)}),oe}return l(re,[{key:"addMatcher",value:function(he,oe){this.matchers.push([he,oe])}},{key:"convert",value:function(he){if(typeof he=="string")return this.container.innerHTML=he.replace(/\>\r?\n +\</g,"><"),this.convert();var oe=this.quill.getFormat(this.quill.selection.savedRange.index);if(oe[O.default.blotName]){var _e=this.container.innerText;return this.container.innerHTML="",new f.default().insert(_e,D({},O.default.blotName,oe[O.default.blotName]))}var Oe=this.prepareMatching(),Te=o(Oe,2),mt=Te[0],_t=Te[1],qe=Q(this.container,mt,_t);return W(qe,`
|
|
2310
|
+
`)&&qe.ops[qe.ops.length-1].attributes==null&&(qe=qe.compose(new f.default().retain(qe.length()-1).delete(1))),q.log("convert",this.container.innerHTML,qe),this.container.innerHTML="",qe}},{key:"dangerouslyPasteHTML",value:function(he,oe){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof he=="string")this.quill.setContents(this.convert(he),oe),this.quill.setSelection(0,g.default.sources.SILENT);else{var Oe=this.convert(oe);this.quill.updateContents(new f.default().retain(he).concat(Oe),_e),this.quill.setSelection(he+Oe.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(he){var oe=this;if(!(he.defaultPrevented||!this.quill.isEnabled())){var _e=this.quill.getSelection(),Oe=new f.default().retain(_e.index),Te=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){Oe=Oe.concat(oe.convert()).delete(_e.length),oe.quill.updateContents(Oe,g.default.sources.USER),oe.quill.setSelection(Oe.length()-_e.length,g.default.sources.SILENT),oe.quill.scrollingContainer.scrollTop=Te,oe.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var he=this,oe=[],_e=[];return this.matchers.forEach(function(Oe){var Te=o(Oe,2),mt=Te[0],_t=Te[1];switch(mt){case Node.TEXT_NODE:_e.push(_t);break;case Node.ELEMENT_NODE:oe.push(_t);break;default:[].forEach.call(he.container.querySelectorAll(mt),function(qe){qe[z]=qe[z]||[],qe[z].push(_t)});break}}),[oe,_e]}}]),re}(I.default);M.DEFAULTS={matchers:[],matchVisual:!0};function k(te,re,ue){return(typeof re=="undefined"?"undefined":s(re))==="object"?Object.keys(re).reduce(function(he,oe){return k(he,oe,re[oe])},te):te.reduce(function(he,oe){return oe.attributes&&oe.attributes[re]?he.push(oe):he.insert(oe.insert,(0,c.default)({},D({},re,ue),oe.attributes))},new f.default)}function B(te){if(te.nodeType!==Node.ELEMENT_NODE)return{};var re="__ql-computed-style";return te[re]||(te[re]=window.getComputedStyle(te))}function W(te,re){for(var ue="",he=te.ops.length-1;he>=0&&ue.length<re.length;--he){var oe=te.ops[he];if(typeof oe.insert!="string")break;ue=oe.insert+ue}return ue.slice(-1*re.length)===re}function $(te){if(te.childNodes.length===0)return!1;var re=B(te);return["block","list-item"].indexOf(re.display)>-1}function Q(te,re,ue){return te.nodeType===te.TEXT_NODE?ue.reduce(function(he,oe){return oe(te,he)},new f.default):te.nodeType===te.ELEMENT_NODE?[].reduce.call(te.childNodes||[],function(he,oe){var _e=Q(oe,re,ue);return oe.nodeType===te.ELEMENT_NODE&&(_e=re.reduce(function(Oe,Te){return Te(oe,Oe)},_e),_e=(oe[z]||[]).reduce(function(Oe,Te){return Te(oe,Oe)},_e)),he.concat(_e)},new f.default):new f.default}function Y(te,re,ue){return k(ue,te,!0)}function X(te,re){var ue=h.default.Attributor.Attribute.keys(te),he=h.default.Attributor.Class.keys(te),oe=h.default.Attributor.Style.keys(te),_e={};return ue.concat(he).concat(oe).forEach(function(Oe){var Te=h.default.query(Oe,h.default.Scope.ATTRIBUTE);Te!=null&&(_e[Te.attrName]=Te.value(te),_e[Te.attrName])||(Te=F[Oe],Te!=null&&(Te.attrName===Oe||Te.keyName===Oe)&&(_e[Te.attrName]=Te.value(te)||void 0),Te=C[Oe],Te!=null&&(Te.attrName===Oe||Te.keyName===Oe)&&(Te=C[Oe],_e[Te.attrName]=Te.value(te)||void 0))}),Object.keys(_e).length>0&&(re=k(re,_e)),re}function ee(te,re){var ue=h.default.query(te);if(ue==null)return re;if(ue.prototype instanceof h.default.Embed){var he={},oe=ue.value(te);oe!=null&&(he[ue.blotName]=oe,re=new f.default().insert(he,ue.formats(te)))}else typeof ue.formats=="function"&&(re=k(re,ue.blotName,ue.formats(te)));return re}function le(te,re){return W(re,`
|
|
2311
2311
|
`)||re.insert(`
|
|
2312
2312
|
`),re}function me(){return new f.default}function ve(te,re){var ue=h.default.query(te);if(ue==null||ue.blotName!=="list-item"||!W(re,`
|
|
2313
2313
|
`))return re;for(var he=-1,oe=te.parentNode;!oe.classList.contains("ql-clipboard");)(h.default.query(oe)||{}).blotName==="list"&&(he+=1),oe=oe.parentNode;return he<=0?re:re.compose(new f.default().retain(re.length()-1).retain(1,{indent:he}))}function Ae(te,re){return W(re,`
|
|
@@ -2315,7 +2315,7 @@ object-assign
|
|
|
2315
2315
|
`),re}function Se(te,re){if($(te)&&te.nextElementSibling!=null&&!W(re,`
|
|
2316
2316
|
|
|
2317
2317
|
`)){var ue=te.offsetHeight+parseFloat(B(te).marginTop)+parseFloat(B(te).marginBottom);te.nextElementSibling.offsetTop>te.offsetTop+ue*1.5&&re.insert(`
|
|
2318
|
-
`)}return re}function Ze(te,re){var ue={},he=te.style||{};return he.fontStyle&&B(te).fontStyle==="italic"&&(ue.italic=!0),he.fontWeight&&(B(te).fontWeight.startsWith("bold")||parseInt(B(te).fontWeight)>=700)&&(ue.bold=!0),Object.keys(ue).length>0&&(re=k(re,ue)),parseFloat(he.textIndent||0)>0&&(re=new f.default().insert(" ").concat(re)),re}function Ve(te,re){var ue=te.data;if(te.parentNode.tagName==="O:P")return re.insert(ue.trim());if(ue.trim().length===0&&te.parentNode.classList.contains("ql-clipboard"))return re;if(!B(te.parentNode).whiteSpace.startsWith("pre")){var he=function(_e,Oe){return Oe=Oe.replace(/[^\u00a0]/g,""),Oe.length<1&&_e?" ":Oe};ue=ue.replace(/\r\n/g," ").replace(/\n/g," "),ue=ue.replace(/\s\s+/g,he.bind(he,!0)),(te.previousSibling==null&&$(te.parentNode)||te.previousSibling!=null&&$(te.previousSibling))&&(ue=ue.replace(/^\s+/,he.bind(he,!1))),(te.nextSibling==null&&$(te.parentNode)||te.nextSibling!=null&&$(te.nextSibling))&&(ue=ue.replace(/\s+$/,he.bind(he,!1)))}return re.insert(ue)}r.default=R,r.matchAttributor=X,r.matchBlot=ee,r.matchNewline=Ae,r.matchSpacing=Se,r.matchText=Ve},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(6),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"optimize",value:function(b){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(u.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var s=function(){function S(M,D){var L=[],F=!0,H=!1,q=void 0;try{for(var z=M[Symbol.iterator](),U;!(F=(U=z.next()).done)&&(L.push(U.value),!(D&&L.length===D));F=!0);}catch(N){H=!0,q=N}finally{try{!F&&z.return&&z.return()}finally{if(H)throw q}}return L}return function(M,D){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return S(M,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(M,D){for(var L=0;L<D.length;L++){var F=D[L];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(M,F.key,F)}}return function(M,D,L){return D&&S(M.prototype,D),L&&S(M,L),M}}(),l=i(2),u=b(l),c=i(0),d=b(c),f=i(5),p=b(f),h=i(10),y=b(h),g=i(9),v=b(g);function b(S){return S&&S.__esModule?S:{default:S}}function w(S,M,D){return M in S?Object.defineProperty(S,M,{value:D,enumerable:!0,configurable:!0,writable:!0}):S[M]=D,S}function I(S,M){if(!(S instanceof M))throw new TypeError("Cannot call a class as a function")}function m(S,M){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:S}function A(S,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);S.prototype=Object.create(M&&M.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(S,M):S.__proto__=M)}var E=(0,y.default)("quill:toolbar"),O=function(S){A(M,S);function M(D,L){I(this,M);var F=m(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,D,L));if(Array.isArray(F.options.container)){var H=document.createElement("div");x(H,F.options.container),D.container.parentNode.insertBefore(H,D.container),F.container=H}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var q;return q=E.error("Container required for toolbar",F.options),m(F,q)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(z){F.addHandler(z,F.options.handlers[z])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(z){F.attach(z)}),F.quill.on(p.default.events.EDITOR_CHANGE,function(z,U){z===p.default.events.SELECTION_CHANGE&&F.update(U)}),F.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var z=F.quill.selection.getRange(),U=s(z,1),N=U[0];F.update(N)}),F}return o(M,[{key:"addHandler",value:function(L,F){this.handlers[L]=F}},{key:"attach",value:function(L){var F=this,H=[].find.call(L.classList,function(z){return z.indexOf("ql-")===0});if(!!H){if(H=H.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){E.warn("ignoring attaching to disabled format",H,L);return}if(d.default.query(H)==null){E.warn("ignoring attaching to nonexistent format",H,L);return}}var q=L.tagName==="SELECT"?"change":"click";L.addEventListener(q,function(z){var U=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var N=L.options[L.selectedIndex];N.hasAttribute("selected")?U=!1:U=N.value||!1}else L.classList.contains("ql-active")?U=!1:U=L.value||!L.hasAttribute("value"),z.preventDefault();F.quill.focus();var C=F.quill.selection.getRange(),R=s(C,1),k=R[0];if(F.handlers[H]!=null)F.handlers[H].call(F,U);else if(d.default.query(H).prototype instanceof d.default.Embed){if(U=prompt("Enter "+H),!U)return;F.quill.updateContents(new u.default().retain(k.index).delete(k.length).insert(w({},H,U)),p.default.sources.USER)}else F.quill.format(H,U,p.default.sources.USER);F.update(k)}),this.controls.push([H,L])}}},{key:"update",value:function(L){var F=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(H){var q=s(H,2),z=q[0],U=q[1];if(U.tagName==="SELECT"){var N=void 0;if(L==null)N=null;else if(F[z]==null)N=U.querySelector("option[selected]");else if(!Array.isArray(F[z])){var C=F[z];typeof C=="string"&&(C=C.replace(/\"/g,'\\"')),N=U.querySelector('option[value="'+C+'"]')}N==null?(U.value="",U.selectedIndex=-1):N.selected=!0}else if(L==null)U.classList.remove("ql-active");else if(U.hasAttribute("value")){var R=F[z]===U.getAttribute("value")||F[z]!=null&&F[z].toString()===U.getAttribute("value")||F[z]==null&&!U.getAttribute("value");U.classList.toggle("ql-active",R)}else U.classList.toggle("ql-active",F[z]!=null)})}}]),M}(v.default);O.DEFAULTS={};function T(S,M,D){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+M),D!=null&&(L.value=D),S.appendChild(L)}function x(S,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(D){var L=document.createElement("span");L.classList.add("ql-formats"),D.forEach(function(F){if(typeof F=="string")T(L,F);else{var H=Object.keys(F)[0],q=F[H];Array.isArray(q)?P(L,H,q):T(L,H,q)}}),S.appendChild(L)})}function P(S,M,D){var L=document.createElement("select");L.classList.add("ql-"+M),D.forEach(function(F){var H=document.createElement("option");F!==!1?H.setAttribute("value",F):H.setAttribute("selected","selected"),L.appendChild(H)}),S.appendChild(L)}O.DEFAULTS={container:null,handlers:{clean:function(){var M=this,D=this.quill.getSelection();if(D!=null)if(D.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(F){d.default.query(F,d.default.Scope.INLINE)!=null&&M.quill.format(F,!1)})}else this.quill.removeFormat(D,p.default.sources.USER)},direction:function(M){var D=this.quill.getFormat().align;M==="rtl"&&D==null?this.quill.format("align","right",p.default.sources.USER):!M&&D==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",M,p.default.sources.USER)},indent:function(M){var D=this.quill.getSelection(),L=this.quill.getFormat(D),F=parseInt(L.indent||0);if(M==="+1"||M==="-1"){var H=M==="+1"?1:-1;L.direction==="rtl"&&(H*=-1),this.quill.format("indent",F+H,p.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,p.default.sources.USER)},list:function(M){var D=this.quill.getSelection(),L=this.quill.getFormat(D);M==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",M,p.default.sources.USER)}}},r.default=O,r.addControls=x},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(28),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(v,b){d(this,g);var w=f(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return w.label.innerHTML=b,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(I){I.classList.add("ql-primary")}),w}return s(g,[{key:"buildItem",value:function(b){var w=o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,b);return w.style.backgroundColor=b.getAttribute("value")||"",w}},{key:"selectItem",value:function(b,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,b,w);var I=this.label.querySelector(".ql-color-label"),m=b&&b.getAttribute("data-value")||"";I&&(I.tagName==="line"?I.style.stroke=m:I.style.fill=m)}}]),g}(u.default);r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(28),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(v,b){d(this,g);var w=f(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(I){I.innerHTML=b[I.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(g,[{key:"selectItem",value:function(b,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,b,w),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),g}(u.default);r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function u(c,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,f){return d&&u(c.prototype,d),f&&u(c,f),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,d){var f=this;o(this,u),this.quill=c,this.boundsContainer=d||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.quill.root.scrollTop+"px"}),this.hide()}return s(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var f=d.left+d.width/2-this.root.offsetWidth/2,p=d.bottom+this.quill.root.scrollTop;this.root.style.left=f+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),g=0;if(y.right>h.right&&(g=h.right-y.right,this.root.style.left=f+g+"px"),y.left<h.left&&(g=h.left-y.left,this.root.style.left=f+g+"px"),y.bottom>h.bottom){var v=y.bottom-y.top,b=d.bottom-d.top+v;this.root.style.top=p-b+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function P(S,M){var D=[],L=!0,F=!1,H=void 0;try{for(var q=S[Symbol.iterator](),z;!(L=(z=q.next()).done)&&(D.push(z.value),!(M&&D.length===M));L=!0);}catch(U){F=!0,H=U}finally{try{!L&&q.return&&q.return()}finally{if(F)throw H}}return D}return function(S,M){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return P(S,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function P(S,M,D){S===null&&(S=Function.prototype);var L=Object.getOwnPropertyDescriptor(S,M);if(L===void 0){var F=Object.getPrototypeOf(S);return F===null?void 0:P(F,M,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},l=function(){function P(S,M){for(var D=0;D<M.length;D++){var L=M[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(S,L.key,L)}}return function(S,M,D){return M&&P(S.prototype,M),D&&P(S,D),S}}(),u=i(3),c=I(u),d=i(8),f=I(d),p=i(43),h=I(p),y=i(27),g=I(y),v=i(15),b=i(41),w=I(b);function I(P){return P&&P.__esModule?P:{default:P}}function m(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function A(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function E(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(P){E(S,P);function S(M,D){m(this,S),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=O);var L=A(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,M,D));return L.quill.container.classList.add("ql-snow"),L}return l(S,[{key:"extendToolbar",value:function(D){D.container.classList.add("ql-snow"),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),w.default),this.tooltip=new x(this.quill,this.options.bounds),D.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,F){D.handlers.link.call(D,!F.format.link)})}}]),S}(h.default);T.DEFAULTS=(0,c.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){if(S){var M=this.quill.getSelection();if(M==null||M.length==0)return;var D=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(D)&&D.indexOf("mailto:")!==0&&(D="mailto:"+D);var L=this.quill.theme.tooltip;L.edit("link",D)}else this.quill.format("link",!1)}}}}});var x=function(P){E(S,P);function S(M,D){m(this,S);var L=A(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,M,D));return L.preview=L.root.querySelector("a.ql-preview"),L}return l(S,[{key:"listen",value:function(){var D=this;o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){D.root.classList.contains("ql-editing")?D.save():D.edit("link",D.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(D.linkRange!=null){var F=D.linkRange;D.restoreFocus(),D.quill.formatText(F,"link",!1,f.default.sources.USER),delete D.linkRange}L.preventDefault(),D.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(L,F,H){if(L!=null){if(L.length===0&&H===f.default.sources.USER){var q=D.quill.scroll.descendant(g.default,L.index),z=s(q,2),U=z[0],N=z[1];if(U!=null){D.linkRange=new v.Range(L.index-N,U.length());var C=g.default.formats(U.domNode);D.preview.textContent=C,D.preview.setAttribute("href",C),D.show(),D.position(D.quill.getBounds(D.linkRange));return}}else delete D.linkRange;D.hide()}})}},{key:"show",value:function(){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),S}(p.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(29),o=oe(s),l=i(36),u=i(38),c=i(64),d=i(65),f=oe(d),p=i(66),h=oe(p),y=i(67),g=oe(y),v=i(37),b=i(26),w=i(39),I=i(40),m=i(56),A=oe(m),E=i(68),O=oe(E),T=i(27),x=oe(T),P=i(69),S=oe(P),M=i(70),D=oe(M),L=i(71),F=oe(L),H=i(72),q=oe(H),z=i(73),U=oe(z),N=i(13),C=oe(N),R=i(74),k=oe(R),B=i(75),W=oe(B),$=i(57),Q=oe($),Y=i(41),X=oe(Y),ee=i(28),le=oe(ee),me=i(59),ve=oe(me),Ae=i(60),Se=oe(Ae),Ze=i(61),Ve=oe(Ze),te=i(108),re=oe(te),ue=i(62),he=oe(ue);function oe(_e){return _e&&_e.__esModule?_e:{default:_e}}o.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":v.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":I.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":v.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":I.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":c.IndentClass,"formats/background":v.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":w.FontClass,"formats/size":I.SizeClass,"formats/blockquote":f.default,"formats/code-block":C.default,"formats/header":h.default,"formats/list":g.default,"formats/bold":A.default,"formats/code":N.Code,"formats/italic":O.default,"formats/link":x.default,"formats/script":S.default,"formats/strike":D.default,"formats/underline":F.default,"formats/image":q.default,"formats/video":U.default,"formats/list/item":y.ListItem,"modules/formula":k.default,"modules/syntax":W.default,"modules/toolbar":Q.default,"themes/bubble":re.default,"themes/snow":he.default,"ui/icons":X.default,"ui/picker":le.default,"ui/icon-picker":Se.default,"ui/color-picker":ve.default,"ui/tooltip":Ve.default},!0),r.default=o.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var s=function(){function g(v,b){for(var w=0;w<b.length;w++){var I=b[w];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(v,I.key,I)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var I=Object.getOwnPropertyDescriptor(v,b);if(I===void 0){var m=Object.getPrototypeOf(v);return m===null?void 0:g(m,b,w)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(w)}},l=i(0),u=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function f(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function p(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var h=function(g){p(v,g);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"add",value:function(w,I){if(I==="+1"||I==="-1"){var m=this.value(w)||0;I=I==="+1"?m+1:m-1}return I===0?(this.remove(w),!0):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"add",this).call(this,w,I)}},{key:"canAdd",value:function(w,I){return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,I)||o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,parseInt(I))}},{key:"value",value:function(w){return parseInt(o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,w))||void 0}}]),v}(u.default.Attributor.Class),y=new h("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(4),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="blockquote",f.tagName="blockquote",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function h(y,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(y,b.key,b)}}return function(y,g,v){return g&&h(y.prototype,g),v&&h(y,v),y}}(),o=i(4),l=u(o);function u(h){return h&&h.__esModule?h:{default:h}}function c(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}function d(h,y){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:h}function f(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);h.prototype=Object.create(y&&y.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(h,y):h.__proto__=y)}var p=function(h){f(y,h);function y(){return c(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"formats",value:function(v){return this.tagName.indexOf(v.tagName)+1}}]),y}(l.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var s=function(){function m(A,E){for(var O=0;O<E.length;O++){var T=E[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(A,T.key,T)}}return function(A,E,O){return E&&m(A.prototype,E),O&&m(A,O),A}}(),o=function m(A,E,O){A===null&&(A=Function.prototype);var T=Object.getOwnPropertyDescriptor(A,E);if(T===void 0){var x=Object.getPrototypeOf(A);return x===null?void 0:m(x,E,O)}else{if("value"in T)return T.value;var P=T.get;return P===void 0?void 0:P.call(O)}},l=i(0),u=h(l),c=i(4),d=h(c),f=i(25),p=h(f);function h(m){return m&&m.__esModule?m:{default:m}}function y(m,A,E){return A in m?Object.defineProperty(m,A,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[A]=E,m}function g(m,A){if(!(m instanceof A))throw new TypeError("Cannot call a class as a function")}function v(m,A){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:m}function b(m,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);m.prototype=Object.create(A&&A.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(m,A):m.__proto__=A)}var w=function(m){b(A,m);function A(){return g(this,A),v(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return s(A,[{key:"format",value:function(O,T){O===I.blotName&&!T?this.replaceWith(u.default.create(this.statics.scope)):o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,O,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,T){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,T),this):(this.parent.unwrap(),o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,O,T))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:o(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,O)}}]),A}(d.default);w.blotName="list-item",w.tagName="LI";var I=function(m){b(A,m),s(A,null,[{key:"create",value:function(O){var T=O==="ordered"?"OL":"UL",x=o(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,T);return(O==="checked"||O==="unchecked")&&x.setAttribute("data-checked",O==="checked"),x}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(E){g(this,A);var O=v(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E)),T=function(P){if(P.target.parentNode===E){var S=O.statics.formats(E),M=u.default.find(P.target);S==="checked"?M.format("list","unchecked"):S==="unchecked"&&M.format("list","checked")}};return E.addEventListener("touchstart",T),E.addEventListener("mousedown",T),O}return s(A,[{key:"format",value:function(O,T){this.children.length>0&&this.children.tail.format(O,T)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,T){if(O instanceof w)o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,O,T);else{var x=T==null?this.length():T.offset(this),P=this.split(x);P.parent.insertBefore(O,P)}}},{key:"optimize",value:function(O){o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,O);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var T=u.default.create(this.statics.defaultChild);O.moveChildren(T),this.appendChild(T)}o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,O)}}]),A}(p.default);I.blotName="list",I.scope=u.default.Scope.BLOCK_BLOT,I.tagName=["OL","UL"],I.defaultChild="list-item",I.allowedChildren=[w],r.ListItem=w,r.default=I},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(56),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="italic",f.tagName=["EM","I"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(6),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),g}(u.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="strike",f.tagName="S",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="underline",f.tagName="U",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(0),u=d(l),c=i(27);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function h(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var y=["alt","height","width"],g=function(v){h(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(I,m){y.indexOf(I)>-1?m?this.domNode.setAttribute(I,m):this.domNode.removeAttribute(I):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,I,m)}}],[{key:"create",value:function(I){var m=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,I);return typeof I=="string"&&m.setAttribute("src",this.sanitize(I)),m}},{key:"formats",value:function(I){return y.reduce(function(m,A){return I.hasAttribute(A)&&(m[A]=I.getAttribute(A)),m},{})}},{key:"match",value:function(I){return/\.(jpe?g|gif|png)$/.test(I)||/^data:image\/.+;base64/.test(I)}},{key:"sanitize",value:function(I){return(0,c.sanitize)(I,["http","https","data"])?I:"//:0"}},{key:"value",value:function(I){return I.getAttribute("src")}}]),b}(u.default.Embed);g.blotName="image",g.tagName="IMG",r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(4),u=i(27),c=d(u);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function h(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var y=["height","width"],g=function(v){h(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(I,m){y.indexOf(I)>-1?m?this.domNode.setAttribute(I,m):this.domNode.removeAttribute(I):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,I,m)}}],[{key:"create",value:function(I){var m=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,I);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(I)),m}},{key:"formats",value:function(I){return y.reduce(function(m,A){return I.hasAttribute(A)&&(m[A]=I.getAttribute(A)),m},{})}},{key:"sanitize",value:function(I){return c.default.sanitize(I)}},{key:"value",value:function(I){return I.getAttribute("src")}}]),b}(l.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var s=function(){function I(m,A){for(var E=0;E<A.length;E++){var O=A[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,A,E){return A&&I(m.prototype,A),E&&I(m,E),m}}(),o=function I(m,A,E){m===null&&(m=Function.prototype);var O=Object.getOwnPropertyDescriptor(m,A);if(O===void 0){var T=Object.getPrototypeOf(m);return T===null?void 0:I(T,A,E)}else{if("value"in O)return O.value;var x=O.get;return x===void 0?void 0:x.call(E)}},l=i(35),u=h(l),c=i(5),d=h(c),f=i(9),p=h(f);function h(I){return I&&I.__esModule?I:{default:I}}function y(I,m){if(!(I instanceof m))throw new TypeError("Cannot call a class as a function")}function g(I,m){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:I}function v(I,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);I.prototype=Object.create(m&&m.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(I,m):I.__proto__=m)}var b=function(I){v(m,I);function m(){return y(this,m),g(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(E){var O=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,E);return typeof E=="string"&&(window.katex.render(E,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",E)),O}},{key:"value",value:function(E){return E.getAttribute("data-value")}}]),m}(u.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var w=function(I){v(m,I),s(m,null,[{key:"register",value:function(){d.default.register(b,!0)}}]);function m(){y(this,m);var A=g(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return m}(p.default);r.FormulaBlot=b,r.default=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var s=function(){function E(O,T){for(var x=0;x<T.length;x++){var P=T[x];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(O,P.key,P)}}return function(O,T,x){return T&&E(O.prototype,T),x&&E(O,x),O}}(),o=function E(O,T,x){O===null&&(O=Function.prototype);var P=Object.getOwnPropertyDescriptor(O,T);if(P===void 0){var S=Object.getPrototypeOf(O);return S===null?void 0:E(S,T,x)}else{if("value"in P)return P.value;var M=P.get;return M===void 0?void 0:M.call(x)}},l=i(0),u=g(l),c=i(5),d=g(c),f=i(9),p=g(f),h=i(13),y=g(h);function g(E){return E&&E.__esModule?E:{default:E}}function v(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")}function b(E,O){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:E}function w(E,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);E.prototype=Object.create(O&&O.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(E,O):E.__proto__=O)}var I=function(E){w(O,E);function O(){return v(this,O),b(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return s(O,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var P=this.domNode.textContent;this.cachedText!==P&&((P.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(P),this.domNode.normalize(),this.attach()),this.cachedText=P)}}]),O}(y.default);I.className="ql-syntax";var m=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),A=function(E){w(O,E),s(O,null,[{key:"register",value:function(){d.default.register(m,!0),d.default.register(I,!0)}}]);function O(T,x){v(this,O);var P=b(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,T,x));if(typeof P.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var S=null;return P.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(S),S=setTimeout(function(){P.highlight(),S=null},P.options.interval)}),P.highlight(),P}return s(O,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var P=this.quill.getSelection();this.quill.scroll.descendants(I).forEach(function(S){S.highlight(x.options.highlight)}),this.quill.update(d.default.sources.SILENT),P!=null&&this.quill.setSelection(P,d.default.sources.SILENT)}}}]),O}(p.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(E){var O=window.hljs.highlightAuto(E);return O.value}}(),interval:1e3},r.CodeBlock=I,r.CodeToken=m,r.default=A},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var s=function O(T,x,P){T===null&&(T=Function.prototype);var S=Object.getOwnPropertyDescriptor(T,x);if(S===void 0){var M=Object.getPrototypeOf(T);return M===null?void 0:O(M,x,P)}else{if("value"in S)return S.value;var D=S.get;return D===void 0?void 0:D.call(P)}},o=function(){function O(T,x){for(var P=0;P<x.length;P++){var S=x[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(T,S.key,S)}}return function(T,x,P){return x&&O(T.prototype,x),P&&O(T,P),T}}(),l=i(3),u=v(l),c=i(8),d=v(c),f=i(43),p=v(f),h=i(15),y=i(41),g=v(y);function v(O){return O&&O.__esModule?O:{default:O}}function b(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function w(O,T){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:O}function I(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);O.prototype=Object.create(T&&T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(O,T):O.__proto__=T)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(O){I(T,O);function T(x,P){b(this,T),P.modules.toolbar!=null&&P.modules.toolbar.container==null&&(P.modules.toolbar.container=m);var S=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,P));return S.quill.container.classList.add("ql-bubble"),S}return o(T,[{key:"extendToolbar",value:function(P){this.tooltip=new E(this.quill,this.options.bounds),this.tooltip.root.appendChild(P.container),this.buildButtons([].slice.call(P.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(P.container.querySelectorAll("select")),g.default)}}]),T}(p.default);A.DEFAULTS=(0,u.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var E=function(O){I(T,O);function T(x,P){b(this,T);var S=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,P));return S.quill.on(d.default.events.EDITOR_CHANGE,function(M,D,L,F){if(M===d.default.events.SELECTION_CHANGE)if(D!=null&&D.length>0&&F===d.default.sources.USER){S.show(),S.root.style.left="0px",S.root.style.width="",S.root.style.width=S.root.offsetWidth+"px";var H=S.quill.getLines(D.index,D.length);if(H.length===1)S.position(S.quill.getBounds(D));else{var q=H[H.length-1],z=S.quill.getIndex(q),U=Math.min(q.length()-1,D.index+D.length-z),N=S.quill.getBounds(new h.Range(z,U));S.position(N)}}else document.activeElement!==S.textbox&&S.quill.hasFocus()&&S.hide()}),S}return o(T,[{key:"listen",value:function(){var P=this;s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){P.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!P.root.classList.contains("ql-hidden")){var S=P.quill.getSelection();S!=null&&P.position(P.quill.getBounds(S))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(P){var S=s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,P),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",S===0)return S;M.style.marginLeft=-1*S-M.offsetWidth/2+"px"}}]),T}(f.BaseTooltip);E.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=E,r.default=A},function(n,r,i){n.exports=i(63)}]).default})})(Zm);var oF=it&&it.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eo=it&&it.__assign||function(){return eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},eo.apply(this,arguments)},lF=it&&it.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r},to=it&&it.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},An=to(cn.default),uF=to(cr.default),ha=to(sF),eg=to(Zm.exports),cF=function(t){oF(e,t);function e(n){var r=t.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(s,o,l,u){var c,d,f,p;s==="text-change"?(d=(c=r).onEditorChangeText)===null||d===void 0||d.call(c,r.editor.root.innerHTML,o,u,r.unprivilegedEditor):s==="selection-change"&&((p=(f=r).onEditorChangeSelection)===null||p===void 0||p.call(f,o,u,r.unprivilegedEditor))};var i=r.isControlled()?n.value:n.defaultValue;return r.value=i!=null?i:"",r}return e.prototype.validateProps=function(n){var r;if(An.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(An.default.Children.count(n.children)){var i=An.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},e.prototype.shouldComponentUpdate=function(n,r){var i=this,s;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),l=(s=n.value,s!=null?s:"");this.isEqualValue(l,o)||this.setEditorContents(this.editor,l)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),lF(this.cleanProps,this.dirtyProps).some(function(u){return!ha.default(n[u],i.props[u])})},e.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(i){return!ha.default(n[i],r.props[i])})},e.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(n,r){var i=this;if(this.editor&&this.shouldComponentRegenerate(n)){var s=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:s,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var l=this.regenerationSnapshot,s=l.delta,u=l.selection;delete this.regenerationSnapshot,this.instantiateEditor();var c=this.editor;c.setContents(s),tg(function(){return i.setEditorSelection(c,u)})}},e.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},e.prototype.destroyEditor=function(){!this.editor||this.unhookEditor(this.editor)},e.prototype.isControlled=function(){return"value"in this.props},e.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},e.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},e.prototype.createEditor=function(n,r){var i=new eg.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(i,r.tabIndex),this.hookEditor(i),i},e.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},e.prototype.getEditorContents=function(){return this.value},e.prototype.getEditorSelection=function(){return this.selection},e.prototype.isDelta=function(n){return n&&n.ops},e.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?ha.default(n.ops,r.ops):ha.default(n,r)},e.prototype.setEditorContents=function(n,r){var i=this;this.value=r;var s=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),tg(function(){return i.setEditorSelection(n,s)})},e.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var i=n.getLength();r.index=Math.max(0,Math.min(r.index,i-1)),r.length=Math.max(0,Math.min(r.length,i-1-r.index)),n.setSelection(r)}},e.prototype.setEditorTabIndex=function(n,r){var i,s;!((s=(i=n)===null||i===void 0?void 0:i.scroll)===null||s===void 0)&&s.domNode&&(n.scroll.domNode.tabIndex=r)},e.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},e.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},e.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=uF.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},e.prototype.renderEditingArea=function(){var n=this,r=this.props,i=r.children,s=r.preserveWhitespace,o=this.state.generation,l={key:o,ref:function(u){n.editingArea=u}};return An.default.Children.count(i)?An.default.cloneElement(An.default.Children.only(i),l):s?An.default.createElement("pre",eo({},l)):An.default.createElement("div",eo({},l))},e.prototype.render=function(){var n;return An.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n!=null?n:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},e.prototype.onEditorChangeText=function(n,r,i,s){var o,l;if(!!this.editor){var u=this.isDelta(this.value)?s.getContents():s.getHTML();u!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=u,(l=(o=this.props).onChange)===null||l===void 0||l.call(o,n,r,i,s))}},e.prototype.onEditorChangeSelection=function(n,r,i){var s,o,l,u,c,d;if(!!this.editor){var f=this.getEditorSelection(),p=!f&&n,h=f&&!n;ha.default(n,f)||(this.selection=n,(o=(s=this.props).onChangeSelection)===null||o===void 0||o.call(s,n,r,i),p?(u=(l=this.props).onFocus)===null||u===void 0||u.call(l,n,r,i):h&&((d=(c=this.props).onBlur)===null||d===void 0||d.call(c,f,r,i)))}},e.prototype.focus=function(){!this.editor||this.editor.focus()},e.prototype.blur=function(){!this.editor||(this.selection=null,this.editor.blur())},e.displayName="React Quill",e.Quill=eg.default,e.defaultProps={theme:"snow",modules:{},readOnly:!1},e}(An.default.Component);function tg(t){Promise.resolve().then(t)}var ng=cF;const rg={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},Uu=({property:t,defaultValue:e,setValue:n})=>{const{description:r,descriptionPlaceholder:i,rules:s,rulesPlaceholder:o,adContent:l,adContentPlaceholder:u}=Ie(Me),c=(d,f,p,h)=>{h.getText().trim()===""?n(null):n(d)};return t==="description"?ae("div",{className:"eow-mb-4",children:[j("label",{className:Yt,children:r}),j(ng,{defaultValue:e,onChange:c,modules:rg,placeholder:i})]}):j("div",{className:"eow-mb-4",children:j(ng,{defaultValue:e,onChange:c,modules:rg,placeholder:t==="rules"?o:u})})},$u=({isDisabled:t,onClick:e})=>{const{add:n}=Ie(Me);return ae("button",{className:"eow-place-self-center eow-bg-transparent eow-border eow-border-gray-400 eow-rounded-full eow-p-2.5",onClick:e,disabled:t,children:["+ ",n]})},dF=t=>{switch(t){case"time":return"either_or_time";case"lives":return"either_or_lives";case"points_correct_steps":return"either_or_points_correct_steps";case"points_score":return"either_or_points_score";case"options_value":return"either_or_options_value"}},fF=(t,e)=>{switch(t){case"points_correct_steps":return e.pointsCorrectStepsPlaceholder;case"points_score":return e.pointsScorePlaceholder;case"options_value":return e.optionsValuePlaceholder}},hF=({type:t})=>{const{time:e,lives:n,pointsCorrectSteps:r,pointsScore:i,optionsValue:s}=Ie(Me);let o=null;switch(t){case"time":o=e;break;case"lives":o=n;break;case"points_correct_steps":o=r;break;case"points_score":o=i;break;case"options_value":o=s;break}return j("label",{htmlFor:e,className:Yt,children:o})},pa=({type:t,defaultValue:e,showDescription:n,onChange:r})=>{const i=Ie(Me),s=o=>{const l=/^[0-9]+$/;o=o||window.event;const u=8,c=typeof o.which=="undefined"?o.keyCode:o.which,f=!String.fromCharCode(c).match(l);c!==u&&f&&o.preventDefault(),r(Number(o.target.value))};return ae("div",{className:`${t==="time"||t==="lives"?"eow-mb-4":"eow-mb-2"}`,children:[j(hF,{type:t}),j("input",{name:dF(t),className:ua+" remove-arrow eow-mb-1",type:"number",defaultValue:e,onChange:s,placeholder:fF(t,i),onWheel:o=>o.target.blur()}),n?j("p",{className:"eow-text-gray-400 eow-text-xs",children:t==="time"?i.timeDescription:i.livesDescription}):j(De,{})]})},ju=({isDisabled:t,onClick:e})=>j("button",{className:"eow-bg-transparent",onClick:e,disabled:t,children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-w-6 eow-h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),pF=1,ig=new la,mF=({points:t,setRequestBody:e})=>{const{points:n,pointsDescription:r,pointNumber:i}=Ie(Me),s=ig.constructPoints(t),o=(f,p)=>{const h=Array.from(s);h[p].correct_steps=f,d(h)},l=(f,p)=>{const h=Array.from(s);h[p].score=f,d(h)},u=()=>{const f=ig.constructEmptyPoints(),p=Array.from(s);p.push(f),d(p)},c=f=>{const p=s.filter((h,y)=>y!==f);d(p)},d=f=>{e(p=>se(Z({},p),{points:f}))};return ae("div",{className:"eow-mb-4",children:[ae("div",{className:"eow-mb-2",children:[j("h3",{className:Yt,children:n}),j("p",{className:"eow-text-gray-400 eow-text-sm",children:r})]}),ae("div",{className:"eow-grid eow-grid-cols-1 lg:eow-grid-cols-6 md:eow-grid-cols-3 eow-gap-4 eow-mb-1",children:[s.map((f,p)=>ae("div",{className:"eow-overflow-visible eow-shadow-l eow-border eow-border-gray-200",children:[ae("div",{className:"eow-bg-gray-100 eow-flex eow-justify-between eow-px-3 eow-py-2",children:[ae("h2",{className:"eow-card-title",children:[i," ",p+1]}),j(ju,{isDisabled:t.length===pF,onClick:()=>c(p)})]}),j("div",{className:"eow-card-body eow-p-3",children:ae("div",{className:"eow-border eow-border-gray-400 eow-rounded eow-p-3 ",children:[j(pa,{type:"points_correct_steps",defaultValue:f.correct_steps,onChange:h=>o(h,p)}),j(pa,{type:"points_score",defaultValue:f.score,onChange:h=>l(h,p)})]})})]},`points_number_${p}`)),j($u,{isDisabled:!1,onClick:u})]})]})},gF=({label:t,defaultValue:e,placeholder:n,onChange:r})=>ae("div",{className:"eow-mb-2",children:[j("label",{htmlFor:t,className:Yt,children:t}),j("input",{onChange:i=>r(i),value:e,type:"text",id:t,className:ua,placeholder:n})]}),vF=({images:t,children:e})=>ae(De,{children:[j("div",{children:j("label",{className:Yt,children:t})}),j("div",{className:"eow-border eow-border-gray-200 eow-rounded eow-p-2 eow-mb-4",children:e})]});var ag={exports:{}};function yF(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hu={exports:{}};const wF=od(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var sg;function Vu(){return sg||(sg=1,function(t,e){(function(n,r){t.exports=r()})(it,function(){var n=n||function(r,i){var s;if(typeof window!="undefined"&&window.crypto&&(s=window.crypto),typeof self!="undefined"&&self.crypto&&(s=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window!="undefined"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof it!="undefined"&&it.crypto&&(s=it.crypto),!s&&typeof yF=="function")try{s=wF}catch(w){}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(I){var m;return w.prototype=I,m=new w,w.prototype=null,m}}(),u={},c=u.lib={},d=c.Base=function(){return{extend:function(w){var I=l(this);return w&&I.mixIn(w),(!I.hasOwnProperty("init")||this.init===I.init)&&(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var I in w)w.hasOwnProperty(I)&&(this[I]=w[I]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(w,I){w=this.words=w||[],I!=i?this.sigBytes=I:this.sigBytes=w.length*4},toString:function(w){return(w||h).stringify(this)},concat:function(w){var I=this.words,m=w.words,A=this.sigBytes,E=w.sigBytes;if(this.clamp(),A%4)for(var O=0;O<E;O++){var T=m[O>>>2]>>>24-O%4*8&255;I[A+O>>>2]|=T<<24-(A+O)%4*8}else for(var x=0;x<E;x+=4)I[A+x>>>2]=m[x>>>2];return this.sigBytes+=E,this},clamp:function(){var w=this.words,I=this.sigBytes;w[I>>>2]&=4294967295<<32-I%4*8,w.length=r.ceil(I/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var I=[],m=0;m<w;m+=4)I.push(o());return new f.init(I,w)}}),p=u.enc={},h=p.Hex={stringify:function(w){for(var I=w.words,m=w.sigBytes,A=[],E=0;E<m;E++){var O=I[E>>>2]>>>24-E%4*8&255;A.push((O>>>4).toString(16)),A.push((O&15).toString(16))}return A.join("")},parse:function(w){for(var I=w.length,m=[],A=0;A<I;A+=2)m[A>>>3]|=parseInt(w.substr(A,2),16)<<24-A%8*4;return new f.init(m,I/2)}},y=p.Latin1={stringify:function(w){for(var I=w.words,m=w.sigBytes,A=[],E=0;E<m;E++){var O=I[E>>>2]>>>24-E%4*8&255;A.push(String.fromCharCode(O))}return A.join("")},parse:function(w){for(var I=w.length,m=[],A=0;A<I;A++)m[A>>>2]|=(w.charCodeAt(A)&255)<<24-A%4*8;return new f.init(m,I)}},g=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(y.stringify(w)))}catch(I){throw new Error("Malformed UTF-8 data")}},parse:function(w){return y.parse(unescape(encodeURIComponent(w)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=g.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var I,m=this._data,A=m.words,E=m.sigBytes,O=this.blockSize,T=O*4,x=E/T;w?x=r.ceil(x):x=r.max((x|0)-this._minBufferSize,0);var P=x*O,S=r.min(P*4,E);if(P){for(var M=0;M<P;M+=O)this._doProcessBlock(A,M);I=A.splice(0,P),m.sigBytes-=S}return new f.init(I,S)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var I=this._doFinalize();return I},blockSize:16,_createHelper:function(w){return function(I,m){return new w.init(m).finalize(I)}},_createHmacHelper:function(w){return function(I,m){return new b.HMAC.init(w,m).finalize(I)}}});var b=u.algo={};return u}(Math);return n})}(Hu)),Hu.exports}(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,l=s.Hasher,u=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=u.MD5=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var b=0;b<16;b++){var w=v+b,I=g[w];g[w]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var m=this._hash.words,A=g[v+0],E=g[v+1],O=g[v+2],T=g[v+3],x=g[v+4],P=g[v+5],S=g[v+6],M=g[v+7],D=g[v+8],L=g[v+9],F=g[v+10],H=g[v+11],q=g[v+12],z=g[v+13],U=g[v+14],N=g[v+15],C=m[0],R=m[1],k=m[2],B=m[3];C=f(C,R,k,B,A,7,c[0]),B=f(B,C,R,k,E,12,c[1]),k=f(k,B,C,R,O,17,c[2]),R=f(R,k,B,C,T,22,c[3]),C=f(C,R,k,B,x,7,c[4]),B=f(B,C,R,k,P,12,c[5]),k=f(k,B,C,R,S,17,c[6]),R=f(R,k,B,C,M,22,c[7]),C=f(C,R,k,B,D,7,c[8]),B=f(B,C,R,k,L,12,c[9]),k=f(k,B,C,R,F,17,c[10]),R=f(R,k,B,C,H,22,c[11]),C=f(C,R,k,B,q,7,c[12]),B=f(B,C,R,k,z,12,c[13]),k=f(k,B,C,R,U,17,c[14]),R=f(R,k,B,C,N,22,c[15]),C=p(C,R,k,B,E,5,c[16]),B=p(B,C,R,k,S,9,c[17]),k=p(k,B,C,R,H,14,c[18]),R=p(R,k,B,C,A,20,c[19]),C=p(C,R,k,B,P,5,c[20]),B=p(B,C,R,k,F,9,c[21]),k=p(k,B,C,R,N,14,c[22]),R=p(R,k,B,C,x,20,c[23]),C=p(C,R,k,B,L,5,c[24]),B=p(B,C,R,k,U,9,c[25]),k=p(k,B,C,R,T,14,c[26]),R=p(R,k,B,C,D,20,c[27]),C=p(C,R,k,B,z,5,c[28]),B=p(B,C,R,k,O,9,c[29]),k=p(k,B,C,R,M,14,c[30]),R=p(R,k,B,C,q,20,c[31]),C=h(C,R,k,B,P,4,c[32]),B=h(B,C,R,k,D,11,c[33]),k=h(k,B,C,R,H,16,c[34]),R=h(R,k,B,C,U,23,c[35]),C=h(C,R,k,B,E,4,c[36]),B=h(B,C,R,k,x,11,c[37]),k=h(k,B,C,R,M,16,c[38]),R=h(R,k,B,C,F,23,c[39]),C=h(C,R,k,B,z,4,c[40]),B=h(B,C,R,k,A,11,c[41]),k=h(k,B,C,R,T,16,c[42]),R=h(R,k,B,C,S,23,c[43]),C=h(C,R,k,B,L,4,c[44]),B=h(B,C,R,k,q,11,c[45]),k=h(k,B,C,R,N,16,c[46]),R=h(R,k,B,C,O,23,c[47]),C=y(C,R,k,B,A,6,c[48]),B=y(B,C,R,k,M,10,c[49]),k=y(k,B,C,R,U,15,c[50]),R=y(R,k,B,C,P,21,c[51]),C=y(C,R,k,B,q,6,c[52]),B=y(B,C,R,k,T,10,c[53]),k=y(k,B,C,R,F,15,c[54]),R=y(R,k,B,C,E,21,c[55]),C=y(C,R,k,B,D,6,c[56]),B=y(B,C,R,k,N,10,c[57]),k=y(k,B,C,R,S,15,c[58]),R=y(R,k,B,C,z,21,c[59]),C=y(C,R,k,B,x,6,c[60]),B=y(B,C,R,k,H,10,c[61]),k=y(k,B,C,R,O,15,c[62]),R=y(R,k,B,C,L,21,c[63]),m[0]=m[0]+C|0,m[1]=m[1]+R|0,m[2]=m[2]+k|0,m[3]=m[3]+B|0},_doFinalize:function(){var g=this._data,v=g.words,b=this._nDataBytes*8,w=g.sigBytes*8;v[w>>>5]|=128<<24-w%32;var I=r.floor(b/4294967296),m=b;v[(w+64>>>9<<4)+15]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,v[(w+64>>>9<<4)+14]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var A=this._hash,E=A.words,O=0;O<4;O++){var T=E[O];E[O]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}return A},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,b,w,I,m,A){var E=g+(v&b|~v&w)+I+A;return(E<<m|E>>>32-m)+v}function p(g,v,b,w,I,m,A){var E=g+(v&w|b&~w)+I+A;return(E<<m|E>>>32-m)+v}function h(g,v,b,w,I,m,A){var E=g+(v^b^w)+I+A;return(E<<m|E>>>32-m)+v}function y(g,v,b,w,I,m,A){var E=g+(b^(v|~w))+I+A;return(E<<m|E>>>32-m)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(ag);const og=ag.exports;var lg={exports:{}};(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,s=i.WordArray,o=s.init,l=s.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var c=u.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=u[f]<<24-f%4*8;o.call(this,d,c)}else o.apply(this,arguments)};l.prototype=s}}(),n.lib.WordArray})})(lg);const ug=lg.exports;var cg={exports:{}};(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64={stringify:function(u){var c=u.words,d=u.sigBytes,f=this._map;u.clamp();for(var p=[],h=0;h<d;h+=3)for(var y=c[h>>>2]>>>24-h%4*8&255,g=c[h+1>>>2]>>>24-(h+1)%4*8&255,v=c[h+2>>>2]>>>24-(h+2)%4*8&255,b=y<<16|g<<8|v,w=0;w<4&&h+w*.75<d;w++)p.push(f.charAt(b>>>6*(3-w)&63));var I=f.charAt(64);if(I)for(;p.length%4;)p.push(I);return p.join("")},parse:function(u){var c=u.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var p=0;p<d.length;p++)f[d.charCodeAt(p)]=p}var h=d.charAt(64);if(h){var y=u.indexOf(h);y!==-1&&(c=y)}return l(u,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(u,c,d){for(var f=[],p=0,h=0;h<c;h++)if(h%4){var y=d[u.charCodeAt(h-1)]<<h%4*2,g=d[u.charCodeAt(h)]>>>6-h%4*2,v=y|g;f[p>>>2]|=v<<24-p%4*8,p++}return s.create(f,p)}}(),n.enc.Base64})})(cg);const bF=cg.exports;class _F{constructor(){a(this,"readFileAndHash",e=>new Promise((n,r)=>{const i=new FileReader;i.onload=s=>{const o=s.target.result,l=ug.create(new Uint8Array(o)),c=og(l).toString(bF);n(c)},i.onerror=s=>{r(s)},i.readAsArrayBuffer(e)}));a(this,"generateHashFileName",e=>new Promise((n,r)=>{const i=new FileReader;i.onload=s=>{const o=s.target.result,l=ug.create(new Uint8Array(o)),u=og(l).toString();n(u)},i.onerror=s=>{r(s)},i.readAsArrayBuffer(e)}))}}const dg=new _F,EF=({type:t,id:e,imageNode:n,onChangeImages:r})=>{const[i,s]=K.useState(!1),{https:o}=Ie(En),{uploadImage:l,generateSignedInUrlErrorMessage:u,uploadingImageMessage:c,uploadingImageErrorMessage:d,encryptingImageErrorMessage:f}=Ie(Me),p=`file-upload-${t}-${n}-${e}`,h=y=>_(this,null,function*(){y.persist();const g=y.target.files[0];if(g){s(!0);try{const v=g.type.split("/")[1],b=yield dg.readFileAndHash(g),w=(yield dg.generateHashFileName(g))+"."+v,I={image_type:v,image_file_name:w,image_size:g.size,base64_sum:b},m=yield o.generateSignedInUrl(I);if(m.ok){const A=yield m.json(),E={"Content-Type":g.type,"Content-MD5":b};try{const O=new File([g],w,{type:g.type}),T=yield o.storeInBucket(A.data.signed_url,O,E);r(T,n),Pe.success(c)}catch(O){console.error("There was a problem with uploading the file: ",O),Pe.error(d)}}else console.error("There was a problem with generating signed in URL: ",yield m.json()),Pe.error(u)}catch(v){console.error("There was a problem with encrypting file...",v),Pe.error(f)}s(!1)}});return ae(De,{children:[ae("button",{className:`${au} eow-p-2 ${i?"eow-bg-gray-200":"eow-bg-white"} eow-border eow-border-gray-200`,onClick:()=>document.getElementById(p).click(),disabled:i,children:[j("img",{src:vn.upload,alt:"Upload",className:"eow-w-6 eow-h-6"}),j("span",{className:"eow-ml-1 eow-text-sm eow-text-gray-700",children:l})]}),j("input",{id:p,type:"file",className:"eow-hidden",accept:"image/*",onChange:h})]})},IF=({isUrlCopied:t,isDisabled:e,onClick:n})=>{const{copyUrl:r,copied:i}=Ie(Me);return j("button",{className:`${e?"":"hover:eow-bg-gray-100"} eow-rounded eow-p-2 eow-w-full eow-bg-white eow-border-gray-200 eow-border`,onClick:n,disabled:e,children:t?ae("span",{className:"eow-inline-flex eow-items-center",children:[j("svg",{className:"eow-w-3 eow-h-3 eow-text-brandColor eow-me-1.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12",children:j("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1 5.917 5.724 10.5 15 1.5"})}),j("span",{className:"eow-text-xs eow-font-semibold eow-text-brandColor",children:i})]}):ae("span",{className:"eow-inline-flex eow-items-center",children:[j("svg",{className:"eow-w-3 eow-h-3 eow-me-1.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20",children:j("path",{d:"M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"})}),j("span",{className:"eow-text-xs eow-font-semibold",children:r})]})})},AF="https://uploads.fansunitedassets.com/sportal_bg/34f381025412708291999cd645e288e5.png",OF=({imageNode:t,setShowImagesContainer:e})=>j("button",{className:"eow-rounded eow-flex eow-items-center eow-p-2 eow-bg-white eow-border eow-border-gray-200 eow-mb-2",onClick:()=>{e(r=>se(Z({},r),{[t]:!r[t]}))},children:j("img",{src:AF,alt:"Sportal365 button",className:"eow-w-24 eow-h-6"})}),TF=t=>{const{previous:e,next:n}=Ie(Me);return j("div",{className:"eow-flex eow-items-baseline eow-flex-wrap",children:ae("div",{className:"eow-flex",children:[t.pageCount&&t.pageCount!==1&&j("button",{className:"eow-text-base eow-rounded-r-none focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition",onClick:t.getPreviousPage,children:ae("div",{className:"eow-flex eow-leading-5 eow-text-xs eow-items-center",children:[j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-left eow-w-4 eow-h-4",children:j("polyline",{points:"15 18 9 12 15 6"})}),e]})}),t.images&&t.images.data.length===20?j("button",{className:`eow-text-base ${t.pageCount!==1?"eow-text-xs eow-rounded-l-none eow-border-l-0":""} focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition`,onClick:t.getNextPage,children:ae("div",{className:"eow-text-xs eow-flex eow-leading-5 eow-items-center",children:[n,j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-right eow-w-4 eow-h-4 eow-ml-1",children:j("polyline",{points:"9 18 15 12 9 6"})})]})}):j(De,{})]})})};var CF=In,SF=function(){return CF.Date.now()},PF=SF,MF=/\s/;function RF(t){for(var e=t.length;e--&&MF.test(t.charAt(e)););return e}var kF=RF,xF=kF,DF=/^\s+/;function FF(t){return t&&t.slice(0,xF(t)+1).replace(DF,"")}var NF=FF,LF=da,BF=fa,UF="[object Symbol]";function $F(t){return typeof t=="symbol"||BF(t)&&LF(t)==UF}var fg=$F,jF=NF,hg=zs,HF=fg,pg=0/0,VF=/^[-+]0x[0-9a-f]+$/i,qF=/^0b[01]+$/i,WF=/^0o[0-7]+$/i,GF=parseInt;function zF(t){if(typeof t=="number")return t;if(HF(t))return pg;if(hg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=hg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jF(t);var n=qF.test(t);return n||WF.test(t)?GF(t.slice(2),n?2:8):VF.test(t)?pg:+t}var QF=zF,YF=zs,qu=PF,mg=QF,KF="Expected a function",JF=Math.max,XF=Math.min;function ZF(t,e,n){var r,i,s,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(KF);e=mg(e)||0,YF(n)&&(d=!!n.leading,f="maxWait"in n,s=f?JF(mg(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p);function h(E){var O=r,T=i;return r=i=void 0,c=E,o=t.apply(T,O),o}function y(E){return c=E,l=setTimeout(b,e),d?h(E):o}function g(E){var O=E-u,T=E-c,x=e-O;return f?XF(x,s-T):x}function v(E){var O=E-u,T=E-c;return u===void 0||O>=e||O<0||f&&T>=s}function b(){var E=qu();if(v(E))return w(E);l=setTimeout(b,g(E))}function w(E){return l=void 0,p&&r?h(E):(r=i=void 0,o)}function I(){l!==void 0&&clearTimeout(l),c=0,r=u=i=l=void 0}function m(){return l===void 0?o:w(qu())}function A(){var E=qu(),O=v(E);if(r=arguments,i=this,u=E,O){if(l===void 0)return y(u);if(f)return clearTimeout(l),l=setTimeout(b,e),h(u)}return l===void 0&&(l=setTimeout(b,e)),o}return A.cancel=I,A.flush=m,A}var Wu=ZF;function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function Pr(t){return Pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(t)}function eN(t,e){if(Pr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gg(t){var e=eN(t,"string");return Pr(e)=="symbol"?e:e+""}function ui(t,e,n){return e=gg(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function we(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vg(Object(n),!0).forEach(function(r){ui(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gg(r.key),r)}}function nN(t,e,n){return e&&yg(t.prototype,e),n&&yg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gu(t,e){return Gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gu(t,e)}function rN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gu(t,e)}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},no(t)}function wg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wg=function(){return!!t})()}function iN(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aN(t,e){if(e&&(Pr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iN(t)}function sN(t){var e=wg();return function(){var r=no(t),i;if(e){var s=no(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return aN(this,i)}}function zu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oN(t){if(Array.isArray(t))return zu(t)}function lN(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bg(t,e){if(!!t){if(typeof t=="string")return zu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zu(t,e)}}function uN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2318
|
+
`)}return re}function Ze(te,re){var ue={},he=te.style||{};return he.fontStyle&&B(te).fontStyle==="italic"&&(ue.italic=!0),he.fontWeight&&(B(te).fontWeight.startsWith("bold")||parseInt(B(te).fontWeight)>=700)&&(ue.bold=!0),Object.keys(ue).length>0&&(re=k(re,ue)),parseFloat(he.textIndent||0)>0&&(re=new f.default().insert(" ").concat(re)),re}function Ve(te,re){var ue=te.data;if(te.parentNode.tagName==="O:P")return re.insert(ue.trim());if(ue.trim().length===0&&te.parentNode.classList.contains("ql-clipboard"))return re;if(!B(te.parentNode).whiteSpace.startsWith("pre")){var he=function(_e,Oe){return Oe=Oe.replace(/[^\u00a0]/g,""),Oe.length<1&&_e?" ":Oe};ue=ue.replace(/\r\n/g," ").replace(/\n/g," "),ue=ue.replace(/\s\s+/g,he.bind(he,!0)),(te.previousSibling==null&&$(te.parentNode)||te.previousSibling!=null&&$(te.previousSibling))&&(ue=ue.replace(/^\s+/,he.bind(he,!1))),(te.nextSibling==null&&$(te.parentNode)||te.nextSibling!=null&&$(te.nextSibling))&&(ue=ue.replace(/\s+$/,he.bind(he,!1)))}return re.insert(ue)}r.default=M,r.matchAttributor=X,r.matchBlot=ee,r.matchNewline=Ae,r.matchSpacing=Se,r.matchText=Ve},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(6),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"optimize",value:function(b){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(u.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var s=function(){function S(R,D){var L=[],N=!0,H=!1,q=void 0;try{for(var z=R[Symbol.iterator](),U;!(N=(U=z.next()).done)&&(L.push(U.value),!(D&&L.length===D));N=!0);}catch(F){H=!0,q=F}finally{try{!N&&z.return&&z.return()}finally{if(H)throw q}}return L}return function(R,D){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return S(R,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(R,D){for(var L=0;L<D.length;L++){var N=D[L];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(R,N.key,N)}}return function(R,D,L){return D&&S(R.prototype,D),L&&S(R,L),R}}(),l=i(2),u=b(l),c=i(0),d=b(c),f=i(5),p=b(f),h=i(10),y=b(h),g=i(9),v=b(g);function b(S){return S&&S.__esModule?S:{default:S}}function w(S,R,D){return R in S?Object.defineProperty(S,R,{value:D,enumerable:!0,configurable:!0,writable:!0}):S[R]=D,S}function I(S,R){if(!(S instanceof R))throw new TypeError("Cannot call a class as a function")}function m(S,R){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:S}function A(S,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);S.prototype=Object.create(R&&R.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(S,R):S.__proto__=R)}var E=(0,y.default)("quill:toolbar"),O=function(S){A(R,S);function R(D,L){I(this,R);var N=m(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D,L));if(Array.isArray(N.options.container)){var H=document.createElement("div");x(H,N.options.container),D.container.parentNode.insertBefore(H,D.container),N.container=H}else typeof N.options.container=="string"?N.container=document.querySelector(N.options.container):N.container=N.options.container;if(!(N.container instanceof HTMLElement)){var q;return q=E.error("Container required for toolbar",N.options),m(N,q)}return N.container.classList.add("ql-toolbar"),N.controls=[],N.handlers={},Object.keys(N.options.handlers).forEach(function(z){N.addHandler(z,N.options.handlers[z])}),[].forEach.call(N.container.querySelectorAll("button, select"),function(z){N.attach(z)}),N.quill.on(p.default.events.EDITOR_CHANGE,function(z,U){z===p.default.events.SELECTION_CHANGE&&N.update(U)}),N.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var z=N.quill.selection.getRange(),U=s(z,1),F=U[0];N.update(F)}),N}return o(R,[{key:"addHandler",value:function(L,N){this.handlers[L]=N}},{key:"attach",value:function(L){var N=this,H=[].find.call(L.classList,function(z){return z.indexOf("ql-")===0});if(!!H){if(H=H.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){E.warn("ignoring attaching to disabled format",H,L);return}if(d.default.query(H)==null){E.warn("ignoring attaching to nonexistent format",H,L);return}}var q=L.tagName==="SELECT"?"change":"click";L.addEventListener(q,function(z){var U=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var F=L.options[L.selectedIndex];F.hasAttribute("selected")?U=!1:U=F.value||!1}else L.classList.contains("ql-active")?U=!1:U=L.value||!L.hasAttribute("value"),z.preventDefault();N.quill.focus();var C=N.quill.selection.getRange(),M=s(C,1),k=M[0];if(N.handlers[H]!=null)N.handlers[H].call(N,U);else if(d.default.query(H).prototype instanceof d.default.Embed){if(U=prompt("Enter "+H),!U)return;N.quill.updateContents(new u.default().retain(k.index).delete(k.length).insert(w({},H,U)),p.default.sources.USER)}else N.quill.format(H,U,p.default.sources.USER);N.update(k)}),this.controls.push([H,L])}}},{key:"update",value:function(L){var N=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(H){var q=s(H,2),z=q[0],U=q[1];if(U.tagName==="SELECT"){var F=void 0;if(L==null)F=null;else if(N[z]==null)F=U.querySelector("option[selected]");else if(!Array.isArray(N[z])){var C=N[z];typeof C=="string"&&(C=C.replace(/\"/g,'\\"')),F=U.querySelector('option[value="'+C+'"]')}F==null?(U.value="",U.selectedIndex=-1):F.selected=!0}else if(L==null)U.classList.remove("ql-active");else if(U.hasAttribute("value")){var M=N[z]===U.getAttribute("value")||N[z]!=null&&N[z].toString()===U.getAttribute("value")||N[z]==null&&!U.getAttribute("value");U.classList.toggle("ql-active",M)}else U.classList.toggle("ql-active",N[z]!=null)})}}]),R}(v.default);O.DEFAULTS={};function T(S,R,D){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+R),D!=null&&(L.value=D),S.appendChild(L)}function x(S,R){Array.isArray(R[0])||(R=[R]),R.forEach(function(D){var L=document.createElement("span");L.classList.add("ql-formats"),D.forEach(function(N){if(typeof N=="string")T(L,N);else{var H=Object.keys(N)[0],q=N[H];Array.isArray(q)?P(L,H,q):T(L,H,q)}}),S.appendChild(L)})}function P(S,R,D){var L=document.createElement("select");L.classList.add("ql-"+R),D.forEach(function(N){var H=document.createElement("option");N!==!1?H.setAttribute("value",N):H.setAttribute("selected","selected"),L.appendChild(H)}),S.appendChild(L)}O.DEFAULTS={container:null,handlers:{clean:function(){var R=this,D=this.quill.getSelection();if(D!=null)if(D.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(N){d.default.query(N,d.default.Scope.INLINE)!=null&&R.quill.format(N,!1)})}else this.quill.removeFormat(D,p.default.sources.USER)},direction:function(R){var D=this.quill.getFormat().align;R==="rtl"&&D==null?this.quill.format("align","right",p.default.sources.USER):!R&&D==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",R,p.default.sources.USER)},indent:function(R){var D=this.quill.getSelection(),L=this.quill.getFormat(D),N=parseInt(L.indent||0);if(R==="+1"||R==="-1"){var H=R==="+1"?1:-1;L.direction==="rtl"&&(H*=-1),this.quill.format("indent",N+H,p.default.sources.USER)}},link:function(R){R===!0&&(R=prompt("Enter link URL:")),this.quill.format("link",R,p.default.sources.USER)},list:function(R){var D=this.quill.getSelection(),L=this.quill.getFormat(D);R==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",R,p.default.sources.USER)}}},r.default=O,r.addControls=x},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(28),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(v,b){d(this,g);var w=f(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return w.label.innerHTML=b,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(I){I.classList.add("ql-primary")}),w}return s(g,[{key:"buildItem",value:function(b){var w=o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,b);return w.style.backgroundColor=b.getAttribute("value")||"",w}},{key:"selectItem",value:function(b,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,b,w);var I=this.label.querySelector(".ql-color-label"),m=b&&b.getAttribute("data-value")||"";I&&(I.tagName==="line"?I.style.stroke=m:I.style.fill=m)}}]),g}(u.default);r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(28),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(v,b){d(this,g);var w=f(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(I){I.innerHTML=b[I.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(g,[{key:"selectItem",value:function(b,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,b,w),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),g}(u.default);r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function u(c,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,f){return d&&u(c.prototype,d),f&&u(c,f),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,d){var f=this;o(this,u),this.quill=c,this.boundsContainer=d||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.quill.root.scrollTop+"px"}),this.hide()}return s(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var f=d.left+d.width/2-this.root.offsetWidth/2,p=d.bottom+this.quill.root.scrollTop;this.root.style.left=f+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),g=0;if(y.right>h.right&&(g=h.right-y.right,this.root.style.left=f+g+"px"),y.left<h.left&&(g=h.left-y.left,this.root.style.left=f+g+"px"),y.bottom>h.bottom){var v=y.bottom-y.top,b=d.bottom-d.top+v;this.root.style.top=p-b+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function P(S,R){var D=[],L=!0,N=!1,H=void 0;try{for(var q=S[Symbol.iterator](),z;!(L=(z=q.next()).done)&&(D.push(z.value),!(R&&D.length===R));L=!0);}catch(U){N=!0,H=U}finally{try{!L&&q.return&&q.return()}finally{if(N)throw H}}return D}return function(S,R){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return P(S,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function P(S,R,D){S===null&&(S=Function.prototype);var L=Object.getOwnPropertyDescriptor(S,R);if(L===void 0){var N=Object.getPrototypeOf(S);return N===null?void 0:P(N,R,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},l=function(){function P(S,R){for(var D=0;D<R.length;D++){var L=R[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(S,L.key,L)}}return function(S,R,D){return R&&P(S.prototype,R),D&&P(S,D),S}}(),u=i(3),c=I(u),d=i(8),f=I(d),p=i(43),h=I(p),y=i(27),g=I(y),v=i(15),b=i(41),w=I(b);function I(P){return P&&P.__esModule?P:{default:P}}function m(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function A(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function E(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(P){E(S,P);function S(R,D){m(this,S),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=O);var L=A(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,R,D));return L.quill.container.classList.add("ql-snow"),L}return l(S,[{key:"extendToolbar",value:function(D){D.container.classList.add("ql-snow"),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),w.default),this.tooltip=new x(this.quill,this.options.bounds),D.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,N){D.handlers.link.call(D,!N.format.link)})}}]),S}(h.default);T.DEFAULTS=(0,c.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){if(S){var R=this.quill.getSelection();if(R==null||R.length==0)return;var D=this.quill.getText(R);/^\S+@\S+\.\S+$/.test(D)&&D.indexOf("mailto:")!==0&&(D="mailto:"+D);var L=this.quill.theme.tooltip;L.edit("link",D)}else this.quill.format("link",!1)}}}}});var x=function(P){E(S,P);function S(R,D){m(this,S);var L=A(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,R,D));return L.preview=L.root.querySelector("a.ql-preview"),L}return l(S,[{key:"listen",value:function(){var D=this;o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){D.root.classList.contains("ql-editing")?D.save():D.edit("link",D.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(D.linkRange!=null){var N=D.linkRange;D.restoreFocus(),D.quill.formatText(N,"link",!1,f.default.sources.USER),delete D.linkRange}L.preventDefault(),D.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(L,N,H){if(L!=null){if(L.length===0&&H===f.default.sources.USER){var q=D.quill.scroll.descendant(g.default,L.index),z=s(q,2),U=z[0],F=z[1];if(U!=null){D.linkRange=new v.Range(L.index-F,U.length());var C=g.default.formats(U.domNode);D.preview.textContent=C,D.preview.setAttribute("href",C),D.show(),D.position(D.quill.getBounds(D.linkRange));return}}else delete D.linkRange;D.hide()}})}},{key:"show",value:function(){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),S}(p.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(29),o=oe(s),l=i(36),u=i(38),c=i(64),d=i(65),f=oe(d),p=i(66),h=oe(p),y=i(67),g=oe(y),v=i(37),b=i(26),w=i(39),I=i(40),m=i(56),A=oe(m),E=i(68),O=oe(E),T=i(27),x=oe(T),P=i(69),S=oe(P),R=i(70),D=oe(R),L=i(71),N=oe(L),H=i(72),q=oe(H),z=i(73),U=oe(z),F=i(13),C=oe(F),M=i(74),k=oe(M),B=i(75),W=oe(B),$=i(57),Q=oe($),Y=i(41),X=oe(Y),ee=i(28),le=oe(ee),me=i(59),ve=oe(me),Ae=i(60),Se=oe(Ae),Ze=i(61),Ve=oe(Ze),te=i(108),re=oe(te),ue=i(62),he=oe(ue);function oe(_e){return _e&&_e.__esModule?_e:{default:_e}}o.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":v.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":I.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":v.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":I.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":c.IndentClass,"formats/background":v.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":w.FontClass,"formats/size":I.SizeClass,"formats/blockquote":f.default,"formats/code-block":C.default,"formats/header":h.default,"formats/list":g.default,"formats/bold":A.default,"formats/code":F.Code,"formats/italic":O.default,"formats/link":x.default,"formats/script":S.default,"formats/strike":D.default,"formats/underline":N.default,"formats/image":q.default,"formats/video":U.default,"formats/list/item":y.ListItem,"modules/formula":k.default,"modules/syntax":W.default,"modules/toolbar":Q.default,"themes/bubble":re.default,"themes/snow":he.default,"ui/icons":X.default,"ui/picker":le.default,"ui/icon-picker":Se.default,"ui/color-picker":ve.default,"ui/tooltip":Ve.default},!0),r.default=o.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var s=function(){function g(v,b){for(var w=0;w<b.length;w++){var I=b[w];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(v,I.key,I)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var I=Object.getOwnPropertyDescriptor(v,b);if(I===void 0){var m=Object.getPrototypeOf(v);return m===null?void 0:g(m,b,w)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(w)}},l=i(0),u=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function f(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function p(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var h=function(g){p(v,g);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"add",value:function(w,I){if(I==="+1"||I==="-1"){var m=this.value(w)||0;I=I==="+1"?m+1:m-1}return I===0?(this.remove(w),!0):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"add",this).call(this,w,I)}},{key:"canAdd",value:function(w,I){return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,I)||o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,parseInt(I))}},{key:"value",value:function(w){return parseInt(o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,w))||void 0}}]),v}(u.default.Attributor.Class),y=new h("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(4),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="blockquote",f.tagName="blockquote",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function h(y,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(y,b.key,b)}}return function(y,g,v){return g&&h(y.prototype,g),v&&h(y,v),y}}(),o=i(4),l=u(o);function u(h){return h&&h.__esModule?h:{default:h}}function c(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}function d(h,y){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:h}function f(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);h.prototype=Object.create(y&&y.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(h,y):h.__proto__=y)}var p=function(h){f(y,h);function y(){return c(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"formats",value:function(v){return this.tagName.indexOf(v.tagName)+1}}]),y}(l.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var s=function(){function m(A,E){for(var O=0;O<E.length;O++){var T=E[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(A,T.key,T)}}return function(A,E,O){return E&&m(A.prototype,E),O&&m(A,O),A}}(),o=function m(A,E,O){A===null&&(A=Function.prototype);var T=Object.getOwnPropertyDescriptor(A,E);if(T===void 0){var x=Object.getPrototypeOf(A);return x===null?void 0:m(x,E,O)}else{if("value"in T)return T.value;var P=T.get;return P===void 0?void 0:P.call(O)}},l=i(0),u=h(l),c=i(4),d=h(c),f=i(25),p=h(f);function h(m){return m&&m.__esModule?m:{default:m}}function y(m,A,E){return A in m?Object.defineProperty(m,A,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[A]=E,m}function g(m,A){if(!(m instanceof A))throw new TypeError("Cannot call a class as a function")}function v(m,A){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:m}function b(m,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);m.prototype=Object.create(A&&A.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(m,A):m.__proto__=A)}var w=function(m){b(A,m);function A(){return g(this,A),v(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return s(A,[{key:"format",value:function(O,T){O===I.blotName&&!T?this.replaceWith(u.default.create(this.statics.scope)):o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,O,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,T){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,T),this):(this.parent.unwrap(),o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,O,T))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:o(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,O)}}]),A}(d.default);w.blotName="list-item",w.tagName="LI";var I=function(m){b(A,m),s(A,null,[{key:"create",value:function(O){var T=O==="ordered"?"OL":"UL",x=o(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,T);return(O==="checked"||O==="unchecked")&&x.setAttribute("data-checked",O==="checked"),x}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(E){g(this,A);var O=v(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E)),T=function(P){if(P.target.parentNode===E){var S=O.statics.formats(E),R=u.default.find(P.target);S==="checked"?R.format("list","unchecked"):S==="unchecked"&&R.format("list","checked")}};return E.addEventListener("touchstart",T),E.addEventListener("mousedown",T),O}return s(A,[{key:"format",value:function(O,T){this.children.length>0&&this.children.tail.format(O,T)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,T){if(O instanceof w)o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,O,T);else{var x=T==null?this.length():T.offset(this),P=this.split(x);P.parent.insertBefore(O,P)}}},{key:"optimize",value:function(O){o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,O);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var T=u.default.create(this.statics.defaultChild);O.moveChildren(T),this.appendChild(T)}o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,O)}}]),A}(p.default);I.blotName="list",I.scope=u.default.Scope.BLOCK_BLOT,I.tagName=["OL","UL"],I.defaultChild="list-item",I.allowedChildren=[w],r.ListItem=w,r.default=I},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(56),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="italic",f.tagName=["EM","I"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:y(I,v,b)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(b)}},l=i(6),u=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var h=function(y){p(g,y);function g(){return d(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),g}(u.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="strike",f.tagName="S",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function u(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function c(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function d(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var f=function(p){d(h,p);function h(){return u(this,h),c(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);f.blotName="underline",f.tagName="U",r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(0),u=d(l),c=i(27);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function h(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var y=["alt","height","width"],g=function(v){h(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(I,m){y.indexOf(I)>-1?m?this.domNode.setAttribute(I,m):this.domNode.removeAttribute(I):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,I,m)}}],[{key:"create",value:function(I){var m=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,I);return typeof I=="string"&&m.setAttribute("src",this.sanitize(I)),m}},{key:"formats",value:function(I){return y.reduce(function(m,A){return I.hasAttribute(A)&&(m[A]=I.getAttribute(A)),m},{})}},{key:"match",value:function(I){return/\.(jpe?g|gif|png)$/.test(I)||/^data:image\/.+;base64/.test(I)}},{key:"sanitize",value:function(I){return(0,c.sanitize)(I,["http","https","data"])?I:"//:0"}},{key:"value",value:function(I){return I.getAttribute("src")}}]),b}(u.default.Embed);g.blotName="image",g.tagName="IMG",r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function v(b,w){for(var I=0;I<w.length;I++){var m=w[I];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(b,m.key,m)}}return function(b,w,I){return w&&v(b.prototype,w),I&&v(b,I),b}}(),o=function v(b,w,I){b===null&&(b=Function.prototype);var m=Object.getOwnPropertyDescriptor(b,w);if(m===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:v(A,w,I)}else{if("value"in m)return m.value;var E=m.get;return E===void 0?void 0:E.call(I)}},l=i(4),u=i(27),c=d(u);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function h(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var y=["height","width"],g=function(v){h(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(I,m){y.indexOf(I)>-1?m?this.domNode.setAttribute(I,m):this.domNode.removeAttribute(I):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,I,m)}}],[{key:"create",value:function(I){var m=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,I);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(I)),m}},{key:"formats",value:function(I){return y.reduce(function(m,A){return I.hasAttribute(A)&&(m[A]=I.getAttribute(A)),m},{})}},{key:"sanitize",value:function(I){return c.default.sanitize(I)}},{key:"value",value:function(I){return I.getAttribute("src")}}]),b}(l.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",r.default=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var s=function(){function I(m,A){for(var E=0;E<A.length;E++){var O=A[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,A,E){return A&&I(m.prototype,A),E&&I(m,E),m}}(),o=function I(m,A,E){m===null&&(m=Function.prototype);var O=Object.getOwnPropertyDescriptor(m,A);if(O===void 0){var T=Object.getPrototypeOf(m);return T===null?void 0:I(T,A,E)}else{if("value"in O)return O.value;var x=O.get;return x===void 0?void 0:x.call(E)}},l=i(35),u=h(l),c=i(5),d=h(c),f=i(9),p=h(f);function h(I){return I&&I.__esModule?I:{default:I}}function y(I,m){if(!(I instanceof m))throw new TypeError("Cannot call a class as a function")}function g(I,m){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:I}function v(I,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);I.prototype=Object.create(m&&m.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(I,m):I.__proto__=m)}var b=function(I){v(m,I);function m(){return y(this,m),g(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(E){var O=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,E);return typeof E=="string"&&(window.katex.render(E,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",E)),O}},{key:"value",value:function(E){return E.getAttribute("data-value")}}]),m}(u.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var w=function(I){v(m,I),s(m,null,[{key:"register",value:function(){d.default.register(b,!0)}}]);function m(){y(this,m);var A=g(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return m}(p.default);r.FormulaBlot=b,r.default=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var s=function(){function E(O,T){for(var x=0;x<T.length;x++){var P=T[x];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(O,P.key,P)}}return function(O,T,x){return T&&E(O.prototype,T),x&&E(O,x),O}}(),o=function E(O,T,x){O===null&&(O=Function.prototype);var P=Object.getOwnPropertyDescriptor(O,T);if(P===void 0){var S=Object.getPrototypeOf(O);return S===null?void 0:E(S,T,x)}else{if("value"in P)return P.value;var R=P.get;return R===void 0?void 0:R.call(x)}},l=i(0),u=g(l),c=i(5),d=g(c),f=i(9),p=g(f),h=i(13),y=g(h);function g(E){return E&&E.__esModule?E:{default:E}}function v(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")}function b(E,O){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:E}function w(E,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);E.prototype=Object.create(O&&O.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(E,O):E.__proto__=O)}var I=function(E){w(O,E);function O(){return v(this,O),b(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return s(O,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var P=this.domNode.textContent;this.cachedText!==P&&((P.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(P),this.domNode.normalize(),this.attach()),this.cachedText=P)}}]),O}(y.default);I.className="ql-syntax";var m=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),A=function(E){w(O,E),s(O,null,[{key:"register",value:function(){d.default.register(m,!0),d.default.register(I,!0)}}]);function O(T,x){v(this,O);var P=b(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,T,x));if(typeof P.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var S=null;return P.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(S),S=setTimeout(function(){P.highlight(),S=null},P.options.interval)}),P.highlight(),P}return s(O,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var P=this.quill.getSelection();this.quill.scroll.descendants(I).forEach(function(S){S.highlight(x.options.highlight)}),this.quill.update(d.default.sources.SILENT),P!=null&&this.quill.setSelection(P,d.default.sources.SILENT)}}}]),O}(p.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(E){var O=window.hljs.highlightAuto(E);return O.value}}(),interval:1e3},r.CodeBlock=I,r.CodeToken=m,r.default=A},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var s=function O(T,x,P){T===null&&(T=Function.prototype);var S=Object.getOwnPropertyDescriptor(T,x);if(S===void 0){var R=Object.getPrototypeOf(T);return R===null?void 0:O(R,x,P)}else{if("value"in S)return S.value;var D=S.get;return D===void 0?void 0:D.call(P)}},o=function(){function O(T,x){for(var P=0;P<x.length;P++){var S=x[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(T,S.key,S)}}return function(T,x,P){return x&&O(T.prototype,x),P&&O(T,P),T}}(),l=i(3),u=v(l),c=i(8),d=v(c),f=i(43),p=v(f),h=i(15),y=i(41),g=v(y);function v(O){return O&&O.__esModule?O:{default:O}}function b(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function w(O,T){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:O}function I(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);O.prototype=Object.create(T&&T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(O,T):O.__proto__=T)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(O){I(T,O);function T(x,P){b(this,T),P.modules.toolbar!=null&&P.modules.toolbar.container==null&&(P.modules.toolbar.container=m);var S=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,P));return S.quill.container.classList.add("ql-bubble"),S}return o(T,[{key:"extendToolbar",value:function(P){this.tooltip=new E(this.quill,this.options.bounds),this.tooltip.root.appendChild(P.container),this.buildButtons([].slice.call(P.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(P.container.querySelectorAll("select")),g.default)}}]),T}(p.default);A.DEFAULTS=(0,u.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var E=function(O){I(T,O);function T(x,P){b(this,T);var S=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,P));return S.quill.on(d.default.events.EDITOR_CHANGE,function(R,D,L,N){if(R===d.default.events.SELECTION_CHANGE)if(D!=null&&D.length>0&&N===d.default.sources.USER){S.show(),S.root.style.left="0px",S.root.style.width="",S.root.style.width=S.root.offsetWidth+"px";var H=S.quill.getLines(D.index,D.length);if(H.length===1)S.position(S.quill.getBounds(D));else{var q=H[H.length-1],z=S.quill.getIndex(q),U=Math.min(q.length()-1,D.index+D.length-z),F=S.quill.getBounds(new h.Range(z,U));S.position(F)}}else document.activeElement!==S.textbox&&S.quill.hasFocus()&&S.hide()}),S}return o(T,[{key:"listen",value:function(){var P=this;s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){P.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!P.root.classList.contains("ql-hidden")){var S=P.quill.getSelection();S!=null&&P.position(P.quill.getBounds(S))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(P){var S=s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,P),R=this.root.querySelector(".ql-tooltip-arrow");if(R.style.marginLeft="",S===0)return S;R.style.marginLeft=-1*S-R.offsetWidth/2+"px"}}]),T}(f.BaseTooltip);E.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=E,r.default=A},function(n,r,i){n.exports=i(63)}]).default})})(Zm);var oF=it&&it.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eo=it&&it.__assign||function(){return eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},eo.apply(this,arguments)},lF=it&&it.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r},to=it&&it.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},An=to(cn.default),uF=to(cr.default),ha=to(sF),eg=to(Zm.exports),cF=function(t){oF(e,t);function e(n){var r=t.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(s,o,l,u){var c,d,f,p;s==="text-change"?(d=(c=r).onEditorChangeText)===null||d===void 0||d.call(c,r.editor.root.innerHTML,o,u,r.unprivilegedEditor):s==="selection-change"&&((p=(f=r).onEditorChangeSelection)===null||p===void 0||p.call(f,o,u,r.unprivilegedEditor))};var i=r.isControlled()?n.value:n.defaultValue;return r.value=i!=null?i:"",r}return e.prototype.validateProps=function(n){var r;if(An.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(An.default.Children.count(n.children)){var i=An.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},e.prototype.shouldComponentUpdate=function(n,r){var i=this,s;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),l=(s=n.value,s!=null?s:"");this.isEqualValue(l,o)||this.setEditorContents(this.editor,l)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),lF(this.cleanProps,this.dirtyProps).some(function(u){return!ha.default(n[u],i.props[u])})},e.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(i){return!ha.default(n[i],r.props[i])})},e.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(n,r){var i=this;if(this.editor&&this.shouldComponentRegenerate(n)){var s=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:s,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var l=this.regenerationSnapshot,s=l.delta,u=l.selection;delete this.regenerationSnapshot,this.instantiateEditor();var c=this.editor;c.setContents(s),tg(function(){return i.setEditorSelection(c,u)})}},e.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},e.prototype.destroyEditor=function(){!this.editor||this.unhookEditor(this.editor)},e.prototype.isControlled=function(){return"value"in this.props},e.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},e.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},e.prototype.createEditor=function(n,r){var i=new eg.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(i,r.tabIndex),this.hookEditor(i),i},e.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},e.prototype.getEditorContents=function(){return this.value},e.prototype.getEditorSelection=function(){return this.selection},e.prototype.isDelta=function(n){return n&&n.ops},e.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?ha.default(n.ops,r.ops):ha.default(n,r)},e.prototype.setEditorContents=function(n,r){var i=this;this.value=r;var s=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),tg(function(){return i.setEditorSelection(n,s)})},e.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var i=n.getLength();r.index=Math.max(0,Math.min(r.index,i-1)),r.length=Math.max(0,Math.min(r.length,i-1-r.index)),n.setSelection(r)}},e.prototype.setEditorTabIndex=function(n,r){var i,s;!((s=(i=n)===null||i===void 0?void 0:i.scroll)===null||s===void 0)&&s.domNode&&(n.scroll.domNode.tabIndex=r)},e.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},e.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},e.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=uF.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},e.prototype.renderEditingArea=function(){var n=this,r=this.props,i=r.children,s=r.preserveWhitespace,o=this.state.generation,l={key:o,ref:function(u){n.editingArea=u}};return An.default.Children.count(i)?An.default.cloneElement(An.default.Children.only(i),l):s?An.default.createElement("pre",eo({},l)):An.default.createElement("div",eo({},l))},e.prototype.render=function(){var n;return An.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n!=null?n:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},e.prototype.onEditorChangeText=function(n,r,i,s){var o,l;if(!!this.editor){var u=this.isDelta(this.value)?s.getContents():s.getHTML();u!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=u,(l=(o=this.props).onChange)===null||l===void 0||l.call(o,n,r,i,s))}},e.prototype.onEditorChangeSelection=function(n,r,i){var s,o,l,u,c,d;if(!!this.editor){var f=this.getEditorSelection(),p=!f&&n,h=f&&!n;ha.default(n,f)||(this.selection=n,(o=(s=this.props).onChangeSelection)===null||o===void 0||o.call(s,n,r,i),p?(u=(l=this.props).onFocus)===null||u===void 0||u.call(l,n,r,i):h&&((d=(c=this.props).onBlur)===null||d===void 0||d.call(c,f,r,i)))}},e.prototype.focus=function(){!this.editor||this.editor.focus()},e.prototype.blur=function(){!this.editor||(this.selection=null,this.editor.blur())},e.displayName="React Quill",e.Quill=eg.default,e.defaultProps={theme:"snow",modules:{},readOnly:!1},e}(An.default.Component);function tg(t){Promise.resolve().then(t)}var ng=cF;const rg={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},Uu=({property:t,defaultValue:e,setValue:n})=>{const{description:r,descriptionPlaceholder:i,rules:s,rulesPlaceholder:o,adContent:l,adContentPlaceholder:u}=Ie(Me),c=(d,f,p,h)=>{h.getText().trim()===""?n(null):n(d)};return t==="description"?ae("div",{className:"eow-mb-4",children:[j("label",{className:Yt,children:r}),j(ng,{defaultValue:e,onChange:c,modules:rg,placeholder:i})]}):j("div",{className:"eow-mb-4",children:j(ng,{defaultValue:e,onChange:c,modules:rg,placeholder:t==="rules"?o:u})})},$u=({isDisabled:t,onClick:e})=>{const{add:n}=Ie(Me);return ae("button",{className:"eow-place-self-center eow-bg-transparent eow-border eow-border-gray-400 eow-rounded-full eow-p-2.5",onClick:e,disabled:t,children:["+ ",n]})},dF=t=>{switch(t){case"time":return"either_or_time";case"lives":return"either_or_lives";case"points_correct_steps":return"either_or_points_correct_steps";case"points_score":return"either_or_points_score";case"options_value":return"either_or_options_value"}},fF=(t,e)=>{switch(t){case"points_correct_steps":return e.pointsCorrectStepsPlaceholder;case"points_score":return e.pointsScorePlaceholder;case"options_value":return e.optionsValuePlaceholder}},hF=({type:t})=>{const{time:e,lives:n,pointsCorrectSteps:r,pointsScore:i,optionsValue:s}=Ie(Me);let o=null;switch(t){case"time":o=e;break;case"lives":o=n;break;case"points_correct_steps":o=r;break;case"points_score":o=i;break;case"options_value":o=s;break}return j("label",{htmlFor:e,className:Yt,children:o})},pa=({type:t,defaultValue:e,showDescription:n,onChange:r})=>{const i=Ie(Me),s=o=>{const l=/^[0-9]+$/;o=o||window.event;const u=8,c=typeof o.which=="undefined"?o.keyCode:o.which,f=!String.fromCharCode(c).match(l);c!==u&&f&&o.preventDefault(),r(Number(o.target.value))};return ae("div",{className:`${t==="time"||t==="lives"?"eow-mb-4":"eow-mb-2"}`,children:[j(hF,{type:t}),j("input",{name:dF(t),className:ua+" remove-arrow eow-mb-1",type:"number",defaultValue:e,onChange:s,placeholder:fF(t,i),onWheel:o=>o.target.blur()}),n?j("p",{className:"eow-text-gray-400 eow-text-xs",children:t==="time"?i.timeDescription:i.livesDescription}):j(De,{})]})},ju=({isDisabled:t,onClick:e})=>j("button",{className:"eow-bg-transparent",onClick:e,disabled:t,children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-w-6 eow-h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),pF=1,ig=new la,mF=({points:t,setRequestBody:e})=>{const{points:n,pointsDescription:r,pointNumber:i}=Ie(Me),s=ig.constructPoints(t),o=(f,p)=>{const h=Array.from(s);h[p].correct_steps=f,d(h)},l=(f,p)=>{const h=Array.from(s);h[p].score=f,d(h)},u=()=>{const f=ig.constructEmptyPoints(),p=Array.from(s);p.push(f),d(p)},c=f=>{const p=s.filter((h,y)=>y!==f);d(p)},d=f=>{e(p=>se(Z({},p),{points:f}))};return ae("div",{className:"eow-mb-4",children:[ae("div",{className:"eow-mb-2",children:[j("h3",{className:Yt,children:n}),j("p",{className:"eow-text-gray-400 eow-text-sm",children:r})]}),ae("div",{className:"eow-grid eow-grid-cols-1 lg:eow-grid-cols-6 md:eow-grid-cols-3 eow-gap-4 eow-mb-1",children:[s.map((f,p)=>ae("div",{className:"eow-overflow-visible eow-shadow-l eow-border eow-border-gray-200",children:[ae("div",{className:"eow-bg-gray-100 eow-flex eow-justify-between eow-px-3 eow-py-2",children:[ae("h2",{className:"eow-card-title",children:[i," ",p+1]}),j(ju,{isDisabled:t.length===pF,onClick:()=>c(p)})]}),j("div",{className:"eow-card-body eow-p-3",children:ae("div",{className:"eow-border eow-border-gray-400 eow-rounded eow-p-3 ",children:[j(pa,{type:"points_correct_steps",defaultValue:f.correct_steps,onChange:h=>o(h,p)}),j(pa,{type:"points_score",defaultValue:f.score,onChange:h=>l(h,p)})]})})]},`points_number_${p}`)),j($u,{isDisabled:!1,onClick:u})]})]})},gF=({label:t,defaultValue:e,placeholder:n,onChange:r})=>ae("div",{className:"eow-mb-2",children:[j("label",{htmlFor:t,className:Yt,children:t}),j("input",{onChange:i=>r(i),value:e,type:"text",id:t,className:ua,placeholder:n})]}),vF=({images:t,children:e})=>ae(De,{children:[j("div",{children:j("label",{className:Yt,children:t})}),j("div",{className:"eow-border eow-border-gray-200 eow-rounded eow-p-2 eow-mb-4",children:e})]});var ag={exports:{}};function yF(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hu={exports:{}};const wF=od(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var sg;function Vu(){return sg||(sg=1,function(t,e){(function(n,r){t.exports=r()})(it,function(){var n=n||function(r,i){var s;if(typeof window!="undefined"&&window.crypto&&(s=window.crypto),typeof self!="undefined"&&self.crypto&&(s=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window!="undefined"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof it!="undefined"&&it.crypto&&(s=it.crypto),!s&&typeof yF=="function")try{s=wF}catch(w){}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(I){var m;return w.prototype=I,m=new w,w.prototype=null,m}}(),u={},c=u.lib={},d=c.Base=function(){return{extend:function(w){var I=l(this);return w&&I.mixIn(w),(!I.hasOwnProperty("init")||this.init===I.init)&&(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var I in w)w.hasOwnProperty(I)&&(this[I]=w[I]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(w,I){w=this.words=w||[],I!=i?this.sigBytes=I:this.sigBytes=w.length*4},toString:function(w){return(w||h).stringify(this)},concat:function(w){var I=this.words,m=w.words,A=this.sigBytes,E=w.sigBytes;if(this.clamp(),A%4)for(var O=0;O<E;O++){var T=m[O>>>2]>>>24-O%4*8&255;I[A+O>>>2]|=T<<24-(A+O)%4*8}else for(var x=0;x<E;x+=4)I[A+x>>>2]=m[x>>>2];return this.sigBytes+=E,this},clamp:function(){var w=this.words,I=this.sigBytes;w[I>>>2]&=4294967295<<32-I%4*8,w.length=r.ceil(I/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var I=[],m=0;m<w;m+=4)I.push(o());return new f.init(I,w)}}),p=u.enc={},h=p.Hex={stringify:function(w){for(var I=w.words,m=w.sigBytes,A=[],E=0;E<m;E++){var O=I[E>>>2]>>>24-E%4*8&255;A.push((O>>>4).toString(16)),A.push((O&15).toString(16))}return A.join("")},parse:function(w){for(var I=w.length,m=[],A=0;A<I;A+=2)m[A>>>3]|=parseInt(w.substr(A,2),16)<<24-A%8*4;return new f.init(m,I/2)}},y=p.Latin1={stringify:function(w){for(var I=w.words,m=w.sigBytes,A=[],E=0;E<m;E++){var O=I[E>>>2]>>>24-E%4*8&255;A.push(String.fromCharCode(O))}return A.join("")},parse:function(w){for(var I=w.length,m=[],A=0;A<I;A++)m[A>>>2]|=(w.charCodeAt(A)&255)<<24-A%4*8;return new f.init(m,I)}},g=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(y.stringify(w)))}catch(I){throw new Error("Malformed UTF-8 data")}},parse:function(w){return y.parse(unescape(encodeURIComponent(w)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=g.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var I,m=this._data,A=m.words,E=m.sigBytes,O=this.blockSize,T=O*4,x=E/T;w?x=r.ceil(x):x=r.max((x|0)-this._minBufferSize,0);var P=x*O,S=r.min(P*4,E);if(P){for(var R=0;R<P;R+=O)this._doProcessBlock(A,R);I=A.splice(0,P),m.sigBytes-=S}return new f.init(I,S)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var I=this._doFinalize();return I},blockSize:16,_createHelper:function(w){return function(I,m){return new w.init(m).finalize(I)}},_createHmacHelper:function(w){return function(I,m){return new b.HMAC.init(w,m).finalize(I)}}});var b=u.algo={};return u}(Math);return n})}(Hu)),Hu.exports}(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,l=s.Hasher,u=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=u.MD5=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var b=0;b<16;b++){var w=v+b,I=g[w];g[w]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var m=this._hash.words,A=g[v+0],E=g[v+1],O=g[v+2],T=g[v+3],x=g[v+4],P=g[v+5],S=g[v+6],R=g[v+7],D=g[v+8],L=g[v+9],N=g[v+10],H=g[v+11],q=g[v+12],z=g[v+13],U=g[v+14],F=g[v+15],C=m[0],M=m[1],k=m[2],B=m[3];C=f(C,M,k,B,A,7,c[0]),B=f(B,C,M,k,E,12,c[1]),k=f(k,B,C,M,O,17,c[2]),M=f(M,k,B,C,T,22,c[3]),C=f(C,M,k,B,x,7,c[4]),B=f(B,C,M,k,P,12,c[5]),k=f(k,B,C,M,S,17,c[6]),M=f(M,k,B,C,R,22,c[7]),C=f(C,M,k,B,D,7,c[8]),B=f(B,C,M,k,L,12,c[9]),k=f(k,B,C,M,N,17,c[10]),M=f(M,k,B,C,H,22,c[11]),C=f(C,M,k,B,q,7,c[12]),B=f(B,C,M,k,z,12,c[13]),k=f(k,B,C,M,U,17,c[14]),M=f(M,k,B,C,F,22,c[15]),C=p(C,M,k,B,E,5,c[16]),B=p(B,C,M,k,S,9,c[17]),k=p(k,B,C,M,H,14,c[18]),M=p(M,k,B,C,A,20,c[19]),C=p(C,M,k,B,P,5,c[20]),B=p(B,C,M,k,N,9,c[21]),k=p(k,B,C,M,F,14,c[22]),M=p(M,k,B,C,x,20,c[23]),C=p(C,M,k,B,L,5,c[24]),B=p(B,C,M,k,U,9,c[25]),k=p(k,B,C,M,T,14,c[26]),M=p(M,k,B,C,D,20,c[27]),C=p(C,M,k,B,z,5,c[28]),B=p(B,C,M,k,O,9,c[29]),k=p(k,B,C,M,R,14,c[30]),M=p(M,k,B,C,q,20,c[31]),C=h(C,M,k,B,P,4,c[32]),B=h(B,C,M,k,D,11,c[33]),k=h(k,B,C,M,H,16,c[34]),M=h(M,k,B,C,U,23,c[35]),C=h(C,M,k,B,E,4,c[36]),B=h(B,C,M,k,x,11,c[37]),k=h(k,B,C,M,R,16,c[38]),M=h(M,k,B,C,N,23,c[39]),C=h(C,M,k,B,z,4,c[40]),B=h(B,C,M,k,A,11,c[41]),k=h(k,B,C,M,T,16,c[42]),M=h(M,k,B,C,S,23,c[43]),C=h(C,M,k,B,L,4,c[44]),B=h(B,C,M,k,q,11,c[45]),k=h(k,B,C,M,F,16,c[46]),M=h(M,k,B,C,O,23,c[47]),C=y(C,M,k,B,A,6,c[48]),B=y(B,C,M,k,R,10,c[49]),k=y(k,B,C,M,U,15,c[50]),M=y(M,k,B,C,P,21,c[51]),C=y(C,M,k,B,q,6,c[52]),B=y(B,C,M,k,T,10,c[53]),k=y(k,B,C,M,N,15,c[54]),M=y(M,k,B,C,E,21,c[55]),C=y(C,M,k,B,D,6,c[56]),B=y(B,C,M,k,F,10,c[57]),k=y(k,B,C,M,S,15,c[58]),M=y(M,k,B,C,z,21,c[59]),C=y(C,M,k,B,x,6,c[60]),B=y(B,C,M,k,H,10,c[61]),k=y(k,B,C,M,O,15,c[62]),M=y(M,k,B,C,L,21,c[63]),m[0]=m[0]+C|0,m[1]=m[1]+M|0,m[2]=m[2]+k|0,m[3]=m[3]+B|0},_doFinalize:function(){var g=this._data,v=g.words,b=this._nDataBytes*8,w=g.sigBytes*8;v[w>>>5]|=128<<24-w%32;var I=r.floor(b/4294967296),m=b;v[(w+64>>>9<<4)+15]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,v[(w+64>>>9<<4)+14]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var A=this._hash,E=A.words,O=0;O<4;O++){var T=E[O];E[O]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}return A},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,b,w,I,m,A){var E=g+(v&b|~v&w)+I+A;return(E<<m|E>>>32-m)+v}function p(g,v,b,w,I,m,A){var E=g+(v&w|b&~w)+I+A;return(E<<m|E>>>32-m)+v}function h(g,v,b,w,I,m,A){var E=g+(v^b^w)+I+A;return(E<<m|E>>>32-m)+v}function y(g,v,b,w,I,m,A){var E=g+(b^(v|~w))+I+A;return(E<<m|E>>>32-m)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(ag);const og=ag.exports;var lg={exports:{}};(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,s=i.WordArray,o=s.init,l=s.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var c=u.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=u[f]<<24-f%4*8;o.call(this,d,c)}else o.apply(this,arguments)};l.prototype=s}}(),n.lib.WordArray})})(lg);const ug=lg.exports;var cg={exports:{}};(function(t,e){(function(n,r){t.exports=r(Vu())})(it,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64={stringify:function(u){var c=u.words,d=u.sigBytes,f=this._map;u.clamp();for(var p=[],h=0;h<d;h+=3)for(var y=c[h>>>2]>>>24-h%4*8&255,g=c[h+1>>>2]>>>24-(h+1)%4*8&255,v=c[h+2>>>2]>>>24-(h+2)%4*8&255,b=y<<16|g<<8|v,w=0;w<4&&h+w*.75<d;w++)p.push(f.charAt(b>>>6*(3-w)&63));var I=f.charAt(64);if(I)for(;p.length%4;)p.push(I);return p.join("")},parse:function(u){var c=u.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var p=0;p<d.length;p++)f[d.charCodeAt(p)]=p}var h=d.charAt(64);if(h){var y=u.indexOf(h);y!==-1&&(c=y)}return l(u,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(u,c,d){for(var f=[],p=0,h=0;h<c;h++)if(h%4){var y=d[u.charCodeAt(h-1)]<<h%4*2,g=d[u.charCodeAt(h)]>>>6-h%4*2,v=y|g;f[p>>>2]|=v<<24-p%4*8,p++}return s.create(f,p)}}(),n.enc.Base64})})(cg);const bF=cg.exports;class _F{constructor(){a(this,"readFileAndHash",e=>new Promise((n,r)=>{const i=new FileReader;i.onload=s=>{const o=s.target.result,l=ug.create(new Uint8Array(o)),c=og(l).toString(bF);n(c)},i.onerror=s=>{r(s)},i.readAsArrayBuffer(e)}));a(this,"generateHashFileName",e=>new Promise((n,r)=>{const i=new FileReader;i.onload=s=>{const o=s.target.result,l=ug.create(new Uint8Array(o)),u=og(l).toString();n(u)},i.onerror=s=>{r(s)},i.readAsArrayBuffer(e)}))}}const dg=new _F,EF=({type:t,id:e,imageNode:n,onChangeImages:r})=>{const[i,s]=K.useState(!1),{https:o}=Ie(En),{uploadImage:l,generateSignedInUrlErrorMessage:u,uploadingImageMessage:c,uploadingImageErrorMessage:d,encryptingImageErrorMessage:f}=Ie(Me),p=`file-upload-${t}-${n}-${e}`,h=y=>_(this,null,function*(){y.persist();const g=y.target.files[0];if(g){s(!0);try{const v=g.type.split("/")[1],b=yield dg.readFileAndHash(g),w=(yield dg.generateHashFileName(g))+"."+v,I={image_type:v,image_file_name:w,image_size:g.size,base64_sum:b},m=yield o.generateSignedInUrl(I);if(m.ok){const A=yield m.json(),E={"Content-Type":g.type,"Content-MD5":b};try{const O=new File([g],w,{type:g.type}),T=yield o.storeInBucket(A.data.signed_url,O,E);r(T,n),Pe.success(c)}catch(O){console.error("There was a problem with uploading the file: ",O),Pe.error(d)}}else console.error("There was a problem with generating signed in URL: ",yield m.json()),Pe.error(u)}catch(v){console.error("There was a problem with encrypting file...",v),Pe.error(f)}s(!1)}});return ae(De,{children:[ae("button",{className:`${au} eow-p-2 ${i?"eow-bg-gray-200":"eow-bg-white"} eow-border eow-border-gray-200`,onClick:()=>document.getElementById(p).click(),disabled:i,children:[j("img",{src:vn.upload,alt:"Upload",className:"eow-w-6 eow-h-6"}),j("span",{className:"eow-ml-1 eow-text-sm eow-text-gray-700",children:l})]}),j("input",{id:p,type:"file",className:"eow-hidden",accept:"image/*",onChange:h})]})},IF=({isUrlCopied:t,isDisabled:e,onClick:n})=>{const{copyUrl:r,copied:i}=Ie(Me);return j("button",{className:`${e?"":"hover:eow-bg-gray-100"} eow-rounded eow-p-2 eow-w-full eow-bg-white eow-border-gray-200 eow-border`,onClick:n,disabled:e,children:t?ae("span",{className:"eow-inline-flex eow-items-center",children:[j("svg",{className:"eow-w-3 eow-h-3 eow-text-brandColor eow-me-1.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12",children:j("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M1 5.917 5.724 10.5 15 1.5"})}),j("span",{className:"eow-text-xs eow-font-semibold eow-text-brandColor",children:i})]}):ae("span",{className:"eow-inline-flex eow-items-center",children:[j("svg",{className:"eow-w-3 eow-h-3 eow-me-1.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20",children:j("path",{d:"M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"})}),j("span",{className:"eow-text-xs eow-font-semibold",children:r})]})})},AF="https://uploads.fansunitedassets.com/sportal_bg/34f381025412708291999cd645e288e5.png",OF=({imageNode:t,setShowImagesContainer:e})=>j("button",{className:"eow-rounded eow-flex eow-items-center eow-p-2 eow-bg-white eow-border eow-border-gray-200 eow-mb-2",onClick:()=>{e(r=>se(Z({},r),{[t]:!r[t]}))},children:j("img",{src:AF,alt:"Sportal365 button",className:"eow-w-24 eow-h-6"})}),TF=t=>{const{previous:e,next:n}=Ie(Me);return j("div",{className:"eow-flex eow-items-baseline eow-flex-wrap",children:ae("div",{className:"eow-flex",children:[t.pageCount&&t.pageCount!==1&&j("button",{className:"eow-text-base eow-rounded-r-none focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition",onClick:t.getPreviousPage,children:ae("div",{className:"eow-flex eow-leading-5 eow-text-xs eow-items-center",children:[j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-left eow-w-4 eow-h-4",children:j("polyline",{points:"15 18 9 12 15 6"})}),e]})}),t.images&&t.images.data.length===20?j("button",{className:`eow-text-base ${t.pageCount!==1?"eow-text-xs eow-rounded-l-none eow-border-l-0":""} focus:eow-outline-none eow-flex eow-justify-center eow-px-4 eow-py-2 eow-rounded eow-font-bold eow-cursor-pointer hover:eow-bg-gray-200 eow-bg-gray-100 eow-text-gray-700 eow-border eow-duration-200 eow-ease-in-out eow-border-gray-300 eow-transition`,onClick:t.getNextPage,children:ae("div",{className:"eow-text-xs eow-flex eow-leading-5 eow-items-center",children:[n,j("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"eow-feather eow-feather-chevron-right eow-w-4 eow-h-4 eow-ml-1",children:j("polyline",{points:"9 18 15 12 9 6"})})]})}):j(De,{})]})})};var CF=In,SF=function(){return CF.Date.now()},PF=SF,MF=/\s/;function RF(t){for(var e=t.length;e--&&MF.test(t.charAt(e)););return e}var kF=RF,xF=kF,DF=/^\s+/;function FF(t){return t&&t.slice(0,xF(t)+1).replace(DF,"")}var NF=FF,LF=da,BF=fa,UF="[object Symbol]";function $F(t){return typeof t=="symbol"||BF(t)&&LF(t)==UF}var fg=$F,jF=NF,hg=zs,HF=fg,pg=0/0,VF=/^[-+]0x[0-9a-f]+$/i,qF=/^0b[01]+$/i,WF=/^0o[0-7]+$/i,GF=parseInt;function zF(t){if(typeof t=="number")return t;if(HF(t))return pg;if(hg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=hg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jF(t);var n=qF.test(t);return n||WF.test(t)?GF(t.slice(2),n?2:8):VF.test(t)?pg:+t}var QF=zF,YF=zs,qu=PF,mg=QF,KF="Expected a function",JF=Math.max,XF=Math.min;function ZF(t,e,n){var r,i,s,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(KF);e=mg(e)||0,YF(n)&&(d=!!n.leading,f="maxWait"in n,s=f?JF(mg(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p);function h(E){var O=r,T=i;return r=i=void 0,c=E,o=t.apply(T,O),o}function y(E){return c=E,l=setTimeout(b,e),d?h(E):o}function g(E){var O=E-u,T=E-c,x=e-O;return f?XF(x,s-T):x}function v(E){var O=E-u,T=E-c;return u===void 0||O>=e||O<0||f&&T>=s}function b(){var E=qu();if(v(E))return w(E);l=setTimeout(b,g(E))}function w(E){return l=void 0,p&&r?h(E):(r=i=void 0,o)}function I(){l!==void 0&&clearTimeout(l),c=0,r=u=i=l=void 0}function m(){return l===void 0?o:w(qu())}function A(){var E=qu(),O=v(E);if(r=arguments,i=this,u=E,O){if(l===void 0)return y(u);if(f)return clearTimeout(l),l=setTimeout(b,e),h(u)}return l===void 0&&(l=setTimeout(b,e)),o}return A.cancel=I,A.flush=m,A}var Wu=ZF;function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function Pr(t){return Pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(t)}function eN(t,e){if(Pr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gg(t){var e=eN(t,"string");return Pr(e)=="symbol"?e:e+""}function ui(t,e,n){return e=gg(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function we(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vg(Object(n),!0).forEach(function(r){ui(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gg(r.key),r)}}function nN(t,e,n){return e&&yg(t.prototype,e),n&&yg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gu(t,e){return Gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gu(t,e)}function rN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gu(t,e)}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},no(t)}function wg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wg=function(){return!!t})()}function iN(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aN(t,e){if(e&&(Pr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iN(t)}function sN(t){var e=wg();return function(){var r=no(t),i;if(e){var s=no(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return aN(this,i)}}function zu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oN(t){if(Array.isArray(t))return zu(t)}function lN(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bg(t,e){if(!!t){if(typeof t=="string")return zu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zu(t,e)}}function uN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2319
2319
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ci(t){return oN(t)||lN(t)||bg(t)||uN()}function cN(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function dN(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var fN=function(){function t(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dN(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=cN(i);try{s.insertRule(r,s.cssRules.length)}catch(o){}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t}(),Et="-ms-",ro="-moz-",Ue="-webkit-",_g="comm",Qu="rule",Yu="decl",hN="@import",Eg="@keyframes",pN="@layer",mN=Math.abs,io=String.fromCharCode,gN=Object.assign;function vN(t,e){return bt(t,0)^45?(((e<<2^bt(t,0))<<2^bt(t,1))<<2^bt(t,2))<<2^bt(t,3):0}function Ig(t){return t.trim()}function yN(t,e){return(t=e.exec(t))?t[0]:t}function $e(t,e,n){return t.replace(e,n)}function Ku(t,e){return t.indexOf(e)}function bt(t,e){return t.charCodeAt(e)|0}function ma(t,e,n){return t.slice(e,n)}function On(t){return t.length}function Ju(t){return t.length}function ao(t,e){return e.push(t),t}function wN(t,e){return t.map(e).join("")}var so=1,di=1,Ag=0,xt=0,ct=0,fi="";function oo(t,e,n,r,i,s,o){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:so,column:di,length:o,return:""}}function ga(t,e){return gN(oo("",null,null,"",null,null,0),t,{length:-t.length},e)}function bN(){return ct}function _N(){return ct=xt>0?bt(fi,--xt):0,di--,ct===10&&(di=1,so--),ct}function $t(){return ct=xt<Ag?bt(fi,xt++):0,di++,ct===10&&(di=1,so++),ct}function Tn(){return bt(fi,xt)}function lo(){return xt}function va(t,e){return ma(fi,t,e)}function ya(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Og(t){return so=di=1,Ag=On(fi=t),xt=0,[]}function Tg(t){return fi="",t}function uo(t){return Ig(va(xt-1,Xu(t===91?t+2:t===40?t+1:t)))}function EN(t){for(;(ct=Tn())&&ct<33;)$t();return ya(t)>2||ya(ct)>3?"":" "}function IN(t,e){for(;--e&&$t()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return va(t,lo()+(e<6&&Tn()==32&&$t()==32))}function Xu(t){for(;$t();)switch(ct){case t:return xt;case 34:case 39:t!==34&&t!==39&&Xu(ct);break;case 40:t===41&&Xu(t);break;case 92:$t();break}return xt}function AN(t,e){for(;$t()&&t+ct!==47+10;)if(t+ct===42+42&&Tn()===47)break;return"/*"+va(e,xt-1)+"*"+io(t===47?t:$t())}function ON(t){for(;!ya(Tn());)$t();return va(t,xt)}function TN(t){return Tg(co("",null,null,null,[""],t=Og(t),0,[0],t))}function co(t,e,n,r,i,s,o,l,u){for(var c=0,d=0,f=o,p=0,h=0,y=0,g=1,v=1,b=1,w=0,I="",m=i,A=s,E=r,O=I;v;)switch(y=w,w=$t()){case 40:if(y!=108&&bt(O,f-1)==58){Ku(O+=$e(uo(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:O+=uo(w);break;case 9:case 10:case 13:case 32:O+=EN(y);break;case 92:O+=IN(lo()-1,7);continue;case 47:switch(Tn()){case 42:case 47:ao(CN(AN($t(),lo()),e,n),u);break;default:O+="/"}break;case 123*g:l[c++]=On(O)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+d:b==-1&&(O=$e(O,/\f/g,"")),h>0&&On(O)-f&&ao(h>32?Sg(O+";",r,n,f-1):Sg($e(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if(ao(E=Cg(O,e,n,c,d,i,l,I,m=[],A=[],f),s),w===123)if(d===0)co(O,e,E,E,m,s,f,l,A);else switch(p===99&&bt(O,3)===110?100:p){case 100:case 108:case 109:case 115:co(t,E,E,r&&ao(Cg(t,E,E,0,0,i,l,I,i,m=[],f),A),i,A,f,l,r?m:A);break;default:co(O,E,E,E,[""],A,0,l,A)}}c=d=h=0,g=b=1,I=O="",f=o;break;case 58:f=1+On(O),h=y;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&_N()==125)continue}switch(O+=io(w),w*g){case 38:b=d>0?1:(O+="\f",-1);break;case 44:l[c++]=(On(O)-1)*b,b=1;break;case 64:Tn()===45&&(O+=uo($t())),p=Tn(),d=f=On(I=O+=ON(lo())),w++;break;case 45:y===45&&On(O)==2&&(g=0)}}return s}function Cg(t,e,n,r,i,s,o,l,u,c,d){for(var f=i-1,p=i===0?s:[""],h=Ju(p),y=0,g=0,v=0;y<r;++y)for(var b=0,w=ma(t,f+1,f=mN(g=o[y])),I=t;b<h;++b)(I=Ig(g>0?p[b]+" "+w:$e(w,/&\f/g,p[b])))&&(u[v++]=I);return oo(t,e,n,i===0?Qu:l,u,c,d)}function CN(t,e,n){return oo(t,e,n,_g,io(bN()),ma(t,2,-2),0)}function Sg(t,e,n,r){return oo(t,e,n,Yu,ma(t,0,r),ma(t,r+1,-1),r)}function hi(t,e){for(var n="",r=Ju(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function SN(t,e,n,r){switch(t.type){case pN:if(t.children.length)break;case hN:case Yu:return t.return=t.return||t.value;case _g:return"";case Eg:return t.return=t.value+"{"+hi(t.children,r)+"}";case Qu:t.value=t.props.join(",")}return On(n=hi(t.children,r))?t.return=t.value+"{"+n+"}":""}function PN(t){var e=Ju(t);return function(n,r,i,s){for(var o="",l=0;l<e;l++)o+=t[l](n,r,i,s)||"";return o}}function MN(t){return function(e){e.root||(e=e.return)&&t(e)}}function RN(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var kN=function(e,n,r){for(var i=0,s=0;i=s,s=Tn(),i===38&&s===12&&(n[r]=1),!ya(s);)$t();return va(e,xt)},xN=function(e,n){var r=-1,i=44;do switch(ya(i)){case 0:i===38&&Tn()===12&&(n[r]=1),e[r]+=kN(xt-1,n,r);break;case 2:e[r]+=uo(i);break;case 4:if(i===44){e[++r]=Tn()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=io(i)}while(i=$t());return e},DN=function(e,n){return Tg(xN(Og(e),n))},Pg=new WeakMap,FN=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Pg.get(r))&&!i){Pg.set(e,!0);for(var s=[],o=DN(n,s),l=r.props,u=0,c=0;u<o.length;u++)for(var d=0;d<l.length;d++,c++)e.props[c]=s[u]?o[u].replace(/&\f/g,l[d]):l[d]+" "+o[u]}}},NN=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Mg(t,e){switch(vN(t,e)){case 5103:return Ue+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ue+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Ue+t+ro+t+Et+t+t;case 6828:case 4268:return Ue+t+Et+t+t;case 6165:return Ue+t+Et+"flex-"+t+t;case 5187:return Ue+t+$e(t,/(\w+).+(:[^]+)/,Ue+"box-$1$2"+Et+"flex-$1$2")+t;case 5443:return Ue+t+Et+"flex-item-"+$e(t,/flex-|-self/,"")+t;case 4675:return Ue+t+Et+"flex-line-pack"+$e(t,/align-content|flex-|-self/,"")+t;case 5548:return Ue+t+Et+$e(t,"shrink","negative")+t;case 5292:return Ue+t+Et+$e(t,"basis","preferred-size")+t;case 6060:return Ue+"box-"+$e(t,"-grow","")+Ue+t+Et+$e(t,"grow","positive")+t;case 4554:return Ue+$e(t,/([^-])(transform)/g,"$1"+Ue+"$2")+t;case 6187:return $e($e($e(t,/(zoom-|grab)/,Ue+"$1"),/(image-set)/,Ue+"$1"),t,"")+t;case 5495:case 3959:return $e(t,/(image-set\([^]*)/,Ue+"$1$`$1");case 4968:return $e($e(t,/(.+:)(flex-)?(.*)/,Ue+"box-pack:$3"+Et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ue+t+t;case 4095:case 3583:case 4068:case 2532:return $e(t,/(.+)-inline(.+)/,Ue+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(On(t)-1-e>6)switch(bt(t,e+1)){case 109:if(bt(t,e+4)!==45)break;case 102:return $e(t,/(.+:)(.+)-([^]+)/,"$1"+Ue+"$2-$3$1"+ro+(bt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ku(t,"stretch")?Mg($e(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(bt(t,e+1)!==115)break;case 6444:switch(bt(t,On(t)-3-(~Ku(t,"!important")&&10))){case 107:return $e(t,":",":"+Ue)+t;case 101:return $e(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ue+(bt(t,14)===45?"inline-":"")+"box$3$1"+Ue+"$2$3$1"+Et+"$2box$3")+t}break;case 5936:switch(bt(t,e+11)){case 114:return Ue+t+Et+$e(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Ue+t+Et+$e(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Ue+t+Et+$e(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Ue+t+Et+t+t}return t}var LN=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Yu:e.return=Mg(e.value,e.length);break;case Eg:return hi([ga(e,{value:$e(e.value,"@","@"+Ue)})],i);case Qu:if(e.length)return wN(e.props,function(s){switch(yN(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return hi([ga(e,{props:[$e(s,/:(read-\w+)/,":"+ro+"$1")]})],i);case"::placeholder":return hi([ga(e,{props:[$e(s,/:(plac\w+)/,":"+Ue+"input-$1")]}),ga(e,{props:[$e(s,/:(plac\w+)/,":"+ro+"$1")]}),ga(e,{props:[$e(s,/:(plac\w+)/,Et+"input-$1")]})],i)}return""})}},BN=[LN],UN=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||BN,s={},o,l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)s[v[b]]=!0;l.push(g)});var u,c=[FN,NN];{var d,f=[SN,MN(function(g){d.insert(g)})],p=PN(c.concat(i,f)),h=function(v){return hi(TN(v),p)};u=function(v,b,w,I){d=w,h(v?v+"{"+b.styles+"}":b.styles),I&&(y.inserted[b.name]=!0)}}var y={key:n,sheet:new fN({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:u};return y.sheet.hydrate(l),y},Rg={exports:{}},ze={};/** @license React v16.13.1
|
|
2320
2320
|
* react-is.production.min.js
|
|
2321
2321
|
*
|
|
@@ -2324,12 +2324,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2324
2324
|
* This source code is licensed under the MIT license found in the
|
|
2325
2325
|
* LICENSE file in the root directory of this source tree.
|
|
2326
2326
|
*/var vt=typeof Symbol=="function"&&Symbol.for,Zu=vt?Symbol.for("react.element"):60103,ec=vt?Symbol.for("react.portal"):60106,fo=vt?Symbol.for("react.fragment"):60107,ho=vt?Symbol.for("react.strict_mode"):60108,po=vt?Symbol.for("react.profiler"):60114,mo=vt?Symbol.for("react.provider"):60109,go=vt?Symbol.for("react.context"):60110,tc=vt?Symbol.for("react.async_mode"):60111,vo=vt?Symbol.for("react.concurrent_mode"):60111,yo=vt?Symbol.for("react.forward_ref"):60112,wo=vt?Symbol.for("react.suspense"):60113,$N=vt?Symbol.for("react.suspense_list"):60120,bo=vt?Symbol.for("react.memo"):60115,_o=vt?Symbol.for("react.lazy"):60116,jN=vt?Symbol.for("react.block"):60121,HN=vt?Symbol.for("react.fundamental"):60117,VN=vt?Symbol.for("react.responder"):60118,qN=vt?Symbol.for("react.scope"):60119;function jt(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Zu:switch(t=t.type,t){case tc:case vo:case fo:case po:case ho:case wo:return t;default:switch(t=t&&t.$$typeof,t){case go:case yo:case _o:case bo:case mo:return t;default:return e}}case ec:return e}}}function kg(t){return jt(t)===vo}ze.AsyncMode=tc,ze.ConcurrentMode=vo,ze.ContextConsumer=go,ze.ContextProvider=mo,ze.Element=Zu,ze.ForwardRef=yo,ze.Fragment=fo,ze.Lazy=_o,ze.Memo=bo,ze.Portal=ec,ze.Profiler=po,ze.StrictMode=ho,ze.Suspense=wo,ze.isAsyncMode=function(t){return kg(t)||jt(t)===tc},ze.isConcurrentMode=kg,ze.isContextConsumer=function(t){return jt(t)===go},ze.isContextProvider=function(t){return jt(t)===mo},ze.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Zu},ze.isForwardRef=function(t){return jt(t)===yo},ze.isFragment=function(t){return jt(t)===fo},ze.isLazy=function(t){return jt(t)===_o},ze.isMemo=function(t){return jt(t)===bo},ze.isPortal=function(t){return jt(t)===ec},ze.isProfiler=function(t){return jt(t)===po},ze.isStrictMode=function(t){return jt(t)===ho},ze.isSuspense=function(t){return jt(t)===wo},ze.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===fo||t===vo||t===po||t===ho||t===wo||t===$N||typeof t=="object"&&t!==null&&(t.$$typeof===_o||t.$$typeof===bo||t.$$typeof===mo||t.$$typeof===go||t.$$typeof===yo||t.$$typeof===HN||t.$$typeof===VN||t.$$typeof===qN||t.$$typeof===jN)},ze.typeOf=jt,function(t){t.exports=ze}(Rg);var xg=Rg.exports,WN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},GN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Dg={};Dg[xg.ForwardRef]=WN,Dg[xg.Memo]=GN;var zN=!0;function QN(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var Fg=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||zN===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},YN=function(e,n,r){Fg(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+i:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function KN(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var JN={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},XN=/[A-Z]|^ms/g,ZN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ng=function(e){return e.charCodeAt(1)===45},Lg=function(e){return e!=null&&typeof e!="boolean"},nc=RN(function(t){return Ng(t)?t:t.replace(XN,"-$&").toLowerCase()}),Bg=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(ZN,function(r,i,s){return Cn={name:i,styles:s,next:Cn},i})}return JN[e]!==1&&!Ng(e)&&typeof n=="number"&&n!==0?n+"px":n},g3="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function wa(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Cn={name:n.name,styles:n.styles,next:Cn},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Cn={name:r.name,styles:r.styles,next:Cn},r=r.next;var i=n.styles+";";return i}return e2(t,e,n)}case"function":{if(t!==void 0){var s=Cn,o=n(t);return Cn=s,wa(t,e,o)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function e2(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=wa(t,e,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object")e!=null&&e[o]!==void 0?r+=s+"{"+e[o]+"}":Lg(o)&&(r+=nc(s)+":"+Bg(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)Lg(o[l])&&(r+=nc(s)+":"+Bg(s,o[l])+";");else{var u=wa(t,e,o);switch(s){case"animation":case"animationName":{r+=nc(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var Ug=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Cn,$g=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,s="";Cn=void 0;var o=e[0];o==null||o.raw===void 0?(i=!1,s+=wa(r,n,o)):s+=o[0];for(var l=1;l<e.length;l++)s+=wa(r,n,e[l]),i&&(s+=o[l]);Ug.lastIndex=0;for(var u="",c;(c=Ug.exec(s))!==null;)u+="-"+c[1];var d=KN(s)+u;return{name:d,styles:s,next:Cn}},t2=function(e){return e()},n2=nt["useInsertionEffect"]?nt["useInsertionEffect"]:!1,r2=n2||t2,rc={}.hasOwnProperty,jg=nt.createContext(typeof HTMLElement!="undefined"?UN({key:"css"}):null);jg.Provider;var i2=function(e){return K.forwardRef(function(n,r){var i=K.useContext(jg);return e(n,i,r)})},a2=nt.createContext({}),ic="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",s2=function(e,n){var r={};for(var i in n)rc.call(n,i)&&(r[i]=n[i]);return r[ic]=e,r},o2=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return Fg(n,r,i),r2(function(){return YN(n,r,i)}),null},l2=i2(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[ic],s=[r],o="";typeof t.className=="string"?o=QN(e.registered,s,t.className):t.className!=null&&(o=t.className+" ");var l=$g(s,void 0,nt.useContext(a2));o+=e.key+"-"+l.name;var u={};for(var c in t)rc.call(t,c)&&c!=="css"&&c!==ic&&(u[c]=t[c]);return u.ref=n,u.className=o,ae(De,{children:[j(o2,{cache:e,serialized:l,isStringTag:typeof i=="string"}),j(i,Z({},u))]})}),u2=l2,be=function(e,n){var r=arguments;if(n==null||!rc.call(n,"css"))return nt.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=u2,s[1]=s2(e,n);for(var o=2;o<i;o++)s[o]=r[o];return nt.createElement.apply(null,s)};function ac(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $g(e)}var c2=function(){var e=ac.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function d2(t){if(Array.isArray(t))return t}function f2(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,l=[],u=!0,c=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=s.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(d){c=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}function h2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2327
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(t,e){return d2(t)||f2(t,e)||bg(t,e)||h2()}function p2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function an(t,e){if(t==null)return{};var n=p2(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function m2(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}const Hg=["top","right","bottom","left"],Vg=["start","end"],qg=Hg.reduce((t,e)=>t.concat(e,e+"-"+Vg[0],e+"-"+Vg[1]),[]),Hn=Math.min,sn=Math.max,Eo=Math.round,Io=Math.floor,Ao=t=>({x:t,y:t}),g2={left:"right",right:"left",bottom:"top",top:"bottom"},v2={start:"end",end:"start"};function sc(t,e,n){return sn(t,Hn(e,n))}function Sn(t,e){return typeof t=="function"?t(e):t}function on(t){return t.split("-")[0]}function Vn(t){return t.split("-")[1]}function oc(t){return t==="x"?"y":"x"}function Wg(t){return t==="y"?"height":"width"}function ba(t){return["top","bottom"].includes(on(t))?"y":"x"}function Gg(t){return oc(ba(t))}function zg(t,e,n){n===void 0&&(n=!1);const r=Vn(t),i=Gg(t),s=Wg(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=To(o)),[o,To(o)]}function y2(t){const e=To(t);return[Oo(t),e,Oo(e)]}function Oo(t){return t.replace(/start|end/g,e=>v2[e])}function w2(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function b2(t,e,n,r){const i=Vn(t);let s=w2(on(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Oo)))),s}function To(t){return t.replace(/left|right|bottom|top/g,e=>g2[e])}function _2(t){return Z({top:0,right:0,bottom:0,left:0},t)}function lc(t){return typeof t!="number"?_2(t):{top:t,right:t,bottom:t,left:t}}function _a(t){return se(Z({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function pi(t,e){return _(this,null,function*(){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Sn(e,t),y=lc(h),v=l[p?f==="floating"?"reference":"floating":f],b=_a(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(v))==null||n?v:v.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),w=f==="floating"?se(Z({},o.floating),{x:r,y:i}):o.reference,I=yield s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating),m=(yield s.isElement==null?void 0:s.isElement(I))?(yield s.getScale==null?void 0:s.getScale(I))||{x:1,y:1}:{x:1,y:1},A=_a(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:I,strategy:u}):w);return{top:(b.top-A.top+y.top)/m.y,bottom:(A.bottom-b.bottom+y.bottom)/m.y,left:(b.left-A.left+y.left)/m.x,right:(A.right-b.right+y.right)/m.x}})}const E2=t=>({name:"arrow",options:t,fn(n){return _(this,null,function*(){const{x:r,y:i,placement:s,rects:o,platform:l,elements:u,middlewareData:c}=n,{element:d,padding:f=0}=Sn(t,n)||{};if(d==null)return{};const p=lc(f),h={x:r,y:i},y=Gg(s),g=Wg(y),v=yield l.getDimensions(d),b=y==="y",w=b?"top":"left",I=b?"bottom":"right",m=b?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[y]-h[y]-o.floating[g],E=h[y]-o.reference[y],O=yield l.getOffsetParent==null?void 0:l.getOffsetParent(d);let T=O?O[m]:0;(!T||!(yield l.isElement==null?void 0:l.isElement(O)))&&(T=u.floating[m]||o.floating[g]);const x=A/2-E/2,P=T/2-v[g]/2-1,S=Hn(p[w],P),M=Hn(p[I],P),D=S,L=T-v[g]-M,F=T/2-v[g]/2+x,H=sc(D,F,L),q=!c.arrow&&Vn(s)!=null&&F!==H&&o.reference[g]/2-(F<D?S:M)-v[g]/2<0,z=q?F<D?F-D:F-L:0;return{[y]:h[y]+z,data:Z({[y]:H,centerOffset:F-H-z},q&&{alignmentOffset:z}),reset:q}})}});function I2(t,e,n){return(t?[...n.filter(i=>Vn(i)===t),...n.filter(i=>Vn(i)!==t)]:n.filter(i=>on(i)===i)).filter(i=>t?Vn(i)===t||(e?Oo(i)!==i:!1):!0)}const A2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,fn(n){return _(this,null,function*(){var r,i,s;const{rects:o,middlewareData:l,placement:u,platform:c,elements:d}=n,S=Sn(t,n),{crossAxis:f=!1,alignment:p,allowedPlacements:h=qg,autoAlignment:y=!0}=S,g=Gn(S,["crossAxis","alignment","allowedPlacements","autoAlignment"]),v=p!==void 0||h===qg?I2(p||null,y,h):h,b=yield pi(n,g),w=((r=l.autoPlacement)==null?void 0:r.index)||0,I=v[w];if(I==null)return{};const m=zg(I,o,yield c.isRTL==null?void 0:c.isRTL(d.floating));if(u!==I)return{reset:{placement:v[0]}};const A=[b[on(I)],b[m[0]],b[m[1]]],E=[...((i=l.autoPlacement)==null?void 0:i.overflows)||[],{placement:I,overflows:A}],O=v[w+1];if(O)return{data:{index:w+1,overflows:E},reset:{placement:O}};const T=E.map(M=>{const D=Vn(M.placement);return[M.placement,D&&f?M.overflows.slice(0,2).reduce((L,F)=>L+F,0):M.overflows[0],M.overflows]}).sort((M,D)=>M[1]-D[1]),P=((s=T.filter(M=>M[2].slice(0,Vn(M[0])?2:3).every(D=>D<=0))[0])==null?void 0:s[0])||T[0][0];return P!==u?{data:{index:w+1,overflows:E},reset:{placement:P}}:{}})}}},O2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,fn(n){return _(this,null,function*(){var r,i;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:c,elements:d}=n,D=Sn(t,n),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=D,b=Gn(D,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const w=on(s),I=on(u)===u,m=yield c.isRTL==null?void 0:c.isRTL(d.floating),A=h||(I||!v?[To(u)]:y2(u));!h&&g!=="none"&&A.push(...b2(u,v,g,m));const E=[u,...A],O=yield pi(n,b),T=[];let x=((i=o.flip)==null?void 0:i.overflows)||[];if(f&&T.push(O[w]),p){const L=zg(s,l,m);T.push(O[L[0]],O[L[1]])}if(x=[...x,{placement:s,overflows:T}],!T.every(L=>L<=0)){var P,S;const L=(((P=o.flip)==null?void 0:P.index)||0)+1,F=E[L];if(F)return{data:{index:L,overflows:x},reset:{placement:F}};let H=(S=x.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:S.placement;if(!H)switch(y){case"bestFit":{var M;const q=(M=x.map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,N)=>U+N,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:M[0];q&&(H=q);break}case"initialPlacement":H=u;break}if(s!==H)return{reset:{placement:H}}}return{}})}}};function Qg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Yg(t){return Hg.some(e=>t[e]>=0)}const T2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,fn(n){return _(this,null,function*(){const{rects:r}=n,o=Sn(t,n),{strategy:i="referenceHidden"}=o,s=Gn(o,["strategy"]);switch(i){case"referenceHidden":{const l=yield pi(n,se(Z({},s),{elementContext:"reference"})),u=Qg(l,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Yg(u)}}}case"escaped":{const l=yield pi(n,se(Z({},s),{altBoundary:!0})),u=Qg(l,r.floating);return{data:{escapedOffsets:u,escaped:Yg(u)}}}default:return{}}})}}};function Kg(t){const e=Hn(...t.map(s=>s.left)),n=Hn(...t.map(s=>s.top)),r=sn(...t.map(s=>s.right)),i=sn(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function C2(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>_a(Kg(i)))}const S2=function(t){return t===void 0&&(t={}),{name:"inline",options:t,fn(n){return _(this,null,function*(){const{placement:r,elements:i,rects:s,platform:o,strategy:l}=n,{padding:u=2,x:c,y:d}=Sn(t,n),f=Array.from((yield o.getClientRects==null?void 0:o.getClientRects(i.reference))||[]),p=C2(f),h=_a(Kg(f)),y=lc(u);function g(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&d!=null)return p.find(b=>c>b.left-y.left&&c<b.right+y.right&&d>b.top-y.top&&d<b.bottom+y.bottom)||h;if(p.length>=2){if(ba(r)==="y"){const S=p[0],M=p[p.length-1],D=on(r)==="top",L=S.top,F=M.bottom,H=D?S.left:M.left,q=D?S.right:M.right,z=q-H,U=F-L;return{top:L,bottom:F,left:H,right:q,width:z,height:U,x:H,y:L}}const b=on(r)==="left",w=sn(...p.map(S=>S.right)),I=Hn(...p.map(S=>S.left)),m=p.filter(S=>b?S.left===I:S.right===w),A=m[0].top,E=m[m.length-1].bottom,O=I,T=w,x=T-O,P=E-A;return{top:A,bottom:E,left:O,right:T,width:x,height:P,x:O,y:A}}return h}const v=yield o.getElementRects({reference:{getBoundingClientRect:g},floating:i.floating,strategy:l});return s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height?{reset:{rects:v}}:{}})}}},P2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,fn(n){return _(this,null,function*(){const{x:r,y:i,placement:s}=n,b=Sn(t,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:w=>{let{x:I,y:m}=w;return{x:I,y:m}}}}=b,c=Gn(b,["mainAxis","crossAxis","limiter"]),d={x:r,y:i},f=yield pi(n,c),p=ba(on(s)),h=oc(p);let y=d[h],g=d[p];if(o){const w=h==="y"?"top":"left",I=h==="y"?"bottom":"right",m=y+f[w],A=y-f[I];y=sc(m,y,A)}if(l){const w=p==="y"?"top":"left",I=p==="y"?"bottom":"right",m=g+f[w],A=g-f[I];g=sc(m,g,A)}const v=u.fn(se(Z({},n),{[h]:y,[p]:g}));return se(Z({},v),{data:{x:v.x-r,y:v.y-i}})})}}},M2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=Sn(t,e),d={x:n,y:r},f=ba(i),p=oc(f);let h=d[p],y=d[f];const g=Sn(l,e),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:Z({mainAxis:0,crossAxis:0},g);if(u){const I=p==="y"?"height":"width",m=s.reference[p]-s.floating[I]+v.mainAxis,A=s.reference[p]+s.reference[I]-v.mainAxis;h<m?h=m:h>A&&(h=A)}if(c){var b,w;const I=p==="y"?"width":"height",m=["top","left"].includes(on(i)),A=s.reference[f]-s.floating[I]+(m&&((b=o.offset)==null?void 0:b[f])||0)+(m?0:v.crossAxis),E=s.reference[f]+s.reference[I]+(m?0:((w=o.offset)==null?void 0:w[f])||0)-(m?v.crossAxis:0);y<A?y=A:y>E&&(y=E)}return{[p]:h,[f]:y}}}},R2=function(t){return t===void 0&&(t={}),{name:"size",options:t,fn(n){return _(this,null,function*(){const{placement:r,rects:i,platform:s,elements:o}=n,O=Sn(t,n),{apply:l=()=>{}}=O,u=Gn(O,["apply"]),c=yield pi(n,u),d=on(r),f=Vn(r),p=ba(r)==="y",{width:h,height:y}=i.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===((yield s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const b=y-c[g],w=h-c[v],I=!n.middlewareData.shift;let m=b,A=w;if(p){const T=h-c.left-c.right;A=f||I?Hn(w,T):T}else{const T=y-c.top-c.bottom;m=f||I?Hn(b,T):T}if(I&&!f){const T=sn(c.left,0),x=sn(c.right,0),P=sn(c.top,0),S=sn(c.bottom,0);p?A=h-2*(T!==0||x!==0?T+x:sn(c.left,c.right)):m=y-2*(P!==0||S!==0?P+S:sn(c.top,c.bottom))}yield l(se(Z({},n),{availableWidth:A,availableHeight:m}));const E=yield s.getDimensions(o.floating);return h!==E.width||y!==E.height?{reset:{rects:!0}}:{}})}}};function Jg(t){return Zg(t)?(t.nodeName||"").toLowerCase():"#document"}function ln(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xg(t){var e;return(e=(Zg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Zg(t){return t instanceof Node||t instanceof ln(t).Node}function uc(t){return t instanceof Element||t instanceof ln(t).Element}function cc(t){return t instanceof HTMLElement||t instanceof ln(t).HTMLElement}function ev(t){return typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof ln(t).ShadowRoot}function tv(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=dc(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function k2(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function x2(t){return["html","body","#document"].includes(Jg(t))}function dc(t){return ln(t).getComputedStyle(t)}function D2(t){if(Jg(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ev(t)&&t.host||Xg(t);return ev(e)?e.host:e}function nv(t){const e=D2(t);return x2(e)?t.ownerDocument?t.ownerDocument.body:t.body:cc(e)&&tv(e)?e:nv(e)}function Co(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=nv(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ln(i);return s?e.concat(o,o.visualViewport||[],tv(i)?i:[],o.frameElement&&n?Co(o.frameElement):[]):e.concat(i,Co(i,[],n))}function F2(t){const e=dc(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=cc(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=Eo(n)!==s||Eo(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function fc(t){return uc(t)?t:t.contextElement}function hc(t){const e=fc(t);if(!cc(e))return Ao(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=F2(e);let o=(s?Eo(n.width):n.width)/r,l=(s?Eo(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const N2=Ao(0);function L2(t){const e=ln(t);return!k2()||!e.visualViewport?N2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function B2(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ln(t)?!1:e}function rv(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=fc(t);let o=Ao(1);e&&(r?uc(r)&&(o=hc(r)):o=hc(t));const l=B2(s,n,r)?L2(s):Ao(0);let u=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const p=ln(s),h=r&&uc(r)?ln(r):r;let y=p,g=y.frameElement;for(;g&&r&&h!==y;){const v=hc(g),b=g.getBoundingClientRect(),w=dc(g),I=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,m=b.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;u*=v.x,c*=v.y,d*=v.x,f*=v.y,u+=I,c+=m,y=ln(g),g=y.frameElement}}return _a({width:d,height:f,x:u,y:c})}function U2(t,e){let n=null,r;const i=Xg(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const{left:c,top:d,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const h=Io(d),y=Io(i.clientWidth-(c+f)),g=Io(i.clientHeight-(d+p)),v=Io(c),w={rootMargin:-h+"px "+-y+"px "+-g+"px "+-v+"px",threshold:sn(0,Hn(1,u))||1};let I=!0;function m(A){const E=A[0].intersectionRatio;if(E!==u){if(!I)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(m,se(Z({},w),{root:i.ownerDocument}))}catch(A){n=new IntersectionObserver(m,w)}n.observe(t)}return o(!0),s}function $2(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=fc(t),d=i||s?[...c?Co(c):[],...Co(e)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=c&&l?U2(c,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var I;(I=h)==null||I.observe(e)})),n()}),c&&!u&&h.observe(c),h.observe(e));let y,g=u?rv(t):null;u&&v();function v(){const b=rv(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,u&&cancelAnimationFrame(y)}}var pc=K.useLayoutEffect,j2=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],So=function(){};function H2(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function V2(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=[].concat(r);if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&s.push("".concat(H2(t,o)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Po=function(e){return Z2(e)?e.filter(Boolean):Pr(e)==="object"&&e!==null?[e]:[]},iv=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=an(e,j2);return we({},n)},rt=function(e,n,r){var i=e.cx,s=e.getStyles,o=e.getClassNames,l=e.className;return{css:s(n,e),className:i(r!=null?r:{},o(n,e),l)}};function q2(t,e,n){if(n){var r=n(t,e);if(typeof r=="string")return r}return t}function Mo(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function W2(t){return Mo(t)?window.innerHeight:t.clientHeight}function av(t){return Mo(t)?window.pageYOffset:t.scrollTop}function Ro(t,e){if(Mo(t)){window.scrollTo(0,e);return}t.scrollTop=e}function G2(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function z2(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function ko(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:So,i=av(t),s=e-i,o=10,l=0;function u(){l+=o;var c=z2(l,i,s,n);Ro(t,c),l<n?window.requestAnimationFrame(u):r(t)}u()}function sv(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?Ro(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&Ro(t,Math.max(e.offsetTop-i,0))}function Q2(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function ov(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}function Y2(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}var lv=!1,K2={get passive(){return lv=!0}},xo=typeof window!="undefined"?window:{};xo.addEventListener&&xo.removeEventListener&&(xo.addEventListener("p",So,K2),xo.removeEventListener("p",So,!1));var J2=lv;function X2(t){return t!=null}function Z2(t){return Array.isArray(t)}function Ea(t,e,n){return t?e:n}function v3(t){return t}function y3(t){return t}var eL=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=Object.entries(e).filter(function(o){var l=yt(o,1),u=l[0];return!r.includes(u)});return s.reduce(function(o,l){var u=yt(l,2),c=u[0],d=u[1];return o[c]=d,o},{})},tL=["children","innerProps"],nL=["children","innerProps"];function rL(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,s=t.shouldScroll,o=t.isFixedPosition,l=t.controlHeight,u=G2(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var d=u.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),h=p.bottom,y=p.height,g=p.top,v=n.offsetParent.getBoundingClientRect(),b=v.top,w=o?window.innerHeight:W2(u),I=av(u),m=parseInt(getComputedStyle(n).marginBottom,10),A=parseInt(getComputedStyle(n).marginTop,10),E=b-A,O=w-g,T=E+I,x=f-I-g,P=h-w+I+m,S=I+g-A,M=160;switch(i){case"auto":case"bottom":if(O>=y)return{placement:"bottom",maxHeight:e};if(x>=y&&!o)return s&&ko(u,P,M),{placement:"bottom",maxHeight:e};if(!o&&x>=r||o&&O>=r){s&&ko(u,P,M);var D=o?O-m:x-m;return{placement:"bottom",maxHeight:D}}if(i==="auto"||o){var L=e,F=o?E:T;return F>=r&&(L=Math.min(F-m-l,e)),{placement:"top",maxHeight:L}}if(i==="bottom")return s&&Ro(u,P),{placement:"bottom",maxHeight:e};break;case"top":if(E>=y)return{placement:"top",maxHeight:e};if(T>=y&&!o)return s&&ko(u,S,M),{placement:"top",maxHeight:e};if(!o&&T>=r||o&&E>=r){var H=e;return(!o&&T>=r||o&&E>=r)&&(H=o?E-A:T-A),s&&ko(u,S,M),{placement:"top",maxHeight:H}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function iL(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var uv=function(e){return e==="auto"?"bottom":e},aL=function(e,n){var r,i=e.placement,s=e.theme,o=s.borderRadius,l=s.spacing,u=s.colors;return we((r={label:"menu"},ui(r,iL(i),"100%"),ui(r,"position","absolute"),ui(r,"width","100%"),ui(r,"zIndex",1),r),n?{}:{backgroundColor:u.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},cv=K.createContext(null),sL=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,s=e.menuPlacement,o=e.menuPosition,l=e.menuShouldScrollIntoView,u=e.theme,c=K.useContext(cv)||{},d=c.setPortalPlacement,f=K.useRef(null),p=K.useState(i),h=yt(p,2),y=h[0],g=h[1],v=K.useState(null),b=yt(v,2),w=b[0],I=b[1],m=u.spacing.controlHeight;return pc(function(){var A=f.current;if(!!A){var E=o==="fixed",O=l&&!E,T=rL({maxHeight:i,menuEl:A,minHeight:r,placement:s,shouldScroll:O,isFixedPosition:E,controlHeight:m});g(T.maxHeight),I(T.placement),d==null||d(T.placement)}},[i,s,o,l,r,d,m]),n({ref:f,placerProps:we(we({},e),{},{placement:w||uv(s),maxHeight:y})})},oL=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return be("div",Ge({},rt(e,"menu",{menu:!0}),{ref:r},i),n)},lL=oL,uL=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return we({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},cL=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,s=e.isMulti;return be("div",Ge({},rt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:i},r),n)},dv=function(e,n){var r=e.theme,i=r.spacing.baseUnit,s=r.colors;return we({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},dL=dv,fL=dv,hL=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,s=an(e,tL);return be("div",Ge({},rt(we(we({},s),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},pL=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,s=an(e,nL);return be("div",Ge({},rt(we(we({},s),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},mL=function(e){var n=e.rect,r=e.offset,i=e.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},gL=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,s=e.innerProps,o=e.menuPlacement,l=e.menuPosition,u=K.useRef(null),c=K.useRef(null),d=K.useState(uv(o)),f=yt(d,2),p=f[0],h=f[1],y=K.useMemo(function(){return{setPortalPlacement:h}},[]),g=K.useState(null),v=yt(g,2),b=v[0],w=v[1],I=K.useCallback(function(){if(!!i){var O=Q2(i),T=l==="fixed"?0:window.pageYOffset,x=O[p]+T;(x!==(b==null?void 0:b.offset)||O.left!==(b==null?void 0:b.rect.left)||O.width!==(b==null?void 0:b.rect.width))&&w({offset:x,rect:O})}},[i,l,p,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);pc(function(){I()},[I]);var m=K.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&u.current&&(c.current=$2(i,u.current,I,{elementResize:"ResizeObserver"in window}))},[i,I]);pc(function(){m()},[m]);var A=K.useCallback(function(O){u.current=O,m()},[m]);if(!n&&l!=="fixed"||!b)return null;var E=be("div",Ge({ref:A},rt(we(we({},e),{},{offset:b.offset,position:l,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return be(cv.Provider,{value:y},n?We.createPortal(E,n):E)},vL=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},yL=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,s=e.isRtl;return be("div",Ge({},rt(e,"container",{"--is-disabled":i,"--is-rtl":s}),r),n)},wL=function(e,n){var r=e.theme.spacing,i=e.isMulti,s=e.hasValue,o=e.selectProps.controlShouldRenderValue;return we({alignItems:"center",display:i&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},bL=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,s=e.hasValue;return be("div",Ge({},rt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s}),r),n)},_L=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},EL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"indicatorsContainer",{indicators:!0}),r),n)},fv,IL=["size"],AL=["innerProps","isRtl","size"],OL={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},hv=function(e){var n=e.size,r=an(e,IL);return be("svg",Ge({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:OL},r))},mc=function(e){return be(hv,Ge({size:20},e),be("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},pv=function(e){return be(hv,Ge({size:20},e),be("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},mv=function(e,n){var r=e.isFocused,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return we({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2,":hover":{color:r?o.neutral80:o.neutral40}})},TL=mv,CL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||be(pv,null))},SL=mv,PL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||be(mc,null))},ML=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return we({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},RL=function(e){var n=e.innerProps;return be("span",Ge({},n,rt(e,"indicatorSeparator",{"indicator-separator":!0})))},kL=c2(fv||(fv=m2([`
|
|
2327
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(t,e){return d2(t)||f2(t,e)||bg(t,e)||h2()}function p2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function an(t,e){if(t==null)return{};var n=p2(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function m2(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}const Hg=["top","right","bottom","left"],Vg=["start","end"],qg=Hg.reduce((t,e)=>t.concat(e,e+"-"+Vg[0],e+"-"+Vg[1]),[]),Hn=Math.min,sn=Math.max,Eo=Math.round,Io=Math.floor,Ao=t=>({x:t,y:t}),g2={left:"right",right:"left",bottom:"top",top:"bottom"},v2={start:"end",end:"start"};function sc(t,e,n){return sn(t,Hn(e,n))}function Sn(t,e){return typeof t=="function"?t(e):t}function on(t){return t.split("-")[0]}function Vn(t){return t.split("-")[1]}function oc(t){return t==="x"?"y":"x"}function Wg(t){return t==="y"?"height":"width"}function ba(t){return["top","bottom"].includes(on(t))?"y":"x"}function Gg(t){return oc(ba(t))}function zg(t,e,n){n===void 0&&(n=!1);const r=Vn(t),i=Gg(t),s=Wg(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=To(o)),[o,To(o)]}function y2(t){const e=To(t);return[Oo(t),e,Oo(e)]}function Oo(t){return t.replace(/start|end/g,e=>v2[e])}function w2(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function b2(t,e,n,r){const i=Vn(t);let s=w2(on(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Oo)))),s}function To(t){return t.replace(/left|right|bottom|top/g,e=>g2[e])}function _2(t){return Z({top:0,right:0,bottom:0,left:0},t)}function lc(t){return typeof t!="number"?_2(t):{top:t,right:t,bottom:t,left:t}}function _a(t){return se(Z({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function pi(t,e){return _(this,null,function*(){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Sn(e,t),y=lc(h),v=l[p?f==="floating"?"reference":"floating":f],b=_a(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(v))==null||n?v:v.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),w=f==="floating"?se(Z({},o.floating),{x:r,y:i}):o.reference,I=yield s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating),m=(yield s.isElement==null?void 0:s.isElement(I))?(yield s.getScale==null?void 0:s.getScale(I))||{x:1,y:1}:{x:1,y:1},A=_a(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:I,strategy:u}):w);return{top:(b.top-A.top+y.top)/m.y,bottom:(A.bottom-b.bottom+y.bottom)/m.y,left:(b.left-A.left+y.left)/m.x,right:(A.right-b.right+y.right)/m.x}})}const E2=t=>({name:"arrow",options:t,fn(n){return _(this,null,function*(){const{x:r,y:i,placement:s,rects:o,platform:l,elements:u,middlewareData:c}=n,{element:d,padding:f=0}=Sn(t,n)||{};if(d==null)return{};const p=lc(f),h={x:r,y:i},y=Gg(s),g=Wg(y),v=yield l.getDimensions(d),b=y==="y",w=b?"top":"left",I=b?"bottom":"right",m=b?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[y]-h[y]-o.floating[g],E=h[y]-o.reference[y],O=yield l.getOffsetParent==null?void 0:l.getOffsetParent(d);let T=O?O[m]:0;(!T||!(yield l.isElement==null?void 0:l.isElement(O)))&&(T=u.floating[m]||o.floating[g]);const x=A/2-E/2,P=T/2-v[g]/2-1,S=Hn(p[w],P),R=Hn(p[I],P),D=S,L=T-v[g]-R,N=T/2-v[g]/2+x,H=sc(D,N,L),q=!c.arrow&&Vn(s)!=null&&N!==H&&o.reference[g]/2-(N<D?S:R)-v[g]/2<0,z=q?N<D?N-D:N-L:0;return{[y]:h[y]+z,data:Z({[y]:H,centerOffset:N-H-z},q&&{alignmentOffset:z}),reset:q}})}});function I2(t,e,n){return(t?[...n.filter(i=>Vn(i)===t),...n.filter(i=>Vn(i)!==t)]:n.filter(i=>on(i)===i)).filter(i=>t?Vn(i)===t||(e?Oo(i)!==i:!1):!0)}const A2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,fn(n){return _(this,null,function*(){var r,i,s;const{rects:o,middlewareData:l,placement:u,platform:c,elements:d}=n,S=Sn(t,n),{crossAxis:f=!1,alignment:p,allowedPlacements:h=qg,autoAlignment:y=!0}=S,g=Gn(S,["crossAxis","alignment","allowedPlacements","autoAlignment"]),v=p!==void 0||h===qg?I2(p||null,y,h):h,b=yield pi(n,g),w=((r=l.autoPlacement)==null?void 0:r.index)||0,I=v[w];if(I==null)return{};const m=zg(I,o,yield c.isRTL==null?void 0:c.isRTL(d.floating));if(u!==I)return{reset:{placement:v[0]}};const A=[b[on(I)],b[m[0]],b[m[1]]],E=[...((i=l.autoPlacement)==null?void 0:i.overflows)||[],{placement:I,overflows:A}],O=v[w+1];if(O)return{data:{index:w+1,overflows:E},reset:{placement:O}};const T=E.map(R=>{const D=Vn(R.placement);return[R.placement,D&&f?R.overflows.slice(0,2).reduce((L,N)=>L+N,0):R.overflows[0],R.overflows]}).sort((R,D)=>R[1]-D[1]),P=((s=T.filter(R=>R[2].slice(0,Vn(R[0])?2:3).every(D=>D<=0))[0])==null?void 0:s[0])||T[0][0];return P!==u?{data:{index:w+1,overflows:E},reset:{placement:P}}:{}})}}},O2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,fn(n){return _(this,null,function*(){var r,i;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:c,elements:d}=n,D=Sn(t,n),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=D,b=Gn(D,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const w=on(s),I=on(u)===u,m=yield c.isRTL==null?void 0:c.isRTL(d.floating),A=h||(I||!v?[To(u)]:y2(u));!h&&g!=="none"&&A.push(...b2(u,v,g,m));const E=[u,...A],O=yield pi(n,b),T=[];let x=((i=o.flip)==null?void 0:i.overflows)||[];if(f&&T.push(O[w]),p){const L=zg(s,l,m);T.push(O[L[0]],O[L[1]])}if(x=[...x,{placement:s,overflows:T}],!T.every(L=>L<=0)){var P,S;const L=(((P=o.flip)==null?void 0:P.index)||0)+1,N=E[L];if(N)return{data:{index:L,overflows:x},reset:{placement:N}};let H=(S=x.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:S.placement;if(!H)switch(y){case"bestFit":{var R;const q=(R=x.map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,F)=>U+F,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:R[0];q&&(H=q);break}case"initialPlacement":H=u;break}if(s!==H)return{reset:{placement:H}}}return{}})}}};function Qg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Yg(t){return Hg.some(e=>t[e]>=0)}const T2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,fn(n){return _(this,null,function*(){const{rects:r}=n,o=Sn(t,n),{strategy:i="referenceHidden"}=o,s=Gn(o,["strategy"]);switch(i){case"referenceHidden":{const l=yield pi(n,se(Z({},s),{elementContext:"reference"})),u=Qg(l,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Yg(u)}}}case"escaped":{const l=yield pi(n,se(Z({},s),{altBoundary:!0})),u=Qg(l,r.floating);return{data:{escapedOffsets:u,escaped:Yg(u)}}}default:return{}}})}}};function Kg(t){const e=Hn(...t.map(s=>s.left)),n=Hn(...t.map(s=>s.top)),r=sn(...t.map(s=>s.right)),i=sn(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function C2(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>_a(Kg(i)))}const S2=function(t){return t===void 0&&(t={}),{name:"inline",options:t,fn(n){return _(this,null,function*(){const{placement:r,elements:i,rects:s,platform:o,strategy:l}=n,{padding:u=2,x:c,y:d}=Sn(t,n),f=Array.from((yield o.getClientRects==null?void 0:o.getClientRects(i.reference))||[]),p=C2(f),h=_a(Kg(f)),y=lc(u);function g(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&d!=null)return p.find(b=>c>b.left-y.left&&c<b.right+y.right&&d>b.top-y.top&&d<b.bottom+y.bottom)||h;if(p.length>=2){if(ba(r)==="y"){const S=p[0],R=p[p.length-1],D=on(r)==="top",L=S.top,N=R.bottom,H=D?S.left:R.left,q=D?S.right:R.right,z=q-H,U=N-L;return{top:L,bottom:N,left:H,right:q,width:z,height:U,x:H,y:L}}const b=on(r)==="left",w=sn(...p.map(S=>S.right)),I=Hn(...p.map(S=>S.left)),m=p.filter(S=>b?S.left===I:S.right===w),A=m[0].top,E=m[m.length-1].bottom,O=I,T=w,x=T-O,P=E-A;return{top:A,bottom:E,left:O,right:T,width:x,height:P,x:O,y:A}}return h}const v=yield o.getElementRects({reference:{getBoundingClientRect:g},floating:i.floating,strategy:l});return s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height?{reset:{rects:v}}:{}})}}},P2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,fn(n){return _(this,null,function*(){const{x:r,y:i,placement:s}=n,b=Sn(t,n),{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:w=>{let{x:I,y:m}=w;return{x:I,y:m}}}}=b,c=Gn(b,["mainAxis","crossAxis","limiter"]),d={x:r,y:i},f=yield pi(n,c),p=ba(on(s)),h=oc(p);let y=d[h],g=d[p];if(o){const w=h==="y"?"top":"left",I=h==="y"?"bottom":"right",m=y+f[w],A=y-f[I];y=sc(m,y,A)}if(l){const w=p==="y"?"top":"left",I=p==="y"?"bottom":"right",m=g+f[w],A=g-f[I];g=sc(m,g,A)}const v=u.fn(se(Z({},n),{[h]:y,[p]:g}));return se(Z({},v),{data:{x:v.x-r,y:v.y-i}})})}}},M2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=Sn(t,e),d={x:n,y:r},f=ba(i),p=oc(f);let h=d[p],y=d[f];const g=Sn(l,e),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:Z({mainAxis:0,crossAxis:0},g);if(u){const I=p==="y"?"height":"width",m=s.reference[p]-s.floating[I]+v.mainAxis,A=s.reference[p]+s.reference[I]-v.mainAxis;h<m?h=m:h>A&&(h=A)}if(c){var b,w;const I=p==="y"?"width":"height",m=["top","left"].includes(on(i)),A=s.reference[f]-s.floating[I]+(m&&((b=o.offset)==null?void 0:b[f])||0)+(m?0:v.crossAxis),E=s.reference[f]+s.reference[I]+(m?0:((w=o.offset)==null?void 0:w[f])||0)-(m?v.crossAxis:0);y<A?y=A:y>E&&(y=E)}return{[p]:h,[f]:y}}}},R2=function(t){return t===void 0&&(t={}),{name:"size",options:t,fn(n){return _(this,null,function*(){const{placement:r,rects:i,platform:s,elements:o}=n,O=Sn(t,n),{apply:l=()=>{}}=O,u=Gn(O,["apply"]),c=yield pi(n,u),d=on(r),f=Vn(r),p=ba(r)==="y",{width:h,height:y}=i.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===((yield s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const b=y-c[g],w=h-c[v],I=!n.middlewareData.shift;let m=b,A=w;if(p){const T=h-c.left-c.right;A=f||I?Hn(w,T):T}else{const T=y-c.top-c.bottom;m=f||I?Hn(b,T):T}if(I&&!f){const T=sn(c.left,0),x=sn(c.right,0),P=sn(c.top,0),S=sn(c.bottom,0);p?A=h-2*(T!==0||x!==0?T+x:sn(c.left,c.right)):m=y-2*(P!==0||S!==0?P+S:sn(c.top,c.bottom))}yield l(se(Z({},n),{availableWidth:A,availableHeight:m}));const E=yield s.getDimensions(o.floating);return h!==E.width||y!==E.height?{reset:{rects:!0}}:{}})}}};function Jg(t){return Zg(t)?(t.nodeName||"").toLowerCase():"#document"}function ln(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xg(t){var e;return(e=(Zg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Zg(t){return t instanceof Node||t instanceof ln(t).Node}function uc(t){return t instanceof Element||t instanceof ln(t).Element}function cc(t){return t instanceof HTMLElement||t instanceof ln(t).HTMLElement}function ev(t){return typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof ln(t).ShadowRoot}function tv(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=dc(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function k2(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function x2(t){return["html","body","#document"].includes(Jg(t))}function dc(t){return ln(t).getComputedStyle(t)}function D2(t){if(Jg(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ev(t)&&t.host||Xg(t);return ev(e)?e.host:e}function nv(t){const e=D2(t);return x2(e)?t.ownerDocument?t.ownerDocument.body:t.body:cc(e)&&tv(e)?e:nv(e)}function Co(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=nv(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ln(i);return s?e.concat(o,o.visualViewport||[],tv(i)?i:[],o.frameElement&&n?Co(o.frameElement):[]):e.concat(i,Co(i,[],n))}function F2(t){const e=dc(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=cc(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=Eo(n)!==s||Eo(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function fc(t){return uc(t)?t:t.contextElement}function hc(t){const e=fc(t);if(!cc(e))return Ao(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=F2(e);let o=(s?Eo(n.width):n.width)/r,l=(s?Eo(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const N2=Ao(0);function L2(t){const e=ln(t);return!k2()||!e.visualViewport?N2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function B2(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ln(t)?!1:e}function rv(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=fc(t);let o=Ao(1);e&&(r?uc(r)&&(o=hc(r)):o=hc(t));const l=B2(s,n,r)?L2(s):Ao(0);let u=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const p=ln(s),h=r&&uc(r)?ln(r):r;let y=p,g=y.frameElement;for(;g&&r&&h!==y;){const v=hc(g),b=g.getBoundingClientRect(),w=dc(g),I=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,m=b.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;u*=v.x,c*=v.y,d*=v.x,f*=v.y,u+=I,c+=m,y=ln(g),g=y.frameElement}}return _a({width:d,height:f,x:u,y:c})}function U2(t,e){let n=null,r;const i=Xg(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const{left:c,top:d,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const h=Io(d),y=Io(i.clientWidth-(c+f)),g=Io(i.clientHeight-(d+p)),v=Io(c),w={rootMargin:-h+"px "+-y+"px "+-g+"px "+-v+"px",threshold:sn(0,Hn(1,u))||1};let I=!0;function m(A){const E=A[0].intersectionRatio;if(E!==u){if(!I)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(m,se(Z({},w),{root:i.ownerDocument}))}catch(A){n=new IntersectionObserver(m,w)}n.observe(t)}return o(!0),s}function $2(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=fc(t),d=i||s?[...c?Co(c):[],...Co(e)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=c&&l?U2(c,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var I;(I=h)==null||I.observe(e)})),n()}),c&&!u&&h.observe(c),h.observe(e));let y,g=u?rv(t):null;u&&v();function v(){const b=rv(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,u&&cancelAnimationFrame(y)}}var pc=K.useLayoutEffect,j2=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],So=function(){};function H2(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function V2(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=[].concat(r);if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&s.push("".concat(H2(t,o)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Po=function(e){return Z2(e)?e.filter(Boolean):Pr(e)==="object"&&e!==null?[e]:[]},iv=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=an(e,j2);return we({},n)},rt=function(e,n,r){var i=e.cx,s=e.getStyles,o=e.getClassNames,l=e.className;return{css:s(n,e),className:i(r!=null?r:{},o(n,e),l)}};function q2(t,e,n){if(n){var r=n(t,e);if(typeof r=="string")return r}return t}function Mo(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function W2(t){return Mo(t)?window.innerHeight:t.clientHeight}function av(t){return Mo(t)?window.pageYOffset:t.scrollTop}function Ro(t,e){if(Mo(t)){window.scrollTo(0,e);return}t.scrollTop=e}function G2(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function z2(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function ko(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:So,i=av(t),s=e-i,o=10,l=0;function u(){l+=o;var c=z2(l,i,s,n);Ro(t,c),l<n?window.requestAnimationFrame(u):r(t)}u()}function sv(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?Ro(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&Ro(t,Math.max(e.offsetTop-i,0))}function Q2(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function ov(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}function Y2(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}var lv=!1,K2={get passive(){return lv=!0}},xo=typeof window!="undefined"?window:{};xo.addEventListener&&xo.removeEventListener&&(xo.addEventListener("p",So,K2),xo.removeEventListener("p",So,!1));var J2=lv;function X2(t){return t!=null}function Z2(t){return Array.isArray(t)}function Ea(t,e,n){return t?e:n}function v3(t){return t}function y3(t){return t}var eL=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=Object.entries(e).filter(function(o){var l=yt(o,1),u=l[0];return!r.includes(u)});return s.reduce(function(o,l){var u=yt(l,2),c=u[0],d=u[1];return o[c]=d,o},{})},tL=["children","innerProps"],nL=["children","innerProps"];function rL(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,s=t.shouldScroll,o=t.isFixedPosition,l=t.controlHeight,u=G2(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var d=u.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),h=p.bottom,y=p.height,g=p.top,v=n.offsetParent.getBoundingClientRect(),b=v.top,w=o?window.innerHeight:W2(u),I=av(u),m=parseInt(getComputedStyle(n).marginBottom,10),A=parseInt(getComputedStyle(n).marginTop,10),E=b-A,O=w-g,T=E+I,x=f-I-g,P=h-w+I+m,S=I+g-A,R=160;switch(i){case"auto":case"bottom":if(O>=y)return{placement:"bottom",maxHeight:e};if(x>=y&&!o)return s&&ko(u,P,R),{placement:"bottom",maxHeight:e};if(!o&&x>=r||o&&O>=r){s&&ko(u,P,R);var D=o?O-m:x-m;return{placement:"bottom",maxHeight:D}}if(i==="auto"||o){var L=e,N=o?E:T;return N>=r&&(L=Math.min(N-m-l,e)),{placement:"top",maxHeight:L}}if(i==="bottom")return s&&Ro(u,P),{placement:"bottom",maxHeight:e};break;case"top":if(E>=y)return{placement:"top",maxHeight:e};if(T>=y&&!o)return s&&ko(u,S,R),{placement:"top",maxHeight:e};if(!o&&T>=r||o&&E>=r){var H=e;return(!o&&T>=r||o&&E>=r)&&(H=o?E-A:T-A),s&&ko(u,S,R),{placement:"top",maxHeight:H}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function iL(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var uv=function(e){return e==="auto"?"bottom":e},aL=function(e,n){var r,i=e.placement,s=e.theme,o=s.borderRadius,l=s.spacing,u=s.colors;return we((r={label:"menu"},ui(r,iL(i),"100%"),ui(r,"position","absolute"),ui(r,"width","100%"),ui(r,"zIndex",1),r),n?{}:{backgroundColor:u.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},cv=K.createContext(null),sL=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,s=e.menuPlacement,o=e.menuPosition,l=e.menuShouldScrollIntoView,u=e.theme,c=K.useContext(cv)||{},d=c.setPortalPlacement,f=K.useRef(null),p=K.useState(i),h=yt(p,2),y=h[0],g=h[1],v=K.useState(null),b=yt(v,2),w=b[0],I=b[1],m=u.spacing.controlHeight;return pc(function(){var A=f.current;if(!!A){var E=o==="fixed",O=l&&!E,T=rL({maxHeight:i,menuEl:A,minHeight:r,placement:s,shouldScroll:O,isFixedPosition:E,controlHeight:m});g(T.maxHeight),I(T.placement),d==null||d(T.placement)}},[i,s,o,l,r,d,m]),n({ref:f,placerProps:we(we({},e),{},{placement:w||uv(s),maxHeight:y})})},oL=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return be("div",Ge({},rt(e,"menu",{menu:!0}),{ref:r},i),n)},lL=oL,uL=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return we({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},cL=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,s=e.isMulti;return be("div",Ge({},rt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:i},r),n)},dv=function(e,n){var r=e.theme,i=r.spacing.baseUnit,s=r.colors;return we({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},dL=dv,fL=dv,hL=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,s=an(e,tL);return be("div",Ge({},rt(we(we({},s),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},pL=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,s=an(e,nL);return be("div",Ge({},rt(we(we({},s),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},mL=function(e){var n=e.rect,r=e.offset,i=e.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},gL=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,s=e.innerProps,o=e.menuPlacement,l=e.menuPosition,u=K.useRef(null),c=K.useRef(null),d=K.useState(uv(o)),f=yt(d,2),p=f[0],h=f[1],y=K.useMemo(function(){return{setPortalPlacement:h}},[]),g=K.useState(null),v=yt(g,2),b=v[0],w=v[1],I=K.useCallback(function(){if(!!i){var O=Q2(i),T=l==="fixed"?0:window.pageYOffset,x=O[p]+T;(x!==(b==null?void 0:b.offset)||O.left!==(b==null?void 0:b.rect.left)||O.width!==(b==null?void 0:b.rect.width))&&w({offset:x,rect:O})}},[i,l,p,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);pc(function(){I()},[I]);var m=K.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&u.current&&(c.current=$2(i,u.current,I,{elementResize:"ResizeObserver"in window}))},[i,I]);pc(function(){m()},[m]);var A=K.useCallback(function(O){u.current=O,m()},[m]);if(!n&&l!=="fixed"||!b)return null;var E=be("div",Ge({ref:A},rt(we(we({},e),{},{offset:b.offset,position:l,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return be(cv.Provider,{value:y},n?We.createPortal(E,n):E)},vL=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},yL=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,s=e.isRtl;return be("div",Ge({},rt(e,"container",{"--is-disabled":i,"--is-rtl":s}),r),n)},wL=function(e,n){var r=e.theme.spacing,i=e.isMulti,s=e.hasValue,o=e.selectProps.controlShouldRenderValue;return we({alignItems:"center",display:i&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},bL=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,s=e.hasValue;return be("div",Ge({},rt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s}),r),n)},_L=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},EL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"indicatorsContainer",{indicators:!0}),r),n)},fv,IL=["size"],AL=["innerProps","isRtl","size"],OL={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},hv=function(e){var n=e.size,r=an(e,IL);return be("svg",Ge({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:OL},r))},mc=function(e){return be(hv,Ge({size:20},e),be("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},pv=function(e){return be(hv,Ge({size:20},e),be("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},mv=function(e,n){var r=e.isFocused,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return we({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2,":hover":{color:r?o.neutral80:o.neutral40}})},TL=mv,CL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||be(pv,null))},SL=mv,PL=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||be(mc,null))},ML=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return we({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},RL=function(e){var n=e.innerProps;return be("span",Ge({},n,rt(e,"indicatorSeparator",{"indicator-separator":!0})))},kL=c2(fv||(fv=m2([`
|
|
2328
2328
|
0%, 80%, 100% { opacity: 0; }
|
|
2329
2329
|
40% { opacity: 1; }
|
|
2330
|
-
`]))),xL=function(e,n){var r=e.isFocused,i=e.size,s=e.theme,o=s.colors,l=s.spacing.baseUnit;return we({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:l*2})},gc=function(e){var n=e.delay,r=e.offset;return be("span",{css:ac({animation:"".concat(kL," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},DL=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,s=i===void 0?4:i,o=an(e,AL);return be("div",Ge({},rt(we(we({},o),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),be(gc,{delay:0,offset:r}),be(gc,{delay:160,offset:!0}),be(gc,{delay:320,offset:!r}))},FL=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.theme,o=s.colors,l=s.borderRadius,u=s.spacing;return we({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:u.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},NL=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.innerRef,o=e.innerProps,l=e.menuIsOpen;return be("div",Ge({ref:s},rt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),o,{"aria-disabled":r||void 0}),n)},LL=NL,BL=["data"],UL=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},$L=function(e){var n=e.children,r=e.cx,i=e.getStyles,s=e.getClassNames,o=e.Heading,l=e.headingProps,u=e.innerProps,c=e.label,d=e.theme,f=e.selectProps;return be("div",Ge({},rt(e,"group",{group:!0}),u),be(o,Ge({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:s,cx:r}),c),be("div",null,n))},jL=function(e,n){var r=e.theme,i=r.colors,s=r.spacing;return we({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},HL=function(e){var n=iv(e);n.data;var r=an(n,BL);return be("div",Ge({},rt(e,"groupHeading",{"group-heading":!0}),r))},VL=$L,qL=["innerRef","isDisabled","isHidden","inputClassName"],WL=function(e,n){var r=e.isDisabled,i=e.value,s=e.theme,o=s.spacing,l=s.colors;return we(we({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},GL),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:l.neutral80})},gv={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},GL={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":we({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},gv)},zL=function(e){return we({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},gv)},QL=function(e){var n=e.cx,r=e.value,i=iv(e),s=i.innerRef,o=i.isDisabled,l=i.isHidden,u=i.inputClassName,c=an(i,qL);return be("div",Ge({},rt(e,"input",{"input-container":!0}),{"data-value":r||""}),be("input",Ge({className:n({input:!0},u),ref:s,style:zL(l),disabled:o},c)))},YL=QL,KL=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors;return we({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:i.baseUnit/2})},JL=function(e,n){var r=e.theme,i=r.borderRadius,s=r.colors,o=e.cropWithEllipsis;return we({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},XL=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors,l=e.isFocused;return we({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},vv=function(e){var n=e.children,r=e.innerProps;return be("div",r,n)},ZL=vv,e4=vv;function t4(t){var e=t.children,n=t.innerProps;return be("div",Ge({role:"button"},n),e||be(mc,{size:14}))}var n4=function(e){var n=e.children,r=e.components,i=e.data,s=e.innerProps,o=e.isDisabled,l=e.removeProps,u=e.selectProps,c=r.Container,d=r.Label,f=r.Remove;return be(c,{data:i,innerProps:we(we({},rt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:u},be(d,{data:i,innerProps:we({},rt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:u},n),be(f,{data:i,innerProps:we(we({},rt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:u}))},r4=n4,i4=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.theme,l=o.spacing,u=o.colors;return we({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?u.primary:i?u.primary25:"transparent",color:r?u.neutral20:s?u.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?u.primary:u.primary50}})},a4=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.innerRef,l=e.innerProps;return be("div",Ge({},rt(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":s}),{ref:o,"aria-disabled":r},l),n)},s4=a4,o4=function(e,n){var r=e.theme,i=r.spacing,s=r.colors;return we({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},l4=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"placeholder",{placeholder:!0}),r),n)},u4=l4,c4=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing,o=i.colors;return we({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},d4=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return be("div",Ge({},rt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},f4=d4,h4={ClearIndicator:PL,Control:LL,DropdownIndicator:CL,DownChevron:pv,CrossIcon:mc,Group:VL,GroupHeading:HL,IndicatorsContainer:EL,IndicatorSeparator:RL,Input:YL,LoadingIndicator:DL,Menu:lL,MenuList:cL,MenuPortal:gL,LoadingMessage:pL,NoOptionsMessage:hL,MultiValue:r4,MultiValueContainer:ZL,MultiValueLabel:e4,MultiValueRemove:t4,Option:s4,Placeholder:u4,SelectContainer:yL,SingleValue:f4,ValueContainer:bL},p4=function(e){return we(we({},h4),e.components)},yv=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function m4(t,e){return!!(t===e||yv(t)&&yv(e))}function g4(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!m4(t[n],e[n]))return!1;return!0}function v4(t,e){e===void 0&&(e=g4);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var o=t.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}for(var y4={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},w4=function(e){return be("span",Ge({css:y4},e))},wv=w4,b4={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.tabSelectsValue,s=e.context,o=e.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,s=e.labels,o=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,s=e.label,o=s===void 0?"":s,l=e.selectValue,u=e.isDisabled,c=e.isSelected,d=e.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&l)return"value ".concat(o," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=u?" disabled":"",h="".concat(c?" selected":"").concat(p);return"".concat(o).concat(h,", ").concat(f(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},_4=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,s=e.focusableOptions,o=e.isFocused,l=e.selectValue,u=e.selectProps,c=e.id,d=e.isAppleDevice,f=u.ariaLiveMessages,p=u.getOptionLabel,h=u.inputValue,y=u.isMulti,g=u.isOptionDisabled,v=u.isSearchable,b=u.menuIsOpen,w=u.options,I=u.screenReaderStatus,m=u.tabSelectsValue,A=u.isLoading,E=u["aria-label"],O=u["aria-live"],T=K.useMemo(function(){return we(we({},b4),f||{})},[f]),x=K.useMemo(function(){var F="";if(n&&T.onChange){var H=n.option,q=n.options,z=n.removedValue,U=n.removedValues,N=n.value,C=function(Y){return Array.isArray(Y)?null:Y},R=z||H||C(N),k=R?p(R):"",B=q||U||void 0,W=B?B.map(p):[],$=we({isDisabled:R&&g(R,l),label:k,labels:W},n);F=T.onChange($)}return F},[n,T,g,l,p]),P=K.useMemo(function(){var F="",H=r||i,q=!!(r&&l&&l.includes(r));if(H&&T.onFocus){var z={focused:H,label:p(H),isDisabled:g(H,l),isSelected:q,options:s,context:H===r?"menu":"value",selectValue:l,isAppleDevice:d};F=T.onFocus(z)}return F},[r,i,p,g,T,s,l,d]),S=K.useMemo(function(){var F="";if(b&&w.length&&!A&&T.onFilter){var H=I({count:s.length});F=T.onFilter({inputValue:h,resultsMessage:H})}return F},[s,h,b,T,w,I,A]),M=(n==null?void 0:n.action)==="initial-input-focus",D=K.useMemo(function(){var F="";if(T.guidance){var H=i?"value":b?"menu":"input";F=T.guidance({"aria-label":E,context:H,isDisabled:r&&g(r,l),isMulti:y,isSearchable:v,tabSelectsValue:m,isInitialFocus:M})}return F},[E,r,i,y,g,v,b,T,l,m,M]),L=be(K.Fragment,null,be("span",{id:"aria-selection"},x),be("span",{id:"aria-focused"},P),be("span",{id:"aria-results"},S),be("span",{id:"aria-guidance"},D));return be(K.Fragment,null,be(wv,{id:c},M&&L),be(wv,{"aria-live":O,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!M&&L))},E4=_4,vc=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],I4=new RegExp("["+vc.map(function(t){return t.letters}).join("")+"]","g"),bv={},yc=0;yc<vc.length;yc++)for(var wc=vc[yc],bc=0;bc<wc.letters.length;bc++)bv[wc.letters[bc]]=wc.base;var _v=function(e){return e.replace(I4,function(n){return bv[n]})},A4=v4(_v),Ev=function(e){return e.replace(/^\s+|\s+$/g,"")},O4=function(e){return"".concat(e.label," ").concat(e.value)},T4=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=we({ignoreCase:!0,ignoreAccents:!0,stringify:O4,trim:!0,matchFrom:"any"},e),s=i.ignoreCase,o=i.ignoreAccents,l=i.stringify,u=i.trim,c=i.matchFrom,d=u?Ev(r):r,f=u?Ev(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),o&&(d=A4(d),f=_v(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},C4=["innerRef"];function S4(t){var e=t.innerRef,n=an(t,C4),r=eL(n,"onExited","in","enter","exit","appear");return be("input",Ge({ref:e},r,{css:ac({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var P4=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function M4(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,s=t.onTopLeave,o=K.useRef(!1),l=K.useRef(!1),u=K.useRef(0),c=K.useRef(null),d=K.useCallback(function(v,b){if(c.current!==null){var w=c.current,I=w.scrollTop,m=w.scrollHeight,A=w.clientHeight,E=c.current,O=b>0,T=m-A-I,x=!1;T>b&&o.current&&(r&&r(v),o.current=!1),O&&l.current&&(s&&s(v),l.current=!1),O&&b>T?(n&&!o.current&&n(v),E.scrollTop=m,x=!0,o.current=!0):!O&&-b>I&&(i&&!l.current&&i(v),E.scrollTop=0,x=!0,l.current=!0),x&&P4(v)}},[n,r,i,s]),f=K.useCallback(function(v){d(v,v.deltaY)},[d]),p=K.useCallback(function(v){u.current=v.changedTouches[0].clientY},[]),h=K.useCallback(function(v){var b=u.current-v.changedTouches[0].clientY;d(v,b)},[d]),y=K.useCallback(function(v){if(!!v){var b=J2?{passive:!1}:!1;v.addEventListener("wheel",f,b),v.addEventListener("touchstart",p,b),v.addEventListener("touchmove",h,b)}},[h,p,f]),g=K.useCallback(function(v){!v||(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",p,!1),v.removeEventListener("touchmove",h,!1))},[h,p,f]);return K.useEffect(function(){if(!!e){var v=c.current;return y(v),function(){g(v)}}},[e,y,g]),function(v){c.current=v}}var Iv=["boxSizing","height","overflow","paddingRight","position"],Av={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ov(t){t.preventDefault()}function Tv(t){t.stopPropagation()}function Cv(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function Sv(){return"ontouchstart"in window||navigator.maxTouchPoints}var Pv=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Ia=0,mi={capture:!1,passive:!1};function R4(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=K.useRef({}),s=K.useRef(null),o=K.useCallback(function(u){if(!!Pv){var c=document.body,d=c&&c.style;if(r&&Iv.forEach(function(y){var g=d&&d[y];i.current[y]=g}),r&&Ia<1){var f=parseInt(i.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,h=window.innerWidth-p+f||0;Object.keys(Av).forEach(function(y){var g=Av[y];d&&(d[y]=g)}),d&&(d.paddingRight="".concat(h,"px"))}c&&Sv()&&(c.addEventListener("touchmove",Ov,mi),u&&(u.addEventListener("touchstart",Cv,mi),u.addEventListener("touchmove",Tv,mi))),Ia+=1}},[r]),l=K.useCallback(function(u){if(!!Pv){var c=document.body,d=c&&c.style;Ia=Math.max(Ia-1,0),r&&Ia<1&&Iv.forEach(function(f){var p=i.current[f];d&&(d[f]=p)}),c&&Sv()&&(c.removeEventListener("touchmove",Ov,mi),u&&(u.removeEventListener("touchstart",Cv,mi),u.removeEventListener("touchmove",Tv,mi)))}},[r]);return K.useEffect(function(){if(!!e){var u=s.current;return o(u),function(){l(u)}}},[e,o,l]),function(u){s.current=u}}var k4=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},x4={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function D4(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,s=t.onBottomArrive,o=t.onBottomLeave,l=t.onTopArrive,u=t.onTopLeave,c=M4({isEnabled:i,onBottomArrive:s,onBottomLeave:o,onTopArrive:l,onTopLeave:u}),d=R4({isEnabled:n}),f=function(h){c(h),d(h)};return be(K.Fragment,null,n&&be("div",{onClick:k4,css:x4}),e(f))}var F4={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},N4=function(e){var n=e.name,r=e.onFocus;return be("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:F4,value:"",onChange:function(){}})},L4=N4;function _c(t){var e;return typeof window!="undefined"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function B4(){return _c(/^iPhone/i)}function Mv(){return _c(/^Mac/i)}function U4(){return _c(/^iPad/i)||Mv()&&navigator.maxTouchPoints>1}function $4(){return B4()||U4()}function j4(){return Mv()||$4()}var H4=function(e){return e.label},Rv=function(e){return e.label},kv=function(e){return e.value},V4=function(e){return!!e.isDisabled},q4={clearIndicator:SL,container:vL,control:FL,dropdownIndicator:TL,group:UL,groupHeading:jL,indicatorsContainer:_L,indicatorSeparator:ML,input:WL,loadingIndicator:xL,loadingMessage:fL,menu:aL,menuList:uL,menuPortal:mL,multiValue:KL,multiValueLabel:JL,multiValueRemove:XL,noOptionsMessage:dL,option:i4,placeholder:o4,singleValue:c4,valueContainer:wL},W4={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},G4=4,xv=4,z4=38,Q4=xv*2,Y4={baseUnit:xv,controlHeight:z4,menuGutter:Q4},Ec={borderRadius:G4,colors:W4,spacing:Y4},K4={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ov(),captureMenuScroll:!ov(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:T4(),formatGroupLabel:H4,getOptionLabel:Rv,getOptionValue:kv,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:V4,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Y2(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Dv(t,e,n,r){var i=Uv(t,e,n),s=$v(t,e,n),o=Bv(t,e),l=Fo(t,e);return{type:"option",data:e,isDisabled:i,isSelected:s,label:o,value:l,index:r}}function Do(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,l){return Dv(t,o,e,l)}).filter(function(o){return Lv(t,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var s=Dv(t,n,e,r);return Lv(t,s)?s:void 0}).filter(X2)}function Fv(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,ci(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function Nv(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ci(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function J4(t,e){return Fv(Do(t,e))}function Lv(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,s=e.isSelected,o=e.label,l=e.value;return(!Hv(t)||!s)&&jv(t,{label:o,value:l,data:i},r)}function X4(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var s=e.indexOf(n);if(s>-1)return n;if(i<e.length)return e[i]}return null}function Z4(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Ic=function(e,n){var r,i=(r=e.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return i||null},Bv=function(e,n){return e.getOptionLabel(n)},Fo=function(e,n){return e.getOptionValue(n)};function Uv(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function $v(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=Fo(t,e);return n.some(function(i){return Fo(t,i)===r})}function jv(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var Hv=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},eB=1,No=function(t){rN(n,t);var e=sN(n);function n(r){var i;if(tN(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=j4(),i.controlRef=null,i.getControlRef=function(u){i.controlRef=u},i.focusedOptionRef=null,i.getFocusedOptionRef=function(u){i.focusedOptionRef=u},i.menuListRef=null,i.getMenuListRef=function(u){i.menuListRef=u},i.inputRef=null,i.getInputRef=function(u){i.inputRef=u},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(u,c){var d=i.props,f=d.onChange,p=d.name;c.name=p,i.ariaOnChange(u,c),f(u,c)},i.setValue=function(u,c,d){var f=i.props,p=f.closeMenuOnSelect,h=f.isMulti,y=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:y}),p&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(u,{action:c,option:d})},i.selectOption=function(u){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,p=c.name,h=i.state.selectValue,y=f&&i.isOptionSelected(u,h),g=i.isOptionDisabled(u,h);if(y){var v=i.getOptionValue(u);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==v}),"deselect-option",u)}else if(!g)f?i.setValue([].concat(ci(h),[u]),"select-option",u):i.setValue(u,"select-option");else{i.ariaOnChange(u,{action:"select-option",option:u,name:p});return}d&&i.blurInput()},i.removeValue=function(u){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(u),p=d.filter(function(y){return i.getOptionValue(y)!==f}),h=Ea(c,p,p[0]||null);i.onChange(h,{action:"remove-value",removedValue:u}),i.focusInput()},i.clearValue=function(){var u=i.state.selectValue;i.onChange(Ea(i.props.isMulti,[],null),{action:"clear",removedValues:u})},i.popValue=function(){var u=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),p=Ea(u,f,f[0]||null);i.onChange(p,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(u){return Ic(i.state.focusableOptionsWithIds,u)},i.getFocusableOptionsWithIds=function(){return Nv(Do(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return V2.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(u){return Bv(i.props,u)},i.getOptionValue=function(u){return Fo(i.props,u)},i.getStyles=function(u,c){var d=i.props.unstyled,f=q4[u](c,d);f.boxSizing="border-box";var p=i.props.styles[u];return p?p(f,c):f},i.getClassNames=function(u,c){var d,f;return(d=(f=i.props.classNames)[u])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(u){return"".concat(i.state.instancePrefix,"-").concat(u)},i.getComponents=function(){return p4(i.props)},i.buildCategorizedOptions=function(){return Do(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Fv(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(u,c){i.setState({ariaSelection:we({value:u},c)})},i.onMenuMouseDown=function(u){u.button===0&&(u.stopPropagation(),u.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(u){i.blockOptionHover=!1},i.onControlMouseDown=function(u){if(!u.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&u.preventDefault()}},i.onDropdownIndicatorMouseDown=function(u){if(!(u&&u.type==="mousedown"&&u.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),u.preventDefault()}},i.onClearIndicatorMouseDown=function(u){u&&u.type==="mousedown"&&u.button!==0||(i.clearValue(),u.preventDefault(),i.openAfterFocus=!1,u.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(u){typeof i.props.closeMenuOnScroll=="boolean"?u.target instanceof HTMLElement&&Mo(u.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(u)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(u){var c=u.touches,d=c&&c.item(0);!d||(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(u){var c=u.touches,d=c&&c.item(0);if(!!d){var f=Math.abs(d.clientX-i.initialTouchX),p=Math.abs(d.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||p>h}},i.onTouchEnd=function(u){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(u.target)&&i.menuListRef&&!i.menuListRef.contains(u.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(u){i.userIsDragging||i.onControlMouseDown(u)},i.onClearIndicatorTouchEnd=function(u){i.userIsDragging||i.onClearIndicatorMouseDown(u)},i.onDropdownIndicatorTouchEnd=function(u){i.userIsDragging||i.onDropdownIndicatorMouseDown(u)},i.handleInputChange=function(u){var c=i.props.inputValue,d=u.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(u){i.props.onFocus&&i.props.onFocus(u),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(u){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(u),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(u){if(!(i.blockOptionHover||i.state.focusedOption===u)){var c=i.getFocusableOptions(),d=c.indexOf(u);i.setState({focusedOption:u,focusedOptionId:d>-1?i.getFocusedOptionId(u):null})}},i.shouldHideSelectedOptions=function(){return Hv(i.props)},i.onValueInputFocus=function(u){u.preventDefault(),u.stopPropagation(),i.focus()},i.onKeyDown=function(u){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,p=c.escapeClearsValue,h=c.inputValue,y=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,b=c.onKeyDown,w=c.tabSelectsValue,I=c.openMenuOnFocus,m=i.state,A=m.focusedOption,E=m.focusedValue,O=m.selectValue;if(!g&&!(typeof b=="function"&&(b(u),u.defaultPrevented))){switch(i.blockOptionHover=!0,u.key){case"ArrowLeft":if(!d||h)return;i.focusValue("previous");break;case"ArrowRight":if(!d||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(E)i.removeValue(E);else{if(!f)return;d?i.popValue():y&&i.clearValue()}break;case"Tab":if(i.isComposing||u.shiftKey||!v||!w||!A||I&&i.isOptionSelected(A,O))return;i.selectOption(A);break;case"Enter":if(u.keyCode===229)break;if(v){if(!A||i.isComposing)return;i.selectOption(A);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):y&&p&&i.clearValue();break;case" ":if(h)return;if(!v){i.openMenu("first");break}if(!A)return;i.selectOption(A);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}u.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++eB),i.state.selectValue=Po(r.value),r.menuIsOpen&&i.state.selectValue.length){var s=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),l=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=s,i.state.focusedOption=o[l],i.state.focusedOptionId=Ic(s,o[l])}return i}return nN(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isDisabled,l=s.menuIsOpen,u=this.state.isFocused;(u&&!o&&i.isDisabled||u&&l&&!i.menuIsOpen)&&this.focusInput(),u&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!u&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,s){this.props.onInputChange(i,s)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(i){var s=this,o=this.state,l=o.selectValue,u=o.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(u&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(i){var s=this.state,o=s.selectValue,l=s.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var u=o.indexOf(l);l||(u=-1);var c=o.length-1,d=-1;if(!!o.length){switch(i){case"previous":u===0?d=0:u===-1?d=c:d=u-1;break;case"next":u>-1&&u<c&&(d=u+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,l=this.getFocusableOptions();if(!!l.length){var u=0,c=l.indexOf(o);o||(c=-1),i==="up"?u=c>0?c-1:l.length-1:i==="down"?u=(c+1)%l.length:i==="pageup"?(u=c-s,u<0&&(u=0)):i==="pagedown"?(u=c+s,u>l.length-1&&(u=l.length-1)):i==="last"&&(u=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[u],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[u])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ec):we(we({},Ec),this.props.theme):Ec}},{key:"getCommonProps",value:function(){var i=this.clearValue,s=this.cx,o=this.getStyles,l=this.getClassNames,u=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,h=f.isRtl,y=f.options,g=this.hasValue();return{clearValue:i,cx:s,getStyles:o,getClassNames:l,getValue:u,hasValue:g,isMulti:p,isRtl:h,options:y,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,s=i.isClearable,o=i.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(i,s){return Uv(this.props,i,s)}},{key:"isOptionSelected",value:function(i,s){return $v(this.props,i,s)}},{key:"filterOption",value:function(i,s){return jv(this.props,i,s)}},{key:"formatOptionLabel",value:function(i,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:s,inputValue:o,selectValue:l})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,s=i.isDisabled,o=i.isSearchable,l=i.inputId,u=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,p=i.required,h=this.getComponents(),y=h.Input,g=this.state,v=g.inputIsHidden,b=g.ariaSelection,w=this.commonProps,I=l||this.getElementId("input"),m=we(we(we({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?j(y,Z(se(Z({},w),{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:I,innerRef:this.getInputRef,isDisabled:s,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:u}),m)):j(S4,Z({id:I,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:So,onFocus:this.onInputFocus,disabled:s,tabIndex:c,inputMode:"none",form:d,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,s=this.getComponents(),o=s.MultiValue,l=s.MultiValueContainer,u=s.MultiValueLabel,c=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,h=this.props,y=h.controlShouldRenderValue,g=h.isDisabled,v=h.isMulti,b=h.inputValue,w=h.placeholder,I=this.state,m=I.selectValue,A=I.focusedValue,E=I.isFocused;if(!this.hasValue()||!y)return b?null:K.createElement(f,se(Z({},p),{key:"placeholder",isDisabled:g,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return m.map(function(T,x){var P=T===A,S="".concat(i.getOptionLabel(T),"-").concat(i.getOptionValue(T));return K.createElement(o,se(Z({},p),{components:{Container:l,Label:u,Remove:c},isFocused:P,isDisabled:g,key:S,index:x,removeProps:{onClick:function(){return i.removeValue(T)},onTouchEnd:function(){return i.removeValue(T)},onMouseDown:function(D){D.preventDefault()}},data:T}),i.formatOptionLabel(T,"value"))});if(b)return null;var O=m[0];return j(d,se(Z({},p),{data:O,isDisabled:g,children:this.formatOptionLabel(O,"value")}))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),s=i.ClearIndicator,o=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||u||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),s=i.LoadingIndicator,o=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!s||!c)return null;var f={"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:f,isDisabled:u,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator,o=i.IndicatorSeparator;if(!s||!o)return null;var l=this.commonProps,u=this.props.isDisabled,c=this.state.isFocused;return j(o,se(Z({},l),{isDisabled:u,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator;if(!s)return null;var o=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:c,isDisabled:l,isFocused:u}))}},{key:"renderMenu",value:function(){var i=this,s=this.getComponents(),o=s.Group,l=s.GroupHeading,u=s.Menu,c=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,h=s.Option,y=this.commonProps,g=this.state.focusedOption,v=this.props,b=v.captureMenuScroll,w=v.inputValue,I=v.isLoading,m=v.loadingMessage,A=v.minMenuHeight,E=v.maxMenuHeight,O=v.menuIsOpen,T=v.menuPlacement,x=v.menuPosition,P=v.menuPortalTarget,S=v.menuShouldBlockScroll,M=v.menuShouldScrollIntoView,D=v.noOptionsMessage,L=v.onMenuScrollToTop,F=v.onMenuScrollToBottom;if(!O)return null;var H=function(k,B){var W=k.type,$=k.data,Q=k.isDisabled,Y=k.isSelected,X=k.label,ee=k.value,le=g===$,me=Q?void 0:function(){return i.onOptionHover($)},ve=Q?void 0:function(){return i.selectOption($)},Ae="".concat(i.getElementId("option"),"-").concat(B),Se={id:Ae,onClick:ve,onMouseMove:me,onMouseOver:me,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:Y};return K.createElement(h,se(Z({},y),{innerProps:Se,data:$,isDisabled:Q,isSelected:Y,key:Ae,label:X,type:W,value:ee,isFocused:le,innerRef:le?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(k.data,"menu"))},q;if(this.hasOptions())q=this.getCategorizedOptions().map(function(R){if(R.type==="group"){var k=R.data,B=R.options,W=R.index,$="".concat(i.getElementId("group"),"-").concat(W),Q="".concat($,"-heading");return K.createElement(o,se(Z({},y),{key:$,data:k,options:B,Heading:l,headingProps:{id:Q,data:R.data},label:i.formatGroupLabel(R.data)}),R.options.map(function(Y){return H(Y,"".concat(W,"-").concat(Y.index))}))}else if(R.type==="option")return H(R,"".concat(R.index))});else if(I){var z=m({inputValue:w});if(z===null)return null;q=j(f,se(Z({},y),{children:z}))}else{var U=D({inputValue:w});if(U===null)return null;q=j(p,se(Z({},y),{children:U}))}var N={minMenuHeight:A,maxMenuHeight:E,menuPlacement:T,menuPosition:x,menuShouldScrollIntoView:M},C=j(sL,se(Z(Z({},y),N),{children:function(R){var k=R.ref,B=R.placerProps,W=B.placement,$=B.maxHeight;return j(u,se(Z(Z({},y),N),{innerRef:k,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:I,placement:W,children:j(D4,{captureEnabled:b,onTopArrive:L,onBottomArrive:F,lockEnabled:S,children:function(Q){return j(c,se(Z({},y),{innerRef:function(X){i.getMenuListRef(X),Q(X)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:i.getElementId("listbox")},isLoading:I,maxHeight:$,focusedOption:g,children:q}))}})}))}}));return P||x==="fixed"?j(d,se(Z({},y),{appendTo:P,controlElement:this.controlRef,menuPlacement:T,menuPosition:x,children:C})):C}},{key:"renderFormField",value:function(){var i=this,s=this.props,o=s.delimiter,l=s.isDisabled,u=s.isMulti,c=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return j(L4,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(u)if(o){var p=f.map(function(g){return i.getOptionValue(g)}).join(o);return j("input",{name:c,type:"hidden",value:p})}else{var h=f.length>0?f.map(function(g,v){return j("input",{name:c,type:"hidden",value:i.getOptionValue(g)},"i-".concat(v))}):j("input",{name:c,type:"hidden",value:""});return j("div",{children:h})}else{var y=f[0]?this.getOptionValue(f[0]):"";return j("input",{name:c,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,s=this.state,o=s.ariaSelection,l=s.focusedOption,u=s.focusedValue,c=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return j(E4,se(Z({},i),{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:l,focusedValue:u,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),s=i.Control,o=i.IndicatorsContainer,l=i.SelectContainer,u=i.ValueContainer,c=this.props,d=c.className,f=c.id,p=c.isDisabled,h=c.menuIsOpen,y=this.state.isFocused,g=this.commonProps=this.getCommonProps();return ae(l,se(Z({},g),{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:y,children:[this.renderLiveRegion(),ae(s,se(Z({},g),{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:y,menuIsOpen:h,children:[ae(u,se(Z({},g),{isDisabled:p,children:[this.renderPlaceholderOrValue(),this.renderInput()]})),ae(o,se(Z({},g),{isDisabled:p,children:[this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator()]}))]})),this.renderMenu(),this.renderFormField()]}))}}],[{key:"getDerivedStateFromProps",value:function(i,s){var o=s.prevProps,l=s.clearFocusValueOnUpdate,u=s.inputIsHiddenAfterUpdate,c=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,h=i.options,y=i.value,g=i.menuIsOpen,v=i.inputValue,b=i.isMulti,w=Po(y),I={};if(o&&(y!==o.value||h!==o.options||g!==o.menuIsOpen||v!==o.inputValue)){var m=g?J4(i,w):[],A=g?Nv(Do(i,w),"".concat(p,"-option")):[],E=l?X4(s,w):null,O=Z4(s,m),T=Ic(A,O);I={selectValue:w,focusedOption:O,focusedOptionId:T,focusableOptionsWithIds:A,focusedValue:E,clearFocusValueOnUpdate:!1}}var x=u!=null&&i!==o?{inputIsHidden:u,inputIsHiddenAfterUpdate:void 0}:{},P=c,S=d&&f;return d&&!S&&(P={value:Ea(b,w,w[0]||null),options:w,action:"initial-input-focus"},S=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(P=null),we(we(we({},I),x),{},{prevProps:i,ariaSelection:P,prevWasFocused:S})}}]),n}(K.Component);No.defaultProps=K4;var tB=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ac(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,s=t.defaultValue,o=s===void 0?null:s,l=t.inputValue,u=t.menuIsOpen,c=t.onChange,d=t.onInputChange,f=t.onMenuClose,p=t.onMenuOpen,h=t.value,y=an(t,tB),g=K.useState(l!==void 0?l:n),v=yt(g,2),b=v[0],w=v[1],I=K.useState(u!==void 0?u:i),m=yt(I,2),A=m[0],E=m[1],O=K.useState(h!==void 0?h:o),T=yt(O,2),x=T[0],P=T[1],S=K.useCallback(function(z,U){typeof c=="function"&&c(z,U),P(z)},[c]),M=K.useCallback(function(z,U){var N;typeof d=="function"&&(N=d(z,U)),w(N!==void 0?N:z)},[d]),D=K.useCallback(function(){typeof p=="function"&&p(),E(!0)},[p]),L=K.useCallback(function(){typeof f=="function"&&f(),E(!1)},[f]),F=l!==void 0?l:b,H=u!==void 0?u:A,q=h!==void 0?h:x;return we(we({},y),{},{inputValue:F,menuIsOpen:H,onChange:S,onInputChange:M,onMenuClose:L,onMenuOpen:D,value:q})}var nB=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function rB(t){var e=t.defaultOptions,n=e===void 0?!1:e,r=t.cacheOptions,i=r===void 0?!1:r,s=t.loadOptions;t.options;var o=t.isLoading,l=o===void 0?!1:o,u=t.onInputChange,c=t.filterOption,d=c===void 0?null:c,f=an(t,nB),p=f.inputValue,h=K.useRef(void 0),y=K.useRef(!1),g=K.useState(Array.isArray(n)?n:void 0),v=yt(g,2),b=v[0],w=v[1],I=K.useState(typeof p!="undefined"?p:""),m=yt(I,2),A=m[0],E=m[1],O=K.useState(n===!0),T=yt(O,2),x=T[0],P=T[1],S=K.useState(void 0),M=yt(S,2),D=M[0],L=M[1],F=K.useState([]),H=yt(F,2),q=H[0],z=H[1],U=K.useState(!1),N=yt(U,2),C=N[0],R=N[1],k=K.useState({}),B=yt(k,2),W=B[0],$=B[1],Q=K.useState(void 0),Y=yt(Q,2),X=Y[0],ee=Y[1],le=K.useState(void 0),me=yt(le,2),ve=me[0],Ae=me[1];i!==ve&&($({}),Ae(i)),n!==X&&(w(Array.isArray(n)?n:void 0),ee(n)),K.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Se=K.useCallback(function(te,re){if(!s)return re();var ue=s(te,re);ue&&typeof ue.then=="function"&&ue.then(re,function(){return re()})},[s]);K.useEffect(function(){n===!0&&Se(A,function(te){!y.current||(w(te||[]),P(!!h.current))})},[]);var Ze=K.useCallback(function(te,re){var ue=q2(te,re,u);if(!ue){h.current=void 0,E(""),L(""),z([]),P(!1),R(!1);return}if(i&&W[ue])E(ue),L(ue),z(W[ue]),P(!1),R(!1);else{var he=h.current={};E(ue),P(!0),R(!D),Se(ue,function(oe){!y||he===h.current&&(h.current=void 0,P(!1),L(ue),z(oe||[]),R(!1),$(oe?we(we({},W),{},ui({},ue,oe)):W))})}},[i,Se,D,W,u]),Ve=C?[]:A&&D?q:b||[];return we(we({},f),{},{options:Ve,isLoading:x||l,onInputChange:Ze,filterOption:d})}var iB=K.forwardRef(function(t,e){var n=rB(t),r=Ac(n);return j(No,Z({ref:e},r))}),Oc=iB,Vv={},qv={exports:{}},aB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",sB=aB,oB=sB;function Wv(){}function Gv(){}Gv.resetWarningCache=Wv;var lB=function(){function t(r,i,s,o,l,u){if(u!==oB){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Gv,resetWarningCache:Wv};return n.PropTypes=n,n};qv.exports=lB();var Tc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],gi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return typeof console!="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var n=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Aa={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Dt=function(t,e){return e===void 0&&(e=2),("000"+t).slice(e*-1)},Kt=function(t){return t===!0?1:0};function zv(t,e){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return t.apply(r,i)},e)}}var Cc=function(t){return t instanceof Array?t:[t]};function Tt(t,e,n){if(n===!0)return t.classList.add(e);t.classList.remove(e)}function je(t,e,n){var r=window.document.createElement(t);return e=e||"",n=n||"",r.className=e,n!==void 0&&(r.textContent=n),r}function Lo(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qv(t,e){if(e(t))return t;if(t.parentNode)return Qv(t.parentNode,e)}function Bo(t,e){var n=je("div","numInputWrapper"),r=je("input","numInput "+t),i=je("span","arrowUp"),s=je("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),e!==void 0)for(var o in e)r.setAttribute(o,e[o]);return n.appendChild(r),n.appendChild(i),n.appendChild(s),n}function Ht(t){try{if(typeof t.composedPath=="function"){var e=t.composedPath();return e[0]}return t.target}catch(n){return t.target}}var Sc=function(){},Uo=function(t,e,n){return n.months[e?"shorthand":"longhand"][t]},uB={D:Sc,F:function(t,e,n){t.setMonth(n.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,n){t.setHours(t.getHours()%12+12*Kt(new RegExp(n.amPM[1],"i").test(e)))},M:function(t,e,n){t.setMonth(n.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,n){var r=parseInt(e),i=new Date(t.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Sc,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Sc,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},Mr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Oa={Z:function(t){return t.toISOString()},D:function(t,e,n){return e.weekdays.shorthand[Oa.w(t,e,n)]},F:function(t,e,n){return Uo(Oa.n(t,e,n)-1,!1,e)},G:function(t,e,n){return Dt(Oa.h(t,e,n))},H:function(t){return Dt(t.getHours())},J:function(t,e){return e.ordinal!==void 0?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Kt(t.getHours()>11)]},M:function(t,e){return Uo(t.getMonth(),!0,e)},S:function(t){return Dt(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,n){return n.getWeek(t)},Y:function(t){return Dt(t.getFullYear(),4)},d:function(t){return Dt(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Dt(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Dt(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},Yv=function(t){var e=t.config,n=e===void 0?gi:e,r=t.l10n,i=r===void 0?Aa:r,s=t.isMobile,o=s===void 0?!1:s;return function(l,u,c){var d=c||i;return n.formatDate!==void 0&&!o?n.formatDate(l,u,d):u.split("").map(function(f,p,h){return Oa[f]&&h[p-1]!=="\\"?Oa[f](l,d,n):f!=="\\"?f:""}).join("")}},Pc=function(t){var e=t.config,n=e===void 0?gi:e,r=t.l10n,i=r===void 0?Aa:r;return function(s,o,l,u){if(!(s!==0&&!s)){var c=u||i,d,f=s;if(s instanceof Date)d=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)d=new Date(s);else if(typeof s=="string"){var p=o||(n||gi).dateFormat,h=String(s).trim();if(h==="today")d=new Date,l=!0;else if(n&&n.parseDate)d=n.parseDate(s,p);else if(/Z$/.test(h)||/GMT$/.test(h))d=new Date(s);else{for(var y=void 0,g=[],v=0,b=0,w="";v<p.length;v++){var I=p[v],m=I==="\\",A=p[v-1]==="\\"||m;if(Mr[I]&&!A){w+=Mr[I];var E=new RegExp(w).exec(s);E&&(y=!0)&&g[I!=="Y"?"push":"unshift"]({fn:uB[I],val:E[++b]})}else m||(w+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(O){var T=O.fn,x=O.val;return d=T(d,x,c)||d}),d=y?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!0&&d.setHours(0,0,0,0),d}}};function Vt(t,e,n){return n===void 0&&(n=!0),n!==!1?new Date(t.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):t.getTime()-e.getTime()}var cB=function(t,e,n){return t>Math.min(e,n)&&t<Math.max(e,n)},Mc=function(t,e,n){return t*3600+e*60+n},dB=function(t){var e=Math.floor(t/3600),n=(t-e*3600)/60;return[e,n,t-e*3600-n*60]},fB={DAY:864e5};function Rc(t){var e=t.defaultHour,n=t.defaultMinute,r=t.defaultSeconds;if(t.minDate!==void 0){var i=t.minDate.getHours(),s=t.minDate.getMinutes(),o=t.minDate.getSeconds();e<i&&(e=i),e===i&&n<s&&(n=s),e===i&&n===s&&r<o&&(r=t.minDate.getSeconds())}if(t.maxDate!==void 0){var l=t.maxDate.getHours(),u=t.maxDate.getMinutes();e=Math.min(e,l),e===l&&(n=Math.min(u,n)),e===l&&n===u&&(r=t.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var r=function(l){l&&Object.keys(l).forEach(function(u){return t[u]=l[u]})},i=0,s=e;i<s.length;i++){var o=s[i];r(o)}return t});var It=globalThis&&globalThis.__assign||function(){return It=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},It.apply(this,arguments)},Kv=globalThis&&globalThis.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r},hB=300;function pB(t,e){var n={config:It(It({},gi),dt.defaultConfig),l10n:Aa};n.parseDate=Pc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=p,n._positionCalendar=re,n.changeMonth=C,n.changeYear=Q,n.clear=R,n.close=k,n.onMouseOver=me,n._createElement=je,n.createDay=E,n.destroy=B,n.isEnabled=Y,n.jumpToDate=w,n.updateValue=Ot,n.open=Ae,n.redraw=oe,n.set=mt,n.setDate=qe,n.toggle=ie;function r(){n.utils={getDaysInMonth:function(V,G){return V===void 0&&(V=n.currentMonth),G===void 0&&(G=n.currentYear),V===1&&(G%4===0&&G%100!==0||G%400===0)?29:n.l10n.daysInMonth[V]}}}function i(){n.element=n.input=t,n.isOpen=!1,Ze(),te(),en(),et(),r(),n.isMobile||A(),b(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&p(n.config.noCalendar?n.latestSelectedDateObj:void 0),Ot(!1)),l();var V=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&V&&re(),fe("onReady")}function s(){var V;return((V=n.calendarContainer)===null||V===void 0?void 0:V.getRootNode()).activeElement||document.activeElement}function o(V){return V.bind(n)}function l(){var V=n.config;V.weekNumbers===!1&&V.showMonths===1||V.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var G=(n.days.offsetWidth+1)*V.showMonths;n.daysContainer.style.width=G+"px",n.calendarContainer.style.width=G+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function u(V){if(n.selectedDates.length===0){var G=n.config.minDate===void 0||Vt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),J=Rc(n.config);G.setHours(J.hours,J.minutes,J.seconds,G.getMilliseconds()),n.selectedDates=[G],n.latestSelectedDateObj=G}V!==void 0&&V.type!=="blur"&&Wn(V);var ne=n._input.value;f(),Ot(),n._input.value!==ne&&n._debouncedChange()}function c(V,G){return V%12+12*Kt(G===n.l10n.amPM[1])}function d(V){switch(V%24){case 0:case 12:return 12;default:return V%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var V=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,G=(parseInt(n.minuteElement.value,10)||0)%60,J=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(V=c(V,n.amPM.textContent));var ne=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Vt(n.latestSelectedDateObj,n.config.minDate,!0)===0,de=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Vt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var pe=Mc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Re=Mc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ye=Mc(V,G,J);if(ye>Re&&ye<pe){var ke=dB(pe);V=ke[0],G=ke[1],J=ke[2]}}else{if(de){var ge=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;V=Math.min(V,ge.getHours()),V===ge.getHours()&&(G=Math.min(G,ge.getMinutes())),G===ge.getMinutes()&&(J=Math.min(J,ge.getSeconds()))}if(ne){var Ce=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;V=Math.max(V,Ce.getHours()),V===Ce.getHours()&&G<Ce.getMinutes()&&(G=Ce.getMinutes()),G===Ce.getMinutes()&&(J=Math.max(J,Ce.getSeconds()))}}h(V,G,J)}}function p(V){var G=V||n.latestSelectedDateObj;G&&G instanceof Date&&h(G.getHours(),G.getMinutes(),G.getSeconds())}function h(V,G,J){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(V%24,G,J||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Dt(n.config.time_24hr?V:(12+V)%12+12*Kt(V%12===0)),n.minuteElement.value=Dt(G),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[Kt(V>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Dt(J)))}function y(V){var G=Ht(V),J=parseInt(G.value)+(V.delta||0);(J/1e3>1||V.key==="Enter"&&!/[^\d]/.test(J.toString()))&&Q(J)}function g(V,G,J,ne){if(G instanceof Array)return G.forEach(function(de){return g(V,de,J,ne)});if(V instanceof Array)return V.forEach(function(de){return g(de,G,J,ne)});V.addEventListener(G,J,ne),n._handlers.push({remove:function(){return V.removeEventListener(G,J,ne)}})}function v(){fe("onChange")}function b(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(J){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+J+"]"),function(ne){return g(ne,"click",n[J])})}),n.isMobile){id();return}var V=zv(ve,50);if(n._debouncedChange=zv(v,hB),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(J){n.config.mode==="range"&&me(Ht(J))}),g(n._input,"keydown",le),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",le),!n.config.inline&&!n.config.static&&g(window,"resize",V),window.ontouchstart!==void 0?g(window.document,"touchstart",$):g(window.document,"mousedown",$),g(window.document,"focus",$,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Qo),g(n.monthNav,["keyup","increment"],y),g(n.daysContainer,"click",Oe)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var G=function(J){return Ht(J).select()};g(n.timeContainer,["increment"],u),g(n.timeContainer,"blur",u,{capture:!0}),g(n.timeContainer,"click",I),g([n.hourElement,n.minuteElement],["focus","click"],G),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(J){u(J)})}n.config.allowInput&&g(n._input,"blur",ee)}function w(V,G){var J=V!==void 0?n.parseDate(V):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),ne=n.currentYear,de=n.currentMonth;try{J!==void 0&&(n.currentYear=J.getFullYear(),n.currentMonth=J.getMonth())}catch(pe){pe.message="Invalid date supplied: "+J,n.config.errorHandler(pe)}G&&n.currentYear!==ne&&(fe("onYearChange"),D()),G&&(n.currentYear!==ne||n.currentMonth!==de)&&fe("onMonthChange"),n.redraw()}function I(V){var G=Ht(V);~G.className.indexOf("arrow")&&m(V,G.classList.contains("arrowUp")?1:-1)}function m(V,G,J){var ne=V&&Ht(V),de=J||ne&&ne.parentNode&&ne.parentNode.firstChild,pe=Ee("increment");pe.delta=G,de&&de.dispatchEvent(pe)}function A(){var V=window.document.createDocumentFragment();if(n.calendarContainer=je("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(V.appendChild(H()),n.innerContainer=je("div","flatpickr-innerContainer"),n.config.weekNumbers){var G=N(),J=G.weekWrapper,ne=G.weekNumbers;n.innerContainer.appendChild(J),n.weekNumbers=ne,n.weekWrapper=J}n.rContainer=je("div","flatpickr-rContainer"),n.rContainer.appendChild(z()),n.daysContainer||(n.daysContainer=je("div","flatpickr-days"),n.daysContainer.tabIndex=-1),M(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),V.appendChild(n.innerContainer)}n.config.enableTime&&V.appendChild(q()),Tt(n.calendarContainer,"rangeMode",n.config.mode==="range"),Tt(n.calendarContainer,"animate",n.config.animate===!0),Tt(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(V);var de=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!de&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var pe=je("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(pe,n.element),pe.appendChild(n.element),n.altInput&&pe.appendChild(n.altInput),pe.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function E(V,G,J,ne){var de=Y(G,!0),pe=je("span",V,G.getDate().toString());return pe.dateObj=G,pe.$i=ne,pe.setAttribute("aria-label",n.formatDate(G,n.config.ariaDateFormat)),V.indexOf("hidden")===-1&&Vt(G,n.now)===0&&(n.todayDateElem=pe,pe.classList.add("today"),pe.setAttribute("aria-current","date")),de?(pe.tabIndex=-1,Le(G)&&(pe.classList.add("selected"),n.selectedDateElem=pe,n.config.mode==="range"&&(Tt(pe,"startRange",n.selectedDates[0]&&Vt(G,n.selectedDates[0],!0)===0),Tt(pe,"endRange",n.selectedDates[1]&&Vt(G,n.selectedDates[1],!0)===0),V==="nextMonthDay"&&pe.classList.add("inRange")))):pe.classList.add("flatpickr-disabled"),n.config.mode==="range"&&xe(G)&&!Le(G)&&pe.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&V!=="prevMonthDay"&&ne%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(G)+"</span>"),fe("onDayCreate",pe),pe}function O(V){V.focus(),n.config.mode==="range"&&me(V)}function T(V){for(var G=V>0?0:n.config.showMonths-1,J=V>0?n.config.showMonths:-1,ne=G;ne!=J;ne+=V)for(var de=n.daysContainer.children[ne],pe=V>0?0:de.children.length-1,Re=V>0?de.children.length:-1,ye=pe;ye!=Re;ye+=V){var ke=de.children[ye];if(ke.className.indexOf("hidden")===-1&&Y(ke.dateObj))return ke}}function x(V,G){for(var J=V.className.indexOf("Month")===-1?V.dateObj.getMonth():n.currentMonth,ne=G>0?n.config.showMonths:-1,de=G>0?1:-1,pe=J-n.currentMonth;pe!=ne;pe+=de)for(var Re=n.daysContainer.children[pe],ye=J-n.currentMonth===pe?V.$i+G:G<0?Re.children.length-1:0,ke=Re.children.length,ge=ye;ge>=0&&ge<ke&&ge!=(G>0?ke:-1);ge+=de){var Ce=Re.children[ge];if(Ce.className.indexOf("hidden")===-1&&Y(Ce.dateObj)&&Math.abs(V.$i-ge)>=Math.abs(G))return O(Ce)}n.changeMonth(de),P(T(de),0)}function P(V,G){var J=s(),ne=X(J||document.body),de=V!==void 0?V:ne?J:n.selectedDateElem!==void 0&&X(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&X(n.todayDateElem)?n.todayDateElem:T(G>0?1:-1);de===void 0?n._input.focus():ne?x(de,G):O(de)}function S(V,G){for(var J=(new Date(V,G,1).getDay()-n.l10n.firstDayOfWeek+7)%7,ne=n.utils.getDaysInMonth((G-1+12)%12,V),de=n.utils.getDaysInMonth(G,V),pe=window.document.createDocumentFragment(),Re=n.config.showMonths>1,ye=Re?"prevMonthDay hidden":"prevMonthDay",ke=Re?"nextMonthDay hidden":"nextMonthDay",ge=ne+1-J,Ce=0;ge<=ne;ge++,Ce++)pe.appendChild(E("flatpickr-day "+ye,new Date(V,G-1,ge),ge,Ce));for(ge=1;ge<=de;ge++,Ce++)pe.appendChild(E("flatpickr-day",new Date(V,G,ge),ge,Ce));for(var Ke=de+1;Ke<=42-J&&(n.config.showMonths===1||Ce%7!==0);Ke++,Ce++)pe.appendChild(E("flatpickr-day "+ke,new Date(V,G+1,Ke%de),Ke,Ce));var kn=je("div","dayContainer");return kn.appendChild(pe),kn}function M(){if(n.daysContainer!==void 0){Lo(n.daysContainer),n.weekNumbers&&Lo(n.weekNumbers);for(var V=document.createDocumentFragment(),G=0;G<n.config.showMonths;G++){var J=new Date(n.currentYear,n.currentMonth,1);J.setMonth(n.currentMonth+G),V.appendChild(S(J.getFullYear(),J.getMonth()))}n.daysContainer.appendChild(V),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&me()}}function D(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var V=function(ne){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&ne<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&ne>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var G=0;G<12;G++)if(!!V(G)){var J=je("option","flatpickr-monthDropdown-month");J.value=new Date(n.currentYear,G).getMonth().toString(),J.textContent=Uo(G,n.config.shorthandCurrentMonth,n.l10n),J.tabIndex=-1,n.currentMonth===G&&(J.selected=!0),n.monthsDropdownContainer.appendChild(J)}}}function L(){var V=je("div","flatpickr-month"),G=window.document.createDocumentFragment(),J;n.config.showMonths>1||n.config.monthSelectorType==="static"?J=je("span","cur-month"):(n.monthsDropdownContainer=je("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Re){var ye=Ht(Re),ke=parseInt(ye.value,10);n.changeMonth(ke-n.currentMonth),fe("onMonthChange")}),D(),J=n.monthsDropdownContainer);var ne=Bo("cur-year",{tabindex:"-1"}),de=ne.getElementsByTagName("input")[0];de.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&de.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(de.setAttribute("max",n.config.maxDate.getFullYear().toString()),de.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var pe=je("div","flatpickr-current-month");return pe.appendChild(J),pe.appendChild(ne),G.appendChild(pe),V.appendChild(G),{container:V,yearElement:de,monthElement:J}}function F(){Lo(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var V=n.config.showMonths;V--;){var G=L();n.yearElements.push(G.yearElement),n.monthElements.push(G.monthElement),n.monthNav.appendChild(G.container)}n.monthNav.appendChild(n.nextMonthNav)}function H(){return n.monthNav=je("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=je("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=je("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,F(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(V){n.__hidePrevMonthArrow!==V&&(Tt(n.prevMonthNav,"flatpickr-disabled",V),n.__hidePrevMonthArrow=V)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(V){n.__hideNextMonthArrow!==V&&(Tt(n.nextMonthNav,"flatpickr-disabled",V),n.__hideNextMonthArrow=V)}}),n.currentYearElement=n.yearElements[0],ft(),n.monthNav}function q(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var V=Rc(n.config);n.timeContainer=je("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var G=je("span","flatpickr-time-separator",":"),J=Bo("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=J.getElementsByTagName("input")[0];var ne=Bo("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=ne.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?V.hours:d(V.hours)),n.minuteElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():V.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(J),n.timeContainer.appendChild(G),n.timeContainer.appendChild(ne),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var de=Bo("flatpickr-second");n.secondElement=de.getElementsByTagName("input")[0],n.secondElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():V.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(je("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(de)}return n.config.time_24hr||(n.amPM=je("span","flatpickr-am-pm",n.l10n.amPM[Kt((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function z(){n.weekdayContainer?Lo(n.weekdayContainer):n.weekdayContainer=je("div","flatpickr-weekdays");for(var V=n.config.showMonths;V--;){var G=je("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(G)}return U(),n.weekdayContainer}function U(){if(!!n.weekdayContainer){var V=n.l10n.firstDayOfWeek,G=Kv(n.l10n.weekdays.shorthand);V>0&&V<G.length&&(G=Kv(G.splice(V,G.length),G.splice(0,V)));for(var J=n.config.showMonths;J--;)n.weekdayContainer.children[J].innerHTML=`
|
|
2330
|
+
`]))),xL=function(e,n){var r=e.isFocused,i=e.size,s=e.theme,o=s.colors,l=s.spacing.baseUnit;return we({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:l*2})},gc=function(e){var n=e.delay,r=e.offset;return be("span",{css:ac({animation:"".concat(kL," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},DL=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,s=i===void 0?4:i,o=an(e,AL);return be("div",Ge({},rt(we(we({},o),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),be(gc,{delay:0,offset:r}),be(gc,{delay:160,offset:!0}),be(gc,{delay:320,offset:!r}))},FL=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.theme,o=s.colors,l=s.borderRadius,u=s.spacing;return we({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:u.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},NL=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.innerRef,o=e.innerProps,l=e.menuIsOpen;return be("div",Ge({ref:s},rt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),o,{"aria-disabled":r||void 0}),n)},LL=NL,BL=["data"],UL=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},$L=function(e){var n=e.children,r=e.cx,i=e.getStyles,s=e.getClassNames,o=e.Heading,l=e.headingProps,u=e.innerProps,c=e.label,d=e.theme,f=e.selectProps;return be("div",Ge({},rt(e,"group",{group:!0}),u),be(o,Ge({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:s,cx:r}),c),be("div",null,n))},jL=function(e,n){var r=e.theme,i=r.colors,s=r.spacing;return we({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},HL=function(e){var n=iv(e);n.data;var r=an(n,BL);return be("div",Ge({},rt(e,"groupHeading",{"group-heading":!0}),r))},VL=$L,qL=["innerRef","isDisabled","isHidden","inputClassName"],WL=function(e,n){var r=e.isDisabled,i=e.value,s=e.theme,o=s.spacing,l=s.colors;return we(we({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},GL),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:l.neutral80})},gv={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},GL={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":we({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},gv)},zL=function(e){return we({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},gv)},QL=function(e){var n=e.cx,r=e.value,i=iv(e),s=i.innerRef,o=i.isDisabled,l=i.isHidden,u=i.inputClassName,c=an(i,qL);return be("div",Ge({},rt(e,"input",{"input-container":!0}),{"data-value":r||""}),be("input",Ge({className:n({input:!0},u),ref:s,style:zL(l),disabled:o},c)))},YL=QL,KL=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors;return we({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:i.baseUnit/2})},JL=function(e,n){var r=e.theme,i=r.borderRadius,s=r.colors,o=e.cropWithEllipsis;return we({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},XL=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors,l=e.isFocused;return we({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},vv=function(e){var n=e.children,r=e.innerProps;return be("div",r,n)},ZL=vv,e4=vv;function t4(t){var e=t.children,n=t.innerProps;return be("div",Ge({role:"button"},n),e||be(mc,{size:14}))}var n4=function(e){var n=e.children,r=e.components,i=e.data,s=e.innerProps,o=e.isDisabled,l=e.removeProps,u=e.selectProps,c=r.Container,d=r.Label,f=r.Remove;return be(c,{data:i,innerProps:we(we({},rt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:u},be(d,{data:i,innerProps:we({},rt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:u},n),be(f,{data:i,innerProps:we(we({},rt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:u}))},r4=n4,i4=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.theme,l=o.spacing,u=o.colors;return we({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?u.primary:i?u.primary25:"transparent",color:r?u.neutral20:s?u.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?u.primary:u.primary50}})},a4=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.innerRef,l=e.innerProps;return be("div",Ge({},rt(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":s}),{ref:o,"aria-disabled":r},l),n)},s4=a4,o4=function(e,n){var r=e.theme,i=r.spacing,s=r.colors;return we({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},l4=function(e){var n=e.children,r=e.innerProps;return be("div",Ge({},rt(e,"placeholder",{placeholder:!0}),r),n)},u4=l4,c4=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing,o=i.colors;return we({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},d4=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return be("div",Ge({},rt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},f4=d4,h4={ClearIndicator:PL,Control:LL,DropdownIndicator:CL,DownChevron:pv,CrossIcon:mc,Group:VL,GroupHeading:HL,IndicatorsContainer:EL,IndicatorSeparator:RL,Input:YL,LoadingIndicator:DL,Menu:lL,MenuList:cL,MenuPortal:gL,LoadingMessage:pL,NoOptionsMessage:hL,MultiValue:r4,MultiValueContainer:ZL,MultiValueLabel:e4,MultiValueRemove:t4,Option:s4,Placeholder:u4,SelectContainer:yL,SingleValue:f4,ValueContainer:bL},p4=function(e){return we(we({},h4),e.components)},yv=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function m4(t,e){return!!(t===e||yv(t)&&yv(e))}function g4(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!m4(t[n],e[n]))return!1;return!0}function v4(t,e){e===void 0&&(e=g4);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var o=t.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}for(var y4={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},w4=function(e){return be("span",Ge({css:y4},e))},wv=w4,b4={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.tabSelectsValue,s=e.context,o=e.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,s=e.labels,o=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,s=e.label,o=s===void 0?"":s,l=e.selectValue,u=e.isDisabled,c=e.isSelected,d=e.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&l)return"value ".concat(o," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=u?" disabled":"",h="".concat(c?" selected":"").concat(p);return"".concat(o).concat(h,", ").concat(f(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},_4=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,s=e.focusableOptions,o=e.isFocused,l=e.selectValue,u=e.selectProps,c=e.id,d=e.isAppleDevice,f=u.ariaLiveMessages,p=u.getOptionLabel,h=u.inputValue,y=u.isMulti,g=u.isOptionDisabled,v=u.isSearchable,b=u.menuIsOpen,w=u.options,I=u.screenReaderStatus,m=u.tabSelectsValue,A=u.isLoading,E=u["aria-label"],O=u["aria-live"],T=K.useMemo(function(){return we(we({},b4),f||{})},[f]),x=K.useMemo(function(){var N="";if(n&&T.onChange){var H=n.option,q=n.options,z=n.removedValue,U=n.removedValues,F=n.value,C=function(Y){return Array.isArray(Y)?null:Y},M=z||H||C(F),k=M?p(M):"",B=q||U||void 0,W=B?B.map(p):[],$=we({isDisabled:M&&g(M,l),label:k,labels:W},n);N=T.onChange($)}return N},[n,T,g,l,p]),P=K.useMemo(function(){var N="",H=r||i,q=!!(r&&l&&l.includes(r));if(H&&T.onFocus){var z={focused:H,label:p(H),isDisabled:g(H,l),isSelected:q,options:s,context:H===r?"menu":"value",selectValue:l,isAppleDevice:d};N=T.onFocus(z)}return N},[r,i,p,g,T,s,l,d]),S=K.useMemo(function(){var N="";if(b&&w.length&&!A&&T.onFilter){var H=I({count:s.length});N=T.onFilter({inputValue:h,resultsMessage:H})}return N},[s,h,b,T,w,I,A]),R=(n==null?void 0:n.action)==="initial-input-focus",D=K.useMemo(function(){var N="";if(T.guidance){var H=i?"value":b?"menu":"input";N=T.guidance({"aria-label":E,context:H,isDisabled:r&&g(r,l),isMulti:y,isSearchable:v,tabSelectsValue:m,isInitialFocus:R})}return N},[E,r,i,y,g,v,b,T,l,m,R]),L=be(K.Fragment,null,be("span",{id:"aria-selection"},x),be("span",{id:"aria-focused"},P),be("span",{id:"aria-results"},S),be("span",{id:"aria-guidance"},D));return be(K.Fragment,null,be(wv,{id:c},R&&L),be(wv,{"aria-live":O,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!R&&L))},E4=_4,vc=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],I4=new RegExp("["+vc.map(function(t){return t.letters}).join("")+"]","g"),bv={},yc=0;yc<vc.length;yc++)for(var wc=vc[yc],bc=0;bc<wc.letters.length;bc++)bv[wc.letters[bc]]=wc.base;var _v=function(e){return e.replace(I4,function(n){return bv[n]})},A4=v4(_v),Ev=function(e){return e.replace(/^\s+|\s+$/g,"")},O4=function(e){return"".concat(e.label," ").concat(e.value)},T4=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=we({ignoreCase:!0,ignoreAccents:!0,stringify:O4,trim:!0,matchFrom:"any"},e),s=i.ignoreCase,o=i.ignoreAccents,l=i.stringify,u=i.trim,c=i.matchFrom,d=u?Ev(r):r,f=u?Ev(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),o&&(d=A4(d),f=_v(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},C4=["innerRef"];function S4(t){var e=t.innerRef,n=an(t,C4),r=eL(n,"onExited","in","enter","exit","appear");return be("input",Ge({ref:e},r,{css:ac({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var P4=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function M4(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,s=t.onTopLeave,o=K.useRef(!1),l=K.useRef(!1),u=K.useRef(0),c=K.useRef(null),d=K.useCallback(function(v,b){if(c.current!==null){var w=c.current,I=w.scrollTop,m=w.scrollHeight,A=w.clientHeight,E=c.current,O=b>0,T=m-A-I,x=!1;T>b&&o.current&&(r&&r(v),o.current=!1),O&&l.current&&(s&&s(v),l.current=!1),O&&b>T?(n&&!o.current&&n(v),E.scrollTop=m,x=!0,o.current=!0):!O&&-b>I&&(i&&!l.current&&i(v),E.scrollTop=0,x=!0,l.current=!0),x&&P4(v)}},[n,r,i,s]),f=K.useCallback(function(v){d(v,v.deltaY)},[d]),p=K.useCallback(function(v){u.current=v.changedTouches[0].clientY},[]),h=K.useCallback(function(v){var b=u.current-v.changedTouches[0].clientY;d(v,b)},[d]),y=K.useCallback(function(v){if(!!v){var b=J2?{passive:!1}:!1;v.addEventListener("wheel",f,b),v.addEventListener("touchstart",p,b),v.addEventListener("touchmove",h,b)}},[h,p,f]),g=K.useCallback(function(v){!v||(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",p,!1),v.removeEventListener("touchmove",h,!1))},[h,p,f]);return K.useEffect(function(){if(!!e){var v=c.current;return y(v),function(){g(v)}}},[e,y,g]),function(v){c.current=v}}var Iv=["boxSizing","height","overflow","paddingRight","position"],Av={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ov(t){t.preventDefault()}function Tv(t){t.stopPropagation()}function Cv(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function Sv(){return"ontouchstart"in window||navigator.maxTouchPoints}var Pv=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Ia=0,mi={capture:!1,passive:!1};function R4(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=K.useRef({}),s=K.useRef(null),o=K.useCallback(function(u){if(!!Pv){var c=document.body,d=c&&c.style;if(r&&Iv.forEach(function(y){var g=d&&d[y];i.current[y]=g}),r&&Ia<1){var f=parseInt(i.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,h=window.innerWidth-p+f||0;Object.keys(Av).forEach(function(y){var g=Av[y];d&&(d[y]=g)}),d&&(d.paddingRight="".concat(h,"px"))}c&&Sv()&&(c.addEventListener("touchmove",Ov,mi),u&&(u.addEventListener("touchstart",Cv,mi),u.addEventListener("touchmove",Tv,mi))),Ia+=1}},[r]),l=K.useCallback(function(u){if(!!Pv){var c=document.body,d=c&&c.style;Ia=Math.max(Ia-1,0),r&&Ia<1&&Iv.forEach(function(f){var p=i.current[f];d&&(d[f]=p)}),c&&Sv()&&(c.removeEventListener("touchmove",Ov,mi),u&&(u.removeEventListener("touchstart",Cv,mi),u.removeEventListener("touchmove",Tv,mi)))}},[r]);return K.useEffect(function(){if(!!e){var u=s.current;return o(u),function(){l(u)}}},[e,o,l]),function(u){s.current=u}}var k4=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},x4={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function D4(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,s=t.onBottomArrive,o=t.onBottomLeave,l=t.onTopArrive,u=t.onTopLeave,c=M4({isEnabled:i,onBottomArrive:s,onBottomLeave:o,onTopArrive:l,onTopLeave:u}),d=R4({isEnabled:n}),f=function(h){c(h),d(h)};return be(K.Fragment,null,n&&be("div",{onClick:k4,css:x4}),e(f))}var F4={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},N4=function(e){var n=e.name,r=e.onFocus;return be("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:F4,value:"",onChange:function(){}})},L4=N4;function _c(t){var e;return typeof window!="undefined"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function B4(){return _c(/^iPhone/i)}function Mv(){return _c(/^Mac/i)}function U4(){return _c(/^iPad/i)||Mv()&&navigator.maxTouchPoints>1}function $4(){return B4()||U4()}function j4(){return Mv()||$4()}var H4=function(e){return e.label},Rv=function(e){return e.label},kv=function(e){return e.value},V4=function(e){return!!e.isDisabled},q4={clearIndicator:SL,container:vL,control:FL,dropdownIndicator:TL,group:UL,groupHeading:jL,indicatorsContainer:_L,indicatorSeparator:ML,input:WL,loadingIndicator:xL,loadingMessage:fL,menu:aL,menuList:uL,menuPortal:mL,multiValue:KL,multiValueLabel:JL,multiValueRemove:XL,noOptionsMessage:dL,option:i4,placeholder:o4,singleValue:c4,valueContainer:wL},W4={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},G4=4,xv=4,z4=38,Q4=xv*2,Y4={baseUnit:xv,controlHeight:z4,menuGutter:Q4},Ec={borderRadius:G4,colors:W4,spacing:Y4},K4={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ov(),captureMenuScroll:!ov(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:T4(),formatGroupLabel:H4,getOptionLabel:Rv,getOptionValue:kv,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:V4,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Y2(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Dv(t,e,n,r){var i=Uv(t,e,n),s=$v(t,e,n),o=Bv(t,e),l=Fo(t,e);return{type:"option",data:e,isDisabled:i,isSelected:s,label:o,value:l,index:r}}function Do(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,l){return Dv(t,o,e,l)}).filter(function(o){return Lv(t,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var s=Dv(t,n,e,r);return Lv(t,s)?s:void 0}).filter(X2)}function Fv(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,ci(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function Nv(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ci(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function J4(t,e){return Fv(Do(t,e))}function Lv(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,s=e.isSelected,o=e.label,l=e.value;return(!Hv(t)||!s)&&jv(t,{label:o,value:l,data:i},r)}function X4(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var s=e.indexOf(n);if(s>-1)return n;if(i<e.length)return e[i]}return null}function Z4(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Ic=function(e,n){var r,i=(r=e.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return i||null},Bv=function(e,n){return e.getOptionLabel(n)},Fo=function(e,n){return e.getOptionValue(n)};function Uv(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function $v(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=Fo(t,e);return n.some(function(i){return Fo(t,i)===r})}function jv(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var Hv=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},eB=1,No=function(t){rN(n,t);var e=sN(n);function n(r){var i;if(tN(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=j4(),i.controlRef=null,i.getControlRef=function(u){i.controlRef=u},i.focusedOptionRef=null,i.getFocusedOptionRef=function(u){i.focusedOptionRef=u},i.menuListRef=null,i.getMenuListRef=function(u){i.menuListRef=u},i.inputRef=null,i.getInputRef=function(u){i.inputRef=u},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(u,c){var d=i.props,f=d.onChange,p=d.name;c.name=p,i.ariaOnChange(u,c),f(u,c)},i.setValue=function(u,c,d){var f=i.props,p=f.closeMenuOnSelect,h=f.isMulti,y=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:y}),p&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(u,{action:c,option:d})},i.selectOption=function(u){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,p=c.name,h=i.state.selectValue,y=f&&i.isOptionSelected(u,h),g=i.isOptionDisabled(u,h);if(y){var v=i.getOptionValue(u);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==v}),"deselect-option",u)}else if(!g)f?i.setValue([].concat(ci(h),[u]),"select-option",u):i.setValue(u,"select-option");else{i.ariaOnChange(u,{action:"select-option",option:u,name:p});return}d&&i.blurInput()},i.removeValue=function(u){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(u),p=d.filter(function(y){return i.getOptionValue(y)!==f}),h=Ea(c,p,p[0]||null);i.onChange(h,{action:"remove-value",removedValue:u}),i.focusInput()},i.clearValue=function(){var u=i.state.selectValue;i.onChange(Ea(i.props.isMulti,[],null),{action:"clear",removedValues:u})},i.popValue=function(){var u=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),p=Ea(u,f,f[0]||null);i.onChange(p,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(u){return Ic(i.state.focusableOptionsWithIds,u)},i.getFocusableOptionsWithIds=function(){return Nv(Do(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return V2.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(u){return Bv(i.props,u)},i.getOptionValue=function(u){return Fo(i.props,u)},i.getStyles=function(u,c){var d=i.props.unstyled,f=q4[u](c,d);f.boxSizing="border-box";var p=i.props.styles[u];return p?p(f,c):f},i.getClassNames=function(u,c){var d,f;return(d=(f=i.props.classNames)[u])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(u){return"".concat(i.state.instancePrefix,"-").concat(u)},i.getComponents=function(){return p4(i.props)},i.buildCategorizedOptions=function(){return Do(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Fv(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(u,c){i.setState({ariaSelection:we({value:u},c)})},i.onMenuMouseDown=function(u){u.button===0&&(u.stopPropagation(),u.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(u){i.blockOptionHover=!1},i.onControlMouseDown=function(u){if(!u.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&u.preventDefault()}},i.onDropdownIndicatorMouseDown=function(u){if(!(u&&u.type==="mousedown"&&u.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),u.preventDefault()}},i.onClearIndicatorMouseDown=function(u){u&&u.type==="mousedown"&&u.button!==0||(i.clearValue(),u.preventDefault(),i.openAfterFocus=!1,u.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(u){typeof i.props.closeMenuOnScroll=="boolean"?u.target instanceof HTMLElement&&Mo(u.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(u)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(u){var c=u.touches,d=c&&c.item(0);!d||(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(u){var c=u.touches,d=c&&c.item(0);if(!!d){var f=Math.abs(d.clientX-i.initialTouchX),p=Math.abs(d.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||p>h}},i.onTouchEnd=function(u){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(u.target)&&i.menuListRef&&!i.menuListRef.contains(u.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(u){i.userIsDragging||i.onControlMouseDown(u)},i.onClearIndicatorTouchEnd=function(u){i.userIsDragging||i.onClearIndicatorMouseDown(u)},i.onDropdownIndicatorTouchEnd=function(u){i.userIsDragging||i.onDropdownIndicatorMouseDown(u)},i.handleInputChange=function(u){var c=i.props.inputValue,d=u.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(u){i.props.onFocus&&i.props.onFocus(u),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(u){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(u),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(u){if(!(i.blockOptionHover||i.state.focusedOption===u)){var c=i.getFocusableOptions(),d=c.indexOf(u);i.setState({focusedOption:u,focusedOptionId:d>-1?i.getFocusedOptionId(u):null})}},i.shouldHideSelectedOptions=function(){return Hv(i.props)},i.onValueInputFocus=function(u){u.preventDefault(),u.stopPropagation(),i.focus()},i.onKeyDown=function(u){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,p=c.escapeClearsValue,h=c.inputValue,y=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,b=c.onKeyDown,w=c.tabSelectsValue,I=c.openMenuOnFocus,m=i.state,A=m.focusedOption,E=m.focusedValue,O=m.selectValue;if(!g&&!(typeof b=="function"&&(b(u),u.defaultPrevented))){switch(i.blockOptionHover=!0,u.key){case"ArrowLeft":if(!d||h)return;i.focusValue("previous");break;case"ArrowRight":if(!d||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(E)i.removeValue(E);else{if(!f)return;d?i.popValue():y&&i.clearValue()}break;case"Tab":if(i.isComposing||u.shiftKey||!v||!w||!A||I&&i.isOptionSelected(A,O))return;i.selectOption(A);break;case"Enter":if(u.keyCode===229)break;if(v){if(!A||i.isComposing)return;i.selectOption(A);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):y&&p&&i.clearValue();break;case" ":if(h)return;if(!v){i.openMenu("first");break}if(!A)return;i.selectOption(A);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}u.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++eB),i.state.selectValue=Po(r.value),r.menuIsOpen&&i.state.selectValue.length){var s=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),l=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=s,i.state.focusedOption=o[l],i.state.focusedOptionId=Ic(s,o[l])}return i}return nN(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isDisabled,l=s.menuIsOpen,u=this.state.isFocused;(u&&!o&&i.isDisabled||u&&l&&!i.menuIsOpen)&&this.focusInput(),u&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!u&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,s){this.props.onInputChange(i,s)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(i){var s=this,o=this.state,l=o.selectValue,u=o.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(u&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(i){var s=this.state,o=s.selectValue,l=s.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var u=o.indexOf(l);l||(u=-1);var c=o.length-1,d=-1;if(!!o.length){switch(i){case"previous":u===0?d=0:u===-1?d=c:d=u-1;break;case"next":u>-1&&u<c&&(d=u+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,l=this.getFocusableOptions();if(!!l.length){var u=0,c=l.indexOf(o);o||(c=-1),i==="up"?u=c>0?c-1:l.length-1:i==="down"?u=(c+1)%l.length:i==="pageup"?(u=c-s,u<0&&(u=0)):i==="pagedown"?(u=c+s,u>l.length-1&&(u=l.length-1)):i==="last"&&(u=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[u],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[u])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ec):we(we({},Ec),this.props.theme):Ec}},{key:"getCommonProps",value:function(){var i=this.clearValue,s=this.cx,o=this.getStyles,l=this.getClassNames,u=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,h=f.isRtl,y=f.options,g=this.hasValue();return{clearValue:i,cx:s,getStyles:o,getClassNames:l,getValue:u,hasValue:g,isMulti:p,isRtl:h,options:y,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,s=i.isClearable,o=i.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(i,s){return Uv(this.props,i,s)}},{key:"isOptionSelected",value:function(i,s){return $v(this.props,i,s)}},{key:"filterOption",value:function(i,s){return jv(this.props,i,s)}},{key:"formatOptionLabel",value:function(i,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:s,inputValue:o,selectValue:l})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,s=i.isDisabled,o=i.isSearchable,l=i.inputId,u=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,p=i.required,h=this.getComponents(),y=h.Input,g=this.state,v=g.inputIsHidden,b=g.ariaSelection,w=this.commonProps,I=l||this.getElementId("input"),m=we(we(we({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?j(y,Z(se(Z({},w),{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:I,innerRef:this.getInputRef,isDisabled:s,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:u}),m)):j(S4,Z({id:I,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:So,onFocus:this.onInputFocus,disabled:s,tabIndex:c,inputMode:"none",form:d,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,s=this.getComponents(),o=s.MultiValue,l=s.MultiValueContainer,u=s.MultiValueLabel,c=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,h=this.props,y=h.controlShouldRenderValue,g=h.isDisabled,v=h.isMulti,b=h.inputValue,w=h.placeholder,I=this.state,m=I.selectValue,A=I.focusedValue,E=I.isFocused;if(!this.hasValue()||!y)return b?null:K.createElement(f,se(Z({},p),{key:"placeholder",isDisabled:g,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return m.map(function(T,x){var P=T===A,S="".concat(i.getOptionLabel(T),"-").concat(i.getOptionValue(T));return K.createElement(o,se(Z({},p),{components:{Container:l,Label:u,Remove:c},isFocused:P,isDisabled:g,key:S,index:x,removeProps:{onClick:function(){return i.removeValue(T)},onTouchEnd:function(){return i.removeValue(T)},onMouseDown:function(D){D.preventDefault()}},data:T}),i.formatOptionLabel(T,"value"))});if(b)return null;var O=m[0];return j(d,se(Z({},p),{data:O,isDisabled:g,children:this.formatOptionLabel(O,"value")}))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),s=i.ClearIndicator,o=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||u||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),s=i.LoadingIndicator,o=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!s||!c)return null;var f={"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:f,isDisabled:u,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator,o=i.IndicatorSeparator;if(!s||!o)return null;var l=this.commonProps,u=this.props.isDisabled,c=this.state.isFocused;return j(o,se(Z({},l),{isDisabled:u,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator;if(!s)return null;var o=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return j(s,se(Z({},o),{innerProps:c,isDisabled:l,isFocused:u}))}},{key:"renderMenu",value:function(){var i=this,s=this.getComponents(),o=s.Group,l=s.GroupHeading,u=s.Menu,c=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,h=s.Option,y=this.commonProps,g=this.state.focusedOption,v=this.props,b=v.captureMenuScroll,w=v.inputValue,I=v.isLoading,m=v.loadingMessage,A=v.minMenuHeight,E=v.maxMenuHeight,O=v.menuIsOpen,T=v.menuPlacement,x=v.menuPosition,P=v.menuPortalTarget,S=v.menuShouldBlockScroll,R=v.menuShouldScrollIntoView,D=v.noOptionsMessage,L=v.onMenuScrollToTop,N=v.onMenuScrollToBottom;if(!O)return null;var H=function(k,B){var W=k.type,$=k.data,Q=k.isDisabled,Y=k.isSelected,X=k.label,ee=k.value,le=g===$,me=Q?void 0:function(){return i.onOptionHover($)},ve=Q?void 0:function(){return i.selectOption($)},Ae="".concat(i.getElementId("option"),"-").concat(B),Se={id:Ae,onClick:ve,onMouseMove:me,onMouseOver:me,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:Y};return K.createElement(h,se(Z({},y),{innerProps:Se,data:$,isDisabled:Q,isSelected:Y,key:Ae,label:X,type:W,value:ee,isFocused:le,innerRef:le?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(k.data,"menu"))},q;if(this.hasOptions())q=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var k=M.data,B=M.options,W=M.index,$="".concat(i.getElementId("group"),"-").concat(W),Q="".concat($,"-heading");return K.createElement(o,se(Z({},y),{key:$,data:k,options:B,Heading:l,headingProps:{id:Q,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(Y){return H(Y,"".concat(W,"-").concat(Y.index))}))}else if(M.type==="option")return H(M,"".concat(M.index))});else if(I){var z=m({inputValue:w});if(z===null)return null;q=j(f,se(Z({},y),{children:z}))}else{var U=D({inputValue:w});if(U===null)return null;q=j(p,se(Z({},y),{children:U}))}var F={minMenuHeight:A,maxMenuHeight:E,menuPlacement:T,menuPosition:x,menuShouldScrollIntoView:R},C=j(sL,se(Z(Z({},y),F),{children:function(M){var k=M.ref,B=M.placerProps,W=B.placement,$=B.maxHeight;return j(u,se(Z(Z({},y),F),{innerRef:k,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:I,placement:W,children:j(D4,{captureEnabled:b,onTopArrive:L,onBottomArrive:N,lockEnabled:S,children:function(Q){return j(c,se(Z({},y),{innerRef:function(X){i.getMenuListRef(X),Q(X)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:i.getElementId("listbox")},isLoading:I,maxHeight:$,focusedOption:g,children:q}))}})}))}}));return P||x==="fixed"?j(d,se(Z({},y),{appendTo:P,controlElement:this.controlRef,menuPlacement:T,menuPosition:x,children:C})):C}},{key:"renderFormField",value:function(){var i=this,s=this.props,o=s.delimiter,l=s.isDisabled,u=s.isMulti,c=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return j(L4,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(u)if(o){var p=f.map(function(g){return i.getOptionValue(g)}).join(o);return j("input",{name:c,type:"hidden",value:p})}else{var h=f.length>0?f.map(function(g,v){return j("input",{name:c,type:"hidden",value:i.getOptionValue(g)},"i-".concat(v))}):j("input",{name:c,type:"hidden",value:""});return j("div",{children:h})}else{var y=f[0]?this.getOptionValue(f[0]):"";return j("input",{name:c,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,s=this.state,o=s.ariaSelection,l=s.focusedOption,u=s.focusedValue,c=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return j(E4,se(Z({},i),{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:l,focusedValue:u,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),s=i.Control,o=i.IndicatorsContainer,l=i.SelectContainer,u=i.ValueContainer,c=this.props,d=c.className,f=c.id,p=c.isDisabled,h=c.menuIsOpen,y=this.state.isFocused,g=this.commonProps=this.getCommonProps();return ae(l,se(Z({},g),{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:y,children:[this.renderLiveRegion(),ae(s,se(Z({},g),{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:y,menuIsOpen:h,children:[ae(u,se(Z({},g),{isDisabled:p,children:[this.renderPlaceholderOrValue(),this.renderInput()]})),ae(o,se(Z({},g),{isDisabled:p,children:[this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator()]}))]})),this.renderMenu(),this.renderFormField()]}))}}],[{key:"getDerivedStateFromProps",value:function(i,s){var o=s.prevProps,l=s.clearFocusValueOnUpdate,u=s.inputIsHiddenAfterUpdate,c=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,h=i.options,y=i.value,g=i.menuIsOpen,v=i.inputValue,b=i.isMulti,w=Po(y),I={};if(o&&(y!==o.value||h!==o.options||g!==o.menuIsOpen||v!==o.inputValue)){var m=g?J4(i,w):[],A=g?Nv(Do(i,w),"".concat(p,"-option")):[],E=l?X4(s,w):null,O=Z4(s,m),T=Ic(A,O);I={selectValue:w,focusedOption:O,focusedOptionId:T,focusableOptionsWithIds:A,focusedValue:E,clearFocusValueOnUpdate:!1}}var x=u!=null&&i!==o?{inputIsHidden:u,inputIsHiddenAfterUpdate:void 0}:{},P=c,S=d&&f;return d&&!S&&(P={value:Ea(b,w,w[0]||null),options:w,action:"initial-input-focus"},S=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(P=null),we(we(we({},I),x),{},{prevProps:i,ariaSelection:P,prevWasFocused:S})}}]),n}(K.Component);No.defaultProps=K4;var tB=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ac(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,s=t.defaultValue,o=s===void 0?null:s,l=t.inputValue,u=t.menuIsOpen,c=t.onChange,d=t.onInputChange,f=t.onMenuClose,p=t.onMenuOpen,h=t.value,y=an(t,tB),g=K.useState(l!==void 0?l:n),v=yt(g,2),b=v[0],w=v[1],I=K.useState(u!==void 0?u:i),m=yt(I,2),A=m[0],E=m[1],O=K.useState(h!==void 0?h:o),T=yt(O,2),x=T[0],P=T[1],S=K.useCallback(function(z,U){typeof c=="function"&&c(z,U),P(z)},[c]),R=K.useCallback(function(z,U){var F;typeof d=="function"&&(F=d(z,U)),w(F!==void 0?F:z)},[d]),D=K.useCallback(function(){typeof p=="function"&&p(),E(!0)},[p]),L=K.useCallback(function(){typeof f=="function"&&f(),E(!1)},[f]),N=l!==void 0?l:b,H=u!==void 0?u:A,q=h!==void 0?h:x;return we(we({},y),{},{inputValue:N,menuIsOpen:H,onChange:S,onInputChange:R,onMenuClose:L,onMenuOpen:D,value:q})}var nB=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function rB(t){var e=t.defaultOptions,n=e===void 0?!1:e,r=t.cacheOptions,i=r===void 0?!1:r,s=t.loadOptions;t.options;var o=t.isLoading,l=o===void 0?!1:o,u=t.onInputChange,c=t.filterOption,d=c===void 0?null:c,f=an(t,nB),p=f.inputValue,h=K.useRef(void 0),y=K.useRef(!1),g=K.useState(Array.isArray(n)?n:void 0),v=yt(g,2),b=v[0],w=v[1],I=K.useState(typeof p!="undefined"?p:""),m=yt(I,2),A=m[0],E=m[1],O=K.useState(n===!0),T=yt(O,2),x=T[0],P=T[1],S=K.useState(void 0),R=yt(S,2),D=R[0],L=R[1],N=K.useState([]),H=yt(N,2),q=H[0],z=H[1],U=K.useState(!1),F=yt(U,2),C=F[0],M=F[1],k=K.useState({}),B=yt(k,2),W=B[0],$=B[1],Q=K.useState(void 0),Y=yt(Q,2),X=Y[0],ee=Y[1],le=K.useState(void 0),me=yt(le,2),ve=me[0],Ae=me[1];i!==ve&&($({}),Ae(i)),n!==X&&(w(Array.isArray(n)?n:void 0),ee(n)),K.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Se=K.useCallback(function(te,re){if(!s)return re();var ue=s(te,re);ue&&typeof ue.then=="function"&&ue.then(re,function(){return re()})},[s]);K.useEffect(function(){n===!0&&Se(A,function(te){!y.current||(w(te||[]),P(!!h.current))})},[]);var Ze=K.useCallback(function(te,re){var ue=q2(te,re,u);if(!ue){h.current=void 0,E(""),L(""),z([]),P(!1),M(!1);return}if(i&&W[ue])E(ue),L(ue),z(W[ue]),P(!1),M(!1);else{var he=h.current={};E(ue),P(!0),M(!D),Se(ue,function(oe){!y||he===h.current&&(h.current=void 0,P(!1),L(ue),z(oe||[]),M(!1),$(oe?we(we({},W),{},ui({},ue,oe)):W))})}},[i,Se,D,W,u]),Ve=C?[]:A&&D?q:b||[];return we(we({},f),{},{options:Ve,isLoading:x||l,onInputChange:Ze,filterOption:d})}var iB=K.forwardRef(function(t,e){var n=rB(t),r=Ac(n);return j(No,Z({ref:e},r))}),Oc=iB,Vv={},qv={exports:{}},aB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",sB=aB,oB=sB;function Wv(){}function Gv(){}Gv.resetWarningCache=Wv;var lB=function(){function t(r,i,s,o,l,u){if(u!==oB){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Gv,resetWarningCache:Wv};return n.PropTypes=n,n};qv.exports=lB();var Tc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],gi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return typeof console!="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var n=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Aa={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Dt=function(t,e){return e===void 0&&(e=2),("000"+t).slice(e*-1)},Kt=function(t){return t===!0?1:0};function zv(t,e){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return t.apply(r,i)},e)}}var Cc=function(t){return t instanceof Array?t:[t]};function Tt(t,e,n){if(n===!0)return t.classList.add(e);t.classList.remove(e)}function je(t,e,n){var r=window.document.createElement(t);return e=e||"",n=n||"",r.className=e,n!==void 0&&(r.textContent=n),r}function Lo(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qv(t,e){if(e(t))return t;if(t.parentNode)return Qv(t.parentNode,e)}function Bo(t,e){var n=je("div","numInputWrapper"),r=je("input","numInput "+t),i=je("span","arrowUp"),s=je("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),e!==void 0)for(var o in e)r.setAttribute(o,e[o]);return n.appendChild(r),n.appendChild(i),n.appendChild(s),n}function Ht(t){try{if(typeof t.composedPath=="function"){var e=t.composedPath();return e[0]}return t.target}catch(n){return t.target}}var Sc=function(){},Uo=function(t,e,n){return n.months[e?"shorthand":"longhand"][t]},uB={D:Sc,F:function(t,e,n){t.setMonth(n.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,n){t.setHours(t.getHours()%12+12*Kt(new RegExp(n.amPM[1],"i").test(e)))},M:function(t,e,n){t.setMonth(n.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,n){var r=parseInt(e),i=new Date(t.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Sc,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Sc,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},Mr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Oa={Z:function(t){return t.toISOString()},D:function(t,e,n){return e.weekdays.shorthand[Oa.w(t,e,n)]},F:function(t,e,n){return Uo(Oa.n(t,e,n)-1,!1,e)},G:function(t,e,n){return Dt(Oa.h(t,e,n))},H:function(t){return Dt(t.getHours())},J:function(t,e){return e.ordinal!==void 0?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Kt(t.getHours()>11)]},M:function(t,e){return Uo(t.getMonth(),!0,e)},S:function(t){return Dt(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,n){return n.getWeek(t)},Y:function(t){return Dt(t.getFullYear(),4)},d:function(t){return Dt(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Dt(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Dt(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},Yv=function(t){var e=t.config,n=e===void 0?gi:e,r=t.l10n,i=r===void 0?Aa:r,s=t.isMobile,o=s===void 0?!1:s;return function(l,u,c){var d=c||i;return n.formatDate!==void 0&&!o?n.formatDate(l,u,d):u.split("").map(function(f,p,h){return Oa[f]&&h[p-1]!=="\\"?Oa[f](l,d,n):f!=="\\"?f:""}).join("")}},Pc=function(t){var e=t.config,n=e===void 0?gi:e,r=t.l10n,i=r===void 0?Aa:r;return function(s,o,l,u){if(!(s!==0&&!s)){var c=u||i,d,f=s;if(s instanceof Date)d=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)d=new Date(s);else if(typeof s=="string"){var p=o||(n||gi).dateFormat,h=String(s).trim();if(h==="today")d=new Date,l=!0;else if(n&&n.parseDate)d=n.parseDate(s,p);else if(/Z$/.test(h)||/GMT$/.test(h))d=new Date(s);else{for(var y=void 0,g=[],v=0,b=0,w="";v<p.length;v++){var I=p[v],m=I==="\\",A=p[v-1]==="\\"||m;if(Mr[I]&&!A){w+=Mr[I];var E=new RegExp(w).exec(s);E&&(y=!0)&&g[I!=="Y"?"push":"unshift"]({fn:uB[I],val:E[++b]})}else m||(w+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(O){var T=O.fn,x=O.val;return d=T(d,x,c)||d}),d=y?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!0&&d.setHours(0,0,0,0),d}}};function Vt(t,e,n){return n===void 0&&(n=!0),n!==!1?new Date(t.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):t.getTime()-e.getTime()}var cB=function(t,e,n){return t>Math.min(e,n)&&t<Math.max(e,n)},Mc=function(t,e,n){return t*3600+e*60+n},dB=function(t){var e=Math.floor(t/3600),n=(t-e*3600)/60;return[e,n,t-e*3600-n*60]},fB={DAY:864e5};function Rc(t){var e=t.defaultHour,n=t.defaultMinute,r=t.defaultSeconds;if(t.minDate!==void 0){var i=t.minDate.getHours(),s=t.minDate.getMinutes(),o=t.minDate.getSeconds();e<i&&(e=i),e===i&&n<s&&(n=s),e===i&&n===s&&r<o&&(r=t.minDate.getSeconds())}if(t.maxDate!==void 0){var l=t.maxDate.getHours(),u=t.maxDate.getMinutes();e=Math.min(e,l),e===l&&(n=Math.min(u,n)),e===l&&n===u&&(r=t.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var r=function(l){l&&Object.keys(l).forEach(function(u){return t[u]=l[u]})},i=0,s=e;i<s.length;i++){var o=s[i];r(o)}return t});var It=globalThis&&globalThis.__assign||function(){return It=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},It.apply(this,arguments)},Kv=globalThis&&globalThis.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r},hB=300;function pB(t,e){var n={config:It(It({},gi),dt.defaultConfig),l10n:Aa};n.parseDate=Pc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=p,n._positionCalendar=re,n.changeMonth=C,n.changeYear=Q,n.clear=M,n.close=k,n.onMouseOver=me,n._createElement=je,n.createDay=E,n.destroy=B,n.isEnabled=Y,n.jumpToDate=w,n.updateValue=Ot,n.open=Ae,n.redraw=oe,n.set=mt,n.setDate=qe,n.toggle=ie;function r(){n.utils={getDaysInMonth:function(V,G){return V===void 0&&(V=n.currentMonth),G===void 0&&(G=n.currentYear),V===1&&(G%4===0&&G%100!==0||G%400===0)?29:n.l10n.daysInMonth[V]}}}function i(){n.element=n.input=t,n.isOpen=!1,Ze(),te(),en(),et(),r(),n.isMobile||A(),b(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&p(n.config.noCalendar?n.latestSelectedDateObj:void 0),Ot(!1)),l();var V=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&V&&re(),fe("onReady")}function s(){var V;return((V=n.calendarContainer)===null||V===void 0?void 0:V.getRootNode()).activeElement||document.activeElement}function o(V){return V.bind(n)}function l(){var V=n.config;V.weekNumbers===!1&&V.showMonths===1||V.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var G=(n.days.offsetWidth+1)*V.showMonths;n.daysContainer.style.width=G+"px",n.calendarContainer.style.width=G+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function u(V){if(n.selectedDates.length===0){var G=n.config.minDate===void 0||Vt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),J=Rc(n.config);G.setHours(J.hours,J.minutes,J.seconds,G.getMilliseconds()),n.selectedDates=[G],n.latestSelectedDateObj=G}V!==void 0&&V.type!=="blur"&&Wn(V);var ne=n._input.value;f(),Ot(),n._input.value!==ne&&n._debouncedChange()}function c(V,G){return V%12+12*Kt(G===n.l10n.amPM[1])}function d(V){switch(V%24){case 0:case 12:return 12;default:return V%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var V=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,G=(parseInt(n.minuteElement.value,10)||0)%60,J=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(V=c(V,n.amPM.textContent));var ne=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Vt(n.latestSelectedDateObj,n.config.minDate,!0)===0,de=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Vt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var pe=Mc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Re=Mc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ye=Mc(V,G,J);if(ye>Re&&ye<pe){var ke=dB(pe);V=ke[0],G=ke[1],J=ke[2]}}else{if(de){var ge=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;V=Math.min(V,ge.getHours()),V===ge.getHours()&&(G=Math.min(G,ge.getMinutes())),G===ge.getMinutes()&&(J=Math.min(J,ge.getSeconds()))}if(ne){var Ce=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;V=Math.max(V,Ce.getHours()),V===Ce.getHours()&&G<Ce.getMinutes()&&(G=Ce.getMinutes()),G===Ce.getMinutes()&&(J=Math.max(J,Ce.getSeconds()))}}h(V,G,J)}}function p(V){var G=V||n.latestSelectedDateObj;G&&G instanceof Date&&h(G.getHours(),G.getMinutes(),G.getSeconds())}function h(V,G,J){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(V%24,G,J||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Dt(n.config.time_24hr?V:(12+V)%12+12*Kt(V%12===0)),n.minuteElement.value=Dt(G),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[Kt(V>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Dt(J)))}function y(V){var G=Ht(V),J=parseInt(G.value)+(V.delta||0);(J/1e3>1||V.key==="Enter"&&!/[^\d]/.test(J.toString()))&&Q(J)}function g(V,G,J,ne){if(G instanceof Array)return G.forEach(function(de){return g(V,de,J,ne)});if(V instanceof Array)return V.forEach(function(de){return g(de,G,J,ne)});V.addEventListener(G,J,ne),n._handlers.push({remove:function(){return V.removeEventListener(G,J,ne)}})}function v(){fe("onChange")}function b(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(J){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+J+"]"),function(ne){return g(ne,"click",n[J])})}),n.isMobile){id();return}var V=zv(ve,50);if(n._debouncedChange=zv(v,hB),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(J){n.config.mode==="range"&&me(Ht(J))}),g(n._input,"keydown",le),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",le),!n.config.inline&&!n.config.static&&g(window,"resize",V),window.ontouchstart!==void 0?g(window.document,"touchstart",$):g(window.document,"mousedown",$),g(window.document,"focus",$,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Qo),g(n.monthNav,["keyup","increment"],y),g(n.daysContainer,"click",Oe)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var G=function(J){return Ht(J).select()};g(n.timeContainer,["increment"],u),g(n.timeContainer,"blur",u,{capture:!0}),g(n.timeContainer,"click",I),g([n.hourElement,n.minuteElement],["focus","click"],G),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(J){u(J)})}n.config.allowInput&&g(n._input,"blur",ee)}function w(V,G){var J=V!==void 0?n.parseDate(V):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),ne=n.currentYear,de=n.currentMonth;try{J!==void 0&&(n.currentYear=J.getFullYear(),n.currentMonth=J.getMonth())}catch(pe){pe.message="Invalid date supplied: "+J,n.config.errorHandler(pe)}G&&n.currentYear!==ne&&(fe("onYearChange"),D()),G&&(n.currentYear!==ne||n.currentMonth!==de)&&fe("onMonthChange"),n.redraw()}function I(V){var G=Ht(V);~G.className.indexOf("arrow")&&m(V,G.classList.contains("arrowUp")?1:-1)}function m(V,G,J){var ne=V&&Ht(V),de=J||ne&&ne.parentNode&&ne.parentNode.firstChild,pe=Ee("increment");pe.delta=G,de&&de.dispatchEvent(pe)}function A(){var V=window.document.createDocumentFragment();if(n.calendarContainer=je("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(V.appendChild(H()),n.innerContainer=je("div","flatpickr-innerContainer"),n.config.weekNumbers){var G=F(),J=G.weekWrapper,ne=G.weekNumbers;n.innerContainer.appendChild(J),n.weekNumbers=ne,n.weekWrapper=J}n.rContainer=je("div","flatpickr-rContainer"),n.rContainer.appendChild(z()),n.daysContainer||(n.daysContainer=je("div","flatpickr-days"),n.daysContainer.tabIndex=-1),R(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),V.appendChild(n.innerContainer)}n.config.enableTime&&V.appendChild(q()),Tt(n.calendarContainer,"rangeMode",n.config.mode==="range"),Tt(n.calendarContainer,"animate",n.config.animate===!0),Tt(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(V);var de=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!de&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var pe=je("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(pe,n.element),pe.appendChild(n.element),n.altInput&&pe.appendChild(n.altInput),pe.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function E(V,G,J,ne){var de=Y(G,!0),pe=je("span",V,G.getDate().toString());return pe.dateObj=G,pe.$i=ne,pe.setAttribute("aria-label",n.formatDate(G,n.config.ariaDateFormat)),V.indexOf("hidden")===-1&&Vt(G,n.now)===0&&(n.todayDateElem=pe,pe.classList.add("today"),pe.setAttribute("aria-current","date")),de?(pe.tabIndex=-1,Le(G)&&(pe.classList.add("selected"),n.selectedDateElem=pe,n.config.mode==="range"&&(Tt(pe,"startRange",n.selectedDates[0]&&Vt(G,n.selectedDates[0],!0)===0),Tt(pe,"endRange",n.selectedDates[1]&&Vt(G,n.selectedDates[1],!0)===0),V==="nextMonthDay"&&pe.classList.add("inRange")))):pe.classList.add("flatpickr-disabled"),n.config.mode==="range"&&xe(G)&&!Le(G)&&pe.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&V!=="prevMonthDay"&&ne%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(G)+"</span>"),fe("onDayCreate",pe),pe}function O(V){V.focus(),n.config.mode==="range"&&me(V)}function T(V){for(var G=V>0?0:n.config.showMonths-1,J=V>0?n.config.showMonths:-1,ne=G;ne!=J;ne+=V)for(var de=n.daysContainer.children[ne],pe=V>0?0:de.children.length-1,Re=V>0?de.children.length:-1,ye=pe;ye!=Re;ye+=V){var ke=de.children[ye];if(ke.className.indexOf("hidden")===-1&&Y(ke.dateObj))return ke}}function x(V,G){for(var J=V.className.indexOf("Month")===-1?V.dateObj.getMonth():n.currentMonth,ne=G>0?n.config.showMonths:-1,de=G>0?1:-1,pe=J-n.currentMonth;pe!=ne;pe+=de)for(var Re=n.daysContainer.children[pe],ye=J-n.currentMonth===pe?V.$i+G:G<0?Re.children.length-1:0,ke=Re.children.length,ge=ye;ge>=0&&ge<ke&&ge!=(G>0?ke:-1);ge+=de){var Ce=Re.children[ge];if(Ce.className.indexOf("hidden")===-1&&Y(Ce.dateObj)&&Math.abs(V.$i-ge)>=Math.abs(G))return O(Ce)}n.changeMonth(de),P(T(de),0)}function P(V,G){var J=s(),ne=X(J||document.body),de=V!==void 0?V:ne?J:n.selectedDateElem!==void 0&&X(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&X(n.todayDateElem)?n.todayDateElem:T(G>0?1:-1);de===void 0?n._input.focus():ne?x(de,G):O(de)}function S(V,G){for(var J=(new Date(V,G,1).getDay()-n.l10n.firstDayOfWeek+7)%7,ne=n.utils.getDaysInMonth((G-1+12)%12,V),de=n.utils.getDaysInMonth(G,V),pe=window.document.createDocumentFragment(),Re=n.config.showMonths>1,ye=Re?"prevMonthDay hidden":"prevMonthDay",ke=Re?"nextMonthDay hidden":"nextMonthDay",ge=ne+1-J,Ce=0;ge<=ne;ge++,Ce++)pe.appendChild(E("flatpickr-day "+ye,new Date(V,G-1,ge),ge,Ce));for(ge=1;ge<=de;ge++,Ce++)pe.appendChild(E("flatpickr-day",new Date(V,G,ge),ge,Ce));for(var Ke=de+1;Ke<=42-J&&(n.config.showMonths===1||Ce%7!==0);Ke++,Ce++)pe.appendChild(E("flatpickr-day "+ke,new Date(V,G+1,Ke%de),Ke,Ce));var kn=je("div","dayContainer");return kn.appendChild(pe),kn}function R(){if(n.daysContainer!==void 0){Lo(n.daysContainer),n.weekNumbers&&Lo(n.weekNumbers);for(var V=document.createDocumentFragment(),G=0;G<n.config.showMonths;G++){var J=new Date(n.currentYear,n.currentMonth,1);J.setMonth(n.currentMonth+G),V.appendChild(S(J.getFullYear(),J.getMonth()))}n.daysContainer.appendChild(V),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&me()}}function D(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var V=function(ne){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&ne<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&ne>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var G=0;G<12;G++)if(!!V(G)){var J=je("option","flatpickr-monthDropdown-month");J.value=new Date(n.currentYear,G).getMonth().toString(),J.textContent=Uo(G,n.config.shorthandCurrentMonth,n.l10n),J.tabIndex=-1,n.currentMonth===G&&(J.selected=!0),n.monthsDropdownContainer.appendChild(J)}}}function L(){var V=je("div","flatpickr-month"),G=window.document.createDocumentFragment(),J;n.config.showMonths>1||n.config.monthSelectorType==="static"?J=je("span","cur-month"):(n.monthsDropdownContainer=je("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Re){var ye=Ht(Re),ke=parseInt(ye.value,10);n.changeMonth(ke-n.currentMonth),fe("onMonthChange")}),D(),J=n.monthsDropdownContainer);var ne=Bo("cur-year",{tabindex:"-1"}),de=ne.getElementsByTagName("input")[0];de.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&de.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(de.setAttribute("max",n.config.maxDate.getFullYear().toString()),de.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var pe=je("div","flatpickr-current-month");return pe.appendChild(J),pe.appendChild(ne),G.appendChild(pe),V.appendChild(G),{container:V,yearElement:de,monthElement:J}}function N(){Lo(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var V=n.config.showMonths;V--;){var G=L();n.yearElements.push(G.yearElement),n.monthElements.push(G.monthElement),n.monthNav.appendChild(G.container)}n.monthNav.appendChild(n.nextMonthNav)}function H(){return n.monthNav=je("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=je("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=je("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,N(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(V){n.__hidePrevMonthArrow!==V&&(Tt(n.prevMonthNav,"flatpickr-disabled",V),n.__hidePrevMonthArrow=V)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(V){n.__hideNextMonthArrow!==V&&(Tt(n.nextMonthNav,"flatpickr-disabled",V),n.__hideNextMonthArrow=V)}}),n.currentYearElement=n.yearElements[0],ft(),n.monthNav}function q(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var V=Rc(n.config);n.timeContainer=je("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var G=je("span","flatpickr-time-separator",":"),J=Bo("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=J.getElementsByTagName("input")[0];var ne=Bo("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=ne.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?V.hours:d(V.hours)),n.minuteElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():V.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(J),n.timeContainer.appendChild(G),n.timeContainer.appendChild(ne),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var de=Bo("flatpickr-second");n.secondElement=de.getElementsByTagName("input")[0],n.secondElement.value=Dt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():V.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(je("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(de)}return n.config.time_24hr||(n.amPM=je("span","flatpickr-am-pm",n.l10n.amPM[Kt((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function z(){n.weekdayContainer?Lo(n.weekdayContainer):n.weekdayContainer=je("div","flatpickr-weekdays");for(var V=n.config.showMonths;V--;){var G=je("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(G)}return U(),n.weekdayContainer}function U(){if(!!n.weekdayContainer){var V=n.l10n.firstDayOfWeek,G=Kv(n.l10n.weekdays.shorthand);V>0&&V<G.length&&(G=Kv(G.splice(V,G.length),G.splice(0,V)));for(var J=n.config.showMonths;J--;)n.weekdayContainer.children[J].innerHTML=`
|
|
2331
2331
|
<span class='flatpickr-weekday'>
|
|
2332
2332
|
`+G.join("</span><span class='flatpickr-weekday'>")+`
|
|
2333
2333
|
</span>
|
|
2334
|
-
`}}function N(){n.calendarContainer.classList.add("hasWeeks");var V=je("div","flatpickr-weekwrapper");V.appendChild(je("span","flatpickr-weekday",n.l10n.weekAbbreviation));var G=je("div","flatpickr-weeks");return V.appendChild(G),{weekWrapper:V,weekNumbers:G}}function C(V,G){G===void 0&&(G=!0);var J=G?V:V-n.currentMonth;J<0&&n._hidePrevMonthArrow===!0||J>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=J,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,fe("onYearChange"),D()),M(),fe("onMonthChange"),ft())}function R(V,G){if(V===void 0&&(V=!0),G===void 0&&(G=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,G===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var J=Rc(n.config),ne=J.hours,de=J.minutes,pe=J.seconds;h(ne,de,pe)}n.redraw(),V&&fe("onChange")}function k(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),fe("onClose")}function B(){n.config!==void 0&&fe("onDestroy");for(var V=n._handlers.length;V--;)n._handlers[V].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var G=n.calendarContainer.parentNode;if(G.lastChild&&G.removeChild(G.lastChild),G.parentNode){for(;G.firstChild;)G.parentNode.insertBefore(G.firstChild,G);G.parentNode.removeChild(G)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(J){try{delete n[J]}catch(ne){}})}function W(V){return n.calendarContainer.contains(V)}function $(V){if(n.isOpen&&!n.config.inline){var G=Ht(V),J=W(G),ne=G===n.input||G===n.altInput||n.element.contains(G)||V.path&&V.path.indexOf&&(~V.path.indexOf(n.input)||~V.path.indexOf(n.altInput)),de=!ne&&!J&&!W(V.relatedTarget),pe=!n.config.ignoredFocusElements.some(function(Re){return Re.contains(G)});de&&pe&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&u(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function Q(V){if(!(!V||n.config.minDate&&V<n.config.minDate.getFullYear()||n.config.maxDate&&V>n.config.maxDate.getFullYear())){var G=V,J=n.currentYear!==G;n.currentYear=G||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),J&&(n.redraw(),fe("onYearChange"),D())}}function Y(V,G){var J;G===void 0&&(G=!0);var ne=n.parseDate(V,void 0,G);if(n.config.minDate&&ne&&Vt(ne,n.config.minDate,G!==void 0?G:!n.minDateHasTime)<0||n.config.maxDate&&ne&&Vt(ne,n.config.maxDate,G!==void 0?G:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(ne===void 0)return!1;for(var de=!!n.config.enable,pe=(J=n.config.enable)!==null&&J!==void 0?J:n.config.disable,Re=0,ye=void 0;Re<pe.length;Re++){if(ye=pe[Re],typeof ye=="function"&&ye(ne))return de;if(ye instanceof Date&&ne!==void 0&&ye.getTime()===ne.getTime())return de;if(typeof ye=="string"){var ke=n.parseDate(ye,void 0,!0);return ke&&ke.getTime()===ne.getTime()?de:!de}else if(typeof ye=="object"&&ne!==void 0&&ye.from&&ye.to&&ne.getTime()>=ye.from.getTime()&&ne.getTime()<=ye.to.getTime())return de}return!de}function X(V){return n.daysContainer!==void 0?V.className.indexOf("hidden")===-1&&V.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(V):!1}function ee(V){var G=V.target===n._input,J=n._input.value.trimEnd()!==At();G&&J&&!(V.relatedTarget&&W(V.relatedTarget))&&n.setDate(n._input.value,!0,V.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function le(V){var G=Ht(V),J=n.config.wrap?t.contains(G):G===n._input,ne=n.config.allowInput,de=n.isOpen&&(!ne||!J),pe=n.config.inline&&J&&!ne;if(V.keyCode===13&&J){if(ne)return n.setDate(n._input.value,!0,G===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),G.blur();n.open()}else if(W(G)||de||pe){var Re=!!n.timeContainer&&n.timeContainer.contains(G);switch(V.keyCode){case 13:Re?(V.preventDefault(),u(),_e()):Oe(V);break;case 27:V.preventDefault(),_e();break;case 8:case 46:J&&!n.config.allowInput&&(V.preventDefault(),n.clear());break;case 37:case 39:if(!Re&&!J){V.preventDefault();var ye=s();if(n.daysContainer!==void 0&&(ne===!1||ye&&X(ye))){var ke=V.keyCode===39?1:-1;V.ctrlKey?(V.stopPropagation(),C(ke),P(T(1),0)):P(void 0,ke)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:V.preventDefault();var ge=V.keyCode===40?1:-1;n.daysContainer&&G.$i!==void 0||G===n.input||G===n.altInput?V.ctrlKey?(V.stopPropagation(),Q(n.currentYear-ge),P(T(1),0)):Re||P(void 0,ge*7):G===n.currentYearElement?Q(n.currentYear-ge):n.config.enableTime&&(!Re&&n.hourElement&&n.hourElement.focus(),u(V),n._debouncedChange());break;case 9:if(Re){var Ce=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(Wt){return Wt}),Ke=Ce.indexOf(G);if(Ke!==-1){var kn=Ce[Ke+(V.shiftKey?-1:1)];V.preventDefault(),(kn||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(G)&&V.shiftKey&&(V.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&G===n.amPM)switch(V.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),Ot();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),Ot();break}(J||W(G))&&fe("onKeyDown",V)}function me(V,G){if(G===void 0&&(G="flatpickr-day"),!(n.selectedDates.length!==1||V&&(!V.classList.contains(G)||V.classList.contains("flatpickr-disabled")))){for(var J=V?V.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),ne=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),de=Math.min(J,n.selectedDates[0].getTime()),pe=Math.max(J,n.selectedDates[0].getTime()),Re=!1,ye=0,ke=0,ge=de;ge<pe;ge+=fB.DAY)Y(new Date(ge),!0)||(Re=Re||ge>de&&ge<pe,ge<ne&&(!ye||ge>ye)?ye=ge:ge>ne&&(!ke||ge<ke)&&(ke=ge));var Ce=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+G));Ce.forEach(function(Ke){var kn=Ke.dateObj,Wt=kn.getTime(),Fa=ye>0&&Wt<ye||ke>0&&Wt>ke;if(Fa){Ke.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ai){Ke.classList.remove(Ai)});return}else if(Re&&!Fa)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ai){Ke.classList.remove(Ai)}),V!==void 0&&(V.classList.add(J<=n.selectedDates[0].getTime()?"startRange":"endRange"),ne<J&&Wt===ne?Ke.classList.add("startRange"):ne>J&&Wt===ne&&Ke.classList.add("endRange"),Wt>=ye&&(ke===0||Wt<=ke)&&cB(Wt,ne,J)&&Ke.classList.add("inRange"))})}}function ve(){n.isOpen&&!n.config.static&&!n.config.inline&&re()}function Ae(V,G){if(G===void 0&&(G=n._positionElement),n.isMobile===!0){if(V){V.preventDefault();var J=Ht(V);J&&J.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),fe("onOpen");return}else if(n._input.disabled||n.config.inline)return;var ne=n.isOpen;n.isOpen=!0,ne||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),fe("onOpen"),re(G)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(V===void 0||!n.timeContainer.contains(V.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function Se(V){return function(G){var J=n.config["_"+V+"Date"]=n.parseDate(G,n.config.dateFormat),ne=n.config["_"+(V==="min"?"max":"min")+"Date"];J!==void 0&&(n[V==="min"?"minDateHasTime":"maxDateHasTime"]=J.getHours()>0||J.getMinutes()>0||J.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(de){return Y(de)}),!n.selectedDates.length&&V==="min"&&p(J),Ot()),n.daysContainer&&(oe(),J!==void 0?n.currentYearElement[V]=J.getFullYear().toString():n.currentYearElement.removeAttribute(V),n.currentYearElement.disabled=!!ne&&J!==void 0&&ne.getFullYear()===J.getFullYear())}}function Ze(){var V=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],G=It(It({},JSON.parse(JSON.stringify(t.dataset||{}))),e),J={};n.config.parseDate=G.parseDate,n.config.formatDate=G.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(Ce){n.config._enable=Ii(Ce)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(Ce){n.config._disable=Ii(Ce)}});var ne=G.mode==="time";if(!G.dateFormat&&(G.enableTime||ne)){var de=dt.defaultConfig.dateFormat||gi.dateFormat;J.dateFormat=G.noCalendar||ne?"H:i"+(G.enableSeconds?":S":""):de+" H:i"+(G.enableSeconds?":S":"")}if(G.altInput&&(G.enableTime||ne)&&!G.altFormat){var pe=dt.defaultConfig.altFormat||gi.altFormat;J.altFormat=G.noCalendar||ne?"h:i"+(G.enableSeconds?":S K":" K"):pe+(" h:i"+(G.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:Se("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:Se("max")});var Re=function(Ce){return function(Ke){n.config[Ce==="min"?"_minTime":"_maxTime"]=n.parseDate(Ke,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Re("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Re("max")}),G.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,J,G);for(var ye=0;ye<V.length;ye++)n.config[V[ye]]=n.config[V[ye]]===!0||n.config[V[ye]]==="true";Tc.filter(function(Ce){return n.config[Ce]!==void 0}).forEach(function(Ce){n.config[Ce]=Cc(n.config[Ce]||[]).map(o)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ye=0;ye<n.config.plugins.length;ye++){var ke=n.config.plugins[ye](n)||{};for(var ge in ke)Tc.indexOf(ge)>-1?n.config[ge]=Cc(ke[ge]).map(o).concat(n.config[ge]):typeof G[ge]=="undefined"&&(n.config[ge]=ke[ge])}G.altInputClass||(n.config.altInputClass=Ve().className+" "+n.config.altInputClass),fe("onParseConfig")}function Ve(){return n.config.wrap?t.querySelector("[data-input]"):t}function te(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=It(It({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),Mr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Mr.l="("+n.l10n.weekdays.longhand.join("|")+")",Mr.M="("+n.l10n.months.shorthand.join("|")+")",Mr.F="("+n.l10n.months.longhand.join("|")+")",Mr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var V=It(It({},e),JSON.parse(JSON.stringify(t.dataset||{})));V.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=Yv(n),n.parseDate=Pc({config:n.config,l10n:n.l10n})}function re(V){if(typeof n.config.position=="function")return void n.config.position(n,V);if(n.calendarContainer!==void 0){fe("onPreCalendarPosition");var G=V||n._positionElement,J=Array.prototype.reduce.call(n.calendarContainer.children,function(o3,l3){return o3+l3.offsetHeight},0),ne=n.calendarContainer.offsetWidth,de=n.config.position.split(" "),pe=de[0],Re=de.length>1?de[1]:null,ye=G.getBoundingClientRect(),ke=window.innerHeight-ye.bottom,ge=pe==="above"||pe!=="below"&&ke<J&&ye.top>J,Ce=window.pageYOffset+ye.top+(ge?-J-2:G.offsetHeight+2);if(Tt(n.calendarContainer,"arrowTop",!ge),Tt(n.calendarContainer,"arrowBottom",ge),!n.config.inline){var Ke=window.pageXOffset+ye.left,kn=!1,Wt=!1;Re==="center"?(Ke-=(ne-ye.width)/2,kn=!0):Re==="right"&&(Ke-=ne-ye.width,Wt=!0),Tt(n.calendarContainer,"arrowLeft",!kn&&!Wt),Tt(n.calendarContainer,"arrowCenter",kn),Tt(n.calendarContainer,"arrowRight",Wt);var Fa=window.document.body.offsetWidth-(window.pageXOffset+ye.right),Ai=Ke+ne>window.document.body.offsetWidth,e3=Fa+ne>window.document.body.offsetWidth;if(Tt(n.calendarContainer,"rightMost",Ai),!n.config.static)if(n.calendarContainer.style.top=Ce+"px",!Ai)n.calendarContainer.style.left=Ke+"px",n.calendarContainer.style.right="auto";else if(!e3)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=Fa+"px";else{var ad=ue();if(ad===void 0)return;var t3=window.document.body.offsetWidth,n3=Math.max(0,t3/2-ne/2),r3=".flatpickr-calendar.centerMost:before",i3=".flatpickr-calendar.centerMost:after",a3=ad.cssRules.length,s3="{left:"+ye.left+"px;right:auto;}";Tt(n.calendarContainer,"rightMost",!1),Tt(n.calendarContainer,"centerMost",!0),ad.insertRule(r3+","+i3+s3,a3),n.calendarContainer.style.left=n3+"px",n.calendarContainer.style.right="auto"}}}}function ue(){for(var V=null,G=0;G<document.styleSheets.length;G++){var J=document.styleSheets[G];if(!!J.cssRules){try{J.cssRules}catch(ne){continue}V=J;break}}return V!=null?V:he()}function he(){var V=document.createElement("style");return document.head.appendChild(V),V.sheet}function oe(){n.config.noCalendar||n.isMobile||(D(),ft(),M())}function _e(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function Oe(V){V.preventDefault(),V.stopPropagation();var G=function(Ce){return Ce.classList&&Ce.classList.contains("flatpickr-day")&&!Ce.classList.contains("flatpickr-disabled")&&!Ce.classList.contains("notAllowed")},J=Qv(Ht(V),G);if(J!==void 0){var ne=J,de=n.latestSelectedDateObj=new Date(ne.dateObj.getTime()),pe=(de.getMonth()<n.currentMonth||de.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=ne,n.config.mode==="single")n.selectedDates=[de];else if(n.config.mode==="multiple"){var Re=Le(de);Re?n.selectedDates.splice(parseInt(Re),1):n.selectedDates.push(de)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=de,n.selectedDates.push(de),Vt(de,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(Ce,Ke){return Ce.getTime()-Ke.getTime()}));if(f(),pe){var ye=n.currentYear!==de.getFullYear();n.currentYear=de.getFullYear(),n.currentMonth=de.getMonth(),ye&&(fe("onYearChange"),D()),fe("onMonthChange")}if(ft(),M(),Ot(),!pe&&n.config.mode!=="range"&&n.config.showMonths===1?O(ne):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var ke=n.config.mode==="single"&&!n.config.enableTime,ge=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(ke||ge)&&_e()}v()}}var Te={locale:[te,U],showMonths:[F,l,z],minDate:[w],maxDate:[w],positionElement:[zo],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function mt(V,G){if(V!==null&&typeof V=="object"){Object.assign(n.config,V);for(var J in V)Te[J]!==void 0&&Te[J].forEach(function(ne){return ne()})}else n.config[V]=G,Te[V]!==void 0?Te[V].forEach(function(ne){return ne()}):Tc.indexOf(V)>-1&&(n.config[V]=Cc(G));n.redraw(),Ot(!0)}function _t(V,G){var J=[];if(V instanceof Array)J=V.map(function(ne){return n.parseDate(ne,G)});else if(V instanceof Date||typeof V=="number")J=[n.parseDate(V,G)];else if(typeof V=="string")switch(n.config.mode){case"single":case"time":J=[n.parseDate(V,G)];break;case"multiple":J=V.split(n.config.conjunction).map(function(ne){return n.parseDate(ne,G)});break;case"range":J=V.split(n.l10n.rangeSeparator).map(function(ne){return n.parseDate(ne,G)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(V)));n.selectedDates=n.config.allowInvalidPreload?J:J.filter(function(ne){return ne instanceof Date&&Y(ne,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(ne,de){return ne.getTime()-de.getTime()})}function qe(V,G,J){if(G===void 0&&(G=!1),J===void 0&&(J=n.config.dateFormat),V!==0&&!V||V instanceof Array&&V.length===0)return n.clear(G);_t(V,J),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,G),p(),n.selectedDates.length===0&&n.clear(!1),Ot(G),G&&fe("onChange")}function Ii(V){return V.slice().map(function(G){return typeof G=="string"||typeof G=="number"||G instanceof Date?n.parseDate(G,void 0,!0):G&&typeof G=="object"&&G.from&&G.to?{from:n.parseDate(G.from,void 0),to:n.parseDate(G.to,void 0)}:G}).filter(function(G){return G})}function et(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var V=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);V&&_t(V,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function en(){if(n.input=Ve(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=je(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),zo()}function zo(){n._positionElement=n.config.positionElement||n._input}function id(){var V=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=je("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=V,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=V==="datetime-local"?"Y-m-d\\TH:i:S":V==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(G){}g(n.mobileInput,"change",function(G){n.setDate(Ht(G).value,!1,n.mobileFormatStr),fe("onChange"),fe("onClose")})}function ie(V){if(n.isOpen===!0)return n.close();n.open(V)}function fe(V,G){if(n.config!==void 0){var J=n.config[V];if(J!==void 0&&J.length>0)for(var ne=0;J[ne]&&ne<J.length;ne++)J[ne](n.selectedDates,n.input.value,n,G);V==="onChange"&&(n.input.dispatchEvent(Ee("change")),n.input.dispatchEvent(Ee("input")))}}function Ee(V){var G=document.createEvent("Event");return G.initEvent(V,!0,!0),G}function Le(V){for(var G=0;G<n.selectedDates.length;G++){var J=n.selectedDates[G];if(J instanceof Date&&Vt(J,V)===0)return""+G}return!1}function xe(V){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Vt(V,n.selectedDates[0])>=0&&Vt(V,n.selectedDates[1])<=0}function ft(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(V,G){var J=new Date(n.currentYear,n.currentMonth,1);J.setMonth(n.currentMonth+G),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[G].textContent=Uo(J.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=J.getMonth().toString(),V.value=J.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function At(V){var G=V||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(J){return n.formatDate(J,G)}).filter(function(J,ne,de){return n.config.mode!=="range"||n.config.enableTime||de.indexOf(J)===ne}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function Ot(V){V===void 0&&(V=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=At(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=At(n.config.altFormat)),V!==!1&&fe("onValueUpdate")}function Qo(V){var G=Ht(V),J=n.prevMonthNav.contains(G),ne=n.nextMonthNav.contains(G);J||ne?C(J?-1:1):n.yearElements.indexOf(G)>=0?G.select():G.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):G.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Wn(V){V.preventDefault();var G=V.type==="keydown",J=Ht(V),ne=J;n.amPM!==void 0&&J===n.amPM&&(n.amPM.textContent=n.l10n.amPM[Kt(n.amPM.textContent===n.l10n.amPM[0])]);var de=parseFloat(ne.getAttribute("min")),pe=parseFloat(ne.getAttribute("max")),Re=parseFloat(ne.getAttribute("step")),ye=parseInt(ne.value,10),ke=V.delta||(G?V.which===38?1:-1:0),ge=ye+Re*ke;if(typeof ne.value!="undefined"&&ne.value.length===2){var Ce=ne===n.hourElement,Ke=ne===n.minuteElement;ge<de?(ge=pe+ge+Kt(!Ce)+(Kt(Ce)&&Kt(!n.amPM)),Ke&&m(void 0,-1,n.hourElement)):ge>pe&&(ge=ne===n.hourElement?ge-pe-Kt(!n.amPM):de,Ke&&m(void 0,1,n.hourElement)),n.amPM&&Ce&&(Re===1?ge+ye===23:Math.abs(ge-ye)>Re)&&(n.amPM.textContent=n.l10n.amPM[Kt(n.amPM.textContent===n.l10n.amPM[0])]),ne.value=Dt(ge)}}return i(),n}function vi(t,e){for(var n=Array.prototype.slice.call(t).filter(function(o){return o instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var s=n[i];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=pB(s,e||{}),r.push(s._flatpickr)}catch(o){console.error(o)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return vi(this,t)},HTMLElement.prototype.flatpickr=function(t){return vi([this],t)});var dt=function(t,e){return typeof t=="string"?vi(window.document.querySelectorAll(t),e):t instanceof Node?vi([t],e):vi(t,e)};dt.defaultConfig={},dt.l10ns={en:It({},Aa),default:It({},Aa)},dt.localize=function(t){dt.l10ns.default=It(It({},dt.l10ns.default),t)},dt.setDefaults=function(t){dt.defaultConfig=It(It({},dt.defaultConfig),t)},dt.parseDate=Pc({}),dt.formatDate=Yv({}),dt.compareDates=Vt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(t){return vi(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))},typeof window!="undefined"&&(window.flatpickr=dt);const mB=od(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(t){function e(C){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(k){return typeof k}:e=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},e(C)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(cn.default),r=s(qv.exports),i=s(mB);function s(C){return C&&C.__esModule?C:{default:C}}function o(){if(typeof WeakMap!="function")return null;var C=new WeakMap;return o=function(){return C},C}function l(C){if(C&&C.__esModule)return C;if(C===null||e(C)!=="object"&&typeof C!="function")return{default:C};var R=o();if(R&&R.has(C))return R.get(C);var k={},B=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in C)if(Object.prototype.hasOwnProperty.call(C,W)){var $=B?Object.getOwnPropertyDescriptor(C,W):null;$&&($.get||$.set)?Object.defineProperty(k,W,$):k[W]=C[W]}return k.default=C,R&&R.set(C,k),k}function u(C){return p(C)||f(C)||d(C)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2335
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(C,R){if(!!C){if(typeof C=="string")return h(C,R);var k=Object.prototype.toString.call(C).slice(8,-1);if(k==="Object"&&C.constructor&&(k=C.constructor.name),k==="Map"||k==="Set")return Array.from(C);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return h(C,R)}}function f(C){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(C))return Array.from(C)}function p(C){if(Array.isArray(C))return h(C)}function h(C,R){(R==null||R>C.length)&&(R=C.length);for(var k=0,B=new Array(R);k<R;k++)B[k]=C[k];return B}function y(){return y=Object.assign||function(C){for(var R=1;R<arguments.length;R++){var k=arguments[R];for(var B in k)Object.prototype.hasOwnProperty.call(k,B)&&(C[B]=k[B])}return C},y.apply(this,arguments)}function g(C,R){if(C==null)return{};var k=v(C,R),B,W;if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(C);for(W=0;W<$.length;W++)B=$[W],!(R.indexOf(B)>=0)&&(!Object.prototype.propertyIsEnumerable.call(C,B)||(k[B]=C[B]))}return k}function v(C,R){if(C==null)return{};var k={},B=Object.keys(C),W,$;for($=0;$<B.length;$++)W=B[$],!(R.indexOf(W)>=0)&&(k[W]=C[W]);return k}function b(C,R){var k=Object.keys(C);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(C);R&&(B=B.filter(function(W){return Object.getOwnPropertyDescriptor(C,W).enumerable})),k.push.apply(k,B)}return k}function w(C){for(var R=1;R<arguments.length;R++){var k=arguments[R]!=null?arguments[R]:{};R%2?b(Object(k),!0).forEach(function(B){D(C,B,k[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(k)):b(Object(k)).forEach(function(B){Object.defineProperty(C,B,Object.getOwnPropertyDescriptor(k,B))})}return C}function I(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")}function m(C,R){for(var k=0;k<R.length;k++){var B=R[k];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(C,B.key,B)}}function A(C,R,k){return R&&m(C.prototype,R),k&&m(C,k),C}function E(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),R&&O(C,R)}function O(C,R){return O=Object.setPrototypeOf||function(B,W){return B.__proto__=W,B},O(C,R)}function T(C){var R=S();return function(){var B=M(C),W;if(R){var $=M(this).constructor;W=Reflect.construct(B,arguments,$)}else W=B.apply(this,arguments);return x(this,W)}}function x(C,R){return R&&(e(R)==="object"||typeof R=="function")?R:P(C)}function P(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function S(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}function M(C){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},M(C)}function D(C,R,k){return R in C?Object.defineProperty(C,R,{value:k,enumerable:!0,configurable:!0,writable:!0}):C[R]=k,C}var L=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],F=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),H=["onCreate","onDestroy"],q=r.default.func,z=function(C){E(k,C);var R=T(k);function k(){var B;I(this,k);for(var W=arguments.length,$=new Array(W),Q=0;Q<W;Q++)$[Q]=arguments[Q];return B=R.call.apply(R,[this].concat($)),D(P(B),"createFlatpickrInstance",function(){var Y=w({onClose:function(){B.node.blur&&B.node.blur()}},B.props.options);Y=U(Y,B.props),B.flatpickr=(0,i.default)(B.node,Y),B.props.hasOwnProperty("value")&&B.flatpickr.setDate(B.props.value,!1);var X=B.props.onCreate;X&&X(B.flatpickr)}),D(P(B),"destroyFlatpickrInstance",function(){var Y=B.props.onDestroy;Y&&Y(B.flatpickr),B.flatpickr.destroy(),B.flatpickr=null}),D(P(B),"handleNodeChange",function(Y){B.node=Y,B.flatpickr&&(B.destroyFlatpickrInstance(),B.createFlatpickrInstance())}),B}return A(k,[{key:"componentDidUpdate",value:function(W){var $=this.props.options,Q=W.options;$=U($,this.props),Q=U(Q,W);for(var Y=Object.getOwnPropertyNames($),X=Y.length-1;X>=0;X--){var ee=Y[X],le=$[ee];le!==Q[ee]&&(L.indexOf(ee)!==-1&&!Array.isArray(le)&&(le=[le]),this.flatpickr.set(ee,le))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&W.value&&Array.isArray(W.value)&&this.props.value.every(function(me,ve){W[ve]}))&&this.props.value!==W.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var W=this.props,$=W.options,Q=W.defaultValue,Y=W.value,X=W.children,ee=W.render,le=g(W,["options","defaultValue","value","children","render"]);return L.forEach(function(me){delete le[me]}),H.forEach(function(me){delete le[me]}),ee?ee(w(w({},le),{},{defaultValue:Q,value:Y}),this.handleNodeChange):$.wrap?n.default.createElement("div",y({},le,{ref:this.handleNodeChange}),X):n.default.createElement("input",y({},le,{defaultValue:Q,ref:this.handleNodeChange}))}}]),k}(n.Component);D(z,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:F,onOpen:F,onClose:F,onMonthChange:F,onYearChange:F,onReady:F,onValueUpdate:F,onDayCreate:F,onCreate:q,onDestroy:q,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),D(z,"defaultProps",{options:{}});function U(C,R){var k=w({},C);return L.forEach(function(B){if(R.hasOwnProperty(B)){var W;k[B]&&!Array.isArray(k[B])?k[B]=[k[B]]:k[B]||(k[B]=[]);var $=Array.isArray(R[B])?R[B]:[R[B]];(W=k[B]).push.apply(W,u($))}}),k}var N=z;t.default=N})(Vv);const gB=hw(Vv);var Ft="top",Jt="bottom",Xt="right",Nt="left",kc="auto",Ta=[Ft,Jt,Xt,Nt],yi="start",Ca="end",vB="clippingParents",Jv="viewport",Sa="popper",yB="reference",Xv=Ta.reduce(function(t,e){return t.concat([e+"-"+yi,e+"-"+Ca])},[]),Zv=[].concat(Ta,[kc]).reduce(function(t,e){return t.concat([e,e+"-"+yi,e+"-"+Ca])},[]),wB="beforeRead",bB="read",_B="afterRead",EB="beforeMain",IB="main",AB="afterMain",OB="beforeWrite",TB="write",CB="afterWrite",SB=[wB,bB,_B,EB,IB,AB,OB,TB,CB];function Pn(t){return t?(t.nodeName||"").toLowerCase():null}function qt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Rr(t){var e=qt(t).Element;return t instanceof e||t instanceof Element}function Zt(t){var e=qt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function xc(t){if(typeof ShadowRoot=="undefined")return!1;var e=qt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function PB(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];!Zt(s)||!Pn(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function MB(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=o.reduce(function(u,c){return u[c]="",u},{});!Zt(i)||!Pn(i)||(Object.assign(i.style,l),Object.keys(s).forEach(function(u){i.removeAttribute(u)}))})}}const ey={name:"applyStyles",enabled:!0,phase:"write",fn:PB,effect:MB,requires:["computeStyles"]};function Mn(t){return t.split("-")[0]}var kr=Math.max,$o=Math.min,wi=Math.round;function Dc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ty(){return!/^((?!chrome|android).)*safari/i.test(Dc())}function bi(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,s=1;e&&Zt(t)&&(i=t.offsetWidth>0&&wi(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&wi(r.height)/t.offsetHeight||1);var o=Rr(t)?qt(t):window,l=o.visualViewport,u=!ty()&&n,c=(r.left+(u&&l?l.offsetLeft:0))/i,d=(r.top+(u&&l?l.offsetTop:0))/s,f=r.width/i,p=r.height/s;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function Fc(t){var e=bi(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ny(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&xc(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(t){return qt(t).getComputedStyle(t)}function RB(t){return["table","td","th"].indexOf(Pn(t))>=0}function lr(t){return((Rr(t)?t.ownerDocument:t.document)||window.document).documentElement}function jo(t){return Pn(t)==="html"?t:t.assignedSlot||t.parentNode||(xc(t)?t.host:null)||lr(t)}function ry(t){return!Zt(t)||qn(t).position==="fixed"?null:t.offsetParent}function kB(t){var e=/firefox/i.test(Dc()),n=/Trident/i.test(Dc());if(n&&Zt(t)){var r=qn(t);if(r.position==="fixed")return null}var i=jo(t);for(xc(i)&&(i=i.host);Zt(i)&&["html","body"].indexOf(Pn(i))<0;){var s=qn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function Pa(t){for(var e=qt(t),n=ry(t);n&&RB(n)&&qn(n).position==="static";)n=ry(n);return n&&(Pn(n)==="html"||Pn(n)==="body"&&qn(n).position==="static")?e:n||kB(t)||e}function Nc(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ma(t,e,n){return kr(t,$o(e,n))}function xB(t,e,n){var r=Ma(t,e,n);return r>n?n:r}function iy(){return{top:0,right:0,bottom:0,left:0}}function ay(t){return Object.assign({},iy(),t)}function sy(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var DB=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,ay(typeof e!="number"?e:sy(e,Ta))};function FB(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,l=Mn(n.placement),u=Nc(l),c=[Nt,Xt].indexOf(l)>=0,d=c?"height":"width";if(!(!s||!o)){var f=DB(i.padding,n),p=Fc(s),h=u==="y"?Ft:Nt,y=u==="y"?Jt:Xt,g=n.rects.reference[d]+n.rects.reference[u]-o[u]-n.rects.popper[d],v=o[u]-n.rects.reference[u],b=Pa(s),w=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,I=g/2-v/2,m=f[h],A=w-p[d]-f[y],E=w/2-p[d]/2+I,O=Ma(m,E,A),T=u;n.modifiersData[r]=(e={},e[T]=O,e.centerOffset=O-E,e)}}function NB(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!ny(e.elements.popper,i)||(e.elements.arrow=i))}const LB={name:"arrow",enabled:!0,phase:"main",fn:FB,effect:NB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _i(t){return t.split("-")[1]}var BB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UB(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:wi(n*i)/i||0,y:wi(r*i)/i||0}}function oy(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,l=t.position,u=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=o.x,h=p===void 0?0:p,y=o.y,g=y===void 0?0:y,v=typeof d=="function"?d({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var b=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),I=Nt,m=Ft,A=window;if(c){var E=Pa(n),O="clientHeight",T="clientWidth";if(E===qt(n)&&(E=lr(n),qn(E).position!=="static"&&l==="absolute"&&(O="scrollHeight",T="scrollWidth")),E=E,i===Ft||(i===Nt||i===Xt)&&s===Ca){m=Jt;var x=f&&E===A&&A.visualViewport?A.visualViewport.height:E[O];g-=x-r.height,g*=u?1:-1}if(i===Nt||(i===Ft||i===Jt)&&s===Ca){I=Xt;var P=f&&E===A&&A.visualViewport?A.visualViewport.width:E[T];h-=P-r.width,h*=u?1:-1}}var S=Object.assign({position:l},c&&BB),M=d===!0?UB({x:h,y:g},qt(n)):{x:h,y:g};if(h=M.x,g=M.y,u){var D;return Object.assign({},S,(D={},D[m]=w?"0":"",D[I]=b?"0":"",D.transform=(A.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",D))}return Object.assign({},S,(e={},e[m]=w?g+"px":"",e[I]=b?h+"px":"",e.transform="",e))}function $B(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,l=n.roundOffsets,u=l===void 0?!0:l,c={placement:Mn(e.placement),variation:_i(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,oy(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oy(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const jB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$B,data:{}};var Ho={passive:!0};function HB(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,u=qt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",n.update,Ho)}),l&&u.addEventListener("resize",n.update,Ho),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Ho)}),l&&u.removeEventListener("resize",n.update,Ho)}}const VB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:HB,data:{}};var qB={left:"right",right:"left",bottom:"top",top:"bottom"};function Vo(t){return t.replace(/left|right|bottom|top/g,function(e){return qB[e]})}var WB={start:"end",end:"start"};function ly(t){return t.replace(/start|end/g,function(e){return WB[e]})}function Lc(t){var e=qt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bc(t){return bi(lr(t)).left+Lc(t).scrollLeft}function GB(t,e){var n=qt(t),r=lr(t),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;var c=ty();(c||!c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:o,x:l+Bc(t),y:u}}function zB(t){var e,n=lr(t),r=Lc(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=kr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=kr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Bc(t),u=-r.scrollTop;return qn(i||n).direction==="rtl"&&(l+=kr(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:l,y:u}}function Uc(t){var e=qn(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uy(t){return["html","body","#document"].indexOf(Pn(t))>=0?t.ownerDocument.body:Zt(t)&&Uc(t)?t:uy(jo(t))}function Ra(t,e){var n;e===void 0&&(e=[]);var r=uy(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=qt(r),o=i?[s].concat(s.visualViewport||[],Uc(r)?r:[]):r,l=e.concat(o);return i?l:l.concat(Ra(jo(o)))}function $c(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function QB(t,e){var n=bi(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function cy(t,e,n){return e===Jv?$c(GB(t,n)):Rr(e)?QB(e,n):$c(zB(lr(t)))}function YB(t){var e=Ra(jo(t)),n=["absolute","fixed"].indexOf(qn(t).position)>=0,r=n&&Zt(t)?Pa(t):t;return Rr(r)?e.filter(function(i){return Rr(i)&&ny(i,r)&&Pn(i)!=="body"}):[]}function KB(t,e,n,r){var i=e==="clippingParents"?YB(t):[].concat(e),s=[].concat(i,[n]),o=s[0],l=s.reduce(function(u,c){var d=cy(t,c,r);return u.top=kr(d.top,u.top),u.right=$o(d.right,u.right),u.bottom=$o(d.bottom,u.bottom),u.left=kr(d.left,u.left),u},cy(t,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function dy(t){var e=t.reference,n=t.element,r=t.placement,i=r?Mn(r):null,s=r?_i(r):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,u;switch(i){case Ft:u={x:o,y:e.y-n.height};break;case Jt:u={x:o,y:e.y+e.height};break;case Xt:u={x:e.x+e.width,y:l};break;case Nt:u={x:e.x-n.width,y:l};break;default:u={x:e.x,y:e.y}}var c=i?Nc(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case yi:u[c]=u[c]-(e[d]/2-n[d]/2);break;case Ca:u[c]=u[c]+(e[d]/2-n[d]/2);break}}return u}function ka(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.strategy,o=s===void 0?t.strategy:s,l=n.boundary,u=l===void 0?vB:l,c=n.rootBoundary,d=c===void 0?Jv:c,f=n.elementContext,p=f===void 0?Sa:f,h=n.altBoundary,y=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,b=ay(typeof v!="number"?v:sy(v,Ta)),w=p===Sa?yB:Sa,I=t.rects.popper,m=t.elements[y?w:p],A=KB(Rr(m)?m:m.contextElement||lr(t.elements.popper),u,d,o),E=bi(t.elements.reference),O=dy({reference:E,element:I,strategy:"absolute",placement:i}),T=$c(Object.assign({},I,O)),x=p===Sa?T:E,P={top:A.top-x.top+b.top,bottom:x.bottom-A.bottom+b.bottom,left:A.left-x.left+b.left,right:x.right-A.right+b.right},S=t.modifiersData.offset;if(p===Sa&&S){var M=S[i];Object.keys(P).forEach(function(D){var L=[Xt,Jt].indexOf(D)>=0?1:-1,F=[Ft,Jt].indexOf(D)>=0?"y":"x";P[D]+=M[F]*L})}return P}function JB(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Zv:u,d=_i(r),f=d?l?Xv:Xv.filter(function(y){return _i(y)===d}):Ta,p=f.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=f);var h=p.reduce(function(y,g){return y[g]=ka(t,{placement:g,boundary:i,rootBoundary:s,padding:o})[Mn(g)],y},{});return Object.keys(h).sort(function(y,g){return h[y]-h[g]})}function XB(t){if(Mn(t)===kc)return[];var e=Vo(t);return[ly(t),e,ly(e)]}function ZB(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,y=h===void 0?!0:h,g=n.allowedAutoPlacements,v=e.options.placement,b=Mn(v),w=b===v,I=u||(w||!y?[Vo(v)]:XB(v)),m=[v].concat(I).reduce(function(B,W){return B.concat(Mn(W)===kc?JB(e,{placement:W,boundary:d,rootBoundary:f,padding:c,flipVariations:y,allowedAutoPlacements:g}):W)},[]),A=e.rects.reference,E=e.rects.popper,O=new Map,T=!0,x=m[0],P=0;P<m.length;P++){var S=m[P],M=Mn(S),D=_i(S)===yi,L=[Ft,Jt].indexOf(M)>=0,F=L?"width":"height",H=ka(e,{placement:S,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),q=L?D?Xt:Nt:D?Jt:Ft;A[F]>E[F]&&(q=Vo(q));var z=Vo(q),U=[];if(s&&U.push(H[M]<=0),l&&U.push(H[q]<=0,H[z]<=0),U.every(function(B){return B})){x=S,T=!1;break}O.set(S,U)}if(T)for(var N=y?3:1,C=function(W){var $=m.find(function(Q){var Y=O.get(Q);if(Y)return Y.slice(0,W).every(function(X){return X})});if($)return x=$,"break"},R=N;R>0;R--){var k=C(R);if(k==="break")break}e.placement!==x&&(e.modifiersData[r]._skip=!0,e.placement=x,e.reset=!0)}}const e5={name:"flip",enabled:!0,phase:"main",fn:ZB,requiresIfExists:["offset"],data:{_skip:!1}};function fy(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function hy(t){return[Ft,Xt,Jt,Nt].some(function(e){return t[e]>=0})}function t5(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=ka(e,{elementContext:"reference"}),l=ka(e,{altBoundary:!0}),u=fy(o,r),c=fy(l,i,s),d=hy(u),f=hy(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const n5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:t5};function r5(t,e,n){var r=Mn(t),i=[Nt,Ft].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],l=s[1];return o=o||0,l=(l||0)*i,[Nt,Xt].indexOf(r)>=0?{x:l,y:o}:{x:o,y:l}}function i5(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=Zv.reduce(function(d,f){return d[f]=r5(f,e.rects,s),d},{}),l=o[e.placement],u=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const a5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:i5};function s5(t){var e=t.state,n=t.name;e.modifiersData[n]=dy({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const o5={name:"popperOffsets",enabled:!0,phase:"read",fn:s5,data:{}};function l5(t){return t==="x"?"y":"x"}function u5(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,h=p===void 0?!0:p,y=n.tetherOffset,g=y===void 0?0:y,v=ka(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),b=Mn(e.placement),w=_i(e.placement),I=!w,m=Nc(b),A=l5(m),E=e.modifiersData.popperOffsets,O=e.rects.reference,T=e.rects.popper,x=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,P=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(!!E){if(s){var D,L=m==="y"?Ft:Nt,F=m==="y"?Jt:Xt,H=m==="y"?"height":"width",q=E[m],z=q+v[L],U=q-v[F],N=h?-T[H]/2:0,C=w===yi?O[H]:T[H],R=w===yi?-T[H]:-O[H],k=e.elements.arrow,B=h&&k?Fc(k):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:iy(),$=W[L],Q=W[F],Y=Ma(0,O[H],B[H]),X=I?O[H]/2-N-Y-$-P.mainAxis:C-Y-$-P.mainAxis,ee=I?-O[H]/2+N+Y+Q+P.mainAxis:R+Y+Q+P.mainAxis,le=e.elements.arrow&&Pa(e.elements.arrow),me=le?m==="y"?le.clientTop||0:le.clientLeft||0:0,ve=(D=S==null?void 0:S[m])!=null?D:0,Ae=q+X-ve-me,Se=q+ee-ve,Ze=Ma(h?$o(z,Ae):z,q,h?kr(U,Se):U);E[m]=Ze,M[m]=Ze-q}if(l){var Ve,te=m==="x"?Ft:Nt,re=m==="x"?Jt:Xt,ue=E[A],he=A==="y"?"height":"width",oe=ue+v[te],_e=ue-v[re],Oe=[Ft,Nt].indexOf(b)!==-1,Te=(Ve=S==null?void 0:S[A])!=null?Ve:0,mt=Oe?oe:ue-O[he]-T[he]-Te+P.altAxis,_t=Oe?ue+O[he]+T[he]-Te-P.altAxis:_e,qe=h&&Oe?xB(mt,ue,_t):Ma(h?mt:oe,ue,h?_t:_e);E[A]=qe,M[A]=qe-ue}e.modifiersData[r]=M}}const c5={name:"preventOverflow",enabled:!0,phase:"main",fn:u5,requiresIfExists:["offset"]};function d5(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function f5(t){return t===qt(t)||!Zt(t)?Lc(t):d5(t)}function h5(t){var e=t.getBoundingClientRect(),n=wi(e.width)/t.offsetWidth||1,r=wi(e.height)/t.offsetHeight||1;return n!==1||r!==1}function p5(t,e,n){n===void 0&&(n=!1);var r=Zt(e),i=Zt(e)&&h5(e),s=lr(e),o=bi(t,i,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Pn(e)!=="body"||Uc(s))&&(l=f5(e)),Zt(e)?(u=bi(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=Bc(s))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function m5(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=e.get(l);u&&i(u)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function g5(t){var e=m5(t);return SB.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function v5(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function y5(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var py={placement:"bottom",modifiers:[],strategy:"absolute"};function my(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function w5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,s=i===void 0?py:i;return function(l,u,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},py,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,h={state:d,setOptions:function(b){var w=typeof b=="function"?b(d.options):b;g(),d.options=Object.assign({},s,d.options,w),d.scrollParents={reference:Rr(l)?Ra(l):l.contextElement?Ra(l.contextElement):[],popper:Ra(u)};var I=g5(y5([].concat(r,d.options.modifiers)));return d.orderedModifiers=I.filter(function(m){return m.enabled}),y(),h.update()},forceUpdate:function(){if(!p){var b=d.elements,w=b.reference,I=b.popper;if(!!my(w,I)){d.rects={reference:p5(w,Pa(I),d.options.strategy==="fixed"),popper:Fc(I)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(P){return d.modifiersData[P.name]=Object.assign({},P.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var A=d.orderedModifiers[m],E=A.fn,O=A.options,T=O===void 0?{}:O,x=A.name;typeof E=="function"&&(d=E({state:d,options:T,name:x,instance:h})||d)}}}},update:v5(function(){return new Promise(function(v){h.forceUpdate(),v(d)})}),destroy:function(){g(),p=!0}};if(!my(l,u))return h;h.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function y(){d.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,I=w===void 0?{}:w,m=v.effect;if(typeof m=="function"){var A=m({state:d,name:b,instance:h,options:I}),E=function(){};f.push(A||E)}})}function g(){f.forEach(function(v){return v()}),f=[]}return h}}var b5=[VB,o5,jB,ey,a5,e5,c5,LB,n5],_5=w5({defaultModifiers:b5}),E5="tippy-box",gy="tippy-content",I5="tippy-backdrop",vy="tippy-arrow",yy="tippy-svg-arrow",xr={passive:!0,capture:!0},wy=function(){return document.body};function jc(t,e,n){if(Array.isArray(t)){var r=t[e];return r==null?Array.isArray(n)?n[e]:n:r}return t}function Hc(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function by(t,e){return typeof t=="function"?t.apply(void 0,e):t}function _y(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function A5(t){return t.split(/\s+/).filter(Boolean)}function Ei(t){return[].concat(t)}function Ey(t,e){t.indexOf(e)===-1&&t.push(e)}function O5(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function T5(t){return t.split("-")[0]}function qo(t){return[].slice.call(t)}function Iy(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function xa(){return document.createElement("div")}function Wo(t){return["Element","Fragment"].some(function(e){return Hc(t,e)})}function C5(t){return Hc(t,"NodeList")}function S5(t){return Hc(t,"MouseEvent")}function P5(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function M5(t){return Wo(t)?[t]:C5(t)?qo(t):Array.isArray(t)?t:qo(document.querySelectorAll(t))}function Vc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Ay(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function R5(t){var e,n=Ei(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function k5(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var s=i.popperRect,o=i.popperState,l=i.props,u=l.interactiveBorder,c=T5(o.placement),d=o.modifiersData.offset;if(!d)return!0;var f=c==="bottom"?d.top.y:0,p=c==="top"?d.bottom.y:0,h=c==="right"?d.left.x:0,y=c==="left"?d.right.x:0,g=s.top-r+f>u,v=r-s.bottom-p>u,b=s.left-n+h>u,w=n-s.right-y>u;return g||v||b||w})}function qc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Oy(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Rn={isTouch:!1},Ty=0;function x5(){Rn.isTouch||(Rn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Cy))}function Cy(){var t=performance.now();t-Ty<20&&(Rn.isTouch=!1,document.removeEventListener("mousemove",Cy)),Ty=t}function D5(){var t=document.activeElement;if(P5(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function F5(){document.addEventListener("touchstart",x5,xr),window.addEventListener("blur",D5)}var N5=typeof window!="undefined"&&typeof document!="undefined",L5=N5?!!window.msCrypto:!1,B5={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},U5={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},un=Object.assign({appendTo:wy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},B5,U5),$5=Object.keys(un),j5=function(e){var n=Object.keys(e);n.forEach(function(r){un[r]=e[r]})};function Sy(t){var e=t.plugins||[],n=e.reduce(function(r,i){var s=i.name,o=i.defaultValue;if(s){var l;r[s]=t[s]!==void 0?t[s]:(l=un[s])!=null?l:o}return r},{});return Object.assign({},t,n)}function H5(t,e){var n=e?Object.keys(Sy(Object.assign({},un,{plugins:e}))):$5,r=n.reduce(function(i,s){var o=(t.getAttribute("data-tippy-"+s)||"").trim();if(!o)return i;if(s==="content")i[s]=o;else try{i[s]=JSON.parse(o)}catch(l){i[s]=o}return i},{});return r}function Py(t,e){var n=Object.assign({},e,{content:by(e.content,[t])},e.ignoreAttributes?{}:H5(t,e.plugins));return n.aria=Object.assign({},un.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}var V5=function(){return"innerHTML"};function Wc(t,e){t[V5()]=e}function My(t){var e=xa();return t===!0?e.className=vy:(e.className=yy,Wo(t)?e.appendChild(t):Wc(e,t)),e}function Ry(t,e){Wo(e.content)?(Wc(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Wc(t,e.content):t.textContent=e.content)}function Gc(t){var e=t.firstElementChild,n=qo(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(gy)}),arrow:n.find(function(r){return r.classList.contains(vy)||r.classList.contains(yy)}),backdrop:n.find(function(r){return r.classList.contains(I5)})}}function ky(t){var e=xa(),n=xa();n.className=E5,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=xa();r.className=gy,r.setAttribute("data-state","hidden"),Ry(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(s,o){var l=Gc(e),u=l.box,c=l.content,d=l.arrow;o.theme?u.setAttribute("data-theme",o.theme):u.removeAttribute("data-theme"),typeof o.animation=="string"?u.setAttribute("data-animation",o.animation):u.removeAttribute("data-animation"),o.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?u.setAttribute("role",o.role):u.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&Ry(c,t.props),o.arrow?d?s.arrow!==o.arrow&&(u.removeChild(d),u.appendChild(My(o.arrow))):u.appendChild(My(o.arrow)):d&&u.removeChild(d)}return{popper:e,onUpdate:i}}ky.$$tippy=!0;var q5=1,Go=[],zc=[];function W5(t,e){var n=Py(t,Object.assign({},un,Sy(Iy(e)))),r,i,s,o=!1,l=!1,u=!1,c=!1,d,f,p,h=[],y=_y(Ae,n.interactiveDebounce),g,v=q5++,b=null,w=O5(n.plugins),I={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},m={id:v,reference:t,popper:xa(),popperInstance:b,props:n,state:I,plugins:w,clearDelayTimeouts:mt,setProps:_t,setContent:qe,show:Ii,hide:et,hideWithInteractivity:en,enable:Oe,disable:Te,unmount:zo,destroy:id};if(!n.render)return m;var A=n.render(m),E=A.popper,O=A.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+m.id,m.popper=E,t._tippy=m,E._tippy=m;var T=w.map(function(ie){return ie.fn(m)}),x=t.hasAttribute("aria-expanded");return le(),N(),q(),z("onCreate",[m]),n.showOnCreate&&oe(),E.addEventListener("mouseenter",function(){m.props.interactive&&m.state.isVisible&&m.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){m.props.interactive&&m.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",y)}),m;function P(){var ie=m.props.touch;return Array.isArray(ie)?ie:[ie,0]}function S(){return P()[0]==="hold"}function M(){var ie;return!!((ie=m.props.render)!=null&&ie.$$tippy)}function D(){return g||t}function L(){var ie=D().parentNode;return ie?R5(ie):document}function F(){return Gc(E)}function H(ie){return m.state.isMounted&&!m.state.isVisible||Rn.isTouch||d&&d.type==="focus"?0:jc(m.props.delay,ie?0:1,un.delay)}function q(ie){ie===void 0&&(ie=!1),E.style.pointerEvents=m.props.interactive&&!ie?"":"none",E.style.zIndex=""+m.props.zIndex}function z(ie,fe,Ee){if(Ee===void 0&&(Ee=!0),T.forEach(function(xe){xe[ie]&&xe[ie].apply(xe,fe)}),Ee){var Le;(Le=m.props)[ie].apply(Le,fe)}}function U(){var ie=m.props.aria;if(!!ie.content){var fe="aria-"+ie.content,Ee=E.id,Le=Ei(m.props.triggerTarget||t);Le.forEach(function(xe){var ft=xe.getAttribute(fe);if(m.state.isVisible)xe.setAttribute(fe,ft?ft+" "+Ee:Ee);else{var At=ft&&ft.replace(Ee,"").trim();At?xe.setAttribute(fe,At):xe.removeAttribute(fe)}})}}function N(){if(!(x||!m.props.aria.expanded)){var ie=Ei(m.props.triggerTarget||t);ie.forEach(function(fe){m.props.interactive?fe.setAttribute("aria-expanded",m.state.isVisible&&fe===D()?"true":"false"):fe.removeAttribute("aria-expanded")})}}function C(){L().removeEventListener("mousemove",y),Go=Go.filter(function(ie){return ie!==y})}function R(ie){if(!(Rn.isTouch&&(u||ie.type==="mousedown"))){var fe=ie.composedPath&&ie.composedPath()[0]||ie.target;if(!(m.props.interactive&&Oy(E,fe))){if(Ei(m.props.triggerTarget||t).some(function(Ee){return Oy(Ee,fe)})){if(Rn.isTouch||m.state.isVisible&&m.props.trigger.indexOf("click")>=0)return}else z("onClickOutside",[m,ie]);m.props.hideOnClick===!0&&(m.clearDelayTimeouts(),m.hide(),l=!0,setTimeout(function(){l=!1}),m.state.isMounted||$())}}}function k(){u=!0}function B(){u=!1}function W(){var ie=L();ie.addEventListener("mousedown",R,!0),ie.addEventListener("touchend",R,xr),ie.addEventListener("touchstart",B,xr),ie.addEventListener("touchmove",k,xr)}function $(){var ie=L();ie.removeEventListener("mousedown",R,!0),ie.removeEventListener("touchend",R,xr),ie.removeEventListener("touchstart",B,xr),ie.removeEventListener("touchmove",k,xr)}function Q(ie,fe){X(ie,function(){!m.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&fe()})}function Y(ie,fe){X(ie,fe)}function X(ie,fe){var Ee=F().box;function Le(xe){xe.target===Ee&&(qc(Ee,"remove",Le),fe())}if(ie===0)return fe();qc(Ee,"remove",f),qc(Ee,"add",Le),f=Le}function ee(ie,fe,Ee){Ee===void 0&&(Ee=!1);var Le=Ei(m.props.triggerTarget||t);Le.forEach(function(xe){xe.addEventListener(ie,fe,Ee),h.push({node:xe,eventType:ie,handler:fe,options:Ee})})}function le(){S()&&(ee("touchstart",ve,{passive:!0}),ee("touchend",Se,{passive:!0})),A5(m.props.trigger).forEach(function(ie){if(ie!=="manual")switch(ee(ie,ve),ie){case"mouseenter":ee("mouseleave",Se);break;case"focus":ee(L5?"focusout":"blur",Ze);break;case"focusin":ee("focusout",Ze);break}})}function me(){h.forEach(function(ie){var fe=ie.node,Ee=ie.eventType,Le=ie.handler,xe=ie.options;fe.removeEventListener(Ee,Le,xe)}),h=[]}function ve(ie){var fe,Ee=!1;if(!(!m.state.isEnabled||Ve(ie)||l)){var Le=((fe=d)==null?void 0:fe.type)==="focus";d=ie,g=ie.currentTarget,N(),!m.state.isVisible&&S5(ie)&&Go.forEach(function(xe){return xe(ie)}),ie.type==="click"&&(m.props.trigger.indexOf("mouseenter")<0||o)&&m.props.hideOnClick!==!1&&m.state.isVisible?Ee=!0:oe(ie),ie.type==="click"&&(o=!Ee),Ee&&!Le&&_e(ie)}}function Ae(ie){var fe=ie.target,Ee=D().contains(fe)||E.contains(fe);if(!(ie.type==="mousemove"&&Ee)){var Le=he().concat(E).map(function(xe){var ft,At=xe._tippy,Ot=(ft=At.popperInstance)==null?void 0:ft.state;return Ot?{popperRect:xe.getBoundingClientRect(),popperState:Ot,props:n}:null}).filter(Boolean);k5(Le,ie)&&(C(),_e(ie))}}function Se(ie){var fe=Ve(ie)||m.props.trigger.indexOf("click")>=0&&o;if(!fe){if(m.props.interactive){m.hideWithInteractivity(ie);return}_e(ie)}}function Ze(ie){m.props.trigger.indexOf("focusin")<0&&ie.target!==D()||m.props.interactive&&ie.relatedTarget&&E.contains(ie.relatedTarget)||_e(ie)}function Ve(ie){return Rn.isTouch?S()!==ie.type.indexOf("touch")>=0:!1}function te(){re();var ie=m.props,fe=ie.popperOptions,Ee=ie.placement,Le=ie.offset,xe=ie.getReferenceClientRect,ft=ie.moveTransition,At=M()?Gc(E).arrow:null,Ot=xe?{getBoundingClientRect:xe,contextElement:xe.contextElement||D()}:t,Qo={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(G){var J=G.state;if(M()){var ne=F(),de=ne.box;["placement","reference-hidden","escaped"].forEach(function(pe){pe==="placement"?de.setAttribute("data-placement",J.placement):J.attributes.popper["data-popper-"+pe]?de.setAttribute("data-"+pe,""):de.removeAttribute("data-"+pe)}),J.attributes.popper={}}}},Wn=[{name:"offset",options:{offset:Le}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ft}},Qo];M()&&At&&Wn.push({name:"arrow",options:{element:At,padding:3}}),Wn.push.apply(Wn,(fe==null?void 0:fe.modifiers)||[]),m.popperInstance=_5(Ot,E,Object.assign({},fe,{placement:Ee,onFirstUpdate:p,modifiers:Wn}))}function re(){m.popperInstance&&(m.popperInstance.destroy(),m.popperInstance=null)}function ue(){var ie=m.props.appendTo,fe,Ee=D();m.props.interactive&&ie===wy||ie==="parent"?fe=Ee.parentNode:fe=by(ie,[Ee]),fe.contains(E)||fe.appendChild(E),m.state.isMounted=!0,te()}function he(){return qo(E.querySelectorAll("[data-tippy-root]"))}function oe(ie){m.clearDelayTimeouts(),ie&&z("onTrigger",[m,ie]),W();var fe=H(!0),Ee=P(),Le=Ee[0],xe=Ee[1];Rn.isTouch&&Le==="hold"&&xe&&(fe=xe),fe?r=setTimeout(function(){m.show()},fe):m.show()}function _e(ie){if(m.clearDelayTimeouts(),z("onUntrigger",[m,ie]),!m.state.isVisible){$();return}if(!(m.props.trigger.indexOf("mouseenter")>=0&&m.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ie.type)>=0&&o)){var fe=H(!1);fe?i=setTimeout(function(){m.state.isVisible&&m.hide()},fe):s=requestAnimationFrame(function(){m.hide()})}}function Oe(){m.state.isEnabled=!0}function Te(){m.hide(),m.state.isEnabled=!1}function mt(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(s)}function _t(ie){if(!m.state.isDestroyed){z("onBeforeUpdate",[m,ie]),me();var fe=m.props,Ee=Py(t,Object.assign({},fe,Iy(ie),{ignoreAttributes:!0}));m.props=Ee,le(),fe.interactiveDebounce!==Ee.interactiveDebounce&&(C(),y=_y(Ae,Ee.interactiveDebounce)),fe.triggerTarget&&!Ee.triggerTarget?Ei(fe.triggerTarget).forEach(function(Le){Le.removeAttribute("aria-expanded")}):Ee.triggerTarget&&t.removeAttribute("aria-expanded"),N(),q(),O&&O(fe,Ee),m.popperInstance&&(te(),he().forEach(function(Le){requestAnimationFrame(Le._tippy.popperInstance.forceUpdate)})),z("onAfterUpdate",[m,ie])}}function qe(ie){m.setProps({content:ie})}function Ii(){var ie=m.state.isVisible,fe=m.state.isDestroyed,Ee=!m.state.isEnabled,Le=Rn.isTouch&&!m.props.touch,xe=jc(m.props.duration,0,un.duration);if(!(ie||fe||Ee||Le)&&!D().hasAttribute("disabled")&&(z("onShow",[m],!1),m.props.onShow(m)!==!1)){if(m.state.isVisible=!0,M()&&(E.style.visibility="visible"),q(),W(),m.state.isMounted||(E.style.transition="none"),M()){var ft=F(),At=ft.box,Ot=ft.content;Vc([At,Ot],0)}p=function(){var Wn;if(!(!m.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=m.props.moveTransition,M()&&m.props.animation){var V=F(),G=V.box,J=V.content;Vc([G,J],xe),Ay([G,J],"visible")}U(),N(),Ey(zc,m),(Wn=m.popperInstance)==null||Wn.forceUpdate(),z("onMount",[m]),m.props.animation&&M()&&Y(xe,function(){m.state.isShown=!0,z("onShown",[m])})}},ue()}}function et(){var ie=!m.state.isVisible,fe=m.state.isDestroyed,Ee=!m.state.isEnabled,Le=jc(m.props.duration,1,un.duration);if(!(ie||fe||Ee)&&(z("onHide",[m],!1),m.props.onHide(m)!==!1)){if(m.state.isVisible=!1,m.state.isShown=!1,c=!1,o=!1,M()&&(E.style.visibility="hidden"),C(),$(),q(!0),M()){var xe=F(),ft=xe.box,At=xe.content;m.props.animation&&(Vc([ft,At],Le),Ay([ft,At],"hidden"))}U(),N(),m.props.animation?M()&&Q(Le,m.unmount):m.unmount()}}function en(ie){L().addEventListener("mousemove",y),Ey(Go,y),y(ie)}function zo(){m.state.isVisible&&m.hide(),m.state.isMounted&&(re(),he().forEach(function(ie){ie._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),zc=zc.filter(function(ie){return ie!==m}),m.state.isMounted=!1,z("onHidden",[m]))}function id(){m.state.isDestroyed||(m.clearDelayTimeouts(),m.unmount(),me(),delete t._tippy,m.state.isDestroyed=!0,z("onDestroy",[m]))}}function Da(t,e){e===void 0&&(e={});var n=un.plugins.concat(e.plugins||[]);F5();var r=Object.assign({},e,{plugins:n}),i=M5(t),s=i.reduce(function(o,l){var u=l&&W5(l,r);return u&&o.push(u),o},[]);return Wo(t)?s[0]:s}Da.defaultProps=un,Da.setDefaultProps=j5,Da.currentInput=Rn,Object.assign({},ey,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Da.setDefaultProps({render:ky});function xy(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Dy=typeof window!="undefined"&&typeof document!="undefined";function Qc(t,e){t&&(typeof t=="function"&&t(e),{}.hasOwnProperty.call(t,"current")&&(t.current=e))}function Fy(){return Dy&&document.createElement("div")}function G5(t){var e={"data-placement":t.placement};return t.referenceHidden&&(e["data-reference-hidden"]=""),t.escaped&&(e["data-escaped"]=""),e}function Ny(t,e){if(t===e)return!0;if(typeof t=="object"&&t!=null&&typeof e=="object"&&e!=null){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(e.hasOwnProperty(n)){if(!Ny(t[n],e[n]))return!1}else return!1;return!0}else return!1}function z5(t){var e=[];return t.forEach(function(n){e.find(function(r){return Ny(n,r)})||e.push(n)}),e}function Q5(t,e){var n,r;return Object.assign({},e,{popperOptions:Object.assign({},t.popperOptions,e.popperOptions,{modifiers:z5([].concat(((n=t.popperOptions)==null?void 0:n.modifiers)||[],((r=e.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Yc=Dy?K.useLayoutEffect:K.useEffect;function Y5(t){var e=K.useRef();return e.current||(e.current=typeof t=="function"?t():t),e.current}function Ly(t,e,n){n.split(/\s+/).forEach(function(r){r&&t.classList[e](r)})}var K5={name:"className",defaultValue:"",fn:function(e){var n=e.popper.firstElementChild,r=function(){var l;return!!((l=e.props.render)!=null&&l.$$tippy)};function i(){e.props.className&&!r()||Ly(n,"add",e.props.className)}function s(){r()&&Ly(n,"remove",e.props.className)}return{onCreate:i,onBeforeUpdate:s,onAfterUpdate:i}}};function J5(t){function e(n){var r=n.children,i=n.content,s=n.visible,o=n.singleton,l=n.render,u=n.reference,c=n.disabled,d=c===void 0?!1:c,f=n.ignoreAttributes,p=f===void 0?!0:f;n.__source,n.__self;var h=xy(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),y=s!==void 0,g=o!==void 0,v=K.useState(!1),b=v[0],w=v[1],I=K.useState({}),m=I[0],A=I[1],E=K.useState(),O=E[0],T=E[1],x=Y5(function(){return{container:Fy(),renders:1}}),P=Object.assign({ignoreAttributes:p},h,{content:x.container});y&&(P.trigger="manual",P.hideOnClick=!1),g&&(d=!0);var S=P,M=P.plugins||[];l&&(S=Object.assign({},P,{plugins:g&&o.data!=null?[].concat(M,[{fn:function(){return{onTrigger:function(H,q){var z=o.data.children.find(function(U){var N=U.instance;return N.reference===q.currentTarget});H.state.$$activeSingletonInstance=z.instance,T(z.content)}}}}]):M,render:function(){return{popper:x.container}}}));var D=[u].concat(r?[r.type]:[]);return Yc(function(){var L=u;u&&u.hasOwnProperty("current")&&(L=u.current);var F=t(L||x.ref||Fy(),Object.assign({},S,{plugins:[K5].concat(P.plugins||[])}));return x.instance=F,d&&F.disable(),s&&F.show(),g&&o.hook({instance:F,content:i,props:S,setSingletonContent:T}),w(!0),function(){F.destroy(),o==null||o.cleanup(F)}},D),Yc(function(){var L;if(x.renders===1){x.renders++;return}var F=x.instance;F.setProps(Q5(F.props,S)),(L=F.popperInstance)==null||L.forceUpdate(),d?F.disable():F.enable(),y&&(s?F.show():F.hide()),g&&o.hook({instance:F,content:i,props:S,setSingletonContent:T})}),Yc(function(){var L;if(!!l){var F=x.instance;F.setProps({popperOptions:Object.assign({},F.props.popperOptions,{modifiers:[].concat((((L=F.props.popperOptions)==null?void 0:L.modifiers)||[]).filter(function(H){var q=H.name;return q!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(q){var z,U=q.state,N=(z=U.modifiersData)==null?void 0:z.hide;(m.placement!==U.placement||m.referenceHidden!==(N==null?void 0:N.isReferenceHidden)||m.escaped!==(N==null?void 0:N.hasPopperEscaped))&&A({placement:U.placement,referenceHidden:N==null?void 0:N.isReferenceHidden,escaped:N==null?void 0:N.hasPopperEscaped}),U.attributes.popper={}}}])})})}},[m.placement,m.referenceHidden,m.escaped].concat(D)),ae(De,{children:[r?K.cloneElement(r,{ref:function(F){x.ref=F,Qc(r.ref,F)}}):null,b&&We.createPortal(l?l(G5(m),O,x.instance):i,x.container)]})}return e}var X5=function(t,e){return K.forwardRef(function(r,i){var s=r.children,o=xy(r,["children"]);return j(t,se(Z({},Object.assign({},e,o)),{children:s?K.cloneElement(s,{ref:function(u){Qc(i,u),Qc(s.ref,u)}}):null}))})},Z5=X5(J5(Da));const eU=Z5,tU=({onClick:t})=>{const{clear:e}=Ie(Me);return j(eU,{content:e,children:j("button",{onClick:t,"data-testid":"clear",className:"eow-border eow-rounded eow-ml-2 eow-px-3 eow-flex eow-items-center",children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-h-4 eow-w-4 ",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})})},nU=({setFilters:t})=>{const[e,n]=K.useState(!1),r=K.useRef(null),{clearFromToFilterSportal365ImagesMessage:i,dateFromTo:s,dateFromToPlaceholder:o}=Ie(Me);return ae("div",{"data-testid":"from/to filter",children:[j("label",{htmlFor:"date from/to",className:Yt,children:s}),ae("div",{className:"eow-flex eow-flex-row",children:[j(gB,{ref:r,className:"eow-flex-1",placeholder:o,options:{mode:"range",enableTime:!1,dateFormat:"YYYY-MM-DD",altFormat:"YYYY-MM-DD",altInput:!0,position:"below",altInputClass:ua,parseDate:(c,d)=>Xi(c,d).toDate(),formatDate:(c,d)=>Xi(c).format(d),defaultDate:null},onChange:c=>{if(c&&c.length>1){n(!0);const d="YYYY-MM-DD",f=Xi(c[0]).format(d),p=Xi(c[1]).format(d);t({from:f,to:p})}else c.length===0&&!e&&(t(null),Pe.info(i))}}),e?j(tU,{onClick:()=>{r.current.flatpickr.clear(),n(!1),t(null)}}):j(De,{})]})]})};class rU{constructor(){a(this,"id");a(this,"value");a(this,"label")}}class By extends rU{constructor(){super(...arguments);a(this,"logo");a(this,"countryName");a(this,"countryFlag")}}const iU=(t,e,n,r)=>({apiKey:t,clientId:e,lang:n||"en",environment:r||"prod",idSchema:"native",errorHandlingMode:"standard",authProvider:{getIdToken:()=>"",logout:()=>{}}}),aU=(t,e)=>{if(!t&&!e)return null;if(!t&&e)return console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null;const n=e&&e==="betway"?{}.VITE_SPORTAL365_BETWAY_TOKEN:{}.VITE_SPORTAL365_SHARED_TOKEN;return{project:t,authorization:`Bearer ${n}`}},Uy=t=>{document.getElementById(t).scrollIntoView({behavior:"smooth"})},Kc={container:t=>Z({},t),control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"2px 6px","&:hover":{borderColor:"gray"},border:"1px solid lightgray",textTransform:"capitalize"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}}),option:(t,e)=>se(Z({},t),{backgroundColor:e.isSelected?"#0066cc":"white","&:hover":{backgroundColor:e.isSelected?"#0066cc":"lightgray"},textTransform:"capitalize"})},sU=t=>{let e=new By;return e.label=t.name,e.value=t.name,e.id=t.id,t.birthDate?e.logo=t.assets&&t.assets.headshot&&t.assets.headshot:e.logo=t.assets&&t.assets.logo&&t.assets.logo,e.countryName=t.country.name,e.countryFlag=t.country.assets&&t.country.assets.flag?t.country.assets.flag:vn.country,e},oU=({setQuery:t,setFilters:e})=>{const[n,r]=K.useState(!1),[i,s]=K.useState(null),{searchImages:o,hideFilters:l,showFilters:u}=Ie(Me),c=()=>r(!n),d=h=>{s(h),t((h==null?void 0:h.value)||"")},p=Wu((h,y)=>{h&&y([{id:h,value:h,label:h}])},300);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"search image",className:Yt,children:o}),j(Oc,{components:{DropdownIndicator:null},loadOptions:p,isClearable:!0,styles:Kc,getOptionValue:h=>h.id,onChange:d,value:i,placeholder:"",className:"eow-mb-1"}),j("a",{className:"eow-flex eow-justify-end eow-underline eow-text-blue-600 hover:eow-text-blue-800 visited:eow-text-purple-600 eow-cursor-pointer eow-mb-4",onClick:c,children:n?l:u}),n?j(nU,{setFilters:e}):j(De,{})]})},Jc="sportal365-images-search",lU=({imageNode:t,onChangeImages:e,setShowImagesContainer:n})=>{const[r,i]=K.useState(null),[s,o]=K.useState(""),[l,u]=K.useState(1),[c,d]=K.useState(null),[f,p]=K.useState(!1),h=K.useRef(!1),{https:y}=Ie(En),{searchSportal365ImagesErrorMessage:g,noImagesFound:v}=Ie(Me);K.useEffect(()=>(h.current?b():h.current=!0,()=>i(null)),[s,c,l]);const b=()=>_(this,null,function*(){if(s){p(!0);const A=yield y.fetchImagesFromSportal365(s,c,l),E=yield A.json();A.ok?(i(E),u(E.meta.pagination.current_page)):(console.error(E),Pe.error(g)),p(!1)}else i(null)}),w=()=>{u(A=>A-1),Uy(Jc)},I=()=>{u(A=>A+1),Uy(Jc)};return ae("div",{id:Jc,className:"eow-p-2 eow-border eow-border-gray-200 eow-rounded eow-bg-gray-100",children:[j("div",{className:"eow-flex eow-justify-end",children:j(ju,{isDisabled:!1,onClick:()=>{n(A=>se(Z({},A),{[t]:!A[t]}))}})}),j(oU,{setQuery:o,setFilters:d}),r?ae(De,{children:[j("div",{className:"eow-grid xl:eow-grid-cols-4 md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-2",children:r.data.map(A=>{var E,O;return ae("div",{className:"eow-relative eow-cursor-pointer eow-group eow-mb-2",onClick:()=>{var T,x;return e((x=(T=A.urls)==null?void 0:T.uploaded)==null?void 0:x.embed)},children:[j("img",{src:(O=(E=A.urls)==null?void 0:E.uploaded)==null?void 0:O.thumbnail,alt:"Sportal365 image",className:"eow-object-cover eow-w-full eow-h-full"}),j("div",{className:"eow-absolute eow-inset-0 eow-bg-black eow-bg-opacity-0 group-hover:eow-bg-opacity-50 eow-flex eow-justify-center eow-items-center eow-transition eow-duration-300",children:j("span",{className:"eow-text-white eow-text-4xl eow-opacity-0 group-hover:eow-opacity-100 eow-transition eow-duration-300",children:"+"})})]},A.id)})}),j(TF,{pageCount:r==null?void 0:r.meta.pagination.current_page,images:r,getPreviousPage:w,getNextPage:I})]}):j(De,{}),r&&r.data.length===0?j("p",{className:"eow-text-center eow-font-bold eow-mb-4",children:v}):j(De,{}),f?j(cm,{}):j(De,{})]})},uU=({imageUrl:t,isOpen:e,closeModal:n})=>{K.useLayoutEffect(()=>(e&&document.body.addEventListener("keydown",r),()=>{document.body.removeEventListener("keydown",r)}),[n]);const r=i=>i.key==="Escape"?n():null;return e?j(fm,{wrapperId:"image-modal",children:ae("div",{className:"eow-fixed eow-inset-0 eow-flex eow-items-center eow-justify-center eow-bg-black eow-bg-opacity-50 eow-animate-fadeIn",children:[j("div",{className:"eow-absolute eow-top-0 eow-right-0 eow-m-4",children:j("button",{className:"eow-text-white eow-text-2xl eow-bg-transparent",onClick:n,children:"X"})}),j("div",{className:"eow-flex eow-items-center eow-justify-center eow-h-full",children:j("img",{src:t,alt:"Image modal",className:"eow-w-full eow-object-cover"})})]})}):null},Xc={mainImage:!1,coverImage:!1,mobileImage:!1},$y=({id:t,type:e,label:n,imageUrl:r,imageNode:i,onChange:s})=>{const[o,l]=K.useState(Xc),[u,c]=K.useState(Xc),[d,f]=K.useState(!1),p=()=>f(!1),h=(g,v)=>{c(Xc),s(g,v)},y=(g,v)=>{navigator.clipboard.writeText(g).then(()=>{c(b=>se(Z({},b),{[v]:!0}))}).catch(b=>{console.error("Failed to copy: ",b),c(w=>se(Z({},w),{[v]:!1}))})};return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:n,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:n}),ae("div",{className:"eow-w-full eow-border eow-rounded eow-overflow-hidden eow-p-2",children:[ae("div",{className:"eow-grid md:eow-grid-cols-8 eow-grid-cols-1 eow-gap-2 eow-mb-2",children:[j("div",{className:"eow-col-span-2",children:r?ae(De,{children:[j("img",{src:r,alt:"Card Image",className:"eow-w-full eow-object-cover eow-cursor-pointer",onClick:()=>f(!0)}),j(uU,{imageUrl:r,isOpen:d,closeModal:p})]}):j("div",{className:"eow-bg-gray-200 xl:eow-min-w-24 eow-min-h-24 eow-flex eow-justify-center eow-items-center eow-p-5",children:j("img",{src:vn.image,alt:"Card image"})})}),ae("div",{className:"eow-flex eow-flex-col eow-col-span-6",children:[ae("div",{className:"eow-grid eow-grid-cols-2 eow-gap-2 eow-mb-2",children:[j(EF,{imageNode:i,onChangeImages:h,type:e,id:t}),j(IF,{isDisabled:!r,isUrlCopied:u[i],onClick:()=>y(r||"",i)})]}),j(OF,{imageNode:i,setShowImagesContainer:l})]})]}),o[i]?j(lU,{onChangeImages:g=>h(g,i),setShowImagesContainer:l,imageNode:i}):j(De,{})]})]})},jy=({id:t,type:e,loadedImages:n,onChange:r})=>{const[i,s]=K.useState(!1),o=()=>s(!i),l=Ie(Me),u=e==="game"?Array.from(pm.keys()):Array.from(xS.keys());return ae(De,{children:[j($y,{id:t,type:e,label:l.main,imageUrl:n==null?void 0:n.main,imageNode:"mainImage",onChange:r}),j("button",{className:"eow-underline eow-text-blue-600 hover:eow-text-blue-800 visited:eow-text-purple-600 eow-bg-transparent eow-mb-4",onClick:o,children:i?l.hideMoreImages:l.showMoreImages}),i?j(De,{children:u.map((c,d)=>j($y,{id:t,type:e,label:l[c],imageUrl:n[c],imageNode:pm.get(c),onChange:r},`${c}-${d}`))}):j(De,{})]})},cU=({id:t,loadedImages:e,onChange:n})=>{const r=Ie(Me);return j(vF,{images:r.optionImages,children:j(jy,{id:t,type:"option",loadedImages:e,onChange:n})})},Hy=new la,dU=5,fU=100,hU=({options:t,setRequestBody:e})=>{const{label:n,labelOptionPlaceholder:r,options:i,optionNumber:s,optionsDescription:o}=Ie(Me),l=Hy.constructOptions(t),u=(y,g)=>{y.persist();const v=Array.from(l);v[g].label=y.target.value,h(v)},c=(y,g)=>{const v=Array.from(l);v[g].value=y,h(v)},d=(y,g,v)=>{const b=y||null,w=Array.from(l);switch(g){case"mainImage":w[v].images.main=b,h(w);break;case"mobileImage":w[v].images.mobile=b,h(w);break}},f=()=>{const y=l.sort((w,I)=>parseInt(I.id)-parseInt(w.id))[0].id,g=`${parseInt(y)+1}`,v=Hy.constructEmptyOption(g),b=Array.from(l);b.push(v),h(b)},p=y=>{const g=l.filter((v,b)=>b!==y);h(g)},h=y=>{e(g=>se(Z({},g),{options:y}))};return ae("div",{className:"eow-mb-4",children:[ae("div",{className:"eow-mb-2",children:[j("h3",{className:Yt,children:i}),j("p",{className:"eow-text-gray-400 eow-text-sm",children:o})]}),ae("div",{className:"eow-grid eow-grid-cols-1 lg:eow-grid-cols-2 2xl:eow-grid-cols-3 eow-gap-4 eow-mb-1",children:[l.map((y,g)=>ae("div",{className:"eow-overflow-visible eow-shadow-l eow-border eow-border-gray-200",children:[ae("div",{className:"eow-bg-gray-100 eow-flex eow-justify-between eow-px-3 eow-py-2",children:[ae("h2",{className:"eow-card-title",children:[s," ",g+1]}),j(ju,{isDisabled:l.length===dU,onClick:()=>p(g)})]}),ae("div",{className:"eow-p-3",children:[ae("div",{className:"eow-grid sm:eow-grid-cols-2 eow-grid-cols-1 eow-gap-2",children:[j(gF,{label:n,defaultValue:y.label,placeholder:r,onChange:v=>u(v,g)}),j(pa,{type:"options_value",defaultValue:y.value,onChange:v=>c(v,g)})]}),j(cU,{id:g,loadedImages:y.images,onChange:(v,b)=>d(v,b,g)})]})]},`points_number_${y.id}_${g}`)),j($u,{isDisabled:l.length===fU,onClick:f})]})]})},pU=({requestBody:t,setRequestBody:e,description:n,setDescription:r})=>{const i=Ie(Me),s=o=>{o.persist(),e(l=>se(Z({},l),{title:o.target.value}))};return ae("div",{className:"md:eow-w-4/6 eow-w-full",children:[j(DS,{value:(t==null?void 0:t.id)||null}),j(ni,{title:i.title,placeholder:i.titlePlaceholder,onChange:s,defaultValue:t.title||""}),j(Uu,{defaultValue:n,setValue:r,property:"description"}),j(mF,{points:t.points,setRequestBody:e}),j(hU,{options:t.options,setRequestBody:e})]})},ur=({title:t,children:e})=>{const[n,r]=K.useState(!1);return ae("div",{className:"eow-border-b eow-border-gray-200 eow-mb-2",children:[ae("button",{className:"eow-flex eow-justify-between eow-py-2 eow-px-4 eow-py-2 eow-px-4 eow-w-full eow-text-left eow-text-gray-800 eow-font-semibold eow-bg-gray-100 hover:eow-bg-gray-200 focus:eow-outline-none",onClick:()=>r(!n),children:[j("span",{children:t}),j("img",{src:n?vn.upArrow:vn.downArrow,alt:"Up arrow",className:"eow-w-6 eow-h-6"})]}),n&&j("div",{className:"eow-border eow-border-gray-200 eow-p-4",children:e})]})},mU=({defaultValue:t,onChange:e})=>{const{https:n}=Ie(En),{type:r,typeDescription:i,noType:s}=Ie(Me),{data:o}=iu({queryKey:["eitherOrTypes"],queryFn:()=>n.getEitherOrTypes()});return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"type",className:Yt,children:r}),ae("select",{id:"quizType",className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2 eow-mb-1",onChange:e,defaultValue:t||"",children:[j("option",{value:"",children:s}),o?o.map((l,u)=>j("option",{id:l.id,value:l.id,children:l.label},`${l.id}-${u}`)):j(De,{})]}),j("p",{className:"eow-text-gray-400 eow-text-xs",children:i})]})},Vy=({type:t,defaultValue:e,onChange:n})=>{const{status:r,active:i,inactive:s,statusDescription:o,winningCondition:l,winningConditionDescription:u,more:c,less:d}=Ie(Me);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"status",className:Yt,children:t==="status"?r:l}),ae("select",{id:t==="status"?"gameStatus":"gameWinningCondition",className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2 eow-mb-1",onChange:n,defaultValue:e,children:[j("option",{value:t==="status"?"ACTIVE":"MORE",children:t==="status"?i:c}),j("option",{value:t==="status"?"INACTIVE":"LESS",children:t==="status"?s:d})]}),j("p",{className:"eow-text-gray-400 eow-text-xs",children:t==="status"?o:u})]})};var gU=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],qy=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(e).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),o=String(r.getOptionLabel(n)).toLowerCase();return s===i||o===i},Zc={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,n,r,i){return!(!e||n.some(function(s){return qy(e,s,i)})||r.some(function(s){return qy(e,s,i)}))},getNewOptionData:function(e,n){return{label:n,value:e,__isNew__:!0}}};function vU(t){var e=t.allowCreateWhileLoading,n=e===void 0?!1:e,r=t.createOptionPosition,i=r===void 0?"last":r,s=t.formatCreateLabel,o=s===void 0?Zc.formatCreateLabel:s,l=t.isValidNewOption,u=l===void 0?Zc.isValidNewOption:l,c=t.getNewOptionData,d=c===void 0?Zc.getNewOptionData:c,f=t.onCreateOption,p=t.options,h=p===void 0?[]:p,y=t.onChange,g=an(t,gU),v=g.getOptionValue,b=v===void 0?kv:v,w=g.getOptionLabel,I=w===void 0?Rv:w,m=g.inputValue,A=g.isLoading,E=g.isMulti,O=g.value,T=g.name,x=K.useMemo(function(){return u(m,Po(O),h,{getOptionValue:b,getOptionLabel:I})?d(m,o(m)):void 0},[o,d,I,b,m,u,h,O]),P=K.useMemo(function(){return(n||!A)&&x?i==="first"?[x].concat(ci(h)):[].concat(ci(h),[x]):h},[n,i,A,x,h]),S=K.useCallback(function(M,D){if(D.action!=="select-option")return y(M,D);var L=Array.isArray(M)?M:[M];if(L[L.length-1]===x){if(f)f(m);else{var F=d(m,m),H={action:"create-option",name:T,option:F};y(Ea(E,[].concat(ci(Po(O)),[F]),F),H)}return}y(M,D)},[d,m,E,T,x,f,y,O]);return we(we({},g),{},{options:P,onChange:S})}var yU=K.forwardRef(function(t,e){var n=Ac(t),r=vU(n);return j(No,Z({ref:e},r))}),wU=yU;const bU=t=>({label:t,value:t}),_U={control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"6px 1px","&:hover":{borderColor:"gray"},border:"1px solid lightgray",boxShadow:"none"}),clearIndicator:t=>se(Z({},t),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}})},Wy=({defaultValue:t,showLabel:e,setObject:n,handleResetData:r})=>{const[i,s]=K.useState(""),o=t.map(y=>bU(y)),{repeatedValueMessage:l,flags:u,flagsPlaceholder:c}=Ie(Me),d=y=>{const g=y.map(v=>v.value);n(v=>se(Z({},v),{flags:g})),r&&r()},f=y=>{s(y)},p=y=>{y.persist();const{key:g}=y;if(!!i)switch(g){case"Enter":case"Tab":if(t.length===0){const v=Array.from(t);v.push(i),n(b=>se(Z({},b),{flags:v}))}if(t.length>0&&h()){const v=Array.from(t);v.push(i),n(b=>se(Z({},b),{flags:v}))}s(""),y.preventDefault()}},h=()=>{let y=!1;const g=o.map(v=>v.label);return g.length&&g.includes(i)?(Pe.warn(l),y):(y=!0,y)};return ae("div",{className:"eow-mb-4",children:[e?j("label",{htmlFor:u,className:"eow-text-sm eow-mb-1",children:u}):j(De,{}),j(wU,{styles:_U,components:{DropdownIndicator:null},getOptionValue:y=>y.value,inputValue:i,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:d,onInputChange:f,onKeyDown:p,placeholder:c,value:o})]})},EU=t=>Object.keys(t).length++,Gy=({property:t,field:e,onChange:n})=>{const r=EU(e),[i,s]=K.useState(JSON.parse(JSON.stringify(e))),{dynamicFieldsDescription:o,keyDynamicFields:l,valueDynamicFields:u}=Ie(Me),c=()=>{const p="new_key"+r,h=JSON.parse(JSON.stringify(e));h[p]="";const y=Z(Z({},e),h);s(y),n(y)},d=(p,h)=>{const y=JSON.parse(JSON.stringify(e)),g=Object.keys(y)[p];y[h]=y[g],delete y[g],n(y)},f=(p,h)=>{const y=JSON.parse(JSON.stringify(e)),g=Object.keys(y)[p]?Object.keys(y)[p]:"new_key";y[g]=h,n(y)};return ae("div",{className:"eow-mb-4",children:[j("div",{className:"eow-mb-2",children:j("p",{className:"eow-text-gray-400 eow-text-sm",children:o})}),ae("div",{className:"eow-border eow-border-gray-200 eow-rounded eow-p-2 eow-mb-4",children:[Object.keys(i).map((p,h)=>ae("div",{className:"eow-flex eow-items-center eow-mb-4",children:[ae("div",{className:"eow-mr-4",children:[j("label",{htmlFor:l,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:l}),j("input",{"data-testid":"dynamic-key-field",onChange:y=>d(h,y.target.value),value:Object.keys(e)[h]&&Object.keys(e)[h].includes("new_key")?"":Object.keys(e)[h],type:"text",id:`${t}-key-${h}`,className:"eow-rounded eow-border eow-border-gray-200 eow-w-64 focus:eow-outline-none eow-px-3 eow-py-2"})]}),ae("div",{className:"eow-w-full",children:[j("label",{htmlFor:l,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:u}),j("input",{"data-testid":"dynamic-value-field",onChange:y=>f(h,y.target.value),value:e[p],type:"text",id:`${t}-value-${h}`,className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2"})]})]},`${t}-${p}-${h}`)),j($u,{isDisabled:!1,onClick:()=>c()})]})]})},IU=({tabValue:t,setTabValue:e})=>{const{content:n,tags:r,campaign:i}=Ie(Me);return j(De,{children:j("div",{className:"eow-grid md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-1 eow-w-full eow-mb-6 eow-border-b",children:[r,n,i].map(o=>j("div",{className:`md:eow-mr-2 last:eow-mr-0 eow-flex-auto eow-text-center eow-pb-2 ${t===o?"eow-border-b-2":"eow-border-b-2 eow-border-white"}`,children:j("a",{className:"eow-leading-normal eow-p-2 eow-cursor-pointer eow-mb-2 "+(t===o?"eow-font-bold eow-text-brandColor":"eow-text-gray-400"),onClick:()=>e(o),children:o})},`context-tab-${o}`))})})};class ed{constructor(){a(this,"label","");a(this,"options",[])}}const AU=10,zy=t=>{const e=[];if(t.competitions.length>0){const n=new ed;n.label="Competitions",n.options=t.competitions.map(r=>td(r,"competition")),e.push(n)}if(t.teams.length>0){const n=new ed;n.label="Teams",n.options=t.teams.map(r=>td(r,"team")),e.push(n)}if(t.players.length>0){const n=new ed;n.label="Players",n.options=t.players.map(r=>td(r,"player")),e.push(n)}return e},td=(t,e)=>{var r,i,s,o,l;let n=new By;return n.label=t.name,n.value=t.name,n.id=t.id,e==="player"?n.logo=((r=t.assets)==null?void 0:r.headshot)||vn.avatar:e==="team"?n.logo=((i=t.assets)==null?void 0:i.logo)||vn.team:n.logo=((s=t.assets)==null?void 0:s.logo)||vn.competition,n.countryName=t.country.name,n.countryFlag=((l=(o=t.country)==null?void 0:o.assets)==null?void 0:l.flag)||vn.country,n},OU=({options:t,setOptions:e,setFilters:n,handleResetData:r})=>{const{sdk:i}=Ie(En),{contextEntityTag:s,typeContextTagNamePlaceholder:o}=Ie(Me),l=d=>{const f=d.map(p=>p.id);e(d),r(),n(p=>se(Z({},p),{entityIds:f}))},c=Wu((d,f)=>{if(d){const p={query:d};i.football.search(p).then(h=>{const y=zy(h);f(y)}).catch(h=>{console.error(h),f([])})}},300);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"context entity tag",className:"eow-text-sm eow-mb-1",children:s}),j(Oc,{components:{DropdownIndicator:null},getOptionValue:d=>d.label,styles:Kc,onChange:l,loadingMessage:()=>"Loading...",isOptionDisabled:()=>t.length===AU,value:t,loadOptions:c,isClearable:!0,isMulti:!0,placeholder:o,formatOptionLabel:d=>ae("div",{className:"eow-flex eow-items-center",children:[j("img",{src:d.logo,alt:"Logo",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-2",children:d.label}),j("img",{src:d.countryFlag,alt:"Country flag",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-1",children:d.countryName})]})})]})},TU=(t,e,n,r)=>{const i=t.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),s=t.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),o=t.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],u=[];if(i.length>0){const c=e.football.getCompetitions({competitionIds:i}).then(d=>{u.push(d)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}if(s.length>0){const c=e.football.getTeams({teamIds:s}).then(d=>{u.push(d.data)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}if(o.length>0){const c=e.football.getPlayers({playerIds:o}).then(d=>{u.push(d.data)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],u).map(f=>sU(f));r(d)})},CU=({tags:t,onChangeTags:e})=>{const[n,r]=K.useState([]),{sdk:i}=Ie(En),{getFootballEntitiesErrorMessage:s,typeContextTagNamePlaceholder:o}=Ie(Me),l=d=>{r(d),e(d)},c=Wu((d,f)=>{if(!d&&t.length>0&&TU(t,i,s,r),d){const p={query:d};i.football.search(p).then(h=>{const y=zy(h);f(y)}).catch(h=>{console.error(h),f([])})}},300);return j("div",{className:"eow-mb-4",children:j(Oc,{components:{DropdownIndicator:null},getOptionValue:d=>d.label,styles:Kc,onChange:l,loadingMessage:()=>"Loading...",value:n,loadOptions:c,isClearable:!0,defaultOptions:!0,isMulti:!0,placeholder:o,formatOptionLabel:d=>ae("div",{className:"eow-flex eow-items-center",children:[j("img",{src:d.logo,alt:"Logo",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-2",children:d.label}),j("img",{src:d.countryFlag,alt:"Country flag",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-1",children:d.countryName})]})})})},SU=new la,PU=t=>t.startsWith("fb:c:")?"competition":t.startsWith("fb:t:")?"team":"player",MU=({defaultValue:t,setRequestBody:e})=>{const n=SU.createContext(t),{content:r,tags:i,campaign:s,id:o,idContentPlaceholder:l,labelContentPlaceholder:u,typeContentPlaceholder:c,idCampaignPlaceholder:d,labelCampaignPlaceholder:f,label:p,type:h}=Ie(Me),[y,g]=K.useState(i),v=O=>{O.persist();const T=Z({},n);T.content.id=O.target.value,E(T)},b=O=>{O.persist();const T=Z({},n);T.content.label=O.target.value,E(T)},w=O=>{O.persist();const T=Z({},n);T.content.type=O.target.value,E(T)},I=O=>{O.persist();const T=Z({},n);T.campaign.id=O.target.value,E(T)},m=O=>{O.persist();const T=Z({},n);T.campaign.label=O.target.value,E(T)},A=O=>{const T=Z({},n);O.length?T.tags=O.map(x=>({id:x.id,type:PU(x.id),source:"football"})):T.tags=[],E(T)},E=O=>{e(T=>se(Z({},T),{context:O}))};return ae("div",{className:"eow-mb-4 eow-p-2",children:[j(IU,{tabValue:y,setTabValue:g}),y===i?j(CU,{tags:n.tags,onChangeTags:A}):j(De,{}),y===r?ae(De,{children:[j(ni,{title:o,placeholder:l,defaultValue:n.content.id,onChange:v}),j(ni,{title:p,placeholder:u,defaultValue:n.content.label,onChange:b}),j(ni,{title:h,placeholder:c,defaultValue:n.content.type,onChange:w})]}):j(De,{}),y===s?ae(De,{children:[j(ni,{title:o,placeholder:d,defaultValue:n.campaign.id,onChange:I}),j(ni,{title:p,placeholder:f,defaultValue:n.campaign.label,onChange:m})]}):j(De,{})]})},RU=new la,kU=({requestBody:t,rules:e,adContent:n,setRules:r,setAdContent:i,setRequestBody:s})=>{const{configuration:o,images:l,flags:u,labels:c,customFields:d,rules:f,adContent:p,context:h}=Ie(Me),y=E=>{E.persist(),s(O=>se(Z({},O),{type:E.target.value?E.target.value:null}))},g=E=>{E.persist(),s(O=>se(Z({},O),{status:E.target.value}))},v=E=>{E.persist(),s(O=>se(Z({},O),{winning_condition:E.target.value}))},b=E=>{s(O=>se(Z({},O),{time:E}))},w=E=>{s(O=>se(Z({},O),{lives:E}))},I=(E,O)=>{const T=E||null,x=RU.createImagesModel();switch(O){case"mainImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.main=T,se(Z({},P),{images:S})});break;case"coverImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.cover=T,se(Z({},P),{images:S})});break;case"mobileImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.mobile=T,se(Z({},P),{images:S})});break}},m=E=>{s(O=>se(Z({},O),{labels:E}))},A=E=>{s(O=>se(Z({},O),{custom_fields:E}))};return ae("div",{className:"md:eow-w-2/6 eow-w-full eow-p-4",children:[ae(ur,{title:o,children:[ae("div",{className:"eow-grid md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-2",children:[j(mU,{defaultValue:t.type,onChange:y}),j(Vy,{type:"status",defaultValue:t.status,onChange:g}),j(Vy,{type:"winning_condition",defaultValue:t.winning_condition,onChange:v})]}),ae("div",{className:"eow-grid md:eow-grid-cols-2 eow-grid-cols-1 eow-gap-2",children:[j(pa,{type:"time",defaultValue:t.time,showDescription:!0,onChange:b}),j(pa,{type:"lives",defaultValue:t.lives,showDescription:!0,onChange:w})]})]}),j(ur,{title:l,children:j(jy,{id:0,type:"game",loadedImages:t.images,onChange:I})}),j(ur,{title:u,children:j(Wy,{defaultValue:t.flags,setObject:s})}),j(ur,{title:c,children:j(Gy,{property:"labels",field:t.labels?t.labels:new Object,onChange:m})}),j(ur,{title:d,children:j(Gy,{property:"custom_fields",field:t.custom_fields?t.custom_fields:new Object,onChange:A})}),j(ur,{title:f,children:j(Uu,{defaultValue:e,setValue:r,property:"rules"})}),j(ur,{title:p,children:j(Uu,{defaultValue:n,setValue:i,property:"ad_content"})}),j(ur,{title:h,children:j(MU,{defaultValue:t.context,setRequestBody:s})})]})},Qy=new la,xU="manage-either-or",DU=({refetchEitherOrs:t,eitherOrById:e,toggleScreen:n,clearEitherOrById:r})=>{const[i,s]=K.useState(Qy.createNewRequestBody(e)),[o,l]=K.useState(e==null?void 0:e.description),[u,c]=K.useState(e==null?void 0:e.rules),[d,f]=K.useState(e==null?void 0:e.ad_content),[p,h]=K.useState(!1),[y,g]=K.useState(!1),v=Ie(Me),{https:b}=Ie(En),w=!!e,I=()=>{g(!y)};return ae("div",{id:xU,children:[j(TS,{managementScreen:w?"edit":"create",toggleScreen:n,clearQuizById:r}),ae("div",{className:"eow-p-2 eow-border eow-border-gray-200 eow-rounded",children:[ae("div",{className:"eow-flex eow-flex-col md:eow-flex-row",children:[j(pU,{requestBody:i,setRequestBody:s,description:o,setDescription:l}),j(kU,{requestBody:i,setRequestBody:s,rules:u,adContent:d,setRules:c,setAdContent:f})]}),j(PS,{isLoading:p,manageEitherOr:()=>_(this,null,function*(){const A=new CS;if(h(!0),w?A.validateUpdate(i,v):A.validateCreate(i,v),!A.isValid){Pe.error(A.message),h(!1);return}i.description=o,i.rules=u,i.ad_content=d;const E=Qy.finalizeNewRequestBody(Z({},i));let O=null;w?O=yield b.updateEitherOr(E.id,Z({},E)):O=yield b.createEitherOr(Z({},E)),O.ok?(h(!1),Pe.success(w?v.updateEitherOrMessage:v.createEitherOrMessage),t.current=!t.current,n()):(Pe.error(w?v.updateEitherOrErrorMessage:v.createEitherOrErrorMessage),console.error(w?v.updateEitherOrErrorMessage:v.createEitherOrErrorMessage,yield O.json()),h(!1))}),handleModal:I})]}),j(kS,{isOpen:y,requestBody:i,description:o,handleClose:I})]})},FU=t=>{const e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e},NU=({children:t,wrapperId:e})=>{const[n,r]=K.useState(null);return K.useLayoutEffect(()=>{let i=document.getElementById(e),s=!1;return i||(s=!0,i=FU(e)),r(i),()=>{s&&i.parentNode&&i.parentNode.removeChild(i)}},[e]),n===null?null:cr.default.createPortal(t,n)},LU=({isOpen:t,eitherOr:e,refetchEitherOrs:n,handleClose:r})=>{const[i,s]=K.useState(!1),{confirmationQuestionLabel:o,deleteLabel:l,cancelLabel:u,deleteEitherOrMessage:c,deleteEitherOrErrorMessage:d}=Ie(Me),{https:f}=Ie(En);K.useLayoutEffect(()=>(t&&document.body.addEventListener("keydown",p),()=>{document.body.removeEventListener("keydown",p)}),[r]);const p=y=>y.key==="Escape"&&!i?r():null,h=()=>_(this,null,function*(){s(!0);const y=yield f.deleteEitherOr(e.id);y.ok?(Pe.success(c),s(!1),n.current=!n.current,r()):(console.error(d,yield y.json()),Pe.error(d),s(!1))});return t?j(NU,{wrapperId:"confirmation-modal",children:ae(De,{children:[j("div",{className:"eow-justify-center eow-items-center eow-flex eow-overflow-x-hidden eow-overflow-y-hidden eow-absolute eow-inset-0 eow-z-50 eow-top-0 eow-right-0 eow-bottom-0 eow-left-0 eow-outline-none focus:eow-outline-none",children:j("div",{className:"eow-relative eow-w-full eow-my-6 eow-mx-auto eow-max-w-lg",children:ae("div",{className:"eow-border-0 eow-rounded eow-shadow-lg eow-relative eow-flex eow-flex-col eow-w-full eow-bg-white eow-outline-none focus:eow-outline-none",children:[ae("div",{className:"eow-flex eow-justify-items-center eow-p-4 eow-border-b eow-border-solid eow-border-gray-200",children:[ae("h3",{className:"eow-text-2xl eow-font-semibold eow-mr-2",children:[l," ",e.title]}),j("button",{className:"eow-flex eow-justify-items-center eow-ml-auto eow-bg-transparent eow-border-0 eow-leading-none eow-font-semibold eow-outline-none focus:eow-outline-none",onClick:r,children:j("span",{className:"eow-bg-transparent eow-h-6 eow-w-6 eow-text-2xl eow-block eow-outline-none focus:eow-outline-none eow-text-red-500 hover:eow-text-red-600",children:"x"})})]}),j("div",{className:"eow-relative eow-whitespace-nowrap eow-p-4 eow-text-gray-500 eow-text-lg eow-mb-4",children:ae("p",{className:"eow-whitespace-normal eow-mb-2",children:[o," ",j("span",{className:"eow-text-xl eow-italic",children:e.title})," ?"]})}),ae("div",{className:"eow-flex eow-items-center eow-justify-end eow-p-3 eow-border-t eow-border-solid eow-border-gray-200 eow-rounded-b",children:[ae("button",{className:`${i?"eow-bg-gray-600":"eow-bg-brandColor hover:eow-bg-blue-700"} eow-text-white eow-font-bold eow-px-4 eow-py-2 eow-text-sm eow-rounded eow-outline-none focus:eow-outline-none eow-mr-2 eow-mb-1 eow-ease-linear eow-transition-all eow-duration-150`,onClick:h,disabled:i,children:[i?j(dm,{}):null,l]}),j("button",{className:`${i?"eow-bg-gray-600":"eow-bg-red-500 hover:eow-bg-red-700"} eow-text-white eow-font-bold eow-text-sm eow-px-4 eow-py-2 eow-rounded eow-outline-none focus:eow-outline-none eow-mr-2 eow-mb-1 eow-ease-linear eow-transition-all eow-duration-150`,onClick:r,disabled:i,children:u})]})]})})}),j("div",{className:"eow-opacity-80 eow-absolute eow-inset-0 eow-z-40 eow-bg-black eow-top-0 eow-right-0 eow-bottom-0 eow-left-0"})]})}):null};var Yy=(t=>(t.CREATED_AT_ASC="created_at_asc",t.CREATED_AT_DESC="created_at_desc",t.UPDATED_AT_ASC="updated_at_asc",t.UPDATED_AT_DESC="updated_at_desc",t))(Yy||{});class BU{constructor(){a(this,"sort","created_at_desc");a(this,"status","");a(this,"flags",[]);a(this,"entityIds",[]);a(this,"groupByStatus",!0)}}var UU=K.forwardRef(function(t,e){var n=Ac(t);return j(No,Z({ref:e},n))}),$U=UU;function jU(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var HU=jU,Ky=Gs,VU=HU,qU=Js,WU=fg,GU=1/0,Jy=Ky?Ky.prototype:void 0,Xy=Jy?Jy.toString:void 0;function Zy(t){if(typeof t=="string")return t;if(qU(t))return VU(t,Zy)+"";if(WU(t))return Xy?Xy.call(t):"";var e=t+"";return e=="0"&&1/t==-GU?"-0":e}var zU=Zy,QU=zU;function YU(t){return t==null?"":QU(t)}var ew=YU;function KU(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}var JU=KU,XU=JU;function ZU(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:XU(t,e,n)}var e$=ZU,t$="\\ud800-\\udfff",n$="\\u0300-\\u036f",r$="\\ufe20-\\ufe2f",i$="\\u20d0-\\u20ff",a$=n$+r$+i$,s$="\\ufe0e\\ufe0f",o$="\\u200d",l$=RegExp("["+o$+t$+a$+s$+"]");function u$(t){return l$.test(t)}var tw=u$;function c$(t){return t.split("")}var d$=c$,nw="\\ud800-\\udfff",f$="\\u0300-\\u036f",h$="\\ufe20-\\ufe2f",p$="\\u20d0-\\u20ff",m$=f$+h$+p$,g$="\\ufe0e\\ufe0f",v$="["+nw+"]",nd="["+m$+"]",rd="\\ud83c[\\udffb-\\udfff]",y$="(?:"+nd+"|"+rd+")",rw="[^"+nw+"]",iw="(?:\\ud83c[\\udde6-\\uddff]){2}",aw="[\\ud800-\\udbff][\\udc00-\\udfff]",w$="\\u200d",sw=y$+"?",ow="["+g$+"]?",b$="(?:"+w$+"(?:"+[rw,iw,aw].join("|")+")"+ow+sw+")*",_$=ow+sw+b$,E$="(?:"+[rw+nd+"?",nd,iw,aw,v$].join("|")+")",I$=RegExp(rd+"(?="+rd+")|"+E$+_$,"g");function A$(t){return t.match(I$)||[]}var O$=A$,T$=d$,C$=tw,S$=O$;function P$(t){return C$(t)?S$(t):T$(t)}var M$=P$,R$=e$,k$=tw,x$=M$,D$=ew;function F$(t){return function(e){e=D$(e);var n=k$(e)?x$(e):void 0,r=n?n[0]:e.charAt(0),i=n?R$(n,1).join(""):e.slice(1);return r[t]()+i}}var N$=F$,L$=N$,B$=L$("toUpperCase"),U$=B$,$$=ew,j$=U$;function H$(t){return j$($$(t).toLowerCase())}var V$=H$;const lw=(t,e)=>{let n="";if(e==="sort")switch(t){case"created_at_asc":n="Sort by created at field in ascending order";break;case"created_at_desc":n="Sort by created at field in descending order";break;case"updated_at_asc":n="Sort by updated at field in ascending order";break;case"updated_at_desc":n="Sort by updated at field in descending order";break}return t&&(t=V$(t)),{id:t,value:t,label:e==="status"?t:n}},q$={control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"2px 6px","&:hover":{borderColor:"gray"},border:"1px solid lightgray"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}}),option:(t,e)=>se(Z({},t),{backgroundColor:e.isSelected?"#0066cc":"white","&:hover":{backgroundColor:e.isSelected?"#0066cc":"lightgray"}})},uw=({defaultValue:t,filterValues:e,filterType:n,showClearStatus:r,setFilters:i,handleResetData:s})=>{const{status:o,clearStatus:l}=Ie(Me),u=e.map(f=>lw(f,n)),c=f=>{const p=f.value.toLocaleLowerCase();n==="sort"?i(h=>se(Z({},h),{sort:p})):n==="status"&&i(h=>se(Z({},h),{status:p.toLocaleUpperCase()})),s()},d=()=>{i(f=>se(Z({},f),{status:""}))};return ae("div",{className:"eow-w-full eow-mb-4",children:[j("label",{className:"eow-text-sm eow-mb-1",children:n==="status"?o:""}),j($U,{onChange:c,options:u,styles:q$,value:lw(t,n),placeholder:""}),r?j("a",{className:"eow-text-brandColor eow-cursor-pointer eow-text-sm eow-mb-8",onClick:()=>d(),children:l}):j(De,{})]})},W$=({value:t,setFilters:e,handleResetData:n})=>{const{groupByStatus:r}=Ie(Me);return ae("div",{className:"eow-flex eow-items-center eow-cursor-pointer",onClick:()=>{e(s=>se(Z({},s),{groupByStatus:!t})),n()},children:[j("input",{type:"checkbox",className:"eow-mr-2 focus:eow-outline-none eow-outline-none eow-cursor-pointer",checked:t,readOnly:!0}),j("span",{className:"eow-text-blueGray-600 eow-select-none",children:r})]})},G$=Object.values(Yy),z$=["active","inactive"],Q$=({filters:t,options:e,setOptions:n,setFilters:r,handleResetData:i})=>{const{filterBy:s,sortBy:o}=Ie(Me);return ae("div",{className:"eow-grid md:eow-grid-cols-2 eow-gap-4 eow-grid-cols-1 eow-mb-6",children:[ae("div",{className:"eow-border eow-border-gray-100 eow-rounded eow-p-4 eow-w-full",children:[j("h3",{className:"eow-font-bold eow-mb-2",children:s}),j(uw,{filterType:"status",defaultValue:t.status,filterValues:z$,showClearStatus:!0,setFilters:r,handleResetData:i}),j(Wy,{defaultValue:t.flags,showLabel:!0,setObject:r,handleResetData:i}),j(OU,{options:e,setOptions:n,setFilters:r,handleResetData:i})]}),ae("div",{className:"eow-border eow-border-gray-100 eow-rounded eow-p-4 eow-w-full",children:[j("h3",{className:"eow-font-bold eow-mb-2",children:o}),j(uw,{filterType:"sort",defaultValue:t.sort,filterValues:G$,setFilters:r,handleResetData:i}),j(W$,{value:t.groupByStatus,setFilters:r,handleResetData:i})]})]})},Y$=({children:t})=>j("div",{children:j("section",{className:"eow-mx-auto",children:j("div",{className:"eow-mb-8 eow-overflow-hidden eow-rounded eow-bg-white",children:j("div",{className:"eow-w-full eow-overflow-x-auto",children:t})})})}),K$=({fansUnitedEnvironment:t,hideSignOutButton:e})=>{const[n,r]=K.useState(new BU),[i,s]=K.useState(1),[o,l]=K.useState(null),[u,c]=K.useState(new Map),[d,f]=K.useState(null),[p,h]=K.useState(!1),[y,g]=K.useState(!1),[v,b]=K.useState(!1),[w,I]=K.useState(null),[m,A]=K.useState([]),{sdk:E,https:O}=Ie(En),{getEitherOrsErrorMessage:T,getEitherOrErrorMessage:x,noGamesFound:P}=Ie(Me),S=K.useRef(!1),M=K.useMemo(()=>JSON.stringify(n),[n,S]),{isError:D,error:L,data:F}=iu({queryKey:["eitherOrsList",M],queryFn:()=>E.miniGames.getEitherOrs(n,!1,!0)});K.useEffect(()=>{if(F){const k=new Map(u).set(i,F.data);c(k),l(F.meta.pagination.nextPageStartsAfter)}},[F]),K.useEffect(()=>{Array.from(u.keys()).length>0&&(Array.from(u.keys()).includes(i)||(B=>_(this,null,function*(){try{const $=yield E.miniGames.getEitherOrs({startAfter:B},!0);if($.data.length>0){const Q=new Map(u).set(i,$.data);c(Q),l($.meta.pagination.nextPageStartsAfter)}}catch($){Pe.error(T),console.error($)}}))(o))},[i]);const H=()=>s(k=>k-1),q=()=>s(k=>k+1),z=()=>h(!p),U=()=>f(null),N=k=>_(this,null,function*(){g(!0);const B=yield O.getEitherOrById(k);if(B.ok){const W=yield B.json();f(W.data),h(!0)}else console.error(x,yield B.json()),Pe.error(x);g(!1)}),C=()=>b(!v),R=()=>{s(1),c(new Map)};return D?(Pe.error(T),console.error(L),j(gh,{fansUnitedEnvironment:t,toggleScreen:z,hideSignOutButton:e})):p?j(DU,{refetchEitherOrs:S,eitherOrById:d,toggleScreen:z,clearEitherOrById:U}):y||!u.get(i)?j(cm,{}):ae(De,{children:[ae(Y$,{children:[j(gh,{fansUnitedEnvironment:t,toggleScreen:z,hideSignOutButton:e}),j(Q$,{filters:n,options:m,setOptions:A,setFilters:r,handleResetData:R}),u.get(i).length>0?ae(De,{children:[ae("table",{className:"eow-w-full eow-border eow-border-gray-200 eow-mb-2 eow-table",children:[j(mI,{}),j(AS,{data:u.get(i),fetchEitherOrById:N,handleModal:C,setSelectedEitherOr:I})]}),j(OS,{pageCount:i,pageGames:u,getPreviousPage:H,getNextPage:q})]}):j("h2",{className:"eow-text-center eow-font-bold eow-text-xl eow-my-60",children:P})]}),j(LU,{isOpen:v,eitherOr:w,refetchEitherOrs:S,handleClose:C})]})},J$=({fansUnitedEnvironment:t,hideSignOutButton:e})=>K.useContext(mh)?j(hI,{children:j(K$,{fansUnitedEnvironment:t,hideSignOutButton:e})}):j(dI,{fansUnitedEnvironment:t}),X$=new MI({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Z$=t=>{const e=iU(t.fansUnitedApiKey,t.fansUnitedClientId,t.fansUnitedLanguage,t.fansUnitedEnvironment),n=aU(t.sportal365Project,t.sportal365Infrastructure);return j(fI,{fansUnitedEnvironment:t.fansUnitedEnvironment,children:j(Rw,{labels:t.labels,children:j(IS,{config:e,sportal365Config:n,children:ae(WI,{client:X$,children:[j(Xo,{position:"top-right",autoClose:5e3,hideProgressBar:!1,limit:3,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),j(J$,{fansUnitedEnvironment:t.fansUnitedEnvironment,hideSignOutButton:t.hideSignOutButton})]})})})})};Be.EitherOrManager=Z$,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2334
|
+
`}}function F(){n.calendarContainer.classList.add("hasWeeks");var V=je("div","flatpickr-weekwrapper");V.appendChild(je("span","flatpickr-weekday",n.l10n.weekAbbreviation));var G=je("div","flatpickr-weeks");return V.appendChild(G),{weekWrapper:V,weekNumbers:G}}function C(V,G){G===void 0&&(G=!0);var J=G?V:V-n.currentMonth;J<0&&n._hidePrevMonthArrow===!0||J>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=J,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,fe("onYearChange"),D()),R(),fe("onMonthChange"),ft())}function M(V,G){if(V===void 0&&(V=!0),G===void 0&&(G=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,G===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var J=Rc(n.config),ne=J.hours,de=J.minutes,pe=J.seconds;h(ne,de,pe)}n.redraw(),V&&fe("onChange")}function k(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),fe("onClose")}function B(){n.config!==void 0&&fe("onDestroy");for(var V=n._handlers.length;V--;)n._handlers[V].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var G=n.calendarContainer.parentNode;if(G.lastChild&&G.removeChild(G.lastChild),G.parentNode){for(;G.firstChild;)G.parentNode.insertBefore(G.firstChild,G);G.parentNode.removeChild(G)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(J){try{delete n[J]}catch(ne){}})}function W(V){return n.calendarContainer.contains(V)}function $(V){if(n.isOpen&&!n.config.inline){var G=Ht(V),J=W(G),ne=G===n.input||G===n.altInput||n.element.contains(G)||V.path&&V.path.indexOf&&(~V.path.indexOf(n.input)||~V.path.indexOf(n.altInput)),de=!ne&&!J&&!W(V.relatedTarget),pe=!n.config.ignoredFocusElements.some(function(Re){return Re.contains(G)});de&&pe&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&u(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function Q(V){if(!(!V||n.config.minDate&&V<n.config.minDate.getFullYear()||n.config.maxDate&&V>n.config.maxDate.getFullYear())){var G=V,J=n.currentYear!==G;n.currentYear=G||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),J&&(n.redraw(),fe("onYearChange"),D())}}function Y(V,G){var J;G===void 0&&(G=!0);var ne=n.parseDate(V,void 0,G);if(n.config.minDate&&ne&&Vt(ne,n.config.minDate,G!==void 0?G:!n.minDateHasTime)<0||n.config.maxDate&&ne&&Vt(ne,n.config.maxDate,G!==void 0?G:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(ne===void 0)return!1;for(var de=!!n.config.enable,pe=(J=n.config.enable)!==null&&J!==void 0?J:n.config.disable,Re=0,ye=void 0;Re<pe.length;Re++){if(ye=pe[Re],typeof ye=="function"&&ye(ne))return de;if(ye instanceof Date&&ne!==void 0&&ye.getTime()===ne.getTime())return de;if(typeof ye=="string"){var ke=n.parseDate(ye,void 0,!0);return ke&&ke.getTime()===ne.getTime()?de:!de}else if(typeof ye=="object"&&ne!==void 0&&ye.from&&ye.to&&ne.getTime()>=ye.from.getTime()&&ne.getTime()<=ye.to.getTime())return de}return!de}function X(V){return n.daysContainer!==void 0?V.className.indexOf("hidden")===-1&&V.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(V):!1}function ee(V){var G=V.target===n._input,J=n._input.value.trimEnd()!==At();G&&J&&!(V.relatedTarget&&W(V.relatedTarget))&&n.setDate(n._input.value,!0,V.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function le(V){var G=Ht(V),J=n.config.wrap?t.contains(G):G===n._input,ne=n.config.allowInput,de=n.isOpen&&(!ne||!J),pe=n.config.inline&&J&&!ne;if(V.keyCode===13&&J){if(ne)return n.setDate(n._input.value,!0,G===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),G.blur();n.open()}else if(W(G)||de||pe){var Re=!!n.timeContainer&&n.timeContainer.contains(G);switch(V.keyCode){case 13:Re?(V.preventDefault(),u(),_e()):Oe(V);break;case 27:V.preventDefault(),_e();break;case 8:case 46:J&&!n.config.allowInput&&(V.preventDefault(),n.clear());break;case 37:case 39:if(!Re&&!J){V.preventDefault();var ye=s();if(n.daysContainer!==void 0&&(ne===!1||ye&&X(ye))){var ke=V.keyCode===39?1:-1;V.ctrlKey?(V.stopPropagation(),C(ke),P(T(1),0)):P(void 0,ke)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:V.preventDefault();var ge=V.keyCode===40?1:-1;n.daysContainer&&G.$i!==void 0||G===n.input||G===n.altInput?V.ctrlKey?(V.stopPropagation(),Q(n.currentYear-ge),P(T(1),0)):Re||P(void 0,ge*7):G===n.currentYearElement?Q(n.currentYear-ge):n.config.enableTime&&(!Re&&n.hourElement&&n.hourElement.focus(),u(V),n._debouncedChange());break;case 9:if(Re){var Ce=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(Wt){return Wt}),Ke=Ce.indexOf(G);if(Ke!==-1){var kn=Ce[Ke+(V.shiftKey?-1:1)];V.preventDefault(),(kn||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(G)&&V.shiftKey&&(V.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&G===n.amPM)switch(V.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),Ot();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),Ot();break}(J||W(G))&&fe("onKeyDown",V)}function me(V,G){if(G===void 0&&(G="flatpickr-day"),!(n.selectedDates.length!==1||V&&(!V.classList.contains(G)||V.classList.contains("flatpickr-disabled")))){for(var J=V?V.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),ne=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),de=Math.min(J,n.selectedDates[0].getTime()),pe=Math.max(J,n.selectedDates[0].getTime()),Re=!1,ye=0,ke=0,ge=de;ge<pe;ge+=fB.DAY)Y(new Date(ge),!0)||(Re=Re||ge>de&&ge<pe,ge<ne&&(!ye||ge>ye)?ye=ge:ge>ne&&(!ke||ge<ke)&&(ke=ge));var Ce=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+G));Ce.forEach(function(Ke){var kn=Ke.dateObj,Wt=kn.getTime(),Fa=ye>0&&Wt<ye||ke>0&&Wt>ke;if(Fa){Ke.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ai){Ke.classList.remove(Ai)});return}else if(Re&&!Fa)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ai){Ke.classList.remove(Ai)}),V!==void 0&&(V.classList.add(J<=n.selectedDates[0].getTime()?"startRange":"endRange"),ne<J&&Wt===ne?Ke.classList.add("startRange"):ne>J&&Wt===ne&&Ke.classList.add("endRange"),Wt>=ye&&(ke===0||Wt<=ke)&&cB(Wt,ne,J)&&Ke.classList.add("inRange"))})}}function ve(){n.isOpen&&!n.config.static&&!n.config.inline&&re()}function Ae(V,G){if(G===void 0&&(G=n._positionElement),n.isMobile===!0){if(V){V.preventDefault();var J=Ht(V);J&&J.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),fe("onOpen");return}else if(n._input.disabled||n.config.inline)return;var ne=n.isOpen;n.isOpen=!0,ne||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),fe("onOpen"),re(G)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(V===void 0||!n.timeContainer.contains(V.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function Se(V){return function(G){var J=n.config["_"+V+"Date"]=n.parseDate(G,n.config.dateFormat),ne=n.config["_"+(V==="min"?"max":"min")+"Date"];J!==void 0&&(n[V==="min"?"minDateHasTime":"maxDateHasTime"]=J.getHours()>0||J.getMinutes()>0||J.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(de){return Y(de)}),!n.selectedDates.length&&V==="min"&&p(J),Ot()),n.daysContainer&&(oe(),J!==void 0?n.currentYearElement[V]=J.getFullYear().toString():n.currentYearElement.removeAttribute(V),n.currentYearElement.disabled=!!ne&&J!==void 0&&ne.getFullYear()===J.getFullYear())}}function Ze(){var V=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],G=It(It({},JSON.parse(JSON.stringify(t.dataset||{}))),e),J={};n.config.parseDate=G.parseDate,n.config.formatDate=G.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(Ce){n.config._enable=Ii(Ce)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(Ce){n.config._disable=Ii(Ce)}});var ne=G.mode==="time";if(!G.dateFormat&&(G.enableTime||ne)){var de=dt.defaultConfig.dateFormat||gi.dateFormat;J.dateFormat=G.noCalendar||ne?"H:i"+(G.enableSeconds?":S":""):de+" H:i"+(G.enableSeconds?":S":"")}if(G.altInput&&(G.enableTime||ne)&&!G.altFormat){var pe=dt.defaultConfig.altFormat||gi.altFormat;J.altFormat=G.noCalendar||ne?"h:i"+(G.enableSeconds?":S K":" K"):pe+(" h:i"+(G.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:Se("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:Se("max")});var Re=function(Ce){return function(Ke){n.config[Ce==="min"?"_minTime":"_maxTime"]=n.parseDate(Ke,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Re("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Re("max")}),G.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,J,G);for(var ye=0;ye<V.length;ye++)n.config[V[ye]]=n.config[V[ye]]===!0||n.config[V[ye]]==="true";Tc.filter(function(Ce){return n.config[Ce]!==void 0}).forEach(function(Ce){n.config[Ce]=Cc(n.config[Ce]||[]).map(o)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ye=0;ye<n.config.plugins.length;ye++){var ke=n.config.plugins[ye](n)||{};for(var ge in ke)Tc.indexOf(ge)>-1?n.config[ge]=Cc(ke[ge]).map(o).concat(n.config[ge]):typeof G[ge]=="undefined"&&(n.config[ge]=ke[ge])}G.altInputClass||(n.config.altInputClass=Ve().className+" "+n.config.altInputClass),fe("onParseConfig")}function Ve(){return n.config.wrap?t.querySelector("[data-input]"):t}function te(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=It(It({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),Mr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Mr.l="("+n.l10n.weekdays.longhand.join("|")+")",Mr.M="("+n.l10n.months.shorthand.join("|")+")",Mr.F="("+n.l10n.months.longhand.join("|")+")",Mr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var V=It(It({},e),JSON.parse(JSON.stringify(t.dataset||{})));V.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=Yv(n),n.parseDate=Pc({config:n.config,l10n:n.l10n})}function re(V){if(typeof n.config.position=="function")return void n.config.position(n,V);if(n.calendarContainer!==void 0){fe("onPreCalendarPosition");var G=V||n._positionElement,J=Array.prototype.reduce.call(n.calendarContainer.children,function(o3,l3){return o3+l3.offsetHeight},0),ne=n.calendarContainer.offsetWidth,de=n.config.position.split(" "),pe=de[0],Re=de.length>1?de[1]:null,ye=G.getBoundingClientRect(),ke=window.innerHeight-ye.bottom,ge=pe==="above"||pe!=="below"&&ke<J&&ye.top>J,Ce=window.pageYOffset+ye.top+(ge?-J-2:G.offsetHeight+2);if(Tt(n.calendarContainer,"arrowTop",!ge),Tt(n.calendarContainer,"arrowBottom",ge),!n.config.inline){var Ke=window.pageXOffset+ye.left,kn=!1,Wt=!1;Re==="center"?(Ke-=(ne-ye.width)/2,kn=!0):Re==="right"&&(Ke-=ne-ye.width,Wt=!0),Tt(n.calendarContainer,"arrowLeft",!kn&&!Wt),Tt(n.calendarContainer,"arrowCenter",kn),Tt(n.calendarContainer,"arrowRight",Wt);var Fa=window.document.body.offsetWidth-(window.pageXOffset+ye.right),Ai=Ke+ne>window.document.body.offsetWidth,e3=Fa+ne>window.document.body.offsetWidth;if(Tt(n.calendarContainer,"rightMost",Ai),!n.config.static)if(n.calendarContainer.style.top=Ce+"px",!Ai)n.calendarContainer.style.left=Ke+"px",n.calendarContainer.style.right="auto";else if(!e3)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=Fa+"px";else{var ad=ue();if(ad===void 0)return;var t3=window.document.body.offsetWidth,n3=Math.max(0,t3/2-ne/2),r3=".flatpickr-calendar.centerMost:before",i3=".flatpickr-calendar.centerMost:after",a3=ad.cssRules.length,s3="{left:"+ye.left+"px;right:auto;}";Tt(n.calendarContainer,"rightMost",!1),Tt(n.calendarContainer,"centerMost",!0),ad.insertRule(r3+","+i3+s3,a3),n.calendarContainer.style.left=n3+"px",n.calendarContainer.style.right="auto"}}}}function ue(){for(var V=null,G=0;G<document.styleSheets.length;G++){var J=document.styleSheets[G];if(!!J.cssRules){try{J.cssRules}catch(ne){continue}V=J;break}}return V!=null?V:he()}function he(){var V=document.createElement("style");return document.head.appendChild(V),V.sheet}function oe(){n.config.noCalendar||n.isMobile||(D(),ft(),R())}function _e(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function Oe(V){V.preventDefault(),V.stopPropagation();var G=function(Ce){return Ce.classList&&Ce.classList.contains("flatpickr-day")&&!Ce.classList.contains("flatpickr-disabled")&&!Ce.classList.contains("notAllowed")},J=Qv(Ht(V),G);if(J!==void 0){var ne=J,de=n.latestSelectedDateObj=new Date(ne.dateObj.getTime()),pe=(de.getMonth()<n.currentMonth||de.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=ne,n.config.mode==="single")n.selectedDates=[de];else if(n.config.mode==="multiple"){var Re=Le(de);Re?n.selectedDates.splice(parseInt(Re),1):n.selectedDates.push(de)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=de,n.selectedDates.push(de),Vt(de,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(Ce,Ke){return Ce.getTime()-Ke.getTime()}));if(f(),pe){var ye=n.currentYear!==de.getFullYear();n.currentYear=de.getFullYear(),n.currentMonth=de.getMonth(),ye&&(fe("onYearChange"),D()),fe("onMonthChange")}if(ft(),R(),Ot(),!pe&&n.config.mode!=="range"&&n.config.showMonths===1?O(ne):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var ke=n.config.mode==="single"&&!n.config.enableTime,ge=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(ke||ge)&&_e()}v()}}var Te={locale:[te,U],showMonths:[N,l,z],minDate:[w],maxDate:[w],positionElement:[zo],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function mt(V,G){if(V!==null&&typeof V=="object"){Object.assign(n.config,V);for(var J in V)Te[J]!==void 0&&Te[J].forEach(function(ne){return ne()})}else n.config[V]=G,Te[V]!==void 0?Te[V].forEach(function(ne){return ne()}):Tc.indexOf(V)>-1&&(n.config[V]=Cc(G));n.redraw(),Ot(!0)}function _t(V,G){var J=[];if(V instanceof Array)J=V.map(function(ne){return n.parseDate(ne,G)});else if(V instanceof Date||typeof V=="number")J=[n.parseDate(V,G)];else if(typeof V=="string")switch(n.config.mode){case"single":case"time":J=[n.parseDate(V,G)];break;case"multiple":J=V.split(n.config.conjunction).map(function(ne){return n.parseDate(ne,G)});break;case"range":J=V.split(n.l10n.rangeSeparator).map(function(ne){return n.parseDate(ne,G)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(V)));n.selectedDates=n.config.allowInvalidPreload?J:J.filter(function(ne){return ne instanceof Date&&Y(ne,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(ne,de){return ne.getTime()-de.getTime()})}function qe(V,G,J){if(G===void 0&&(G=!1),J===void 0&&(J=n.config.dateFormat),V!==0&&!V||V instanceof Array&&V.length===0)return n.clear(G);_t(V,J),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,G),p(),n.selectedDates.length===0&&n.clear(!1),Ot(G),G&&fe("onChange")}function Ii(V){return V.slice().map(function(G){return typeof G=="string"||typeof G=="number"||G instanceof Date?n.parseDate(G,void 0,!0):G&&typeof G=="object"&&G.from&&G.to?{from:n.parseDate(G.from,void 0),to:n.parseDate(G.to,void 0)}:G}).filter(function(G){return G})}function et(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var V=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);V&&_t(V,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function en(){if(n.input=Ve(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=je(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),zo()}function zo(){n._positionElement=n.config.positionElement||n._input}function id(){var V=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=je("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=V,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=V==="datetime-local"?"Y-m-d\\TH:i:S":V==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(G){}g(n.mobileInput,"change",function(G){n.setDate(Ht(G).value,!1,n.mobileFormatStr),fe("onChange"),fe("onClose")})}function ie(V){if(n.isOpen===!0)return n.close();n.open(V)}function fe(V,G){if(n.config!==void 0){var J=n.config[V];if(J!==void 0&&J.length>0)for(var ne=0;J[ne]&&ne<J.length;ne++)J[ne](n.selectedDates,n.input.value,n,G);V==="onChange"&&(n.input.dispatchEvent(Ee("change")),n.input.dispatchEvent(Ee("input")))}}function Ee(V){var G=document.createEvent("Event");return G.initEvent(V,!0,!0),G}function Le(V){for(var G=0;G<n.selectedDates.length;G++){var J=n.selectedDates[G];if(J instanceof Date&&Vt(J,V)===0)return""+G}return!1}function xe(V){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Vt(V,n.selectedDates[0])>=0&&Vt(V,n.selectedDates[1])<=0}function ft(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(V,G){var J=new Date(n.currentYear,n.currentMonth,1);J.setMonth(n.currentMonth+G),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[G].textContent=Uo(J.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=J.getMonth().toString(),V.value=J.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function At(V){var G=V||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(J){return n.formatDate(J,G)}).filter(function(J,ne,de){return n.config.mode!=="range"||n.config.enableTime||de.indexOf(J)===ne}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function Ot(V){V===void 0&&(V=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=At(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=At(n.config.altFormat)),V!==!1&&fe("onValueUpdate")}function Qo(V){var G=Ht(V),J=n.prevMonthNav.contains(G),ne=n.nextMonthNav.contains(G);J||ne?C(J?-1:1):n.yearElements.indexOf(G)>=0?G.select():G.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):G.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Wn(V){V.preventDefault();var G=V.type==="keydown",J=Ht(V),ne=J;n.amPM!==void 0&&J===n.amPM&&(n.amPM.textContent=n.l10n.amPM[Kt(n.amPM.textContent===n.l10n.amPM[0])]);var de=parseFloat(ne.getAttribute("min")),pe=parseFloat(ne.getAttribute("max")),Re=parseFloat(ne.getAttribute("step")),ye=parseInt(ne.value,10),ke=V.delta||(G?V.which===38?1:-1:0),ge=ye+Re*ke;if(typeof ne.value!="undefined"&&ne.value.length===2){var Ce=ne===n.hourElement,Ke=ne===n.minuteElement;ge<de?(ge=pe+ge+Kt(!Ce)+(Kt(Ce)&&Kt(!n.amPM)),Ke&&m(void 0,-1,n.hourElement)):ge>pe&&(ge=ne===n.hourElement?ge-pe-Kt(!n.amPM):de,Ke&&m(void 0,1,n.hourElement)),n.amPM&&Ce&&(Re===1?ge+ye===23:Math.abs(ge-ye)>Re)&&(n.amPM.textContent=n.l10n.amPM[Kt(n.amPM.textContent===n.l10n.amPM[0])]),ne.value=Dt(ge)}}return i(),n}function vi(t,e){for(var n=Array.prototype.slice.call(t).filter(function(o){return o instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var s=n[i];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=pB(s,e||{}),r.push(s._flatpickr)}catch(o){console.error(o)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return vi(this,t)},HTMLElement.prototype.flatpickr=function(t){return vi([this],t)});var dt=function(t,e){return typeof t=="string"?vi(window.document.querySelectorAll(t),e):t instanceof Node?vi([t],e):vi(t,e)};dt.defaultConfig={},dt.l10ns={en:It({},Aa),default:It({},Aa)},dt.localize=function(t){dt.l10ns.default=It(It({},dt.l10ns.default),t)},dt.setDefaults=function(t){dt.defaultConfig=It(It({},dt.defaultConfig),t)},dt.parseDate=Pc({}),dt.formatDate=Yv({}),dt.compareDates=Vt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(t){return vi(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))},typeof window!="undefined"&&(window.flatpickr=dt);const mB=od(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(t){function e(C){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(k){return typeof k}:e=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},e(C)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(cn.default),r=s(qv.exports),i=s(mB);function s(C){return C&&C.__esModule?C:{default:C}}function o(){if(typeof WeakMap!="function")return null;var C=new WeakMap;return o=function(){return C},C}function l(C){if(C&&C.__esModule)return C;if(C===null||e(C)!=="object"&&typeof C!="function")return{default:C};var M=o();if(M&&M.has(C))return M.get(C);var k={},B=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in C)if(Object.prototype.hasOwnProperty.call(C,W)){var $=B?Object.getOwnPropertyDescriptor(C,W):null;$&&($.get||$.set)?Object.defineProperty(k,W,$):k[W]=C[W]}return k.default=C,M&&M.set(C,k),k}function u(C){return p(C)||f(C)||d(C)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2335
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(C,M){if(!!C){if(typeof C=="string")return h(C,M);var k=Object.prototype.toString.call(C).slice(8,-1);if(k==="Object"&&C.constructor&&(k=C.constructor.name),k==="Map"||k==="Set")return Array.from(C);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return h(C,M)}}function f(C){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(C))return Array.from(C)}function p(C){if(Array.isArray(C))return h(C)}function h(C,M){(M==null||M>C.length)&&(M=C.length);for(var k=0,B=new Array(M);k<M;k++)B[k]=C[k];return B}function y(){return y=Object.assign||function(C){for(var M=1;M<arguments.length;M++){var k=arguments[M];for(var B in k)Object.prototype.hasOwnProperty.call(k,B)&&(C[B]=k[B])}return C},y.apply(this,arguments)}function g(C,M){if(C==null)return{};var k=v(C,M),B,W;if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(C);for(W=0;W<$.length;W++)B=$[W],!(M.indexOf(B)>=0)&&(!Object.prototype.propertyIsEnumerable.call(C,B)||(k[B]=C[B]))}return k}function v(C,M){if(C==null)return{};var k={},B=Object.keys(C),W,$;for($=0;$<B.length;$++)W=B[$],!(M.indexOf(W)>=0)&&(k[W]=C[W]);return k}function b(C,M){var k=Object.keys(C);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(C);M&&(B=B.filter(function(W){return Object.getOwnPropertyDescriptor(C,W).enumerable})),k.push.apply(k,B)}return k}function w(C){for(var M=1;M<arguments.length;M++){var k=arguments[M]!=null?arguments[M]:{};M%2?b(Object(k),!0).forEach(function(B){D(C,B,k[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(k)):b(Object(k)).forEach(function(B){Object.defineProperty(C,B,Object.getOwnPropertyDescriptor(k,B))})}return C}function I(C,M){if(!(C instanceof M))throw new TypeError("Cannot call a class as a function")}function m(C,M){for(var k=0;k<M.length;k++){var B=M[k];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(C,B.key,B)}}function A(C,M,k){return M&&m(C.prototype,M),k&&m(C,k),C}function E(C,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(M&&M.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),M&&O(C,M)}function O(C,M){return O=Object.setPrototypeOf||function(B,W){return B.__proto__=W,B},O(C,M)}function T(C){var M=S();return function(){var B=R(C),W;if(M){var $=R(this).constructor;W=Reflect.construct(B,arguments,$)}else W=B.apply(this,arguments);return x(this,W)}}function x(C,M){return M&&(e(M)==="object"||typeof M=="function")?M:P(C)}function P(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function S(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}function R(C){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},R(C)}function D(C,M,k){return M in C?Object.defineProperty(C,M,{value:k,enumerable:!0,configurable:!0,writable:!0}):C[M]=k,C}var L=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],N=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),H=["onCreate","onDestroy"],q=r.default.func,z=function(C){E(k,C);var M=T(k);function k(){var B;I(this,k);for(var W=arguments.length,$=new Array(W),Q=0;Q<W;Q++)$[Q]=arguments[Q];return B=M.call.apply(M,[this].concat($)),D(P(B),"createFlatpickrInstance",function(){var Y=w({onClose:function(){B.node.blur&&B.node.blur()}},B.props.options);Y=U(Y,B.props),B.flatpickr=(0,i.default)(B.node,Y),B.props.hasOwnProperty("value")&&B.flatpickr.setDate(B.props.value,!1);var X=B.props.onCreate;X&&X(B.flatpickr)}),D(P(B),"destroyFlatpickrInstance",function(){var Y=B.props.onDestroy;Y&&Y(B.flatpickr),B.flatpickr.destroy(),B.flatpickr=null}),D(P(B),"handleNodeChange",function(Y){B.node=Y,B.flatpickr&&(B.destroyFlatpickrInstance(),B.createFlatpickrInstance())}),B}return A(k,[{key:"componentDidUpdate",value:function(W){var $=this.props.options,Q=W.options;$=U($,this.props),Q=U(Q,W);for(var Y=Object.getOwnPropertyNames($),X=Y.length-1;X>=0;X--){var ee=Y[X],le=$[ee];le!==Q[ee]&&(L.indexOf(ee)!==-1&&!Array.isArray(le)&&(le=[le]),this.flatpickr.set(ee,le))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&W.value&&Array.isArray(W.value)&&this.props.value.every(function(me,ve){W[ve]}))&&this.props.value!==W.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var W=this.props,$=W.options,Q=W.defaultValue,Y=W.value,X=W.children,ee=W.render,le=g(W,["options","defaultValue","value","children","render"]);return L.forEach(function(me){delete le[me]}),H.forEach(function(me){delete le[me]}),ee?ee(w(w({},le),{},{defaultValue:Q,value:Y}),this.handleNodeChange):$.wrap?n.default.createElement("div",y({},le,{ref:this.handleNodeChange}),X):n.default.createElement("input",y({},le,{defaultValue:Q,ref:this.handleNodeChange}))}}]),k}(n.Component);D(z,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:N,onOpen:N,onClose:N,onMonthChange:N,onYearChange:N,onReady:N,onValueUpdate:N,onDayCreate:N,onCreate:q,onDestroy:q,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),D(z,"defaultProps",{options:{}});function U(C,M){var k=w({},C);return L.forEach(function(B){if(M.hasOwnProperty(B)){var W;k[B]&&!Array.isArray(k[B])?k[B]=[k[B]]:k[B]||(k[B]=[]);var $=Array.isArray(M[B])?M[B]:[M[B]];(W=k[B]).push.apply(W,u($))}}),k}var F=z;t.default=F})(Vv);const gB=hw(Vv);var Ft="top",Jt="bottom",Xt="right",Nt="left",kc="auto",Ta=[Ft,Jt,Xt,Nt],yi="start",Ca="end",vB="clippingParents",Jv="viewport",Sa="popper",yB="reference",Xv=Ta.reduce(function(t,e){return t.concat([e+"-"+yi,e+"-"+Ca])},[]),Zv=[].concat(Ta,[kc]).reduce(function(t,e){return t.concat([e,e+"-"+yi,e+"-"+Ca])},[]),wB="beforeRead",bB="read",_B="afterRead",EB="beforeMain",IB="main",AB="afterMain",OB="beforeWrite",TB="write",CB="afterWrite",SB=[wB,bB,_B,EB,IB,AB,OB,TB,CB];function Pn(t){return t?(t.nodeName||"").toLowerCase():null}function qt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Rr(t){var e=qt(t).Element;return t instanceof e||t instanceof Element}function Zt(t){var e=qt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function xc(t){if(typeof ShadowRoot=="undefined")return!1;var e=qt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function PB(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];!Zt(s)||!Pn(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function MB(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=o.reduce(function(u,c){return u[c]="",u},{});!Zt(i)||!Pn(i)||(Object.assign(i.style,l),Object.keys(s).forEach(function(u){i.removeAttribute(u)}))})}}const ey={name:"applyStyles",enabled:!0,phase:"write",fn:PB,effect:MB,requires:["computeStyles"]};function Mn(t){return t.split("-")[0]}var kr=Math.max,$o=Math.min,wi=Math.round;function Dc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ty(){return!/^((?!chrome|android).)*safari/i.test(Dc())}function bi(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,s=1;e&&Zt(t)&&(i=t.offsetWidth>0&&wi(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&wi(r.height)/t.offsetHeight||1);var o=Rr(t)?qt(t):window,l=o.visualViewport,u=!ty()&&n,c=(r.left+(u&&l?l.offsetLeft:0))/i,d=(r.top+(u&&l?l.offsetTop:0))/s,f=r.width/i,p=r.height/s;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function Fc(t){var e=bi(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ny(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&xc(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(t){return qt(t).getComputedStyle(t)}function RB(t){return["table","td","th"].indexOf(Pn(t))>=0}function lr(t){return((Rr(t)?t.ownerDocument:t.document)||window.document).documentElement}function jo(t){return Pn(t)==="html"?t:t.assignedSlot||t.parentNode||(xc(t)?t.host:null)||lr(t)}function ry(t){return!Zt(t)||qn(t).position==="fixed"?null:t.offsetParent}function kB(t){var e=/firefox/i.test(Dc()),n=/Trident/i.test(Dc());if(n&&Zt(t)){var r=qn(t);if(r.position==="fixed")return null}var i=jo(t);for(xc(i)&&(i=i.host);Zt(i)&&["html","body"].indexOf(Pn(i))<0;){var s=qn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function Pa(t){for(var e=qt(t),n=ry(t);n&&RB(n)&&qn(n).position==="static";)n=ry(n);return n&&(Pn(n)==="html"||Pn(n)==="body"&&qn(n).position==="static")?e:n||kB(t)||e}function Nc(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ma(t,e,n){return kr(t,$o(e,n))}function xB(t,e,n){var r=Ma(t,e,n);return r>n?n:r}function iy(){return{top:0,right:0,bottom:0,left:0}}function ay(t){return Object.assign({},iy(),t)}function sy(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var DB=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,ay(typeof e!="number"?e:sy(e,Ta))};function FB(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,l=Mn(n.placement),u=Nc(l),c=[Nt,Xt].indexOf(l)>=0,d=c?"height":"width";if(!(!s||!o)){var f=DB(i.padding,n),p=Fc(s),h=u==="y"?Ft:Nt,y=u==="y"?Jt:Xt,g=n.rects.reference[d]+n.rects.reference[u]-o[u]-n.rects.popper[d],v=o[u]-n.rects.reference[u],b=Pa(s),w=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,I=g/2-v/2,m=f[h],A=w-p[d]-f[y],E=w/2-p[d]/2+I,O=Ma(m,E,A),T=u;n.modifiersData[r]=(e={},e[T]=O,e.centerOffset=O-E,e)}}function NB(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!ny(e.elements.popper,i)||(e.elements.arrow=i))}const LB={name:"arrow",enabled:!0,phase:"main",fn:FB,effect:NB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _i(t){return t.split("-")[1]}var BB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UB(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:wi(n*i)/i||0,y:wi(r*i)/i||0}}function oy(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,l=t.position,u=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=o.x,h=p===void 0?0:p,y=o.y,g=y===void 0?0:y,v=typeof d=="function"?d({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var b=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),I=Nt,m=Ft,A=window;if(c){var E=Pa(n),O="clientHeight",T="clientWidth";if(E===qt(n)&&(E=lr(n),qn(E).position!=="static"&&l==="absolute"&&(O="scrollHeight",T="scrollWidth")),E=E,i===Ft||(i===Nt||i===Xt)&&s===Ca){m=Jt;var x=f&&E===A&&A.visualViewport?A.visualViewport.height:E[O];g-=x-r.height,g*=u?1:-1}if(i===Nt||(i===Ft||i===Jt)&&s===Ca){I=Xt;var P=f&&E===A&&A.visualViewport?A.visualViewport.width:E[T];h-=P-r.width,h*=u?1:-1}}var S=Object.assign({position:l},c&&BB),R=d===!0?UB({x:h,y:g},qt(n)):{x:h,y:g};if(h=R.x,g=R.y,u){var D;return Object.assign({},S,(D={},D[m]=w?"0":"",D[I]=b?"0":"",D.transform=(A.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",D))}return Object.assign({},S,(e={},e[m]=w?g+"px":"",e[I]=b?h+"px":"",e.transform="",e))}function $B(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,l=n.roundOffsets,u=l===void 0?!0:l,c={placement:Mn(e.placement),variation:_i(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,oy(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oy(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const jB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$B,data:{}};var Ho={passive:!0};function HB(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,u=qt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",n.update,Ho)}),l&&u.addEventListener("resize",n.update,Ho),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Ho)}),l&&u.removeEventListener("resize",n.update,Ho)}}const VB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:HB,data:{}};var qB={left:"right",right:"left",bottom:"top",top:"bottom"};function Vo(t){return t.replace(/left|right|bottom|top/g,function(e){return qB[e]})}var WB={start:"end",end:"start"};function ly(t){return t.replace(/start|end/g,function(e){return WB[e]})}function Lc(t){var e=qt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bc(t){return bi(lr(t)).left+Lc(t).scrollLeft}function GB(t,e){var n=qt(t),r=lr(t),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;var c=ty();(c||!c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:o,x:l+Bc(t),y:u}}function zB(t){var e,n=lr(t),r=Lc(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=kr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=kr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Bc(t),u=-r.scrollTop;return qn(i||n).direction==="rtl"&&(l+=kr(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:l,y:u}}function Uc(t){var e=qn(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uy(t){return["html","body","#document"].indexOf(Pn(t))>=0?t.ownerDocument.body:Zt(t)&&Uc(t)?t:uy(jo(t))}function Ra(t,e){var n;e===void 0&&(e=[]);var r=uy(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=qt(r),o=i?[s].concat(s.visualViewport||[],Uc(r)?r:[]):r,l=e.concat(o);return i?l:l.concat(Ra(jo(o)))}function $c(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function QB(t,e){var n=bi(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function cy(t,e,n){return e===Jv?$c(GB(t,n)):Rr(e)?QB(e,n):$c(zB(lr(t)))}function YB(t){var e=Ra(jo(t)),n=["absolute","fixed"].indexOf(qn(t).position)>=0,r=n&&Zt(t)?Pa(t):t;return Rr(r)?e.filter(function(i){return Rr(i)&&ny(i,r)&&Pn(i)!=="body"}):[]}function KB(t,e,n,r){var i=e==="clippingParents"?YB(t):[].concat(e),s=[].concat(i,[n]),o=s[0],l=s.reduce(function(u,c){var d=cy(t,c,r);return u.top=kr(d.top,u.top),u.right=$o(d.right,u.right),u.bottom=$o(d.bottom,u.bottom),u.left=kr(d.left,u.left),u},cy(t,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function dy(t){var e=t.reference,n=t.element,r=t.placement,i=r?Mn(r):null,s=r?_i(r):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,u;switch(i){case Ft:u={x:o,y:e.y-n.height};break;case Jt:u={x:o,y:e.y+e.height};break;case Xt:u={x:e.x+e.width,y:l};break;case Nt:u={x:e.x-n.width,y:l};break;default:u={x:e.x,y:e.y}}var c=i?Nc(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case yi:u[c]=u[c]-(e[d]/2-n[d]/2);break;case Ca:u[c]=u[c]+(e[d]/2-n[d]/2);break}}return u}function ka(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.strategy,o=s===void 0?t.strategy:s,l=n.boundary,u=l===void 0?vB:l,c=n.rootBoundary,d=c===void 0?Jv:c,f=n.elementContext,p=f===void 0?Sa:f,h=n.altBoundary,y=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,b=ay(typeof v!="number"?v:sy(v,Ta)),w=p===Sa?yB:Sa,I=t.rects.popper,m=t.elements[y?w:p],A=KB(Rr(m)?m:m.contextElement||lr(t.elements.popper),u,d,o),E=bi(t.elements.reference),O=dy({reference:E,element:I,strategy:"absolute",placement:i}),T=$c(Object.assign({},I,O)),x=p===Sa?T:E,P={top:A.top-x.top+b.top,bottom:x.bottom-A.bottom+b.bottom,left:A.left-x.left+b.left,right:x.right-A.right+b.right},S=t.modifiersData.offset;if(p===Sa&&S){var R=S[i];Object.keys(P).forEach(function(D){var L=[Xt,Jt].indexOf(D)>=0?1:-1,N=[Ft,Jt].indexOf(D)>=0?"y":"x";P[D]+=R[N]*L})}return P}function JB(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Zv:u,d=_i(r),f=d?l?Xv:Xv.filter(function(y){return _i(y)===d}):Ta,p=f.filter(function(y){return c.indexOf(y)>=0});p.length===0&&(p=f);var h=p.reduce(function(y,g){return y[g]=ka(t,{placement:g,boundary:i,rootBoundary:s,padding:o})[Mn(g)],y},{});return Object.keys(h).sort(function(y,g){return h[y]-h[g]})}function XB(t){if(Mn(t)===kc)return[];var e=Vo(t);return[ly(t),e,ly(e)]}function ZB(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,y=h===void 0?!0:h,g=n.allowedAutoPlacements,v=e.options.placement,b=Mn(v),w=b===v,I=u||(w||!y?[Vo(v)]:XB(v)),m=[v].concat(I).reduce(function(B,W){return B.concat(Mn(W)===kc?JB(e,{placement:W,boundary:d,rootBoundary:f,padding:c,flipVariations:y,allowedAutoPlacements:g}):W)},[]),A=e.rects.reference,E=e.rects.popper,O=new Map,T=!0,x=m[0],P=0;P<m.length;P++){var S=m[P],R=Mn(S),D=_i(S)===yi,L=[Ft,Jt].indexOf(R)>=0,N=L?"width":"height",H=ka(e,{placement:S,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),q=L?D?Xt:Nt:D?Jt:Ft;A[N]>E[N]&&(q=Vo(q));var z=Vo(q),U=[];if(s&&U.push(H[R]<=0),l&&U.push(H[q]<=0,H[z]<=0),U.every(function(B){return B})){x=S,T=!1;break}O.set(S,U)}if(T)for(var F=y?3:1,C=function(W){var $=m.find(function(Q){var Y=O.get(Q);if(Y)return Y.slice(0,W).every(function(X){return X})});if($)return x=$,"break"},M=F;M>0;M--){var k=C(M);if(k==="break")break}e.placement!==x&&(e.modifiersData[r]._skip=!0,e.placement=x,e.reset=!0)}}const e5={name:"flip",enabled:!0,phase:"main",fn:ZB,requiresIfExists:["offset"],data:{_skip:!1}};function fy(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function hy(t){return[Ft,Xt,Jt,Nt].some(function(e){return t[e]>=0})}function t5(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=ka(e,{elementContext:"reference"}),l=ka(e,{altBoundary:!0}),u=fy(o,r),c=fy(l,i,s),d=hy(u),f=hy(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const n5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:t5};function r5(t,e,n){var r=Mn(t),i=[Nt,Ft].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],l=s[1];return o=o||0,l=(l||0)*i,[Nt,Xt].indexOf(r)>=0?{x:l,y:o}:{x:o,y:l}}function i5(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=Zv.reduce(function(d,f){return d[f]=r5(f,e.rects,s),d},{}),l=o[e.placement],u=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const a5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:i5};function s5(t){var e=t.state,n=t.name;e.modifiersData[n]=dy({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const o5={name:"popperOffsets",enabled:!0,phase:"read",fn:s5,data:{}};function l5(t){return t==="x"?"y":"x"}function u5(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,h=p===void 0?!0:p,y=n.tetherOffset,g=y===void 0?0:y,v=ka(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),b=Mn(e.placement),w=_i(e.placement),I=!w,m=Nc(b),A=l5(m),E=e.modifiersData.popperOffsets,O=e.rects.reference,T=e.rects.popper,x=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,P=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(!!E){if(s){var D,L=m==="y"?Ft:Nt,N=m==="y"?Jt:Xt,H=m==="y"?"height":"width",q=E[m],z=q+v[L],U=q-v[N],F=h?-T[H]/2:0,C=w===yi?O[H]:T[H],M=w===yi?-T[H]:-O[H],k=e.elements.arrow,B=h&&k?Fc(k):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:iy(),$=W[L],Q=W[N],Y=Ma(0,O[H],B[H]),X=I?O[H]/2-F-Y-$-P.mainAxis:C-Y-$-P.mainAxis,ee=I?-O[H]/2+F+Y+Q+P.mainAxis:M+Y+Q+P.mainAxis,le=e.elements.arrow&&Pa(e.elements.arrow),me=le?m==="y"?le.clientTop||0:le.clientLeft||0:0,ve=(D=S==null?void 0:S[m])!=null?D:0,Ae=q+X-ve-me,Se=q+ee-ve,Ze=Ma(h?$o(z,Ae):z,q,h?kr(U,Se):U);E[m]=Ze,R[m]=Ze-q}if(l){var Ve,te=m==="x"?Ft:Nt,re=m==="x"?Jt:Xt,ue=E[A],he=A==="y"?"height":"width",oe=ue+v[te],_e=ue-v[re],Oe=[Ft,Nt].indexOf(b)!==-1,Te=(Ve=S==null?void 0:S[A])!=null?Ve:0,mt=Oe?oe:ue-O[he]-T[he]-Te+P.altAxis,_t=Oe?ue+O[he]+T[he]-Te-P.altAxis:_e,qe=h&&Oe?xB(mt,ue,_t):Ma(h?mt:oe,ue,h?_t:_e);E[A]=qe,R[A]=qe-ue}e.modifiersData[r]=R}}const c5={name:"preventOverflow",enabled:!0,phase:"main",fn:u5,requiresIfExists:["offset"]};function d5(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function f5(t){return t===qt(t)||!Zt(t)?Lc(t):d5(t)}function h5(t){var e=t.getBoundingClientRect(),n=wi(e.width)/t.offsetWidth||1,r=wi(e.height)/t.offsetHeight||1;return n!==1||r!==1}function p5(t,e,n){n===void 0&&(n=!1);var r=Zt(e),i=Zt(e)&&h5(e),s=lr(e),o=bi(t,i,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Pn(e)!=="body"||Uc(s))&&(l=f5(e)),Zt(e)?(u=bi(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=Bc(s))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function m5(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=e.get(l);u&&i(u)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function g5(t){var e=m5(t);return SB.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function v5(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function y5(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var py={placement:"bottom",modifiers:[],strategy:"absolute"};function my(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function w5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,s=i===void 0?py:i;return function(l,u,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},py,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,h={state:d,setOptions:function(b){var w=typeof b=="function"?b(d.options):b;g(),d.options=Object.assign({},s,d.options,w),d.scrollParents={reference:Rr(l)?Ra(l):l.contextElement?Ra(l.contextElement):[],popper:Ra(u)};var I=g5(y5([].concat(r,d.options.modifiers)));return d.orderedModifiers=I.filter(function(m){return m.enabled}),y(),h.update()},forceUpdate:function(){if(!p){var b=d.elements,w=b.reference,I=b.popper;if(!!my(w,I)){d.rects={reference:p5(w,Pa(I),d.options.strategy==="fixed"),popper:Fc(I)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(P){return d.modifiersData[P.name]=Object.assign({},P.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var A=d.orderedModifiers[m],E=A.fn,O=A.options,T=O===void 0?{}:O,x=A.name;typeof E=="function"&&(d=E({state:d,options:T,name:x,instance:h})||d)}}}},update:v5(function(){return new Promise(function(v){h.forceUpdate(),v(d)})}),destroy:function(){g(),p=!0}};if(!my(l,u))return h;h.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function y(){d.orderedModifiers.forEach(function(v){var b=v.name,w=v.options,I=w===void 0?{}:w,m=v.effect;if(typeof m=="function"){var A=m({state:d,name:b,instance:h,options:I}),E=function(){};f.push(A||E)}})}function g(){f.forEach(function(v){return v()}),f=[]}return h}}var b5=[VB,o5,jB,ey,a5,e5,c5,LB,n5],_5=w5({defaultModifiers:b5}),E5="tippy-box",gy="tippy-content",I5="tippy-backdrop",vy="tippy-arrow",yy="tippy-svg-arrow",xr={passive:!0,capture:!0},wy=function(){return document.body};function jc(t,e,n){if(Array.isArray(t)){var r=t[e];return r==null?Array.isArray(n)?n[e]:n:r}return t}function Hc(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function by(t,e){return typeof t=="function"?t.apply(void 0,e):t}function _y(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function A5(t){return t.split(/\s+/).filter(Boolean)}function Ei(t){return[].concat(t)}function Ey(t,e){t.indexOf(e)===-1&&t.push(e)}function O5(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function T5(t){return t.split("-")[0]}function qo(t){return[].slice.call(t)}function Iy(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function xa(){return document.createElement("div")}function Wo(t){return["Element","Fragment"].some(function(e){return Hc(t,e)})}function C5(t){return Hc(t,"NodeList")}function S5(t){return Hc(t,"MouseEvent")}function P5(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function M5(t){return Wo(t)?[t]:C5(t)?qo(t):Array.isArray(t)?t:qo(document.querySelectorAll(t))}function Vc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Ay(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function R5(t){var e,n=Ei(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function k5(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var s=i.popperRect,o=i.popperState,l=i.props,u=l.interactiveBorder,c=T5(o.placement),d=o.modifiersData.offset;if(!d)return!0;var f=c==="bottom"?d.top.y:0,p=c==="top"?d.bottom.y:0,h=c==="right"?d.left.x:0,y=c==="left"?d.right.x:0,g=s.top-r+f>u,v=r-s.bottom-p>u,b=s.left-n+h>u,w=n-s.right-y>u;return g||v||b||w})}function qc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Oy(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Rn={isTouch:!1},Ty=0;function x5(){Rn.isTouch||(Rn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Cy))}function Cy(){var t=performance.now();t-Ty<20&&(Rn.isTouch=!1,document.removeEventListener("mousemove",Cy)),Ty=t}function D5(){var t=document.activeElement;if(P5(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function F5(){document.addEventListener("touchstart",x5,xr),window.addEventListener("blur",D5)}var N5=typeof window!="undefined"&&typeof document!="undefined",L5=N5?!!window.msCrypto:!1,B5={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},U5={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},un=Object.assign({appendTo:wy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},B5,U5),$5=Object.keys(un),j5=function(e){var n=Object.keys(e);n.forEach(function(r){un[r]=e[r]})};function Sy(t){var e=t.plugins||[],n=e.reduce(function(r,i){var s=i.name,o=i.defaultValue;if(s){var l;r[s]=t[s]!==void 0?t[s]:(l=un[s])!=null?l:o}return r},{});return Object.assign({},t,n)}function H5(t,e){var n=e?Object.keys(Sy(Object.assign({},un,{plugins:e}))):$5,r=n.reduce(function(i,s){var o=(t.getAttribute("data-tippy-"+s)||"").trim();if(!o)return i;if(s==="content")i[s]=o;else try{i[s]=JSON.parse(o)}catch(l){i[s]=o}return i},{});return r}function Py(t,e){var n=Object.assign({},e,{content:by(e.content,[t])},e.ignoreAttributes?{}:H5(t,e.plugins));return n.aria=Object.assign({},un.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}var V5=function(){return"innerHTML"};function Wc(t,e){t[V5()]=e}function My(t){var e=xa();return t===!0?e.className=vy:(e.className=yy,Wo(t)?e.appendChild(t):Wc(e,t)),e}function Ry(t,e){Wo(e.content)?(Wc(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Wc(t,e.content):t.textContent=e.content)}function Gc(t){var e=t.firstElementChild,n=qo(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(gy)}),arrow:n.find(function(r){return r.classList.contains(vy)||r.classList.contains(yy)}),backdrop:n.find(function(r){return r.classList.contains(I5)})}}function ky(t){var e=xa(),n=xa();n.className=E5,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=xa();r.className=gy,r.setAttribute("data-state","hidden"),Ry(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(s,o){var l=Gc(e),u=l.box,c=l.content,d=l.arrow;o.theme?u.setAttribute("data-theme",o.theme):u.removeAttribute("data-theme"),typeof o.animation=="string"?u.setAttribute("data-animation",o.animation):u.removeAttribute("data-animation"),o.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?u.setAttribute("role",o.role):u.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&Ry(c,t.props),o.arrow?d?s.arrow!==o.arrow&&(u.removeChild(d),u.appendChild(My(o.arrow))):u.appendChild(My(o.arrow)):d&&u.removeChild(d)}return{popper:e,onUpdate:i}}ky.$$tippy=!0;var q5=1,Go=[],zc=[];function W5(t,e){var n=Py(t,Object.assign({},un,Sy(Iy(e)))),r,i,s,o=!1,l=!1,u=!1,c=!1,d,f,p,h=[],y=_y(Ae,n.interactiveDebounce),g,v=q5++,b=null,w=O5(n.plugins),I={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},m={id:v,reference:t,popper:xa(),popperInstance:b,props:n,state:I,plugins:w,clearDelayTimeouts:mt,setProps:_t,setContent:qe,show:Ii,hide:et,hideWithInteractivity:en,enable:Oe,disable:Te,unmount:zo,destroy:id};if(!n.render)return m;var A=n.render(m),E=A.popper,O=A.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+m.id,m.popper=E,t._tippy=m,E._tippy=m;var T=w.map(function(ie){return ie.fn(m)}),x=t.hasAttribute("aria-expanded");return le(),F(),q(),z("onCreate",[m]),n.showOnCreate&&oe(),E.addEventListener("mouseenter",function(){m.props.interactive&&m.state.isVisible&&m.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){m.props.interactive&&m.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",y)}),m;function P(){var ie=m.props.touch;return Array.isArray(ie)?ie:[ie,0]}function S(){return P()[0]==="hold"}function R(){var ie;return!!((ie=m.props.render)!=null&&ie.$$tippy)}function D(){return g||t}function L(){var ie=D().parentNode;return ie?R5(ie):document}function N(){return Gc(E)}function H(ie){return m.state.isMounted&&!m.state.isVisible||Rn.isTouch||d&&d.type==="focus"?0:jc(m.props.delay,ie?0:1,un.delay)}function q(ie){ie===void 0&&(ie=!1),E.style.pointerEvents=m.props.interactive&&!ie?"":"none",E.style.zIndex=""+m.props.zIndex}function z(ie,fe,Ee){if(Ee===void 0&&(Ee=!0),T.forEach(function(xe){xe[ie]&&xe[ie].apply(xe,fe)}),Ee){var Le;(Le=m.props)[ie].apply(Le,fe)}}function U(){var ie=m.props.aria;if(!!ie.content){var fe="aria-"+ie.content,Ee=E.id,Le=Ei(m.props.triggerTarget||t);Le.forEach(function(xe){var ft=xe.getAttribute(fe);if(m.state.isVisible)xe.setAttribute(fe,ft?ft+" "+Ee:Ee);else{var At=ft&&ft.replace(Ee,"").trim();At?xe.setAttribute(fe,At):xe.removeAttribute(fe)}})}}function F(){if(!(x||!m.props.aria.expanded)){var ie=Ei(m.props.triggerTarget||t);ie.forEach(function(fe){m.props.interactive?fe.setAttribute("aria-expanded",m.state.isVisible&&fe===D()?"true":"false"):fe.removeAttribute("aria-expanded")})}}function C(){L().removeEventListener("mousemove",y),Go=Go.filter(function(ie){return ie!==y})}function M(ie){if(!(Rn.isTouch&&(u||ie.type==="mousedown"))){var fe=ie.composedPath&&ie.composedPath()[0]||ie.target;if(!(m.props.interactive&&Oy(E,fe))){if(Ei(m.props.triggerTarget||t).some(function(Ee){return Oy(Ee,fe)})){if(Rn.isTouch||m.state.isVisible&&m.props.trigger.indexOf("click")>=0)return}else z("onClickOutside",[m,ie]);m.props.hideOnClick===!0&&(m.clearDelayTimeouts(),m.hide(),l=!0,setTimeout(function(){l=!1}),m.state.isMounted||$())}}}function k(){u=!0}function B(){u=!1}function W(){var ie=L();ie.addEventListener("mousedown",M,!0),ie.addEventListener("touchend",M,xr),ie.addEventListener("touchstart",B,xr),ie.addEventListener("touchmove",k,xr)}function $(){var ie=L();ie.removeEventListener("mousedown",M,!0),ie.removeEventListener("touchend",M,xr),ie.removeEventListener("touchstart",B,xr),ie.removeEventListener("touchmove",k,xr)}function Q(ie,fe){X(ie,function(){!m.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&fe()})}function Y(ie,fe){X(ie,fe)}function X(ie,fe){var Ee=N().box;function Le(xe){xe.target===Ee&&(qc(Ee,"remove",Le),fe())}if(ie===0)return fe();qc(Ee,"remove",f),qc(Ee,"add",Le),f=Le}function ee(ie,fe,Ee){Ee===void 0&&(Ee=!1);var Le=Ei(m.props.triggerTarget||t);Le.forEach(function(xe){xe.addEventListener(ie,fe,Ee),h.push({node:xe,eventType:ie,handler:fe,options:Ee})})}function le(){S()&&(ee("touchstart",ve,{passive:!0}),ee("touchend",Se,{passive:!0})),A5(m.props.trigger).forEach(function(ie){if(ie!=="manual")switch(ee(ie,ve),ie){case"mouseenter":ee("mouseleave",Se);break;case"focus":ee(L5?"focusout":"blur",Ze);break;case"focusin":ee("focusout",Ze);break}})}function me(){h.forEach(function(ie){var fe=ie.node,Ee=ie.eventType,Le=ie.handler,xe=ie.options;fe.removeEventListener(Ee,Le,xe)}),h=[]}function ve(ie){var fe,Ee=!1;if(!(!m.state.isEnabled||Ve(ie)||l)){var Le=((fe=d)==null?void 0:fe.type)==="focus";d=ie,g=ie.currentTarget,F(),!m.state.isVisible&&S5(ie)&&Go.forEach(function(xe){return xe(ie)}),ie.type==="click"&&(m.props.trigger.indexOf("mouseenter")<0||o)&&m.props.hideOnClick!==!1&&m.state.isVisible?Ee=!0:oe(ie),ie.type==="click"&&(o=!Ee),Ee&&!Le&&_e(ie)}}function Ae(ie){var fe=ie.target,Ee=D().contains(fe)||E.contains(fe);if(!(ie.type==="mousemove"&&Ee)){var Le=he().concat(E).map(function(xe){var ft,At=xe._tippy,Ot=(ft=At.popperInstance)==null?void 0:ft.state;return Ot?{popperRect:xe.getBoundingClientRect(),popperState:Ot,props:n}:null}).filter(Boolean);k5(Le,ie)&&(C(),_e(ie))}}function Se(ie){var fe=Ve(ie)||m.props.trigger.indexOf("click")>=0&&o;if(!fe){if(m.props.interactive){m.hideWithInteractivity(ie);return}_e(ie)}}function Ze(ie){m.props.trigger.indexOf("focusin")<0&&ie.target!==D()||m.props.interactive&&ie.relatedTarget&&E.contains(ie.relatedTarget)||_e(ie)}function Ve(ie){return Rn.isTouch?S()!==ie.type.indexOf("touch")>=0:!1}function te(){re();var ie=m.props,fe=ie.popperOptions,Ee=ie.placement,Le=ie.offset,xe=ie.getReferenceClientRect,ft=ie.moveTransition,At=R()?Gc(E).arrow:null,Ot=xe?{getBoundingClientRect:xe,contextElement:xe.contextElement||D()}:t,Qo={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(G){var J=G.state;if(R()){var ne=N(),de=ne.box;["placement","reference-hidden","escaped"].forEach(function(pe){pe==="placement"?de.setAttribute("data-placement",J.placement):J.attributes.popper["data-popper-"+pe]?de.setAttribute("data-"+pe,""):de.removeAttribute("data-"+pe)}),J.attributes.popper={}}}},Wn=[{name:"offset",options:{offset:Le}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ft}},Qo];R()&&At&&Wn.push({name:"arrow",options:{element:At,padding:3}}),Wn.push.apply(Wn,(fe==null?void 0:fe.modifiers)||[]),m.popperInstance=_5(Ot,E,Object.assign({},fe,{placement:Ee,onFirstUpdate:p,modifiers:Wn}))}function re(){m.popperInstance&&(m.popperInstance.destroy(),m.popperInstance=null)}function ue(){var ie=m.props.appendTo,fe,Ee=D();m.props.interactive&&ie===wy||ie==="parent"?fe=Ee.parentNode:fe=by(ie,[Ee]),fe.contains(E)||fe.appendChild(E),m.state.isMounted=!0,te()}function he(){return qo(E.querySelectorAll("[data-tippy-root]"))}function oe(ie){m.clearDelayTimeouts(),ie&&z("onTrigger",[m,ie]),W();var fe=H(!0),Ee=P(),Le=Ee[0],xe=Ee[1];Rn.isTouch&&Le==="hold"&&xe&&(fe=xe),fe?r=setTimeout(function(){m.show()},fe):m.show()}function _e(ie){if(m.clearDelayTimeouts(),z("onUntrigger",[m,ie]),!m.state.isVisible){$();return}if(!(m.props.trigger.indexOf("mouseenter")>=0&&m.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ie.type)>=0&&o)){var fe=H(!1);fe?i=setTimeout(function(){m.state.isVisible&&m.hide()},fe):s=requestAnimationFrame(function(){m.hide()})}}function Oe(){m.state.isEnabled=!0}function Te(){m.hide(),m.state.isEnabled=!1}function mt(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(s)}function _t(ie){if(!m.state.isDestroyed){z("onBeforeUpdate",[m,ie]),me();var fe=m.props,Ee=Py(t,Object.assign({},fe,Iy(ie),{ignoreAttributes:!0}));m.props=Ee,le(),fe.interactiveDebounce!==Ee.interactiveDebounce&&(C(),y=_y(Ae,Ee.interactiveDebounce)),fe.triggerTarget&&!Ee.triggerTarget?Ei(fe.triggerTarget).forEach(function(Le){Le.removeAttribute("aria-expanded")}):Ee.triggerTarget&&t.removeAttribute("aria-expanded"),F(),q(),O&&O(fe,Ee),m.popperInstance&&(te(),he().forEach(function(Le){requestAnimationFrame(Le._tippy.popperInstance.forceUpdate)})),z("onAfterUpdate",[m,ie])}}function qe(ie){m.setProps({content:ie})}function Ii(){var ie=m.state.isVisible,fe=m.state.isDestroyed,Ee=!m.state.isEnabled,Le=Rn.isTouch&&!m.props.touch,xe=jc(m.props.duration,0,un.duration);if(!(ie||fe||Ee||Le)&&!D().hasAttribute("disabled")&&(z("onShow",[m],!1),m.props.onShow(m)!==!1)){if(m.state.isVisible=!0,R()&&(E.style.visibility="visible"),q(),W(),m.state.isMounted||(E.style.transition="none"),R()){var ft=N(),At=ft.box,Ot=ft.content;Vc([At,Ot],0)}p=function(){var Wn;if(!(!m.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=m.props.moveTransition,R()&&m.props.animation){var V=N(),G=V.box,J=V.content;Vc([G,J],xe),Ay([G,J],"visible")}U(),F(),Ey(zc,m),(Wn=m.popperInstance)==null||Wn.forceUpdate(),z("onMount",[m]),m.props.animation&&R()&&Y(xe,function(){m.state.isShown=!0,z("onShown",[m])})}},ue()}}function et(){var ie=!m.state.isVisible,fe=m.state.isDestroyed,Ee=!m.state.isEnabled,Le=jc(m.props.duration,1,un.duration);if(!(ie||fe||Ee)&&(z("onHide",[m],!1),m.props.onHide(m)!==!1)){if(m.state.isVisible=!1,m.state.isShown=!1,c=!1,o=!1,R()&&(E.style.visibility="hidden"),C(),$(),q(!0),R()){var xe=N(),ft=xe.box,At=xe.content;m.props.animation&&(Vc([ft,At],Le),Ay([ft,At],"hidden"))}U(),F(),m.props.animation?R()&&Q(Le,m.unmount):m.unmount()}}function en(ie){L().addEventListener("mousemove",y),Ey(Go,y),y(ie)}function zo(){m.state.isVisible&&m.hide(),m.state.isMounted&&(re(),he().forEach(function(ie){ie._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),zc=zc.filter(function(ie){return ie!==m}),m.state.isMounted=!1,z("onHidden",[m]))}function id(){m.state.isDestroyed||(m.clearDelayTimeouts(),m.unmount(),me(),delete t._tippy,m.state.isDestroyed=!0,z("onDestroy",[m]))}}function Da(t,e){e===void 0&&(e={});var n=un.plugins.concat(e.plugins||[]);F5();var r=Object.assign({},e,{plugins:n}),i=M5(t),s=i.reduce(function(o,l){var u=l&&W5(l,r);return u&&o.push(u),o},[]);return Wo(t)?s[0]:s}Da.defaultProps=un,Da.setDefaultProps=j5,Da.currentInput=Rn,Object.assign({},ey,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Da.setDefaultProps({render:ky});function xy(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Dy=typeof window!="undefined"&&typeof document!="undefined";function Qc(t,e){t&&(typeof t=="function"&&t(e),{}.hasOwnProperty.call(t,"current")&&(t.current=e))}function Fy(){return Dy&&document.createElement("div")}function G5(t){var e={"data-placement":t.placement};return t.referenceHidden&&(e["data-reference-hidden"]=""),t.escaped&&(e["data-escaped"]=""),e}function Ny(t,e){if(t===e)return!0;if(typeof t=="object"&&t!=null&&typeof e=="object"&&e!=null){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(e.hasOwnProperty(n)){if(!Ny(t[n],e[n]))return!1}else return!1;return!0}else return!1}function z5(t){var e=[];return t.forEach(function(n){e.find(function(r){return Ny(n,r)})||e.push(n)}),e}function Q5(t,e){var n,r;return Object.assign({},e,{popperOptions:Object.assign({},t.popperOptions,e.popperOptions,{modifiers:z5([].concat(((n=t.popperOptions)==null?void 0:n.modifiers)||[],((r=e.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Yc=Dy?K.useLayoutEffect:K.useEffect;function Y5(t){var e=K.useRef();return e.current||(e.current=typeof t=="function"?t():t),e.current}function Ly(t,e,n){n.split(/\s+/).forEach(function(r){r&&t.classList[e](r)})}var K5={name:"className",defaultValue:"",fn:function(e){var n=e.popper.firstElementChild,r=function(){var l;return!!((l=e.props.render)!=null&&l.$$tippy)};function i(){e.props.className&&!r()||Ly(n,"add",e.props.className)}function s(){r()&&Ly(n,"remove",e.props.className)}return{onCreate:i,onBeforeUpdate:s,onAfterUpdate:i}}};function J5(t){function e(n){var r=n.children,i=n.content,s=n.visible,o=n.singleton,l=n.render,u=n.reference,c=n.disabled,d=c===void 0?!1:c,f=n.ignoreAttributes,p=f===void 0?!0:f;n.__source,n.__self;var h=xy(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),y=s!==void 0,g=o!==void 0,v=K.useState(!1),b=v[0],w=v[1],I=K.useState({}),m=I[0],A=I[1],E=K.useState(),O=E[0],T=E[1],x=Y5(function(){return{container:Fy(),renders:1}}),P=Object.assign({ignoreAttributes:p},h,{content:x.container});y&&(P.trigger="manual",P.hideOnClick=!1),g&&(d=!0);var S=P,R=P.plugins||[];l&&(S=Object.assign({},P,{plugins:g&&o.data!=null?[].concat(R,[{fn:function(){return{onTrigger:function(H,q){var z=o.data.children.find(function(U){var F=U.instance;return F.reference===q.currentTarget});H.state.$$activeSingletonInstance=z.instance,T(z.content)}}}}]):R,render:function(){return{popper:x.container}}}));var D=[u].concat(r?[r.type]:[]);return Yc(function(){var L=u;u&&u.hasOwnProperty("current")&&(L=u.current);var N=t(L||x.ref||Fy(),Object.assign({},S,{plugins:[K5].concat(P.plugins||[])}));return x.instance=N,d&&N.disable(),s&&N.show(),g&&o.hook({instance:N,content:i,props:S,setSingletonContent:T}),w(!0),function(){N.destroy(),o==null||o.cleanup(N)}},D),Yc(function(){var L;if(x.renders===1){x.renders++;return}var N=x.instance;N.setProps(Q5(N.props,S)),(L=N.popperInstance)==null||L.forceUpdate(),d?N.disable():N.enable(),y&&(s?N.show():N.hide()),g&&o.hook({instance:N,content:i,props:S,setSingletonContent:T})}),Yc(function(){var L;if(!!l){var N=x.instance;N.setProps({popperOptions:Object.assign({},N.props.popperOptions,{modifiers:[].concat((((L=N.props.popperOptions)==null?void 0:L.modifiers)||[]).filter(function(H){var q=H.name;return q!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(q){var z,U=q.state,F=(z=U.modifiersData)==null?void 0:z.hide;(m.placement!==U.placement||m.referenceHidden!==(F==null?void 0:F.isReferenceHidden)||m.escaped!==(F==null?void 0:F.hasPopperEscaped))&&A({placement:U.placement,referenceHidden:F==null?void 0:F.isReferenceHidden,escaped:F==null?void 0:F.hasPopperEscaped}),U.attributes.popper={}}}])})})}},[m.placement,m.referenceHidden,m.escaped].concat(D)),ae(De,{children:[r?K.cloneElement(r,{ref:function(N){x.ref=N,Qc(r.ref,N)}}):null,b&&We.createPortal(l?l(G5(m),O,x.instance):i,x.container)]})}return e}var X5=function(t,e){return K.forwardRef(function(r,i){var s=r.children,o=xy(r,["children"]);return j(t,se(Z({},Object.assign({},e,o)),{children:s?K.cloneElement(s,{ref:function(u){Qc(i,u),Qc(s.ref,u)}}):null}))})},Z5=X5(J5(Da));const eU=Z5,tU=({onClick:t})=>{const{clear:e}=Ie(Me);return j(eU,{content:e,children:j("button",{onClick:t,"data-testid":"clear",className:"eow-border eow-rounded eow-ml-2 eow-px-3 eow-flex eow-items-center",children:j("svg",{xmlns:"http://www.w3.org/2000/svg",className:"eow-h-4 eow-w-4 ",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})})},nU=({setFilters:t})=>{const[e,n]=K.useState(!1),r=K.useRef(null),{clearFromToFilterSportal365ImagesMessage:i,dateFromTo:s,dateFromToPlaceholder:o}=Ie(Me);return ae("div",{"data-testid":"from/to filter",children:[j("label",{htmlFor:"date from/to",className:Yt,children:s}),ae("div",{className:"eow-flex eow-flex-row",children:[j(gB,{ref:r,className:"eow-flex-1",placeholder:o,options:{mode:"range",enableTime:!1,dateFormat:"YYYY-MM-DD",altFormat:"YYYY-MM-DD",altInput:!0,position:"below",altInputClass:ua,parseDate:(c,d)=>Xi(c,d).toDate(),formatDate:(c,d)=>Xi(c).format(d),defaultDate:null},onChange:c=>{if(c&&c.length>1){n(!0);const d="YYYY-MM-DD",f=Xi(c[0]).format(d),p=Xi(c[1]).format(d);t({from:f,to:p})}else c.length===0&&!e&&(t(null),Pe.info(i))}}),e?j(tU,{onClick:()=>{r.current.flatpickr.clear(),n(!1),t(null)}}):j(De,{})]})]})};class rU{constructor(){a(this,"id");a(this,"value");a(this,"label")}}class By extends rU{constructor(){super(...arguments);a(this,"logo");a(this,"countryName");a(this,"countryFlag")}}const iU=(t,e,n,r)=>({apiKey:t,clientId:e,lang:n||"en",environment:r||"prod",idSchema:"native",errorHandlingMode:"standard",authProvider:{getIdToken:()=>"",logout:()=>{}}}),aU=(t,e)=>{if(!t&&!e)return null;if(!t&&e)return console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null;const n=e&&e==="betway"?{}.VITE_SPORTAL365_BETWAY_TOKEN:{}.VITE_SPORTAL365_SHARED_TOKEN;return{project:t,authorization:`Bearer ${n}`}},Uy=t=>{document.getElementById(t).scrollIntoView({behavior:"smooth"})},Kc={container:t=>Z({},t),control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"2px 6px","&:hover":{borderColor:"gray"},border:"1px solid lightgray",textTransform:"capitalize"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}}),option:(t,e)=>se(Z({},t),{backgroundColor:e.isSelected?"#0066cc":"white","&:hover":{backgroundColor:e.isSelected?"#0066cc":"lightgray"},textTransform:"capitalize"})},sU=t=>{let e=new By;return e.label=t.name,e.value=t.name,e.id=t.id,t.birthDate?e.logo=t.assets&&t.assets.headshot&&t.assets.headshot:e.logo=t.assets&&t.assets.logo&&t.assets.logo,e.countryName=t.country.name,e.countryFlag=t.country.assets&&t.country.assets.flag?t.country.assets.flag:vn.country,e},oU=({setQuery:t,setFilters:e})=>{const[n,r]=K.useState(!1),[i,s]=K.useState(null),{searchImages:o,hideFilters:l,showFilters:u}=Ie(Me),c=()=>r(!n),d=h=>{s(h),t((h==null?void 0:h.value)||"")},p=Wu((h,y)=>{h&&y([{id:h,value:h,label:h}])},300);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"search image",className:Yt,children:o}),j(Oc,{components:{DropdownIndicator:null},loadOptions:p,isClearable:!0,styles:Kc,getOptionValue:h=>h.id,onChange:d,value:i,placeholder:"",className:"eow-mb-1"}),j("a",{className:"eow-flex eow-justify-end eow-underline eow-text-blue-600 hover:eow-text-blue-800 visited:eow-text-purple-600 eow-cursor-pointer eow-mb-4",onClick:c,children:n?l:u}),n?j(nU,{setFilters:e}):j(De,{})]})},Jc="sportal365-images-search",lU=({imageNode:t,onChangeImages:e,setShowImagesContainer:n})=>{const[r,i]=K.useState(null),[s,o]=K.useState(""),[l,u]=K.useState(1),[c,d]=K.useState(null),[f,p]=K.useState(!1),h=K.useRef(!1),{https:y}=Ie(En),{searchSportal365ImagesErrorMessage:g,noImagesFound:v}=Ie(Me);K.useEffect(()=>(h.current?b():h.current=!0,()=>i(null)),[s,c,l]);const b=()=>_(this,null,function*(){if(s){p(!0);const A=yield y.fetchImagesFromSportal365(s,c,l),E=yield A.json();A.ok?(i(E),u(E.meta.pagination.current_page)):(console.error(E),Pe.error(g)),p(!1)}else i(null)}),w=()=>{u(A=>A-1),Uy(Jc)},I=()=>{u(A=>A+1),Uy(Jc)};return ae("div",{id:Jc,className:"eow-p-2 eow-border eow-border-gray-200 eow-rounded eow-bg-gray-100",children:[j("div",{className:"eow-flex eow-justify-end",children:j(ju,{isDisabled:!1,onClick:()=>{n(A=>se(Z({},A),{[t]:!A[t]}))}})}),j(oU,{setQuery:o,setFilters:d}),r?ae(De,{children:[j("div",{className:"eow-grid xl:eow-grid-cols-4 md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-2",children:r.data.map(A=>{var E,O;return ae("div",{className:"eow-relative eow-cursor-pointer eow-group eow-mb-2",onClick:()=>{var T,x;return e((x=(T=A.urls)==null?void 0:T.uploaded)==null?void 0:x.embed)},children:[j("img",{src:(O=(E=A.urls)==null?void 0:E.uploaded)==null?void 0:O.thumbnail,alt:"Sportal365 image",className:"eow-object-cover eow-w-full eow-h-full"}),j("div",{className:"eow-absolute eow-inset-0 eow-bg-black eow-bg-opacity-0 group-hover:eow-bg-opacity-50 eow-flex eow-justify-center eow-items-center eow-transition eow-duration-300",children:j("span",{className:"eow-text-white eow-text-4xl eow-opacity-0 group-hover:eow-opacity-100 eow-transition eow-duration-300",children:"+"})})]},A.id)})}),j(TF,{pageCount:r==null?void 0:r.meta.pagination.current_page,images:r,getPreviousPage:w,getNextPage:I})]}):j(De,{}),r&&r.data.length===0?j("p",{className:"eow-text-center eow-font-bold eow-mb-4",children:v}):j(De,{}),f?j(cm,{}):j(De,{})]})},uU=({imageUrl:t,isOpen:e,closeModal:n})=>{K.useLayoutEffect(()=>(e&&document.body.addEventListener("keydown",r),()=>{document.body.removeEventListener("keydown",r)}),[n]);const r=i=>i.key==="Escape"?n():null;return e?j(fm,{wrapperId:"image-modal",children:ae("div",{className:"eow-fixed eow-inset-0 eow-flex eow-items-center eow-justify-center eow-bg-black eow-bg-opacity-50 eow-animate-fadeIn",children:[j("div",{className:"eow-absolute eow-top-0 eow-right-0 eow-m-4",children:j("button",{className:"eow-text-white eow-text-2xl eow-bg-transparent",onClick:n,children:"X"})}),j("div",{className:"eow-flex eow-items-center eow-justify-center eow-h-full",children:j("img",{src:t,alt:"Image modal",className:"eow-w-full eow-object-cover"})})]})}):null},Xc={mainImage:!1,coverImage:!1,mobileImage:!1},$y=({id:t,type:e,label:n,imageUrl:r,imageNode:i,onChange:s})=>{const[o,l]=K.useState(Xc),[u,c]=K.useState(Xc),[d,f]=K.useState(!1),p=()=>f(!1),h=(g,v)=>{c(Xc),s(g,v)},y=(g,v)=>{navigator.clipboard.writeText(g).then(()=>{c(b=>se(Z({},b),{[v]:!0}))}).catch(b=>{console.error("Failed to copy: ",b),c(w=>se(Z({},w),{[v]:!1}))})};return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:n,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:n}),ae("div",{className:"eow-w-full eow-border eow-rounded eow-overflow-hidden eow-p-2",children:[ae("div",{className:"eow-grid md:eow-grid-cols-8 eow-grid-cols-1 eow-gap-2 eow-mb-2",children:[j("div",{className:"eow-col-span-2",children:r?ae(De,{children:[j("img",{src:r,alt:"Card Image",className:"eow-w-full eow-object-cover eow-cursor-pointer",onClick:()=>f(!0)}),j(uU,{imageUrl:r,isOpen:d,closeModal:p})]}):j("div",{className:"eow-bg-gray-200 xl:eow-min-w-24 eow-min-h-24 eow-flex eow-justify-center eow-items-center eow-p-5",children:j("img",{src:vn.image,alt:"Card image"})})}),ae("div",{className:"eow-flex eow-flex-col eow-col-span-6",children:[ae("div",{className:"eow-grid eow-grid-cols-2 eow-gap-2 eow-mb-2",children:[j(EF,{imageNode:i,onChangeImages:h,type:e,id:t}),j(IF,{isDisabled:!r,isUrlCopied:u[i],onClick:()=>y(r||"",i)})]}),j(OF,{imageNode:i,setShowImagesContainer:l})]})]}),o[i]?j(lU,{onChangeImages:g=>h(g,i),setShowImagesContainer:l,imageNode:i}):j(De,{})]})]})},jy=({id:t,type:e,loadedImages:n,onChange:r})=>{const[i,s]=K.useState(!1),o=()=>s(!i),l=Ie(Me),u=e==="game"?Array.from(pm.keys()):Array.from(xS.keys());return ae(De,{children:[j($y,{id:t,type:e,label:l.main,imageUrl:n==null?void 0:n.main,imageNode:"mainImage",onChange:r}),j("button",{className:"eow-underline eow-text-blue-600 hover:eow-text-blue-800 visited:eow-text-purple-600 eow-bg-transparent eow-mb-4",onClick:o,children:i?l.hideMoreImages:l.showMoreImages}),i?j(De,{children:u.map((c,d)=>j($y,{id:t,type:e,label:l[c],imageUrl:n[c],imageNode:pm.get(c),onChange:r},`${c}-${d}`))}):j(De,{})]})},cU=({id:t,loadedImages:e,onChange:n})=>{const r=Ie(Me);return j(vF,{images:r.optionImages,children:j(jy,{id:t,type:"option",loadedImages:e,onChange:n})})},Hy=new la,dU=5,fU=100,hU=({options:t,setRequestBody:e})=>{const{label:n,labelOptionPlaceholder:r,options:i,optionNumber:s,optionsDescription:o}=Ie(Me),l=Hy.constructOptions(t),u=(y,g)=>{y.persist();const v=Array.from(l);v[g].label=y.target.value,h(v)},c=(y,g)=>{const v=Array.from(l);v[g].value=y,h(v)},d=(y,g,v)=>{const b=y||null,w=Array.from(l);switch(g){case"mainImage":w[v].images.main=b,h(w);break;case"mobileImage":w[v].images.mobile=b,h(w);break}},f=()=>{const y=l.sort((w,I)=>parseInt(I.id)-parseInt(w.id))[0].id,g=`${parseInt(y)+1}`,v=Hy.constructEmptyOption(g),b=Array.from(l);b.push(v),h(b)},p=y=>{const g=l.filter((v,b)=>b!==y);h(g)},h=y=>{e(g=>se(Z({},g),{options:y}))};return ae("div",{className:"eow-mb-4",children:[ae("div",{className:"eow-mb-2",children:[j("h3",{className:Yt,children:i}),j("p",{className:"eow-text-gray-400 eow-text-sm",children:o})]}),ae("div",{className:"eow-grid eow-grid-cols-1 lg:eow-grid-cols-2 2xl:eow-grid-cols-3 eow-gap-4 eow-mb-1",children:[l.map((y,g)=>ae("div",{className:"eow-overflow-visible eow-shadow-l eow-border eow-border-gray-200",children:[ae("div",{className:"eow-bg-gray-100 eow-flex eow-justify-between eow-px-3 eow-py-2",children:[ae("h2",{className:"eow-card-title",children:[s," ",g+1]}),j(ju,{isDisabled:l.length===dU,onClick:()=>p(g)})]}),ae("div",{className:"eow-p-3",children:[ae("div",{className:"eow-grid sm:eow-grid-cols-2 eow-grid-cols-1 eow-gap-2",children:[j(gF,{label:n,defaultValue:y.label,placeholder:r,onChange:v=>u(v,g)}),j(pa,{type:"options_value",defaultValue:y.value,onChange:v=>c(v,g)})]}),j(cU,{id:g,loadedImages:y.images,onChange:(v,b)=>d(v,b,g)})]})]},`points_number_${y.id}_${g}`)),j($u,{isDisabled:l.length===fU,onClick:f})]})]})},pU=({requestBody:t,setRequestBody:e,description:n,setDescription:r})=>{const i=Ie(Me),s=o=>{o.persist(),e(l=>se(Z({},l),{title:o.target.value}))};return ae("div",{className:"md:eow-w-4/6 eow-w-full",children:[j(DS,{value:(t==null?void 0:t.id)||null}),j(ni,{title:i.title,placeholder:i.titlePlaceholder,onChange:s,defaultValue:t.title||""}),j(Uu,{defaultValue:n,setValue:r,property:"description"}),j(mF,{points:t.points,setRequestBody:e}),j(hU,{options:t.options,setRequestBody:e})]})},ur=({title:t,children:e})=>{const[n,r]=K.useState(!1);return ae("div",{className:"eow-border-b eow-border-gray-200 eow-mb-2",children:[ae("button",{className:"eow-flex eow-justify-between eow-py-2 eow-px-4 eow-py-2 eow-px-4 eow-w-full eow-text-left eow-text-gray-800 eow-font-semibold eow-bg-gray-100 hover:eow-bg-gray-200 focus:eow-outline-none",onClick:()=>r(!n),children:[j("span",{children:t}),j("img",{src:n?vn.upArrow:vn.downArrow,alt:"Up arrow",className:"eow-w-6 eow-h-6"})]}),n&&j("div",{className:"eow-border eow-border-gray-200 eow-p-4",children:e})]})},mU=({defaultValue:t,onChange:e})=>{const{https:n}=Ie(En),{type:r,typeDescription:i,noType:s}=Ie(Me),{data:o}=iu({queryKey:["eitherOrTypes"],queryFn:()=>n.getEitherOrTypes()});return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"type",className:Yt,children:r}),ae("select",{id:"quizType",className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2 eow-mb-1",onChange:e,defaultValue:t||"",children:[j("option",{value:"",children:s}),o?o.map((l,u)=>j("option",{id:l.id,value:l.id,children:l.label},`${l.id}-${u}`)):j(De,{})]}),j("p",{className:"eow-text-gray-400 eow-text-xs",children:i})]})},Vy=({type:t,defaultValue:e,onChange:n})=>{const{status:r,active:i,inactive:s,statusDescription:o,winningCondition:l,winningConditionDescription:u,more:c,less:d}=Ie(Me);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"status",className:Yt,children:t==="status"?r:l}),ae("select",{id:t==="status"?"gameStatus":"gameWinningCondition",className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2 eow-mb-1",onChange:n,defaultValue:e,children:[j("option",{value:t==="status"?"ACTIVE":"MORE",children:t==="status"?i:c}),j("option",{value:t==="status"?"INACTIVE":"LESS",children:t==="status"?s:d})]}),j("p",{className:"eow-text-gray-400 eow-text-xs",children:t==="status"?o:u})]})};var gU=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],qy=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(e).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),o=String(r.getOptionLabel(n)).toLowerCase();return s===i||o===i},Zc={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,n,r,i){return!(!e||n.some(function(s){return qy(e,s,i)})||r.some(function(s){return qy(e,s,i)}))},getNewOptionData:function(e,n){return{label:n,value:e,__isNew__:!0}}};function vU(t){var e=t.allowCreateWhileLoading,n=e===void 0?!1:e,r=t.createOptionPosition,i=r===void 0?"last":r,s=t.formatCreateLabel,o=s===void 0?Zc.formatCreateLabel:s,l=t.isValidNewOption,u=l===void 0?Zc.isValidNewOption:l,c=t.getNewOptionData,d=c===void 0?Zc.getNewOptionData:c,f=t.onCreateOption,p=t.options,h=p===void 0?[]:p,y=t.onChange,g=an(t,gU),v=g.getOptionValue,b=v===void 0?kv:v,w=g.getOptionLabel,I=w===void 0?Rv:w,m=g.inputValue,A=g.isLoading,E=g.isMulti,O=g.value,T=g.name,x=K.useMemo(function(){return u(m,Po(O),h,{getOptionValue:b,getOptionLabel:I})?d(m,o(m)):void 0},[o,d,I,b,m,u,h,O]),P=K.useMemo(function(){return(n||!A)&&x?i==="first"?[x].concat(ci(h)):[].concat(ci(h),[x]):h},[n,i,A,x,h]),S=K.useCallback(function(R,D){if(D.action!=="select-option")return y(R,D);var L=Array.isArray(R)?R:[R];if(L[L.length-1]===x){if(f)f(m);else{var N=d(m,m),H={action:"create-option",name:T,option:N};y(Ea(E,[].concat(ci(Po(O)),[N]),N),H)}return}y(R,D)},[d,m,E,T,x,f,y,O]);return we(we({},g),{},{options:P,onChange:S})}var yU=K.forwardRef(function(t,e){var n=Ac(t),r=vU(n);return j(No,Z({ref:e},r))}),wU=yU;const bU=t=>({label:t,value:t}),_U={control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"6px 1px","&:hover":{borderColor:"gray"},border:"1px solid lightgray",boxShadow:"none"}),clearIndicator:t=>se(Z({},t),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}})},Wy=({defaultValue:t,showLabel:e,setObject:n,handleResetData:r})=>{const[i,s]=K.useState(""),o=t.map(y=>bU(y)),{repeatedValueMessage:l,flags:u,flagsPlaceholder:c}=Ie(Me),d=y=>{const g=y.map(v=>v.value);n(v=>se(Z({},v),{flags:g})),r&&r()},f=y=>{s(y)},p=y=>{y.persist();const{key:g}=y;if(!!i)switch(g){case"Enter":case"Tab":if(t.length===0){const v=Array.from(t);v.push(i),n(b=>se(Z({},b),{flags:v}))}if(t.length>0&&h()){const v=Array.from(t);v.push(i),n(b=>se(Z({},b),{flags:v}))}s(""),y.preventDefault()}},h=()=>{let y=!1;const g=o.map(v=>v.label);return g.length&&g.includes(i)?(Pe.warn(l),y):(y=!0,y)};return ae("div",{className:"eow-mb-4",children:[e?j("label",{htmlFor:u,className:"eow-text-sm eow-mb-1",children:u}):j(De,{}),j(wU,{styles:_U,components:{DropdownIndicator:null},getOptionValue:y=>y.value,inputValue:i,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:d,onInputChange:f,onKeyDown:p,placeholder:c,value:o})]})},EU=t=>Object.keys(t).length++,Gy=({property:t,field:e,onChange:n})=>{const r=EU(e),[i,s]=K.useState(JSON.parse(JSON.stringify(e))),{dynamicFieldsDescription:o,keyDynamicFields:l,valueDynamicFields:u}=Ie(Me),c=()=>{const p="new_key"+r,h=JSON.parse(JSON.stringify(e));h[p]="";const y=Z(Z({},e),h);s(y),n(y)},d=(p,h)=>{const y=JSON.parse(JSON.stringify(e)),g=Object.keys(y)[p];y[h]=y[g],delete y[g],n(y)},f=(p,h)=>{const y=JSON.parse(JSON.stringify(e)),g=Object.keys(y)[p]?Object.keys(y)[p]:"new_key";y[g]=h,n(y)};return ae("div",{className:"eow-mb-4",children:[j("div",{className:"eow-mb-2",children:j("p",{className:"eow-text-gray-400 eow-text-sm",children:o})}),ae("div",{className:"eow-border eow-border-gray-200 eow-rounded eow-p-2 eow-mb-4",children:[Object.keys(i).map((p,h)=>ae("div",{className:"eow-flex eow-items-center eow-mb-4",children:[ae("div",{className:"eow-mr-4",children:[j("label",{htmlFor:l,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:l}),j("input",{"data-testid":"dynamic-key-field",onChange:y=>d(h,y.target.value),value:Object.keys(e)[h]&&Object.keys(e)[h].includes("new_key")?"":Object.keys(e)[h],type:"text",id:`${t}-key-${h}`,className:"eow-rounded eow-border eow-border-gray-200 eow-w-64 focus:eow-outline-none eow-px-3 eow-py-2"})]}),ae("div",{className:"eow-w-full",children:[j("label",{htmlFor:l,className:"eow-text-xs eow-font-medium eow-block eow-mb-1 eow-uppercase",children:u}),j("input",{"data-testid":"dynamic-value-field",onChange:y=>f(h,y.target.value),value:e[p],type:"text",id:`${t}-value-${h}`,className:"eow-rounded eow-border eow-border-gray-200 eow-w-full focus:eow-outline-none eow-px-3 eow-py-2"})]})]},`${t}-${p}-${h}`)),j($u,{isDisabled:!1,onClick:()=>c()})]})]})},IU=({tabValue:t,setTabValue:e})=>{const{content:n,tags:r,campaign:i}=Ie(Me);return j(De,{children:j("div",{className:"eow-grid md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-1 eow-w-full eow-mb-6 eow-border-b",children:[r,n,i].map(o=>j("div",{className:`md:eow-mr-2 last:eow-mr-0 eow-flex-auto eow-text-center eow-pb-2 ${t===o?"eow-border-b-2":"eow-border-b-2 eow-border-white"}`,children:j("a",{className:"eow-leading-normal eow-p-2 eow-cursor-pointer eow-mb-2 "+(t===o?"eow-font-bold eow-text-brandColor":"eow-text-gray-400"),onClick:()=>e(o),children:o})},`context-tab-${o}`))})})};class ed{constructor(){a(this,"label","");a(this,"options",[])}}const AU=10,zy=t=>{const e=[];if(t.competitions.length>0){const n=new ed;n.label="Competitions",n.options=t.competitions.map(r=>td(r,"competition")),e.push(n)}if(t.teams.length>0){const n=new ed;n.label="Teams",n.options=t.teams.map(r=>td(r,"team")),e.push(n)}if(t.players.length>0){const n=new ed;n.label="Players",n.options=t.players.map(r=>td(r,"player")),e.push(n)}return e},td=(t,e)=>{var r,i,s,o,l;let n=new By;return n.label=t.name,n.value=t.name,n.id=t.id,e==="player"?n.logo=((r=t.assets)==null?void 0:r.headshot)||vn.avatar:e==="team"?n.logo=((i=t.assets)==null?void 0:i.logo)||vn.team:n.logo=((s=t.assets)==null?void 0:s.logo)||vn.competition,n.countryName=t.country.name,n.countryFlag=((l=(o=t.country)==null?void 0:o.assets)==null?void 0:l.flag)||vn.country,n},OU=({options:t,setOptions:e,setFilters:n,handleResetData:r})=>{const{sdk:i}=Ie(En),{contextEntityTag:s,typeContextTagNamePlaceholder:o}=Ie(Me),l=d=>{const f=d.map(p=>p.id);e(d),r(),n(p=>se(Z({},p),{entityIds:f}))},c=Wu((d,f)=>{if(d){const p={query:d};i.football.search(p).then(h=>{const y=zy(h);f(y)}).catch(h=>{console.error(h),f([])})}},300);return ae("div",{className:"eow-mb-4",children:[j("label",{htmlFor:"context entity tag",className:"eow-text-sm eow-mb-1",children:s}),j(Oc,{components:{DropdownIndicator:null},getOptionValue:d=>d.label,styles:Kc,onChange:l,loadingMessage:()=>"Loading...",isOptionDisabled:()=>t.length===AU,value:t,loadOptions:c,isClearable:!0,isMulti:!0,placeholder:o,formatOptionLabel:d=>ae("div",{className:"eow-flex eow-items-center",children:[j("img",{src:d.logo,alt:"Logo",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-2",children:d.label}),j("img",{src:d.countryFlag,alt:"Country flag",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-1",children:d.countryName})]})})]})},TU=(t,e,n,r)=>{const i=t.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),s=t.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),o=t.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],u=[];if(i.length>0){const c=e.football.getCompetitions({competitionIds:i}).then(d=>{u.push(d)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}if(s.length>0){const c=e.football.getTeams({teamIds:s}).then(d=>{u.push(d.data)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}if(o.length>0){const c=e.football.getPlayers({playerIds:o}).then(d=>{u.push(d.data)}).catch(d=>{console.error(d),Pe.error(n)});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],u).map(f=>sU(f));r(d)})},CU=({tags:t,onChangeTags:e})=>{const[n,r]=K.useState([]),{sdk:i}=Ie(En),{getFootballEntitiesErrorMessage:s,typeContextTagNamePlaceholder:o}=Ie(Me),l=d=>{r(d),e(d)},c=Wu((d,f)=>{if(!d&&t.length>0&&TU(t,i,s,r),d){const p={query:d};i.football.search(p).then(h=>{const y=zy(h);f(y)}).catch(h=>{console.error(h),f([])})}},300);return j("div",{className:"eow-mb-4",children:j(Oc,{components:{DropdownIndicator:null},getOptionValue:d=>d.label,styles:Kc,onChange:l,loadingMessage:()=>"Loading...",value:n,loadOptions:c,isClearable:!0,defaultOptions:!0,isMulti:!0,placeholder:o,formatOptionLabel:d=>ae("div",{className:"eow-flex eow-items-center",children:[j("img",{src:d.logo,alt:"Logo",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-2",children:d.label}),j("img",{src:d.countryFlag,alt:"Country flag",className:"eow-h-5 eow-w-5 eow-mr-1"}),j("span",{className:"eow-mr-1",children:d.countryName})]})})})},SU=new la,PU=t=>t.startsWith("fb:c:")?"competition":t.startsWith("fb:t:")?"team":"player",MU=({defaultValue:t,setRequestBody:e})=>{const n=SU.createContext(t),{content:r,tags:i,campaign:s,id:o,idContentPlaceholder:l,labelContentPlaceholder:u,typeContentPlaceholder:c,idCampaignPlaceholder:d,labelCampaignPlaceholder:f,label:p,type:h}=Ie(Me),[y,g]=K.useState(i),v=O=>{O.persist();const T=Z({},n);T.content.id=O.target.value,E(T)},b=O=>{O.persist();const T=Z({},n);T.content.label=O.target.value,E(T)},w=O=>{O.persist();const T=Z({},n);T.content.type=O.target.value,E(T)},I=O=>{O.persist();const T=Z({},n);T.campaign.id=O.target.value,E(T)},m=O=>{O.persist();const T=Z({},n);T.campaign.label=O.target.value,E(T)},A=O=>{const T=Z({},n);O.length?T.tags=O.map(x=>({id:x.id,type:PU(x.id),source:"football"})):T.tags=[],E(T)},E=O=>{e(T=>se(Z({},T),{context:O}))};return ae("div",{className:"eow-mb-4 eow-p-2",children:[j(IU,{tabValue:y,setTabValue:g}),y===i?j(CU,{tags:n.tags,onChangeTags:A}):j(De,{}),y===r?ae(De,{children:[j(ni,{title:o,placeholder:l,defaultValue:n.content.id,onChange:v}),j(ni,{title:p,placeholder:u,defaultValue:n.content.label,onChange:b}),j(ni,{title:h,placeholder:c,defaultValue:n.content.type,onChange:w})]}):j(De,{}),y===s?ae(De,{children:[j(ni,{title:o,placeholder:d,defaultValue:n.campaign.id,onChange:I}),j(ni,{title:p,placeholder:f,defaultValue:n.campaign.label,onChange:m})]}):j(De,{})]})},RU=new la,kU=({requestBody:t,rules:e,adContent:n,setRules:r,setAdContent:i,setRequestBody:s})=>{const{configuration:o,images:l,flags:u,labels:c,customFields:d,rules:f,adContent:p,context:h}=Ie(Me),y=E=>{E.persist(),s(O=>se(Z({},O),{type:E.target.value?E.target.value:null}))},g=E=>{E.persist(),s(O=>se(Z({},O),{status:E.target.value}))},v=E=>{E.persist(),s(O=>se(Z({},O),{winning_condition:E.target.value}))},b=E=>{s(O=>se(Z({},O),{time:E}))},w=E=>{s(O=>se(Z({},O),{lives:E}))},I=(E,O)=>{const T=E||null,x=RU.createImagesModel();switch(O){case"mainImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.main=T,se(Z({},P),{images:S})});break;case"coverImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.cover=T,se(Z({},P),{images:S})});break;case"mobileImage":s(P=>{const S=P.images?JSON.parse(JSON.stringify(P.images)):x;return S.mobile=T,se(Z({},P),{images:S})});break}},m=E=>{s(O=>se(Z({},O),{labels:E}))},A=E=>{s(O=>se(Z({},O),{custom_fields:E}))};return ae("div",{className:"md:eow-w-2/6 eow-w-full eow-p-4",children:[ae(ur,{title:o,children:[ae("div",{className:"eow-grid md:eow-grid-cols-3 eow-grid-cols-1 eow-gap-2",children:[j(mU,{defaultValue:t.type,onChange:y}),j(Vy,{type:"status",defaultValue:t.status,onChange:g}),j(Vy,{type:"winning_condition",defaultValue:t.winning_condition,onChange:v})]}),ae("div",{className:"eow-grid md:eow-grid-cols-2 eow-grid-cols-1 eow-gap-2",children:[j(pa,{type:"time",defaultValue:t.time,showDescription:!0,onChange:b}),j(pa,{type:"lives",defaultValue:t.lives,showDescription:!0,onChange:w})]})]}),j(ur,{title:l,children:j(jy,{id:0,type:"game",loadedImages:t.images,onChange:I})}),j(ur,{title:u,children:j(Wy,{defaultValue:t.flags,setObject:s})}),j(ur,{title:c,children:j(Gy,{property:"labels",field:t.labels?t.labels:new Object,onChange:m})}),j(ur,{title:d,children:j(Gy,{property:"custom_fields",field:t.custom_fields?t.custom_fields:new Object,onChange:A})}),j(ur,{title:f,children:j(Uu,{defaultValue:e,setValue:r,property:"rules"})}),j(ur,{title:p,children:j(Uu,{defaultValue:n,setValue:i,property:"ad_content"})}),j(ur,{title:h,children:j(MU,{defaultValue:t.context,setRequestBody:s})})]})},Qy=new la,xU="manage-either-or",DU=({eitherOrById:t,setFilters:e,toggleScreen:n,clearEitherOrById:r})=>{const[i,s]=K.useState(Qy.createNewRequestBody(t)),[o,l]=K.useState(t==null?void 0:t.description),[u,c]=K.useState(t==null?void 0:t.rules),[d,f]=K.useState(t==null?void 0:t.ad_content),[p,h]=K.useState(!1),[y,g]=K.useState(!1),v=Ie(Me),{https:b}=Ie(En),w=!!t,I=()=>{g(!y)};return ae("div",{id:xU,children:[j(TS,{managementScreen:w?"edit":"create",toggleScreen:n,clearQuizById:r}),ae("div",{className:"eow-p-2 eow-border eow-border-gray-200 eow-rounded",children:[ae("div",{className:"eow-flex eow-flex-col md:eow-flex-row",children:[j(pU,{requestBody:i,setRequestBody:s,description:o,setDescription:l}),j(kU,{requestBody:i,setRequestBody:s,rules:u,adContent:d,setRules:c,setAdContent:f})]}),j(PS,{isLoading:p,manageEitherOr:()=>_(this,null,function*(){const A=new CS;if(h(!0),w?A.validateUpdate(i,v):A.validateCreate(i,v),!A.isValid){Pe.error(A.message),h(!1);return}i.description=o,i.rules=u,i.ad_content=d;const E=Qy.finalizeNewRequestBody(Z({},i));let O=null;w?O=yield b.updateEitherOr(E.id,Z({},E)):O=yield b.createEitherOr(Z({},E)),O.ok?(h(!1),Pe.success(w?v.updateEitherOrMessage:v.createEitherOrMessage),e(T=>se(Z({},T),{refetchEitherOrs:!T.refetchEitherOrs})),n()):(Pe.error(w?v.updateEitherOrErrorMessage:v.createEitherOrErrorMessage),console.error(w?v.updateEitherOrErrorMessage:v.createEitherOrErrorMessage,yield O.json()),h(!1))}),handleModal:I})]}),j(kS,{isOpen:y,requestBody:i,description:o,handleClose:I})]})},FU=t=>{const e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e},NU=({children:t,wrapperId:e})=>{const[n,r]=K.useState(null);return K.useLayoutEffect(()=>{let i=document.getElementById(e),s=!1;return i||(s=!0,i=FU(e)),r(i),()=>{s&&i.parentNode&&i.parentNode.removeChild(i)}},[e]),n===null?null:cr.default.createPortal(t,n)},LU=({isOpen:t,eitherOr:e,setFilters:n,handleClose:r})=>{const[i,s]=K.useState(!1),{confirmationQuestionLabel:o,deleteLabel:l,cancelLabel:u,deleteEitherOrMessage:c,deleteEitherOrErrorMessage:d}=Ie(Me),{https:f}=Ie(En);K.useLayoutEffect(()=>(t&&document.body.addEventListener("keydown",p),()=>{document.body.removeEventListener("keydown",p)}),[r]);const p=y=>y.key==="Escape"&&!i?r():null,h=()=>_(this,null,function*(){s(!0);const y=yield f.deleteEitherOr(e.id);y.ok?(Pe.success(c),s(!1),n(g=>se(Z({},g),{refetchEitherOrs:!g.refetchEitherOrs})),r()):(console.error(d,yield y.json()),Pe.error(d),s(!1))});return t?j(NU,{wrapperId:"confirmation-modal",children:ae(De,{children:[j("div",{className:"eow-justify-center eow-items-center eow-flex eow-overflow-x-hidden eow-overflow-y-hidden eow-absolute eow-inset-0 eow-z-50 eow-top-0 eow-right-0 eow-bottom-0 eow-left-0 eow-outline-none focus:eow-outline-none",children:j("div",{className:"eow-relative eow-w-full eow-my-6 eow-mx-auto eow-max-w-lg",children:ae("div",{className:"eow-border-0 eow-rounded eow-shadow-lg eow-relative eow-flex eow-flex-col eow-w-full eow-bg-white eow-outline-none focus:eow-outline-none",children:[ae("div",{className:"eow-flex eow-justify-items-center eow-p-4 eow-border-b eow-border-solid eow-border-gray-200",children:[ae("h3",{className:"eow-text-2xl eow-font-semibold eow-mr-2",children:[l," ",e.title]}),j("button",{className:"eow-flex eow-justify-items-center eow-ml-auto eow-bg-transparent eow-border-0 eow-leading-none eow-font-semibold eow-outline-none focus:eow-outline-none",onClick:r,children:j("span",{className:"eow-bg-transparent eow-h-6 eow-w-6 eow-text-2xl eow-block eow-outline-none focus:eow-outline-none eow-text-red-500 hover:eow-text-red-600",children:"x"})})]}),j("div",{className:"eow-relative eow-whitespace-nowrap eow-p-4 eow-text-gray-500 eow-text-lg eow-mb-4",children:ae("p",{className:"eow-whitespace-normal eow-mb-2",children:[o," ",j("span",{className:"eow-text-xl eow-italic",children:e.title})," ?"]})}),ae("div",{className:"eow-flex eow-items-center eow-justify-end eow-p-3 eow-border-t eow-border-solid eow-border-gray-200 eow-rounded-b",children:[ae("button",{className:`${i?"eow-bg-gray-600":"eow-bg-brandColor hover:eow-bg-blue-700"} eow-text-white eow-font-bold eow-px-4 eow-py-2 eow-text-sm eow-rounded eow-outline-none focus:eow-outline-none eow-mr-2 eow-mb-1 eow-ease-linear eow-transition-all eow-duration-150`,onClick:h,disabled:i,children:[i?j(dm,{}):null,l]}),j("button",{className:`${i?"eow-bg-gray-600":"eow-bg-red-500 hover:eow-bg-red-700"} eow-text-white eow-font-bold eow-text-sm eow-px-4 eow-py-2 eow-rounded eow-outline-none focus:eow-outline-none eow-mr-2 eow-mb-1 eow-ease-linear eow-transition-all eow-duration-150`,onClick:r,disabled:i,children:u})]})]})})}),j("div",{className:"eow-opacity-80 eow-absolute eow-inset-0 eow-z-40 eow-bg-black eow-top-0 eow-right-0 eow-bottom-0 eow-left-0"})]})}):null};var Yy=(t=>(t.CREATED_AT_ASC="created_at_asc",t.CREATED_AT_DESC="created_at_desc",t.UPDATED_AT_ASC="updated_at_asc",t.UPDATED_AT_DESC="updated_at_desc",t))(Yy||{});class BU{constructor(){a(this,"sort","created_at_desc");a(this,"status","");a(this,"flags",[]);a(this,"entityIds",[]);a(this,"groupByStatus",!0);a(this,"refetchEitherOrs",!1)}}var UU=K.forwardRef(function(t,e){var n=Ac(t);return j(No,Z({ref:e},n))}),$U=UU;function jU(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var HU=jU,Ky=Gs,VU=HU,qU=Js,WU=fg,GU=1/0,Jy=Ky?Ky.prototype:void 0,Xy=Jy?Jy.toString:void 0;function Zy(t){if(typeof t=="string")return t;if(qU(t))return VU(t,Zy)+"";if(WU(t))return Xy?Xy.call(t):"";var e=t+"";return e=="0"&&1/t==-GU?"-0":e}var zU=Zy,QU=zU;function YU(t){return t==null?"":QU(t)}var ew=YU;function KU(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}var JU=KU,XU=JU;function ZU(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:XU(t,e,n)}var e$=ZU,t$="\\ud800-\\udfff",n$="\\u0300-\\u036f",r$="\\ufe20-\\ufe2f",i$="\\u20d0-\\u20ff",a$=n$+r$+i$,s$="\\ufe0e\\ufe0f",o$="\\u200d",l$=RegExp("["+o$+t$+a$+s$+"]");function u$(t){return l$.test(t)}var tw=u$;function c$(t){return t.split("")}var d$=c$,nw="\\ud800-\\udfff",f$="\\u0300-\\u036f",h$="\\ufe20-\\ufe2f",p$="\\u20d0-\\u20ff",m$=f$+h$+p$,g$="\\ufe0e\\ufe0f",v$="["+nw+"]",nd="["+m$+"]",rd="\\ud83c[\\udffb-\\udfff]",y$="(?:"+nd+"|"+rd+")",rw="[^"+nw+"]",iw="(?:\\ud83c[\\udde6-\\uddff]){2}",aw="[\\ud800-\\udbff][\\udc00-\\udfff]",w$="\\u200d",sw=y$+"?",ow="["+g$+"]?",b$="(?:"+w$+"(?:"+[rw,iw,aw].join("|")+")"+ow+sw+")*",_$=ow+sw+b$,E$="(?:"+[rw+nd+"?",nd,iw,aw,v$].join("|")+")",I$=RegExp(rd+"(?="+rd+")|"+E$+_$,"g");function A$(t){return t.match(I$)||[]}var O$=A$,T$=d$,C$=tw,S$=O$;function P$(t){return C$(t)?S$(t):T$(t)}var M$=P$,R$=e$,k$=tw,x$=M$,D$=ew;function F$(t){return function(e){e=D$(e);var n=k$(e)?x$(e):void 0,r=n?n[0]:e.charAt(0),i=n?R$(n,1).join(""):e.slice(1);return r[t]()+i}}var N$=F$,L$=N$,B$=L$("toUpperCase"),U$=B$,$$=ew,j$=U$;function H$(t){return j$($$(t).toLowerCase())}var V$=H$;const lw=(t,e)=>{let n="";if(e==="sort")switch(t){case"created_at_asc":n="Sort by created at field in ascending order";break;case"created_at_desc":n="Sort by created at field in descending order";break;case"updated_at_asc":n="Sort by updated at field in ascending order";break;case"updated_at_desc":n="Sort by updated at field in descending order";break}return t&&(t=V$(t)),{id:t,value:t,label:e==="status"?t:n}},q$={control:t=>se(Z({},t),{fontSize:"14px",borderRadius:"0.25em",padding:"2px 6px","&:hover":{borderColor:"gray"},border:"1px solid lightgray"}),input:t=>se(Z({},t),{"input:focus":{boxShadow:"none"}}),option:(t,e)=>se(Z({},t),{backgroundColor:e.isSelected?"#0066cc":"white","&:hover":{backgroundColor:e.isSelected?"#0066cc":"lightgray"}})},uw=({defaultValue:t,filterValues:e,filterType:n,showClearStatus:r,setFilters:i,handleResetData:s})=>{const{status:o,clearStatus:l}=Ie(Me),u=e.map(f=>lw(f,n)),c=f=>{const p=f.value.toLocaleLowerCase();n==="sort"?i(h=>se(Z({},h),{sort:p})):n==="status"&&i(h=>se(Z({},h),{status:p.toLocaleUpperCase()})),s()},d=()=>{i(f=>se(Z({},f),{status:""}))};return ae("div",{className:"eow-w-full eow-mb-4",children:[j("label",{className:"eow-text-sm eow-mb-1",children:n==="status"?o:""}),j($U,{onChange:c,options:u,styles:q$,value:lw(t,n),placeholder:""}),r?j("a",{className:"eow-text-brandColor eow-cursor-pointer eow-text-sm eow-mb-8",onClick:()=>d(),children:l}):j(De,{})]})},W$=({value:t,setFilters:e,handleResetData:n})=>{const{groupByStatus:r}=Ie(Me);return ae("div",{className:"eow-flex eow-items-center eow-cursor-pointer",onClick:()=>{e(s=>se(Z({},s),{groupByStatus:!t})),n()},children:[j("input",{type:"checkbox",className:"eow-mr-2 focus:eow-outline-none eow-outline-none eow-cursor-pointer",checked:t,readOnly:!0}),j("span",{className:"eow-text-blueGray-600 eow-select-none",children:r})]})},G$=Object.values(Yy),z$=["active","inactive"],Q$=({filters:t,options:e,setOptions:n,setFilters:r,handleResetData:i})=>{const{filterBy:s,sortBy:o}=Ie(Me);return ae("div",{className:"eow-grid md:eow-grid-cols-2 eow-gap-4 eow-grid-cols-1 eow-mb-6",children:[ae("div",{className:"eow-border eow-border-gray-100 eow-rounded eow-p-4 eow-w-full",children:[j("h3",{className:"eow-font-bold eow-mb-2",children:s}),j(uw,{filterType:"status",defaultValue:t.status,filterValues:z$,showClearStatus:!0,setFilters:r,handleResetData:i}),j(Wy,{defaultValue:t.flags,showLabel:!0,setObject:r,handleResetData:i}),j(OU,{options:e,setOptions:n,setFilters:r,handleResetData:i})]}),ae("div",{className:"eow-border eow-border-gray-100 eow-rounded eow-p-4 eow-w-full",children:[j("h3",{className:"eow-font-bold eow-mb-2",children:o}),j(uw,{filterType:"sort",defaultValue:t.sort,filterValues:G$,setFilters:r,handleResetData:i}),j(W$,{value:t.groupByStatus,setFilters:r,handleResetData:i})]})]})},Y$=({children:t})=>j("div",{children:j("section",{className:"eow-mx-auto",children:j("div",{className:"eow-mb-8 eow-overflow-hidden eow-rounded eow-bg-white",children:j("div",{className:"eow-w-full eow-overflow-x-auto",children:t})})})}),K$=({fansUnitedEnvironment:t,hideSignOutButton:e})=>{const[n,r]=K.useState(new BU),[i,s]=K.useState(1),[o,l]=K.useState(null),[u,c]=K.useState(new Map),[d,f]=K.useState(null),[p,h]=K.useState(!1),[y,g]=K.useState(!1),[v,b]=K.useState(!1),[w,I]=K.useState(null),[m,A]=K.useState([]),{sdk:E,https:O}=Ie(En),{getEitherOrsErrorMessage:T,getEitherOrErrorMessage:x,noGamesFound:P}=Ie(Me),S=K.useMemo(()=>JSON.stringify(n),[n]),{isError:R,error:D,data:L}=iu({queryKey:["eitherOrsList",S],queryFn:()=>E.miniGames.getEitherOrs(n,!1,!0)});K.useEffect(()=>{if(L){const M=new Map(u).set(i,L.data);c(M),l(L.meta.pagination.nextPageStartsAfter)}},[L]),K.useEffect(()=>{Array.from(u.keys()).length>0&&(Array.from(u.keys()).includes(i)||(k=>_(this,null,function*(){try{const W=yield E.miniGames.getEitherOrs({startAfter:k},!0);if(W.data.length>0){const $=new Map(u).set(i,W.data);c($),l(W.meta.pagination.nextPageStartsAfter)}}catch(W){Pe.error(T),console.error(W)}}))(o))},[i]);const N=()=>s(M=>M-1),H=()=>s(M=>M+1),q=()=>h(!p),z=()=>f(null),U=M=>_(this,null,function*(){g(!0);const k=yield O.getEitherOrById(M);if(k.ok){const B=yield k.json();f(B.data),h(!0)}else console.error(x,yield k.json()),Pe.error(x);g(!1)}),F=()=>b(!v),C=()=>{s(1),c(new Map)};return R?(Pe.error(T),console.error(D),j(gh,{fansUnitedEnvironment:t,toggleScreen:q,hideSignOutButton:e})):p?j(DU,{eitherOrById:d,setFilters:r,toggleScreen:q,clearEitherOrById:z}):y||!u.get(i)?j(cm,{}):ae(De,{children:[ae(Y$,{children:[j(gh,{fansUnitedEnvironment:t,toggleScreen:q,hideSignOutButton:e}),j(Q$,{filters:n,options:m,setOptions:A,setFilters:r,handleResetData:C}),u.get(i).length>0?ae(De,{children:[ae("table",{className:"eow-w-full eow-border eow-border-gray-200 eow-mb-2 eow-table",children:[j(mI,{}),j(AS,{data:u.get(i),fetchEitherOrById:U,handleModal:F,setSelectedEitherOr:I})]}),j(OS,{pageCount:i,pageGames:u,getPreviousPage:N,getNextPage:H})]}):j("h2",{className:"eow-text-center eow-font-bold eow-text-xl eow-my-60",children:P})]}),j(LU,{isOpen:v,eitherOr:w,setFilters:r,handleClose:F})]})},J$=({fansUnitedEnvironment:t,hideSignOutButton:e})=>K.useContext(mh)?j(hI,{children:j(K$,{fansUnitedEnvironment:t,hideSignOutButton:e})}):j(dI,{fansUnitedEnvironment:t}),X$=new MI({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Z$=t=>{const e=iU(t.fansUnitedApiKey,t.fansUnitedClientId,t.fansUnitedLanguage,t.fansUnitedEnvironment),n=aU(t.sportal365Project,t.sportal365Infrastructure);return j(fI,{fansUnitedEnvironment:t.fansUnitedEnvironment,children:j(Rw,{labels:t.labels,children:j(IS,{config:e,sportal365Config:n,children:ae(WI,{client:X$,children:[j(Xo,{position:"top-right",autoClose:5e3,hideProgressBar:!1,limit:3,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),j(J$,{fansUnitedEnvironment:t.fansUnitedEnvironment,hideSignOutButton:t.hideSignOutButton})]})})})})};Be.EitherOrManager=Z$,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|