import{r as b,_ as Ce,p as ln,B as ct,q as _t,s as ft,v as ke,w as un,x as jt,y as cn,N as hn,z as dn,A as Ue,D as fn,E as mn,F as pn,H as gn,J as vn,n as Re,o as bn,i as yn,j as V,R as ve,C as Ot,I as wn,e as ut,d as xt}from"./index-9600e7d5.js";import{I as Tn}from"./index.es-b07989b8.js";import{S as Sn}from"./Slideshow-37c7b261.js";import{E as On,C as xn,I as En,h as Et}from"./handleErrorMessage-588dcd74.js";import{C as Cn,s as kn}from"./setWebPageTitle-364a3db0.js";import{d as In}from"./dateKhmerFormat-8553e5bc.js";import{u as mt,L as Ct}from"./index-707c4d2f.js";import{u as Rt,P as Pn,D as _n,I as jn}from"./index-10abfb9a.js";import"./ImageComponent-85a8e7ec.js";function Rn(){const[o,g]=b.useState([]),C=b.useCallback(f=>(g(S=>[].concat(Ce(S),[f])),()=>{g(S=>S.filter(x=>x!==f))}),[]);return[o,C]}function kt(o){return!!(o&&o.then)}const Ln=o=>{const{type:g,children:C,prefixCls:f,buttonProps:S,close:x,autoFocus:q,emitEvent:w,quitOnNullishReturnValue:T,actionFn:v}=o,s=b.useRef(!1),R=b.useRef(null),[E,c]=ln(!1),p=function(){x==null||x.apply(void 0,arguments)};b.useEffect(()=>{let O=null;return q&&(O=setTimeout(()=>{var P;(P=R.current)===null||P===void 0||P.focus()})),()=>{O&&clearTimeout(O)}},[]);const I=O=>{kt(O)&&(c(!0),O.then(function(){c(!1,!0),p.apply(void 0,arguments),s.current=!1},P=>(c(!1,!0),s.current=!1,Promise.reject(P))))},k=O=>{if(s.current)return;if(s.current=!0,!v){p();return}let P;if(w){if(P=v(O),T&&!kt(P)){s.current=!1,p(O);return}}else if(v.length)P=v(x),s.current=!1;else if(P=v(),!P){p();return}I(P)};return b.createElement(ct,Object.assign({},_t(g),{onClick:k,loading:E,prefixCls:f},S,{ref:R}),C)},It=Ln;var Nn=globalThis&&globalThis.__rest||function(o,g){var C={};for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&g.indexOf(f)<0&&(C[f]=o[f]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,f=Object.getOwnPropertySymbols(o);S<f.length;S++)g.indexOf(f[S])<0&&Object.prototype.propertyIsEnumerable.call(o,f[S])&&(C[f[S]]=o[f[S]]);return C};function Lt(o,g){return b.createElement("span",{className:`${o}-close-x`},g||b.createElement(un,{className:`${o}-close-icon`}))}const Nt=o=>{const{okText:g,okType:C="primary",cancelText:f,confirmLoading:S,onOk:x,onCancel:q,okButtonProps:w,cancelButtonProps:T,footer:v}=o,[s]=mt("Modal",jt());return v===void 0?b.createElement(b.Fragment,null,b.createElement(ct,Object.assign({onClick:q},T),f||(s==null?void 0:s.cancelText)),b.createElement(ct,Object.assign({},_t(C),{loading:S,onClick:x},w),g||(s==null?void 0:s.okText))):v},Mn=o=>{const{prefixCls:g,className:C,closeIcon:f,closable:S,type:x,title:q,children:w}=o,T=Nn(o,["prefixCls","className","closeIcon","closable","type","title","children"]),{getPrefixCls:v}=b.useContext(ft),s=v(),R=g||v("modal"),[,E]=Rt(R),c=`${R}-confirm`;let p={};return x?p={closable:S??!1,title:"",footer:"",children:b.createElement(Ft,Object.assign({},o,{confirmPrefixCls:c,rootPrefixCls:s,content:w}))}:p={closable:S??!0,title:q,footer:o.footer===null?o.footer:b.createElement(Nt,Object.assign({},o)),children:w},b.createElement(Pn,Object.assign({prefixCls:R,className:ke(E,`${R}-pure-panel`,x&&c,x&&`${c}-${x}`,C)},T,{closeIcon:Lt(R,f),closable:S},p))},Fn=Mn;var Dn=globalThis&&globalThis.__rest||function(o,g){var C={};for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&g.indexOf(f)<0&&(C[f]=o[f]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,f=Object.getOwnPropertySymbols(o);S<f.length;S++)g.indexOf(f[S])<0&&Object.prototype.propertyIsEnumerable.call(o,f[S])&&(C[f[S]]=o[f[S]]);return C};let ht;const Wn=o=>{ht={x:o.pageX,y:o.pageY},setTimeout(()=>{ht=null},100)};cn()&&document.documentElement.addEventListener("click",Wn,!0);const zn=o=>{var g;const{getPopupContainer:C,getPrefixCls:f,direction:S}=b.useContext(ft),x=Y=>{const{onCancel:Q}=o;Q==null||Q(Y)},q=Y=>{const{onOk:Q}=o;Q==null||Q(Y)},{prefixCls:w,className:T,rootClassName:v,open:s,wrapClassName:R,centered:E,getContainer:c,closeIcon:p,focusTriggerAfterClose:I=!0,visible:k,width:O=520}=o,P=Dn(o,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","visible","width"]),L=f("modal",w),$=f(),[ue,K]=Rt(L),ee=ke(R,{[`${L}-centered`]:!!E,[`${L}-wrap-rtl`]:S==="rtl"});return ue(b.createElement(hn,null,b.createElement(dn,{status:!0,override:!0},b.createElement(_n,Object.assign({width:O},P,{getContainer:c===void 0?C:c,prefixCls:L,rootClassName:ke(K,v),wrapClassName:ee,footer:o.footer===null?o.footer:b.createElement(Nt,Object.assign({},o,{onOk:q,onCancel:x})),visible:s??k,mousePosition:(g=P.mousePosition)!==null&&g!==void 0?g:ht,onClose:x,closeIcon:Lt(L,p),focusTriggerAfterClose:I,transitionName:Ue($,"zoom",o.transitionName),maskTransitionName:Ue($,"fade",o.maskTransitionName),className:ke(K,T)})))))},Mt=zn;function Ft(o){const{icon:g,onCancel:C,onOk:f,close:S,okText:x,okButtonProps:q,cancelText:w,cancelButtonProps:T,confirmPrefixCls:v,rootPrefixCls:s,type:R,okCancel:E,footer:c,locale:p}=o;let I=g;if(!g&&g!==null)switch(R){case"info":I=b.createElement(En,null);break;case"success":I=b.createElement(xn,null);break;case"error":I=b.createElement(Cn,null);break;default:I=b.createElement(On,null)}const k=o.okType||"primary",O=E??R==="confirm",P=o.autoFocusButton===null?!1:o.autoFocusButton||"ok",[L]=mt("Modal"),$=p||L,ue=O&&b.createElement(It,{actionFn:C,close:S,autoFocus:P==="cancel",buttonProps:T,prefixCls:`${s}-btn`},w||($==null?void 0:$.cancelText));return b.createElement("div",{className:`${v}-body-wrapper`},b.createElement("div",{className:`${v}-body`},I,o.title===void 0?null:b.createElement("span",{className:`${v}-title`},o.title),b.createElement("div",{className:`${v}-content`},o.content)),c!==void 0?c:b.createElement("div",{className:`${v}-btns`},ue,b.createElement(It,{type:k,actionFn:f,close:S,autoFocus:P==="ok",buttonProps:q,prefixCls:`${s}-btn`},x||(O?$==null?void 0:$.okText:$==null?void 0:$.justOkText))))}const Dt=o=>{const{close:g,zIndex:C,afterClose:f,visible:S,open:x,keyboard:q,centered:w,getContainer:T,maskStyle:v,direction:s,prefixCls:R,wrapClassName:E,rootPrefixCls:c,iconPrefixCls:p,bodyStyle:I,closable:k=!1,closeIcon:O,modalRender:P,focusTriggerAfterClose:L}=o,$=`${R}-confirm`,ue=o.width||416,K=o.style||{},ee=o.mask===void 0?!0:o.mask,Y=o.maskClosable===void 0?!1:o.maskClosable,Q=ke($,`${$}-${o.type}`,{[`${$}-rtl`]:s==="rtl"},o.className);return b.createElement(fn,{prefixCls:c,iconPrefixCls:p,direction:s},b.createElement(Mt,{prefixCls:R,className:Q,wrapClassName:ke({[`${$}-centered`]:!!o.centered},E),onCancel:()=>g==null?void 0:g({triggerCancel:!0}),open:x,title:"",footer:null,transitionName:Ue(c,"zoom",o.transitionName),maskTransitionName:Ue(c,"fade",o.maskTransitionName),mask:ee,maskClosable:Y,maskStyle:v,style:K,bodyStyle:I,width:ue,zIndex:C,afterClose:f,keyboard:q,centered:w,getContainer:T,closable:k,closeIcon:O,modalRender:P,focusTriggerAfterClose:L},b.createElement(Ft,Object.assign({},o,{confirmPrefixCls:$}))))},An=[],Te=An;var Bn=globalThis&&globalThis.__rest||function(o,g){var C={};for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&g.indexOf(f)<0&&(C[f]=o[f]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,f=Object.getOwnPropertySymbols(o);S<f.length;S++)g.indexOf(f[S])<0&&Object.prototype.propertyIsEnumerable.call(o,f[S])&&(C[f[S]]=o[f[S]]);return C};let Wt="";function Gn(){return Wt}function Le(o){const g=document.createDocumentFragment();let C=Object.assign(Object.assign({},o),{close:q,open:!0}),f;function S(){for(var T=arguments.length,v=new Array(T),s=0;s<T;s++)v[s]=arguments[s];const R=v.some(E=>E&&E.triggerCancel);o.onCancel&&R&&o.onCancel.apply(o,[()=>{}].concat(Ce(v.slice(1))));for(let E=0;E<Te.length;E++)if(Te[E]===q){Te.splice(E,1);break}mn(g)}function x(T){var{okText:v,cancelText:s,prefixCls:R}=T,E=Bn(T,["okText","cancelText","prefixCls"]);clearTimeout(f),f=setTimeout(()=>{const c=jt(),{getPrefixCls:p,getIconPrefixCls:I}=gn(),k=p(void 0,Gn()),O=R||`${k}-modal`,P=I();pn(b.createElement(Dt,Object.assign({},E,{prefixCls:O,rootPrefixCls:k,iconPrefixCls:P,okText:v,locale:c,cancelText:s||c.cancelText})),g)})}function q(){for(var T=arguments.length,v=new Array(T),s=0;s<T;s++)v[s]=arguments[s];C=Object.assign(Object.assign({},C),{open:!1,afterClose:()=>{typeof o.afterClose=="function"&&o.afterClose(),S.apply(this,v)}}),C.visible&&delete C.visible,x(C)}function w(T){typeof T=="function"?C=T(C):C=Object.assign(Object.assign({},C),T),x(C)}return x(C),Te.push(q),{destroy:q,update:w}}function zt(o){return Object.assign(Object.assign({},o),{type:"warning"})}function At(o){return Object.assign(Object.assign({},o),{type:"info"})}function Bt(o){return Object.assign(Object.assign({},o),{type:"success"})}function Gt(o){return Object.assign(Object.assign({},o),{type:"error"})}function Ht(o){return Object.assign(Object.assign({},o),{type:"confirm"})}function Hn(o){let{rootPrefixCls:g}=o;Wt=g}const Un=(o,g)=>{let{afterClose:C,config:f}=o;var S;const[x,q]=b.useState(!0),[w,T]=b.useState(f),{direction:v,getPrefixCls:s}=b.useContext(ft),R=s("modal"),E=s(),c=function(){q(!1);for(var k=arguments.length,O=new Array(k),P=0;P<k;P++)O[P]=arguments[P];const L=O.some($=>$&&$.triggerCancel);w.onCancel&&L&&w.onCancel.apply(w,[()=>{}].concat(Ce(O.slice(1))))};b.useImperativeHandle(g,()=>({destroy:c,update:k=>{T(O=>Object.assign(Object.assign({},O),k))}}));const p=(S=w.okCancel)!==null&&S!==void 0?S:w.type==="confirm",[I]=mt("Modal",vn.Modal);return b.createElement(Dt,Object.assign({prefixCls:R,rootPrefixCls:E},w,{close:c,open:x,afterClose:C,okText:w.okText||(p?I==null?void 0:I.okText:I==null?void 0:I.justOkText),direction:v,cancelText:w.cancelText||(I==null?void 0:I.cancelText)}))},$n=b.forwardRef(Un);let Pt=0;const qn=b.memo(b.forwardRef((o,g)=>{const[C,f]=Rn();return b.useImperativeHandle(g,()=>({patchElement:f}),[]),b.createElement(b.Fragment,null,C)}));function Kn(){const o=b.useRef(null),[g,C]=b.useState([]);b.useEffect(()=>{g.length&&(Ce(g).forEach(q=>{q()}),C([]))},[g]);const f=b.useCallback(x=>function(w){var T;Pt+=1;const v=b.createRef();let s;const R=b.createElement($n,{key:`modal-${Pt}`,config:x(w),ref:v,afterClose:()=>{s==null||s()}});return s=(T=o.current)===null||T===void 0?void 0:T.patchElement(R),s&&Te.push(s),{destroy:()=>{function E(){var c;(c=v.current)===null||c===void 0||c.destroy()}v.current?E():C(c=>[].concat(Ce(c),[E]))},update:E=>{function c(){var p;(p=v.current)===null||p===void 0||p.update(E)}v.current?c():C(p=>[].concat(Ce(p),[c]))}}},[]);return[b.useMemo(()=>({info:f(At),success:f(Bt),error:f(Gt),warning:f(zt),confirm:f(Ht)}),[]),b.createElement(qn,{key:"modal-holder",ref:o})]}function Ut(o){return Le(zt(o))}const ce=Mt;ce.useModal=Kn;ce.info=function(g){return Le(At(g))};ce.success=function(g){return Le(Bt(g))};ce.error=function(g){return Le(Gt(g))};ce.warning=Ut;ce.warn=Ut;ce.confirm=function(g){return Le(Ht(g))};ce.destroyAll=function(){for(;Te.length;){const g=Te.pop();g&&g()}};ce.config=Hn;ce._InternalPanelDoNotUseOrYouWillBeFired=Fn;const Vn=ce;var dt={},Xn={get exports(){return dt},set exports(o){dt=o}};(function(o,g){(function(C,f){o.exports=f(b)})(Re,function(C){return(()=>{var f={703:(w,T,v)=>{var s=v(414);function R(){}function E(){}E.resetWarningCache=R,w.exports=function(){function c(k,O,P,L,$,ue){if(ue!==s){var K=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 K.name="Invariant Violation",K}}function p(){return c}c.isRequired=c;var I={array:c,bool:c,func:c,number:c,object:c,string:c,symbol:c,any:c,arrayOf:p,element:c,elementType:c,instanceOf:p,node:c,objectOf:p,oneOf:p,oneOfType:p,shape:p,exact:p,checkPropTypes:E,resetWarningCache:R};return I.PropTypes=I,I}},697:(w,T,v)=>{w.exports=v(703)()},414:w=>{w.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:w=>{var T=typeof Element<"u",v=typeof Map=="function",s=typeof Set=="function",R=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function E(c,p){if(c===p)return!0;if(c&&p&&typeof c=="object"&&typeof p=="object"){if(c.constructor!==p.constructor)return!1;var I,k,O,P;if(Array.isArray(c)){if((I=c.length)!=p.length)return!1;for(k=I;k--!=0;)if(!E(c[k],p[k]))return!1;return!0}if(v&&c instanceof Map&&p instanceof Map){if(c.size!==p.size)return!1;for(P=c.entries();!(k=P.next()).done;)if(!p.has(k.value[0]))return!1;for(P=c.entries();!(k=P.next()).done;)if(!E(k.value[1],p.get(k.value[0])))return!1;return!0}if(s&&c instanceof Set&&p instanceof Set){if(c.size!==p.size)return!1;for(P=c.entries();!(k=P.next()).done;)if(!p.has(k.value[0]))return!1;return!0}if(R&&ArrayBuffer.isView(c)&&ArrayBuffer.isView(p)){if((I=c.length)!=p.length)return!1;for(k=I;k--!=0;)if(c[k]!==p[k])return!1;return!0}if(c.constructor===RegExp)return c.source===p.source&&c.flags===p.flags;if(c.valueOf!==Object.prototype.valueOf)return c.valueOf()===p.valueOf();if(c.toString!==Object.prototype.toString)return c.toString()===p.toString();if((I=(O=Object.keys(c)).length)!==Object.keys(p).length)return!1;for(k=I;k--!=0;)if(!Object.prototype.hasOwnProperty.call(p,O[k]))return!1;if(T&&c instanceof Element)return!1;for(k=I;k--!=0;)if((O[k]!=="_owner"&&O[k]!=="__v"&&O[k]!=="__o"||!c.$$typeof)&&!E(c[O[k]],p[O[k]]))return!1;return!0}return c!=c&&p!=p}w.exports=function(c,p){try{return E(c,p)}catch(I){if((I.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw I}}},37:function(w,T,v){(function(s,R){function E(){return E=Object.assign||function(K){for(var ee=1;ee<arguments.length;ee++){var Y=arguments[ee];for(var Q in Y)Object.prototype.hasOwnProperty.call(Y,Q)&&(K[Q]=Y[Q])}return K},E.apply(this,arguments)}var c="Left",p="Right",I="Down",k={delta:10,preventDefaultTouchmoveEvent:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0},O={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},P="mousemove",L="mouseup";function $(K,ee){if(ee===0)return K;var Y=Math.PI/180*ee;return[K[0]*Math.cos(Y)+K[1]*Math.sin(Y),K[1]*Math.cos(Y)-K[0]*Math.sin(Y)]}function ue(K,ee){var Y=function(N){N&&"touches"in N&&N.touches.length>1||K(function(B,A){A.trackMouse&&(document.addEventListener(P,Q),document.addEventListener(L,Se));var te="touches"in N?N.touches[0]:N,re=$([te.clientX,te.clientY],A.rotationAngle);return E({},B,O,{initial:[].concat(re),xy:re,start:N.timeStamp||0})})},Q=function(N){K(function(B,A){if("touches"in N&&N.touches.length>1)return B;var te="touches"in N?N.touches[0]:N,re=$([te.clientX,te.clientY],A.rotationAngle),ge=re[0],ye=re[1],xe=ge-B.xy[0],we=ye-B.xy[1],me=Math.abs(xe),he=Math.abs(we),Ie=(N.timeStamp||0)-B.start,$e=Math.sqrt(me*me+he*he)/(Ie||1),qe=[xe/(Ie||1),we/(Ie||1)];if(me<A.delta&&he<A.delta&&!B.swiping)return B;var Ne=function(Me,Ee,Fe,Ke){return Me>Ee?Fe>0?p:c:Ke>0?I:"Up"}(me,he,xe,we),Pe={absX:me,absY:he,deltaX:xe,deltaY:we,dir:Ne,event:N,first:B.first,initial:B.initial,velocity:$e,vxvy:qe};A.onSwiping&&A.onSwiping(Pe);var pe=!1;return(A.onSwiping||A.onSwiped||"onSwiped"+Ne in A)&&(pe=!0),pe&&A.preventDefaultTouchmoveEvent&&A.trackTouch&&N.cancelable&&N.preventDefault(),E({},B,{first:!1,eventData:Pe,swiping:!0})})},be=function(N){K(function(B,A){var te;if(B.swiping&&B.eventData){te=E({},B.eventData,{event:N}),A.onSwiped&&A.onSwiped(te);var re="onSwiped"+te.dir;re in A&&A[re](te)}else A.onTap&&A.onTap({event:N});return E({},B,O,{eventData:te})})},Se=function(N){document.removeEventListener(P,Q),document.removeEventListener(L,Se),be(N)},Oe=function(N,B){var A=function(){};if(N&&N.addEventListener){var te=[["touchstart",Y],["touchmove",Q],["touchend",be]];te.forEach(function(re){var ge=re[0],ye=re[1];return N.addEventListener(ge,ye,{passive:B})}),A=function(){return te.forEach(function(re){var ge=re[0],ye=re[1];return N.removeEventListener(ge,ye)})}}return A},ae={ref:function(N){N!==null&&K(function(B,A){if(B.el===N)return B;var te={};return B.el&&B.el!==N&&B.cleanUpTouch&&(B.cleanUpTouch(),te.cleanUpTouch=void 0),A.trackTouch&&N&&(te.cleanUpTouch=Oe(N,!A.preventDefaultTouchmoveEvent)),E({},B,{el:N},te)})}};return ee.trackMouse&&(ae.onMouseDown=Y),[ae,Oe]}s.DOWN=I,s.LEFT=c,s.RIGHT=p,s.UP="Up",s.useSwipeable=function(K){var ee=K.trackMouse,Y=R.useRef(E({},O)),Q=R.useRef(E({},k));Q.current=E({},k,K);var be=R.useMemo(function(){return ue(function(ae){return Y.current=ae(Y.current,Q.current)},{trackMouse:ee})},[ee]),Se=be[0],Oe=be[1];return Y.current=function(ae,N,B){var A={};return!N.trackTouch&&ae.cleanUpTouch?(ae.cleanUpTouch(),A.cleanUpTouch=void 0):N.trackTouch&&!ae.cleanUpTouch&&ae.el&&(A.cleanUpTouch=B(ae.el,!N.preventDefaultTouchmoveEvent)),E({},ae,A)}(Y.current,Q.current,Oe),Se}})(T,v(888))},888:w=>{w.exports=C}},S={};function x(w){var T=S[w];if(T!==void 0)return T.exports;var v=S[w]={exports:{}};return f[w].call(v.exports,v,v.exports,x),v.exports}x.n=w=>{var T=w&&w.__esModule?()=>w.default:()=>w;return x.d(T,{a:T}),T},x.d=(w,T)=>{for(var v in T)x.o(T,v)&&!x.o(w,v)&&Object.defineProperty(w,v,{enumerable:!0,get:T[v]})},x.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),x.o=(w,T)=>Object.prototype.hasOwnProperty.call(w,T),x.r=w=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})};var q={};return(()=>{function w(n){var i,r,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n))for(i=0;i<n.length;i++)n[i]&&(r=w(n[i]))&&(l&&(l+=" "),l+=r);else for(i in n)n[i]&&(l&&(l+=" "),l+=i);return l}function T(){for(var n,i,r=0,l="";r<arguments.length;)(n=arguments[r++])&&(i=w(n))&&(l&&(l+=" "),l+=i);return l}x.r(q),x.d(q,{default:()=>sn});var v=x(888),s=x.n(v);const R=function(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")},E=typeof Re=="object"&&Re&&Re.Object===Object&&Re;var c=typeof self=="object"&&self&&self.Object===Object&&self;const p=E||c||Function("return this")(),I=function(){return p.Date.now()};var k=/\s/,O=/^\s+/;const P=function(n){return n&&n.slice(0,function(i){for(var r=i.length;r--&&k.test(i.charAt(r)););return r}(n)+1).replace(O,"")},L=p.Symbol;var $=Object.prototype,ue=$.hasOwnProperty,K=$.toString,ee=L?L.toStringTag:void 0,Y=Object.prototype.toString,Q=L?L.toStringTag:void 0;const be=function(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Q&&Q in Object(n)?function(i){var r=ue.call(i,ee),l=i[ee];try{i[ee]=void 0;var y=!0}catch{}var G=K.call(i);return y&&(r?i[ee]=l:delete i[ee]),G}(n):function(i){return Y.call(i)}(n)};var Se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,ae=/^0o[0-7]+$/i,N=parseInt;const B=function(n){if(typeof n=="number")return n;if(function(l){return typeof l=="symbol"||function(y){return y!=null&&typeof y=="object"}(l)&&be(l)=="[object Symbol]"}(n))return NaN;if(R(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=R(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=P(n);var r=Oe.test(n);return r||ae.test(n)?N(n.slice(2),r?2:8):Se.test(n)?NaN:+n};var A=Math.max,te=Math.min;const re=function(n,i,r){var l,y,G,H,e,t,a=0,h=!1,m=!1,d=!0;if(typeof n!="function")throw new TypeError("Expected a function");function j(D){var U=l,Z=y;return l=y=void 0,a=D,H=n.apply(Z,U)}function _(D){return a=D,e=setTimeout(z,i),h?j(D):H}function M(D){var U=D-t;return t===void 0||U>=i||U<0||m&&D-a>=G}function z(){var D=I();if(M(D))return W(D);e=setTimeout(z,function(U){var Z=i-(U-t);return m?te(Z,G-(U-a)):Z}(D))}function W(D){return e=void 0,d&&l?j(D):(l=y=void 0,H)}function F(){var D=I(),U=M(D);if(l=arguments,y=this,t=D,U){if(e===void 0)return _(t);if(m)return clearTimeout(e),e=setTimeout(z,i),j(t)}return e===void 0&&(e=setTimeout(z,i)),H}return i=B(i)||0,R(r)&&(h=!!r.leading,G=(m="maxWait"in r)?A(B(r.maxWait)||0,i):G,d="trailing"in r?!!r.trailing:d),F.cancel=function(){e!==void 0&&clearTimeout(e),a=0,l=t=y=e=void 0},F.flush=function(){return e===void 0?H:W(I())},F},ge=function(n,i,r){var l=!0,y=!0;if(typeof n!="function")throw new TypeError("Expected a function");return R(r)&&(l="leading"in r?!!r.leading:l,y="trailing"in r?!!r.trailing:y),re(n,i,{leading:l,maxWait:i,trailing:y})};var ye=x(590),xe=x.n(ye),we=function(){if(typeof Map<"u")return Map;function n(i,r){var l=-1;return i.some(function(y,G){return y[0]===r&&(l=G,!0)}),l}return function(){function i(){this.__entries__=[]}return Object.defineProperty(i.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),i.prototype.get=function(r){var l=n(this.__entries__,r),y=this.__entries__[l];return y&&y[1]},i.prototype.set=function(r,l){var y=n(this.__entries__,r);~y?this.__entries__[y][1]=l:this.__entries__.push([r,l])},i.prototype.delete=function(r){var l=this.__entries__,y=n(l,r);~y&&l.splice(y,1)},i.prototype.has=function(r){return!!~n(this.__entries__,r)},i.prototype.clear=function(){this.__entries__.splice(0)},i.prototype.forEach=function(r,l){l===void 0&&(l=null);for(var y=0,G=this.__entries__;y<G.length;y++){var H=G[y];r.call(l,H[1],H[0])}},i}()}(),me=typeof window<"u"&&typeof document<"u"&&window.document===document,he=x.g!==void 0&&x.g.Math===Math?x.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Ie=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(he):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)},$e=["top","right","bottom","left","width","height","size","weight"],qe=typeof MutationObserver<"u",Ne=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(i,r){var l=!1,y=!1,G=0;function H(){l&&(l=!1,i()),y&&t()}function e(){Ie(H)}function t(){var a=Date.now();if(l){if(a-G<2)return;y=!0}else l=!0,y=!1,setTimeout(e,20);G=a}return t}(this.refresh.bind(this))}return n.prototype.addObserver=function(i){~this.observers_.indexOf(i)||this.observers_.push(i),this.connected_||this.connect_()},n.prototype.removeObserver=function(i){var r=this.observers_,l=r.indexOf(i);~l&&r.splice(l,1),!r.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},n.prototype.updateObservers_=function(){var i=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return i.forEach(function(r){return r.broadcastActive()}),i.length>0},n.prototype.connect_=function(){me&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),qe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){me&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(i){var r=i.propertyName,l=r===void 0?"":r;$e.some(function(y){return!!~l.indexOf(y)})&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),Pe=function(n,i){for(var r=0,l=Object.keys(i);r<l.length;r++){var y=l[r];Object.defineProperty(n,y,{value:i[y],enumerable:!1,writable:!1,configurable:!0})}return n},pe=function(n){return n&&n.ownerDocument&&n.ownerDocument.defaultView||he},Me=De(0,0,0,0);function Ee(n){return parseFloat(n)||0}function Fe(n){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];return i.reduce(function(l,y){return l+Ee(n["border-"+y+"-width"])},0)}var Ke=typeof SVGGraphicsElement<"u"?function(n){return n instanceof pe(n).SVGGraphicsElement}:function(n){return n instanceof pe(n).SVGElement&&typeof n.getBBox=="function"};function $t(n){return me?Ke(n)?function(i){var r=i.getBBox();return De(0,0,r.width,r.height)}(n):function(i){var r=i.clientWidth,l=i.clientHeight;if(!r&&!l)return Me;var y=pe(i).getComputedStyle(i),G=function(d){for(var j={},_=0,M=["top","right","bottom","left"];_<M.length;_++){var z=M[_],W=d["padding-"+z];j[z]=Ee(W)}return j}(y),H=G.left+G.right,e=G.top+G.bottom,t=Ee(y.width),a=Ee(y.height);if(y.boxSizing==="border-box"&&(Math.round(t+H)!==r&&(t-=Fe(y,"left","right")+H),Math.round(a+e)!==l&&(a-=Fe(y,"top","bottom")+e)),!function(d){return d===pe(d).document.documentElement}(i)){var h=Math.round(t+H)-r,m=Math.round(a+e)-l;Math.abs(h)!==1&&(t-=h),Math.abs(m)!==1&&(a-=m)}return De(G.left,G.top,t,a)}(n):Me}function De(n,i,r,l){return{x:n,y:i,width:r,height:l}}var qt=function(){function n(i){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=De(0,0,0,0),this.target=i}return n.prototype.isActive=function(){var i=$t(this.target);return this.contentRect_=i,i.width!==this.broadcastWidth||i.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var i=this.contentRect_;return this.broadcastWidth=i.width,this.broadcastHeight=i.height,i},n}(),Kt=function(n,i){var r,l,y,G,H,e,t,a=(l=(r=i).x,y=r.y,G=r.width,H=r.height,e=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,t=Object.create(e.prototype),Pe(t,{x:l,y,width:G,height:H,top:y,right:l+G,bottom:H+y,left:l}),t);Pe(this,{target:n,contentRect:a})},Vt=function(){function n(i,r,l){if(this.activeObservations_=[],this.observations_=new we,typeof i!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=i,this.controller_=r,this.callbackCtx_=l}return n.prototype.observe=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(i instanceof pe(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(i)||(r.set(i,new qt(i)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(i instanceof pe(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(i)&&(r.delete(i),r.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var i=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&i.activeObservations_.push(r)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var i=this.callbackCtx_,r=this.activeObservations_.map(function(l){return new Kt(l.target,l.broadcastRect())});this.callback_.call(i,r,i),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),pt=typeof WeakMap<"u"?new WeakMap:new we,gt=function n(i){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Ne.getInstance(),l=new Vt(i,r,this);pt.set(this,l)};["observe","unobserve","disconnect"].forEach(function(n){gt.prototype[n]=function(){var i;return(i=pt.get(this))[n].apply(i,arguments)}});const vt=he.ResizeObserver!==void 0?he.ResizeObserver:gt;var J=x(37),u=x(697),We=s().memo(function(n){var i=n.description,r=n.fullscreen,l=n.handleImageLoaded,y=n.isFullscreen,G=n.onImageError,H=n.original,e=n.originalAlt,t=n.originalHeight,a=n.originalWidth,h=n.originalTitle,m=n.sizes,d=n.srcSet,j=n.loading,_=y&&r||H;return s().createElement(s().Fragment,null,s().createElement("img",{className:"image-gallery-image",src:_,alt:e,srcSet:d,height:t,width:a,sizes:m,title:h,onLoad:function(M){return l(M,H)},onError:G,loading:j}),i&&s().createElement("span",{className:"image-gallery-description"},i))});We.displayName="Item",We.propTypes={description:u.string,fullscreen:u.string,handleImageLoaded:u.func.isRequired,isFullscreen:u.bool,onImageError:u.func.isRequired,original:u.string.isRequired,originalAlt:u.string,originalHeight:u.string,originalWidth:u.string,originalTitle:u.string,sizes:u.string,srcSet:u.string,loading:u.string},We.defaultProps={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"};const Xt=We;var Yt={left:s().createElement("polyline",{points:"15 18 9 12 15 6"}),right:s().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:s().createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:s().createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:s().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:s().createElement(s().Fragment,null,s().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},Ve=function(n){var i=n.strokeWidth,r=n.viewBox,l=n.icon;return s().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:r,fill:"none",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round"},Yt[l])};Ve.propTypes={strokeWidth:u.number,viewBox:u.string,icon:(0,u.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired},Ve.defaultProps={strokeWidth:1,viewBox:"0 0 24 24"};const ze=Ve;var Xe=s().memo(function(n){var i=n.isFullscreen,r=n.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:r,"aria-label":"Open Fullscreen"},s().createElement(ze,{strokeWidth:2,icon:i?"minimize":"maximize"}))});Xe.displayName="Fullscreen",Xe.propTypes={isFullscreen:u.bool.isRequired,onClick:u.func.isRequired};const Qt=Xe;var Ye=s().memo(function(n){var i=n.disabled,r=n.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:i,onClick:r,"aria-label":"Previous Slide"},s().createElement(ze,{icon:"left",viewBox:"6 0 12 24"}))});Ye.displayName="LeftNav",Ye.propTypes={disabled:u.bool.isRequired,onClick:u.func.isRequired};const Jt=Ye;var Qe=s().memo(function(n){var i=n.disabled,r=n.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:i,onClick:r,"aria-label":"Next Slide"},s().createElement(ze,{icon:"right",viewBox:"6 0 12 24"}))});Qe.displayName="RightNav",Qe.propTypes={disabled:u.bool.isRequired,onClick:u.func.isRequired};const Zt=Qe;var Je=s().memo(function(n){var i=n.isPlaying,r=n.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:r,"aria-label":"Play or Pause Slideshow"},s().createElement(ze,{strokeWidth:2,icon:i?"pause":"play"}))});Je.displayName="PlayPause",Je.propTypes={isPlaying:u.bool.isRequired,onClick:u.func.isRequired};const en=Je;function Ze(){return Ze=Object.assign||function(n){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}return n},Ze.apply(this,arguments)}var et=function(n){var i=n.children,r=n.className,l=n.delta,y=n.onSwiping,G=n.onSwiped,H=(0,J.useSwipeable)({delta:l,onSwiping:y,onSwiped:G});return s().createElement("div",Ze({},H,{className:r}),i)};et.propTypes={children:u.node.isRequired,className:u.string,delta:u.number,onSwiped:u.func,onSwiping:u.func},et.defaultProps={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}};const bt=et;function tt(n){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},tt(n)}function yt(n,i){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);i&&(l=l.filter(function(y){return Object.getOwnPropertyDescriptor(n,y).enumerable})),r.push.apply(r,l)}return r}function wt(n){for(var i=1;i<arguments.length;i++){var r=arguments[i]!=null?arguments[i]:{};i%2?yt(Object(r),!0).forEach(function(l){tn(n,l,r[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach(function(l){Object.defineProperty(n,l,Object.getOwnPropertyDescriptor(r,l))})}return n}function tn(n,i,r){return i in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,n}function nn(n,i){for(var r=0;r<i.length;r++){var l=i[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function nt(n,i){return nt=Object.setPrototypeOf||function(r,l){return r.__proto__=l,r},nt(n,i)}function rn(n,i){return!i||tt(i)!=="object"&&typeof i!="function"?ne(n):i}function ne(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ae(n){return Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},Ae(n)}var Tt=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],an=(0,u.arrayOf)((0,u.shape)({srcSet:u.string,media:u.string}));function St(n){var i=parseInt(n.keyCode||n.which||0,10);return i===66||i===62}var it=function(n){(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)})(H,n);var i,r,l,y,G=(l=H,y=function(){if(typeof Reflect>"u"||!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{return!1}}(),function(){var e,t=Ae(l);if(y){var a=Ae(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return rn(this,e)});function H(e){var t;return function(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}(this,H),(t=G.call(this,e)).state={currentIndex:e.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(e.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},t.loadedImages={},t.imageGallery=s().createRef(),t.thumbnailsWrapper=s().createRef(),t.thumbnails=s().createRef(),t.imageGallerySlideWrapper=s().createRef(),t.handleImageLoaded=t.handleImageLoaded.bind(ne(t)),t.handleKeyDown=t.handleKeyDown.bind(ne(t)),t.handleMouseDown=t.handleMouseDown.bind(ne(t)),t.handleResize=t.handleResize.bind(ne(t)),t.handleTouchMove=t.handleTouchMove.bind(ne(t)),t.handleOnSwiped=t.handleOnSwiped.bind(ne(t)),t.handleScreenChange=t.handleScreenChange.bind(ne(t)),t.handleSwiping=t.handleSwiping.bind(ne(t)),t.handleThumbnailSwiping=t.handleThumbnailSwiping.bind(ne(t)),t.handleOnThumbnailSwiped=t.handleOnThumbnailSwiped.bind(ne(t)),t.onThumbnailMouseLeave=t.onThumbnailMouseLeave.bind(ne(t)),t.handleImageError=t.handleImageError.bind(ne(t)),t.pauseOrPlay=t.pauseOrPlay.bind(ne(t)),t.renderThumbInner=t.renderThumbInner.bind(ne(t)),t.renderItem=t.renderItem.bind(ne(t)),t.slideLeft=t.slideLeft.bind(ne(t)),t.slideRight=t.slideRight.bind(ne(t)),t.toggleFullScreen=t.toggleFullScreen.bind(ne(t)),t.togglePlay=t.togglePlay.bind(ne(t)),t.unthrottledSlideToIndex=t.slideToIndex,t.slideToIndex=ge(t.unthrottledSlideToIndex,e.slideDuration,{trailing:!1}),e.lazyLoad&&(t.lazyLoaded=[]),t}return i=H,r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.autoPlay,a=e.useWindowKeyDown;t&&this.play(),a?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(e,t){var a=this.props,h=a.items,m=a.lazyLoad,d=a.slideDuration,j=a.slideInterval,_=a.startIndex,M=a.thumbnailPosition,z=a.showThumbnails,W=a.useWindowKeyDown,F=this.state,D=F.currentIndex,U=F.isPlaying,Z=e.items.length!==h.length,se=!xe()(e.items,h),de=e.startIndex!==_,fe=e.thumbnailPosition!==M,oe=e.showThumbnails!==z;j===e.slideInterval&&d===e.slideDuration||U&&(this.pause(),this.play()),fe&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),oe&&z&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),oe&&!z&&this.removeThumbnailsResizeObserver(),(Z||oe)&&this.handleResize(),t.currentIndex!==D&&this.slideThumbnailBar(),e.slideDuration!==d&&(this.slideToIndex=ge(this.unthrottledSlideToIndex,d,{trailing:!1})),!m||e.lazyLoad&&!se||(this.lazyLoaded=[]),W!==e.useWindowKeyDown&&(W?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(de||se)&&this.setState({currentIndex:_,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var e=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),e?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var e=this,t=this.state,a=t.currentIndex,h=t.isTransitioning,m=this.props,d=m.onSlide,j=m.slideDuration;this.transitionTimer=window.setTimeout(function(){h&&(e.setState({isTransitioning:!h,isSwipingThumbnail:!1}),d&&d(a))},j+50)}},{key:"onThumbnailClick",value:function(e,t){var a=this.props.onThumbnailClick;e.target.parentNode.parentNode.blur(),this.slideToIndex(t,e),a&&a(e,t)}},{key:"onThumbnailMouseOver",value:function(e,t){var a=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){a.slideToIndex(t),a.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var e=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,e&&this.play()}}},{key:"setThumbsTranslate",value:function(e){this.setState({thumbsTranslate:e})}},{key:"setModalFullscreen",value:function(e){var t=this.props.onScreenChange;this.setState({modalFullscreen:e}),t&&t(e)}},{key:"getThumbsTranslate",value:function(e){var t,a=this.props,h=a.disableThumbnailScroll,m=a.items,d=this.state,j=d.thumbnailsWrapperWidth,_=d.thumbnailsWrapperHeight,M=this.thumbnails&&this.thumbnails.current;if(h)return 0;if(M){if(this.isThumbnailVertical()){if(M.scrollHeight<=_)return 0;t=M.scrollHeight-_}else{if(M.scrollWidth<=j||j<=0)return 0;t=M.scrollWidth-j}return e*(t/(m.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(e){switch(e){case"left":e=" ".concat("image-gallery-thumbnails-left");break;case"right":e=" ".concat("image-gallery-thumbnails-right");break;case"bottom":e=" ".concat("image-gallery-thumbnails-bottom");break;case"top":e=" ".concat("image-gallery-thumbnails-top")}return e}},{key:"getAlignmentClassName",value:function(e){var t=this.state.currentIndex,a=this.props,h=a.infinite,m=a.items,d="",j="image-gallery-left",_="image-gallery-right";switch(e){case t-1:d=" ".concat(j);break;case t:d=" ".concat("image-gallery-center");break;case t+1:d=" ".concat(_)}return m.length>=3&&h&&(e===0&&t===m.length-1?d=" ".concat(_):e===m.length-1&&t===0&&(d=" ".concat(j))),d}},{key:"getTranslateXForTwoSlide",value:function(e){var t=this.state,a=t.currentIndex,h=t.currentSlideOffset,m=t.previousIndex,d=a!==m,j=e===0&&m===0,_=e===1&&m===1,M=e===0&&a===1,z=e===1&&a===0,W=h===0,F=-100*a+100*e+h;return h>0?this.direction="left":h<0&&(this.direction="right"),z&&h>0&&(F=-100+h),M&&h<0&&(F=100+h),d?j&&W&&this.direction==="left"?F=100:_&&W&&this.direction==="right"&&(F=-100):(z&&W&&this.direction==="left"&&(F=-100),M&&W&&this.direction==="right"&&(F=100)),F}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(e){var t=this.state,a=t.currentIndex,h=t.currentSlideOffset,m=t.slideStyle,d=this.props,j=d.infinite,_=d.items,M=d.useTranslate3D,z=d.isRTL,W=-100*a,F=_.length-1,D=(W+100*e)*(z?-1:1)+h;j&&_.length>2&&(a===0&&e===F?D=-100*(z?-1:1)+h:a===F&&e===0&&(D=100*(z?-1:1)+h)),j&&_.length===2&&(D=this.getTranslateXForTwoSlide(e));var U="translate(".concat(D,"%, 0)");return M&&(U="translate3d(".concat(D,"%, 0, 0)")),wt({display:this.isSlideVisible(e)?"inherit":"none",WebkitTransform:U,MozTransform:U,msTransform:U,OTransform:U,transform:U},m)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var e,t=this.props,a=t.useTranslate3D,h=t.isRTL,m=this.state,d=m.thumbsTranslate,j=m.thumbsStyle,_=h?-1*d:d;return this.isThumbnailVertical()?(e="translate(0, ".concat(d,"px)"),a&&(e="translate3d(0, ".concat(d,"px, 0)"))):(e="translate(".concat(_,"px, 0)"),a&&(e="translate3d(".concat(_,"px, 0, 0)"))),wt({WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e},j)}},{key:"getSlideItems",value:function(){var e=this,t=this.state.currentIndex,a=this.props,h=a.items,m=a.slideOnThumbnailOver,d=a.onClick,j=a.lazyLoad,_=a.onTouchMove,M=a.onTouchEnd,z=a.onTouchStart,W=a.onMouseOver,F=a.onMouseLeave,D=a.renderItem,U=a.renderThumbInner,Z=a.showThumbnails,se=a.showBullets,de=[],fe=[],oe=[];return h.forEach(function(ie,X){var Be=e.getAlignmentClassName(X),rt=ie.originalClass?" ".concat(ie.originalClass):"",at=ie.thumbnailClass?" ".concat(ie.thumbnailClass):"",_e=ie.renderItem||D||e.renderItem,Ge=ie.renderThumbInner||U||e.renderThumbInner,je=!j||Be||e.lazyLoaded[X];je&&j&&!e.lazyLoaded[X]&&(e.lazyLoaded[X]=!0);var st=e.getSlideStyle(X),ot=s().createElement("div",{"aria-label":"Go to Slide ".concat(X+1),key:"slide-".concat(X),tabIndex:"-1",className:"image-gallery-slide ".concat(Be," ").concat(rt),style:st,onClick:d,onKeyUp:e.handleSlideKeyUp,onTouchMove:_,onTouchEnd:M,onTouchStart:z,onMouseOver:W,onFocus:W,onMouseLeave:F,role:"button"},je?_e(ie):s().createElement("div",{style:{height:"100%"}}));if(de.push(ot),Z&&ie.thumbnail){var He=T("image-gallery-thumbnail",at,{active:t===X});fe.push(s().createElement("button",{key:"thumbnail-".concat(X),type:"button",tabIndex:"0","aria-pressed":t===X?"true":"false","aria-label":"Go to Slide ".concat(X+1),className:He,onMouseLeave:m?e.onThumbnailMouseLeave:null,onMouseOver:function(le){return e.handleThumbnailMouseOver(le,X)},onFocus:function(le){return e.handleThumbnailMouseOver(le,X)},onKeyUp:function(le){return e.handleThumbnailKeyUp(le,X)},onClick:function(le){return e.onThumbnailClick(le,X)}},Ge(ie)))}if(se){var lt=T("image-gallery-bullet",ie.bulletClass,{active:t===X});oe.push(s().createElement("button",{type:"button",key:"bullet-".concat(X),className:lt,onClick:function(le){return ie.bulletOnClick&&ie.bulletOnClick({item:ie,itemIndex:X,currentIndex:t}),le.target.blur(),e.slideToIndex.call(e,X,le)},"aria-pressed":t===X?"true":"false","aria-label":"Go to Slide ".concat(X+1)}))}}),{slides:de,thumbnails:fe,bullets:oe}}},{key:"ignoreIsTransitioning",value:function(){var e=this.props.items,t=this.state,a=t.previousIndex,h=t.currentIndex,m=e.length-1;return Math.abs(a-h)>1&&!(a===0&&h===m)&&!(a===m&&h===0)}},{key:"isFirstOrLastSlide",value:function(e){return e===this.props.items.length-1||e===0}},{key:"slideIsTransitioning",value:function(e){var t=this.state,a=t.isTransitioning,h=t.previousIndex,m=t.currentIndex;return a&&!(e===h||e===m)}},{key:"isSlideVisible",value:function(e){return!this.slideIsTransitioning(e)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(e)}},{key:"slideThumbnailBar",value:function(){var e=this.state,t=e.currentIndex,a=e.isSwipingThumbnail,h=-this.getThumbsTranslate(t);a||(t===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:h,thumbsSwipedTranslate:h}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var e=this.props,t=e.infinite,a=e.isRTL;return t||(a?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var e=this.props,t=e.infinite,a=e.isRTL;return t||(a?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(e){var t=e.event,a=e.absX,h=e.dir,m=this.props,d=m.disableSwipe,j=m.stopPropagation,_=this.state,M=_.galleryWidth,z=_.isTransitioning,W=_.swipingUpDown,F=_.swipingLeftRight;if(h!==J.UP&&h!==J.DOWN&&!W||F){if(h!==J.LEFT&&h!==J.RIGHT||F||this.setState({swipingLeftRight:!0}),!d){var D=this.props.swipingTransitionDuration;if(j&&t.preventDefault(),z)this.setState({currentSlideOffset:0});else{var U=h===J.RIGHT?1:-1,Z=a/M*100;Math.abs(Z)>=100&&(Z=100);var se={transition:"transform ".concat(D,"ms ease-out")};this.setState({currentSlideOffset:U*Z,slideStyle:se})}}}else W||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(e){var t=e.event,a=e.absX,h=e.absY,m=e.dir,d=this.props,j=d.stopPropagation,_=d.swipingThumbnailTransitionDuration,M=this.state,z=M.thumbsSwipedTranslate,W=M.thumbnailsWrapperHeight,F=M.thumbnailsWrapperWidth,D=M.swipingUpDown,U=M.swipingLeftRight;if(this.isThumbnailVertical()){if((m===J.LEFT||m===J.RIGHT||U)&&!D)return void(U||this.setState({swipingLeftRight:!0}));m!==J.UP&&m!==J.DOWN||D||this.setState({swipingUpDown:!0})}else{if((m===J.UP||m===J.DOWN||D)&&!U)return void(D||this.setState({swipingUpDown:!0}));m!==J.LEFT&&m!==J.RIGHT||U||this.setState({swipingLeftRight:!0})}var Z,se,de,fe,oe,ie=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(Z=z+(m===J.DOWN?h:-h),se=ie.scrollHeight-W+20,de=Math.abs(Z)>se,fe=Z>20,oe=ie.scrollHeight<=W):(Z=z+(m===J.RIGHT?a:-a),se=ie.scrollWidth-F+20,de=Math.abs(Z)>se,fe=Z>20,oe=ie.scrollWidth<=F),!oe&&(m!==J.LEFT&&m!==J.UP||!de)&&(m!==J.RIGHT&&m!==J.DOWN||!fe)){j&&t.stopPropagation();var X={transition:"transform ".concat(_,"ms ease-out")};this.setState({thumbsTranslate:Z,thumbsStyle:X})}}},{key:"handleOnThumbnailSwiped",value:function(){var e=this.state.thumbsTranslate,t=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:e,thumbsStyle:{transition:"all ".concat(t,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var e=this.state.currentSlideOffset,t=this.props.swipeThreshold;return Math.abs(e)>t}},{key:"resetSwipingDirection",value:function(){var e=this.state,t=e.swipingUpDown,a=e.swipingLeftRight;t&&this.setState({swipingUpDown:!1}),a&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(e){var t=e.event,a=e.dir,h=e.velocity,m=this.props,d=m.disableSwipe,j=m.stopPropagation,_=m.flickThreshold;if(!d){var M=this.props.isRTL;j&&t.stopPropagation(),this.resetSwipingDirection();var z=(a===J.LEFT?1:-1)*(M?-1:1),W=a===J.UP||a===J.DOWN,F=h>_&&!W;this.handleOnSwipedTo(z,F)}}},{key:"handleOnSwipedTo",value:function(e,t){var a=this.state,h=a.currentIndex,m=a.isTransitioning,d=h;!this.sufficientSwipe()&&!t||m||(d+=e),(e===-1&&!this.canSlideLeft()||e===1&&!this.canSlideRight())&&(d=h),this.unthrottledSlideToIndex(d)}},{key:"handleTouchMove",value:function(e){this.state.swipingLeftRight&&e.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(e){var t=this.props,a=t.disableKeyDown,h=t.useBrowserFullscreen,m=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!a)switch(parseInt(e.keyCode||e.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(e);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(e);break;case 27:m&&!h&&this.exitFullScreen()}}},{key:"handleImageError",value:function(e){var t=this.props.onErrorImageURL;t&&e.target.src.indexOf(t)===-1&&(e.target.src=t)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var e=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(e)))}},{key:"initSlideWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeSlideWrapperObserver=new vt(re(function(a){a&&a.forEach(function(h){t.setState({thumbnailsWrapperWidth:h.contentRect.width},t.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(e.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeThumbnailWrapperObserver=new vt(re(function(a){a&&a.forEach(function(h){t.setState({thumbnailsWrapperHeight:h.contentRect.height},t.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(e.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var e=this.props,t=e.onScreenChange,a=e.useBrowserFullscreen,h=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,m=this.imageGallery.current===h;t&&t(m),a&&this.setState({isFullscreen:m})}},{key:"slideToIndex",value:function(e,t){var a=this.state,h=a.currentIndex,m=a.isTransitioning,d=this.props,j=d.items,_=d.slideDuration,M=d.onBeforeSlide;if(!m){t&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var z=j.length-1,W=e;e<0?W=z:e>z&&(W=0),M&&W!==h&&M(W),this.setState({previousIndex:h,currentIndex:W,isTransitioning:W!==h,currentSlideOffset:0,slideStyle:{transition:"all ".concat(_,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"right":"left")}},{key:"slideRight",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"left":"right")}},{key:"slideTo",value:function(e,t){var a=this,h=this.state,m=h.currentIndex,d=h.currentSlideOffset,j=h.isTransitioning,_=this.props.items,M=m+(t==="left"?-1:1);j||(_.length===2?this.setState({currentSlideOffset:d+(t==="left"?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return a.slideToIndex(M,e)},25)}):this.slideToIndex(M,e))}},{key:"handleThumbnailMouseOver",value:function(e,t){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(e,t)}},{key:"handleThumbnailKeyUp",value:function(e,t){St(e)&&this.onThumbnailClick(e,t)}},{key:"handleSlideKeyUp",value:function(e){St(e)&&(0,this.props.onClick)(e)}},{key:"isThumbnailVertical",value:function(){var e=this.props.thumbnailPosition;return e==="left"||e==="right"}},{key:"addScreenChangeEvent",value:function(){var e=this;Tt.forEach(function(t){document.addEventListener(t,e.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var e=this;Tt.forEach(function(t){document.removeEventListener(t,e.handleScreenChange)})}},{key:"fullScreen",value:function(){var e=this.props.useBrowserFullscreen,t=this.imageGallery.current;e?t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var e=this.state.isFullscreen,t=this.props.useBrowserFullscreen;e&&(t?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var e=this.props.infinite,t=this.state.currentIndex;e||this.canSlideRight()?this.slideToIndex(t+1):this.pause()}},{key:"play",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=this.props,a=t.onPlay,h=t.slideInterval,m=t.slideDuration,d=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(h,m)),a&&e&&a(d))}},{key:"pause",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=this.props.onPause,a=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),t&&e&&t(a))}},{key:"isImageLoaded",value:function(e){return!!this.loadedImages[e.original]||(this.loadedImages[e.original]=!0,!1)}},{key:"handleImageLoaded",value:function(e,t){var a=this.props.onImageLoad;!this.loadedImages[t]&&a&&(this.loadedImages[t]=!0,a(e))}},{key:"renderItem",value:function(e){var t=this.state.isFullscreen,a=this.props.onImageError||this.handleImageError;return s().createElement(Xt,{description:e.description,fullscreen:e.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:t,onImageError:a,original:e.original,originalAlt:e.originalAlt,originalHeight:e.originalHeight,originalWidth:e.originalWidth,originalTitle:e.originalTitle,sizes:e.sizes,loading:e.loading,srcSet:e.srcSet})}},{key:"renderThumbInner",value:function(e){var t=this.props.onThumbnailError||this.handleImageError;return s().createElement("span",{className:"image-gallery-thumbnail-inner"},s().createElement("img",{className:"image-gallery-thumbnail-image",src:e.thumbnail,height:e.thumbnailHeight,width:e.thumbnailWidth,alt:e.thumbnailAlt,title:e.thumbnailTitle,loading:e.thumbnailLoading,onError:t}),e.thumbnailLabel&&s().createElement("div",{className:"image-gallery-thumbnail-label"},e.thumbnailLabel))}},{key:"render",value:function(){var e=this.state,t=e.currentIndex,a=e.isFullscreen,h=e.modalFullscreen,m=e.isPlaying,d=this.props,j=d.additionalClass,_=d.disableThumbnailSwipe,M=d.indexSeparator,z=d.isRTL,W=d.items,F=d.thumbnailPosition,D=d.renderFullscreenButton,U=d.renderCustomControls,Z=d.renderLeftNav,se=d.renderRightNav,de=d.showBullets,fe=d.showFullscreenButton,oe=d.showIndex,ie=d.showThumbnails,X=d.showNav,Be=d.showPlayButton,rt=d.renderPlayPauseButton,at=this.getThumbnailStyle(),_e=this.getSlideItems(),Ge=_e.slides,je=_e.thumbnails,st=_e.bullets,ot=T("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(F),{"image-gallery-rtl":z}),He=s().createElement("div",{ref:this.imageGallerySlideWrapper,className:ot},U&&U(),this.canSlide()?s().createElement(s().Fragment,null,X&&s().createElement(s().Fragment,null,Z(this.slideLeft,!this.canSlideLeft()),se(this.slideRight,!this.canSlideRight())),s().createElement(bt,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},s().createElement("div",{className:"image-gallery-slides"},Ge))):s().createElement("div",{className:"image-gallery-slides"},Ge),Be&&rt(this.togglePlay,m),de&&s().createElement("div",{className:"image-gallery-bullets"},s().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},st)),fe&&D(this.toggleFullScreen,a),oe&&s().createElement("div",{className:"image-gallery-index"},s().createElement("span",{className:"image-gallery-index-current"},t+1),s().createElement("span",{className:"image-gallery-index-separator"},M),s().createElement("span",{className:"image-gallery-index-total"},W.length))),lt=T("image-gallery",j,{"fullscreen-modal":h}),le=T("image-gallery-content",this.getThumbnailPositionClassName(F),{fullscreen:a}),on=T("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(F),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&z},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!_},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!_});return s().createElement("div",{ref:this.imageGallery,className:lt,"aria-live":"polite"},s().createElement("div",{className:le},(F==="bottom"||F==="right")&&He,ie&&je.length>0?s().createElement(bt,{className:on,delta:0,onSwiping:!_&&this.handleThumbnailSwiping,onSwiped:!_&&this.handleOnThumbnailSwiped},s().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},s().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:at,"aria-label":"Thumbnail Navigation"},je))):null,(F==="top"||F==="left")&&He))}}],r&&nn(i.prototype,r),H}(s().Component);it.propTypes={flickThreshold:u.number,items:(0,u.arrayOf)((0,u.shape)({bulletClass:u.string,bulletOnClick:u.func,description:u.string,original:u.string,originalHeight:u.number,originalWidth:u.number,loading:u.string,thumbnailHeight:u.number,thumbnailWidth:u.number,thumbnailLoading:u.string,fullscreen:u.string,originalAlt:u.string,originalTitle:u.string,thumbnail:u.string,thumbnailAlt:u.string,thumbnailLabel:u.string,thumbnailTitle:u.string,originalClass:u.string,thumbnailClass:u.string,renderItem:u.func,renderThumbInner:u.func,imageSet:an,srcSet:u.string,sizes:u.string})).isRequired,showNav:u.bool,autoPlay:u.bool,lazyLoad:u.bool,infinite:u.bool,showIndex:u.bool,showBullets:u.bool,showThumbnails:u.bool,showPlayButton:u.bool,showFullscreenButton:u.bool,disableThumbnailScroll:u.bool,disableKeyDown:u.bool,disableSwipe:u.bool,disableThumbnailSwipe:u.bool,useBrowserFullscreen:u.bool,onErrorImageURL:u.string,indexSeparator:u.string,thumbnailPosition:(0,u.oneOf)(["top","bottom","left","right"]),startIndex:u.number,slideDuration:u.number,slideInterval:u.number,slideOnThumbnailOver:u.bool,swipeThreshold:u.number,swipingTransitionDuration:u.number,swipingThumbnailTransitionDuration:u.number,onSlide:u.func,onBeforeSlide:u.func,onScreenChange:u.func,onPause:u.func,onPlay:u.func,onClick:u.func,onImageLoad:u.func,onImageError:u.func,onTouchMove:u.func,onTouchEnd:u.func,onTouchStart:u.func,onMouseOver:u.func,onMouseLeave:u.func,onThumbnailError:u.func,onThumbnailClick:u.func,renderCustomControls:u.func,renderLeftNav:u.func,renderRightNav:u.func,renderPlayPauseButton:u.func,renderFullscreenButton:u.func,renderItem:u.func,renderThumbInner:u.func,stopPropagation:u.bool,additionalClass:u.string,useTranslate3D:u.bool,isRTL:u.bool,useWindowKeyDown:u.bool},it.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,renderLeftNav:function(n,i){return s().createElement(Jt,{onClick:n,disabled:i})},renderRightNav:function(n,i){return s().createElement(Zt,{onClick:n,disabled:i})},renderPlayPauseButton:function(n,i){return s().createElement(en,{onClick:n,isPlaying:i})},renderFullscreenButton:function(n,i){return s().createElement(Qt,{onClick:n,isFullscreen:i})},useWindowKeyDown:!0};const sn=it})(),q})()})})(Xn);const Yn=bn(dt);function si(){var I,k;const{t:o}=yn(),[g,C]=b.useState([]),[f,S]=b.useState(null),[x,q]=b.useState([]),[w,T]=b.useState(0),[v,s]=b.useState(!1);kn(o("picture"));async function R(O,P){try{const L=await xt.get("picture/album",{params:{limit:O,page:P,galleryStatus:!0,albumId:"all",status:!0}});L&&(C(L.data.data),S(L.data.meta.pagination))}catch(L){Et(L)}}async function E(O,P){try{const L=await xt.get("picture/album",{params:{limit:O,page:P,galleryStatus:!0,albumId:"all",status:!0}});console.log("res pic: ",L.data.data),L&&(C([...g,...L.data.data]),S(L.data.meta.pagination))}catch(L){Et(L)}}b.useEffect(()=>{R(16,1),window.scrollTo(0,0)},[]);function c(){return console.log("data.length: ",g.length),console.log("pagination.total: ",f==null?void 0:f.total),V.jsx(Tn,{dataLength:g.length,next:()=>E(12,(f==null?void 0:f.current)+1),hasMore:g.length<(f==null?void 0:f.total),loader:V.jsx(ve,{justify:"center",children:o("loading-info")}),children:V.jsx(Ct,{className:"picture-list mt-20",grid:{gutter:15,xxl:4,xl:4,lg:4,md:3,sm:2,xs:1},dataSource:g,renderItem:O=>V.jsx(Ct.Item,{children:V.jsx(ve,{children:V.jsxs(Ot,{span:24,children:[V.jsx(ve,{children:V.jsx(jn,{className:"cursor-pointer-hover",src:O.data[0].pictureStatus===!0?`https://spm-production.s3.ap-southeast-1.amazonaws.com/${O.data[0].thumnail}`:O.data[0].picture,preview:!1,onClick:()=>p(O.data),alt:O.data[0].title,fallback:ut})}),V.jsx(ve,{className:"mt-5 mb-10",justify:"center",children:V.jsx("span",{children:O.name})})]})})})})})}function p(O){T(0),s(!0);let P=[];O.map(L=>{P.push({original:"https://spm-production.s3.ap-southeast-1.amazonaws.com/"+L.thumnail,thumbnail:"https://spm-production.s3.ap-southeast-1.amazonaws.com/"+L.thumnail,originalWidth:"500px",originalHeight:"500px",originalTitle:L.title,thumbnailTitle:L.title,loading:ut,title:L.title,createdAt:L.createdAt})}),console.log("array: ",P),q(P)}return V.jsx(ve,{className:"w-100",children:V.jsxs(Ot,{span:24,align:"middle",children:[V.jsx("div",{children:V.jsx(Sn,{hasRunText:!1})}),V.jsxs("div",{className:"pt-20 layout-max-width",children:[V.jsxs(ve,{align:"middle",className:"pt-10 fs-18",children:[V.jsx(wn,{className:"t-primary ml-10"}),V.jsx("span",{className:"ml-10 t-primary font-battambang-bold",children:o("picture")})]}),c(),V.jsx(Vn,{wrapClassName:"album-slideshow",style:{top:0,height:"100vh"},open:v,width:"100%",onCancel:()=>s(!1),footer:!1,children:V.jsxs("div",{className:"mt-30",children:[v===!0?V.jsx(Yn,{items:x,showFullscreenButton:!1,showPlayButton:!1,onSlide:O=>T(O),onImageError:O=>ut}):null,v===!0?V.jsxs("div",{children:[V.jsx(ve,{justify:"center",children:V.jsx("span",{className:"fs-20 font-battambang-bold",children:(I=x[w])==null?void 0:I.title})}),V.jsx(ve,{justify:"center",children:V.jsx("span",{className:"mb-10",children:In((k=x[w])==null?void 0:k.createdAt)})})]}):null]})})]})]})})}export{si as default};