BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
app.imagivibe.com
/
public
/
build
/
assets
📤 Upload
📝 New File
📁 New Folder
Close
Editing: app-JVJjggrX.js
import{e as H,L as fm}from"./livewire.esm-C819BCfU.js";import{f as cm,m as hm}from"./fetch-Bv7pIKk9.js";import{c as dm}from"./clipboard-CBCTDmBy.js";import{R as pm}from"./recorder-Cl4mhFdd.js";const gm="modulepreload",vm=function(a){return"/build/"+a},Ku={},Zu=function(i,r,s){let l=Promise.resolve();if(r&&r.length>0){let p=function(w){return Promise.all(w.map(C=>Promise.resolve(C).then(A=>({status:"fulfilled",value:A}),A=>({status:"rejected",reason:A}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),b=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));l=p(r.map(w=>{if(w=vm(w),w in Ku)return;Ku[w]=!0;const C=w.endsWith(".css"),A=C?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${w}"]${A}`))return;const R=document.createElement("link");if(R.rel=C?"stylesheet":gm,C||(R.as="script"),R.crossOrigin="",R.href=w,b&&R.setAttribute("nonce",b),document.head.appendChild(R),C)return new Promise((P,M)=>{R.addEventListener("load",P),R.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${w}`)))})}))}function h(p){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=p,window.dispatchEvent(m),!m.defaultPrevented)throw p}return l.then(p=>{for(const m of p||[])m.status==="rejected"&&h(m.reason);return i().catch(h)})};typeof window.pusherConfig<"u"?Zu(async()=>{const{default:a}=await import("./echo-Cg34J4s1.js");return{default:a}},[]).then(({default:a})=>{Zu(async()=>{const{default:i}=await import("./pusher-DqdtxvB9.js").then(r=>r.p);return{default:i}},[]).then(({default:i})=>{window.Pusher=i;let r=window.pusherConfig;window.Echo=new a({broadcaster:"pusher",key:r.key,cluster:r.cluster,wsHost:r.wsHost??`ws-${r.cluster}.pusher.com`,wsPort:r.port??80,wssPort:r.port??443,forceTLS:(r.scheme??"https")==="https",enabledTransports:["ws","wss"]})}).catch(i=>console.log("Failed to load Pusher:",i))}).catch(a=>console.log("Failed to load Echo:",a)):console.log("window.pusherConfig is not defined.");function Qu(a,i){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);i&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),r.push.apply(r,s)}return r}function Ct(a){for(var i=1;i<arguments.length;i++){var r=arguments[i]!=null?arguments[i]:{};i%2?Qu(Object(r),!0).forEach(function(s){mm(a,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach(function(s){Object.defineProperty(a,s,Object.getOwnPropertyDescriptor(r,s))})}return a}function _i(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_i=function(i){return typeof i}:_i=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_i(a)}function mm(a,i,r){return i in a?Object.defineProperty(a,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[i]=r,a}function $t(){return $t=Object.assign||function(a){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=r[s])}return a},$t.apply(this,arguments)}function _m(a,i){if(a==null)return{};var r={},s=Object.keys(a),l,h;for(h=0;h<s.length;h++)l=s[h],!(i.indexOf(l)>=0)&&(r[l]=a[l]);return r}function wm(a,i){if(a==null)return{};var r=_m(a,i),s,l;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(a);for(l=0;l<h.length;l++)s=h[l],!(i.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(a,s)&&(r[s]=a[s])}return r}var bm="1.15.2";function Bt(a){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(a)}var qt=Bt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_r=Bt(/Edge/i),Ju=Bt(/firefox/i),dr=Bt(/safari/i)&&!Bt(/chrome/i)&&!Bt(/android/i),ul=Bt(/iP(ad|od|hone)/i),ll=Bt(/chrome/i)&&Bt(/android/i),fl={capture:!1,passive:!1};function ee(a,i,r){a.addEventListener(i,r,!qt&&fl)}function J(a,i,r){a.removeEventListener(i,r,!qt&&fl)}function Ai(a,i){if(i){if(i[0]===">"&&(i=i.substring(1)),a)try{if(a.matches)return a.matches(i);if(a.msMatchesSelector)return a.msMatchesSelector(i);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(i)}catch{return!1}return!1}}function ym(a){return a.host&&a!==document&&a.host.nodeType?a.host:a.parentNode}function _t(a,i,r,s){if(a){r=r||document;do{if(i!=null&&(i[0]===">"?a.parentNode===r&&Ai(a,i):Ai(a,i))||s&&a===r)return a;if(a===r)break}while(a=ym(a))}return null}var ju=/\s+/g;function Ze(a,i,r){if(a&&i)if(a.classList)a.classList[r?"add":"remove"](i);else{var s=(" "+a.className+" ").replace(ju," ").replace(" "+i+" "," ");a.className=(s+(r?" "+i:"")).replace(ju," ")}}function B(a,i,r){var s=a&&a.style;if(s){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(r=a.currentStyle),i===void 0?r:r[i];!(i in s)&&i.indexOf("webkit")===-1&&(i="-webkit-"+i),s[i]=r+(typeof r=="string"?"":"px")}}function Nn(a,i){var r="";if(typeof a=="string")r=a;else do{var s=B(a,"transform");s&&s!=="none"&&(r=s+" "+r)}while(!i&&(a=a.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(r)}function cl(a,i,r){if(a){var s=a.getElementsByTagName(i),l=0,h=s.length;if(r)for(;l<h;l++)r(s[l],l);return s}return[]}function xt(){var a=document.scrollingElement;return a||document.documentElement}function we(a,i,r,s,l){if(!(!a.getBoundingClientRect&&a!==window)){var h,p,m,b,w,C,A;if(a!==window&&a.parentNode&&a!==xt()?(h=a.getBoundingClientRect(),p=h.top,m=h.left,b=h.bottom,w=h.right,C=h.height,A=h.width):(p=0,m=0,b=window.innerHeight,w=window.innerWidth,C=window.innerHeight,A=window.innerWidth),(i||r)&&a!==window&&(l=l||a.parentNode,!qt))do if(l&&l.getBoundingClientRect&&(B(l,"transform")!=="none"||r&&B(l,"position")!=="static")){var R=l.getBoundingClientRect();p-=R.top+parseInt(B(l,"border-top-width")),m-=R.left+parseInt(B(l,"border-left-width")),b=p+h.height,w=m+h.width;break}while(l=l.parentNode);if(s&&a!==window){var P=Nn(l||a),M=P&&P.a,G=P&&P.d;P&&(p/=G,m/=M,A/=M,C/=G,b=p+C,w=m+A)}return{top:p,left:m,bottom:b,right:w,width:A,height:C}}}function el(a,i,r){for(var s=Jt(a,!0),l=we(a)[i];s;){var h=we(s)[r],p=void 0;if(p=l>=h,!p)return s;if(s===xt())break;s=Jt(s,!1)}return!1}function $n(a,i,r,s){for(var l=0,h=0,p=a.children;h<p.length;){if(p[h].style.display!=="none"&&p[h]!==q.ghost&&(s||p[h]!==q.dragged)&&_t(p[h],r.draggable,a,!1)){if(l===i)return p[h];l++}h++}return null}function gs(a,i){for(var r=a.lastElementChild;r&&(r===q.ghost||B(r,"display")==="none"||i&&!Ai(r,i));)r=r.previousElementSibling;return r||null}function ut(a,i){var r=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==q.clone&&(!i||Ai(a,i))&&r++;return r}function tl(a){var i=0,r=0,s=xt();if(a)do{var l=Nn(a),h=l.a,p=l.d;i+=a.scrollLeft*h,r+=a.scrollTop*p}while(a!==s&&(a=a.parentNode));return[i,r]}function Sm(a,i){for(var r in a)if(a.hasOwnProperty(r)){for(var s in i)if(i.hasOwnProperty(s)&&i[s]===a[r][s])return Number(r)}return-1}function Jt(a,i){if(!a||!a.getBoundingClientRect)return xt();var r=a,s=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var l=B(r);if(r.clientWidth<r.scrollWidth&&(l.overflowX=="auto"||l.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(l.overflowY=="auto"||l.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return xt();if(s||i)return r;s=!0}}while(r=r.parentNode);return xt()}function Am(a,i){if(a&&i)for(var r in i)i.hasOwnProperty(r)&&(a[r]=i[r]);return a}function jo(a,i){return Math.round(a.top)===Math.round(i.top)&&Math.round(a.left)===Math.round(i.left)&&Math.round(a.height)===Math.round(i.height)&&Math.round(a.width)===Math.round(i.width)}var pr;function hl(a,i){return function(){if(!pr){var r=arguments,s=this;r.length===1?a.call(s,r[0]):a.apply(s,r),pr=setTimeout(function(){pr=void 0},i)}}}function Em(){clearTimeout(pr),pr=void 0}function dl(a,i,r){a.scrollLeft+=i,a.scrollTop+=r}function pl(a){var i=window.Polymer,r=window.jQuery||window.Zepto;return i&&i.dom?i.dom(a).cloneNode(!0):r?r(a).clone(!0)[0]:a.cloneNode(!0)}function gl(a,i,r){var s={};return Array.from(a.children).forEach(function(l){var h,p,m,b;if(!(!_t(l,i.draggable,a,!1)||l.animated||l===r)){var w=we(l);s.left=Math.min((h=s.left)!==null&&h!==void 0?h:1/0,w.left),s.top=Math.min((p=s.top)!==null&&p!==void 0?p:1/0,w.top),s.right=Math.max((m=s.right)!==null&&m!==void 0?m:-1/0,w.right),s.bottom=Math.max((b=s.bottom)!==null&&b!==void 0?b:-1/0,w.bottom)}}),s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}var Je="Sortable"+new Date().getTime();function xm(){var a=[],i;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var s=[].slice.call(this.el.children);s.forEach(function(l){if(!(B(l,"display")==="none"||l===q.ghost)){a.push({target:l,rect:we(l)});var h=Ct({},a[a.length-1].rect);if(l.thisAnimationDuration){var p=Nn(l,!0);p&&(h.top-=p.f,h.left-=p.e)}l.fromRect=h}})}},addAnimationState:function(s){a.push(s)},removeAnimationState:function(s){a.splice(Sm(a,{target:s}),1)},animateAll:function(s){var l=this;if(!this.options.animation){clearTimeout(i),typeof s=="function"&&s();return}var h=!1,p=0;a.forEach(function(m){var b=0,w=m.target,C=w.fromRect,A=we(w),R=w.prevFromRect,P=w.prevToRect,M=m.rect,G=Nn(w,!0);G&&(A.top-=G.f,A.left-=G.e),w.toRect=A,w.thisAnimationDuration&&jo(R,A)&&!jo(C,A)&&(M.top-A.top)/(M.left-A.left)===(C.top-A.top)/(C.left-A.left)&&(b=Tm(M,R,P,l.options)),jo(A,C)||(w.prevFromRect=C,w.prevToRect=A,b||(b=l.options.animation),l.animate(w,M,A,b)),b&&(h=!0,p=Math.max(p,b),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},b),w.thisAnimationDuration=b)}),clearTimeout(i),h?i=setTimeout(function(){typeof s=="function"&&s()},p):typeof s=="function"&&s(),a=[]},animate:function(s,l,h,p){if(p){B(s,"transition",""),B(s,"transform","");var m=Nn(this.el),b=m&&m.a,w=m&&m.d,C=(l.left-h.left)/(b||1),A=(l.top-h.top)/(w||1);s.animatingX=!!C,s.animatingY=!!A,B(s,"transform","translate3d("+C+"px,"+A+"px,0)"),this.forRepaintDummy=Cm(s),B(s,"transition","transform "+p+"ms"+(this.options.easing?" "+this.options.easing:"")),B(s,"transform","translate3d(0,0,0)"),typeof s.animated=="number"&&clearTimeout(s.animated),s.animated=setTimeout(function(){B(s,"transition",""),B(s,"transform",""),s.animated=!1,s.animatingX=!1,s.animatingY=!1},p)}}}}function Cm(a){return a.offsetWidth}function Tm(a,i,r,s){return Math.sqrt(Math.pow(i.top-a.top,2)+Math.pow(i.left-a.left,2))/Math.sqrt(Math.pow(i.top-r.top,2)+Math.pow(i.left-r.left,2))*s.animation}var Pn=[],es={initializeByDefault:!0},wr={mount:function(i){for(var r in es)es.hasOwnProperty(r)&&!(r in i)&&(i[r]=es[r]);Pn.forEach(function(s){if(s.pluginName===i.pluginName)throw"Sortable: Cannot mount plugin ".concat(i.pluginName," more than once")}),Pn.push(i)},pluginEvent:function(i,r,s){var l=this;this.eventCanceled=!1,s.cancel=function(){l.eventCanceled=!0};var h=i+"Global";Pn.forEach(function(p){r[p.pluginName]&&(r[p.pluginName][h]&&r[p.pluginName][h](Ct({sortable:r},s)),r.options[p.pluginName]&&r[p.pluginName][i]&&r[p.pluginName][i](Ct({sortable:r},s)))})},initializePlugins:function(i,r,s,l){Pn.forEach(function(m){var b=m.pluginName;if(!(!i.options[b]&&!m.initializeByDefault)){var w=new m(i,r,i.options);w.sortable=i,w.options=i.options,i[b]=w,$t(s,w.defaults)}});for(var h in i.options)if(i.options.hasOwnProperty(h)){var p=this.modifyOption(i,h,i.options[h]);typeof p<"u"&&(i.options[h]=p)}},getEventProperties:function(i,r){var s={};return Pn.forEach(function(l){typeof l.eventProperties=="function"&&$t(s,l.eventProperties.call(r[l.pluginName],i))}),s},modifyOption:function(i,r,s){var l;return Pn.forEach(function(h){i[h.pluginName]&&h.optionListeners&&typeof h.optionListeners[r]=="function"&&(l=h.optionListeners[r].call(i[h.pluginName],s))}),l}};function Im(a){var i=a.sortable,r=a.rootEl,s=a.name,l=a.targetEl,h=a.cloneEl,p=a.toEl,m=a.fromEl,b=a.oldIndex,w=a.newIndex,C=a.oldDraggableIndex,A=a.newDraggableIndex,R=a.originalEvent,P=a.putSortable,M=a.extraEventProperties;if(i=i||r&&r[Je],!!i){var G,ne=i.options,me="on"+s.charAt(0).toUpperCase()+s.substr(1);window.CustomEvent&&!qt&&!_r?G=new CustomEvent(s,{bubbles:!0,cancelable:!0}):(G=document.createEvent("Event"),G.initEvent(s,!0,!0)),G.to=p||r,G.from=m||r,G.item=l||r,G.clone=h,G.oldIndex=b,G.newIndex=w,G.oldDraggableIndex=C,G.newDraggableIndex=A,G.originalEvent=R,G.pullMode=P?P.lastPutMode:void 0;var ae=Ct(Ct({},M),wr.getEventProperties(s,i));for(var pe in ae)G[pe]=ae[pe];r&&r.dispatchEvent(G),ne[me]&&ne[me].call(i,G)}}var Dm=["evt"],ke=function(i,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=s.evt,h=wm(s,Dm);wr.pluginEvent.bind(q)(i,r,Ct({dragEl:I,parentEl:de,ghostEl:k,rootEl:le,nextEl:pn,lastDownEl:wi,cloneEl:ce,cloneHidden:Qt,dragStarted:lr,putSortable:De,activeSortable:q.active,originalEvent:l,oldIndex:Fn,oldDraggableIndex:gr,newIndex:Qe,newDraggableIndex:Zt,hideGhostForTarget:wl,unhideGhostForTarget:bl,cloneNowHidden:function(){Qt=!0},cloneNowShown:function(){Qt=!1},dispatchSortableEvent:function(m){We({sortable:r,name:m,originalEvent:l})}},h))};function We(a){Im(Ct({putSortable:De,cloneEl:ce,targetEl:I,rootEl:le,oldIndex:Fn,oldDraggableIndex:gr,newIndex:Qe,newDraggableIndex:Zt},a))}var I,de,k,le,pn,wi,ce,Qt,Fn,Qe,gr,Zt,hi,De,Mn=!1,Ei=!1,xi=[],hn,mt,ts,ns,nl,rl,lr,Ln,vr,mr=!1,di=!1,bi,Le,rs=[],ls=!1,Ci=[],Ii=typeof document<"u",pi=ul,il=_r||qt?"cssFloat":"float",Rm=Ii&&!ll&&!ul&&"draggable"in document.createElement("div"),vl=function(){if(Ii){if(qt)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}}(),ml=function(i,r){var s=B(i),l=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),h=$n(i,0,r),p=$n(i,1,r),m=h&&B(h),b=p&&B(p),w=m&&parseInt(m.marginLeft)+parseInt(m.marginRight)+we(h).width,C=b&&parseInt(b.marginLeft)+parseInt(b.marginRight)+we(p).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(h&&m.float&&m.float!=="none"){var A=m.float==="left"?"left":"right";return p&&(b.clear==="both"||b.clear===A)?"vertical":"horizontal"}return h&&(m.display==="block"||m.display==="flex"||m.display==="table"||m.display==="grid"||w>=l&&s[il]==="none"||p&&s[il]==="none"&&w+C>l)?"vertical":"horizontal"},Om=function(i,r,s){var l=s?i.left:i.top,h=s?i.right:i.bottom,p=s?i.width:i.height,m=s?r.left:r.top,b=s?r.right:r.bottom,w=s?r.width:r.height;return l===m||h===b||l+p/2===m+w/2},Pm=function(i,r){var s;return xi.some(function(l){var h=l[Je].options.emptyInsertThreshold;if(!(!h||gs(l))){var p=we(l),m=i>=p.left-h&&i<=p.right+h,b=r>=p.top-h&&r<=p.bottom+h;if(m&&b)return s=l}}),s},_l=function(i){function r(h,p){return function(m,b,w,C){var A=m.options.group.name&&b.options.group.name&&m.options.group.name===b.options.group.name;if(h==null&&(p||A))return!0;if(h==null||h===!1)return!1;if(p&&h==="clone")return h;if(typeof h=="function")return r(h(m,b,w,C),p)(m,b,w,C);var R=(p?m:b).options.group.name;return h===!0||typeof h=="string"&&h===R||h.join&&h.indexOf(R)>-1}}var s={},l=i.group;(!l||_i(l)!="object")&&(l={name:l}),s.name=l.name,s.checkPull=r(l.pull,!0),s.checkPut=r(l.put),s.revertClone=l.revertClone,i.group=s},wl=function(){!vl&&k&&B(k,"display","none")},bl=function(){!vl&&k&&B(k,"display","")};Ii&&!ll&&document.addEventListener("click",function(a){if(Ei)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),Ei=!1,!1},!0);var dn=function(i){if(I){i=i.touches?i.touches[0]:i;var r=Pm(i.clientX,i.clientY);if(r){var s={};for(var l in i)i.hasOwnProperty(l)&&(s[l]=i[l]);s.target=s.rootEl=r,s.preventDefault=void 0,s.stopPropagation=void 0,r[Je]._onDragOver(s)}}},Lm=function(i){I&&I.parentNode[Je]._isOutsideThisEl(i.target)};function q(a,i){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=i=$t({},i),a[Je]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ml(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(p,m){p.setData("Text",m.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:q.supportPointer!==!1&&"PointerEvent"in window&&!dr,emptyInsertThreshold:5};wr.initializePlugins(this,a,r);for(var s in r)!(s in i)&&(i[s]=r[s]);_l(i);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=i.forceFallback?!1:Rm,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?ee(a,"pointerdown",this._onTapStart):(ee(a,"mousedown",this._onTapStart),ee(a,"touchstart",this._onTapStart)),this.nativeDraggable&&(ee(a,"dragover",this),ee(a,"dragenter",this)),xi.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),$t(this,xm())}q.prototype={constructor:q,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(Ln=null)},_getDirection:function(i,r){return typeof this.options.direction=="function"?this.options.direction.call(this,i,r,I):this.options.direction},_onTapStart:function(i){if(i.cancelable){var r=this,s=this.el,l=this.options,h=l.preventOnFilter,p=i.type,m=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,b=(m||i).target,w=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||b,C=l.filter;if(Um(s),!I&&!(/mousedown|pointerdown/.test(p)&&i.button!==0||l.disabled)&&!w.isContentEditable&&!(!this.nativeDraggable&&dr&&b&&b.tagName.toUpperCase()==="SELECT")&&(b=_t(b,l.draggable,s,!1),!(b&&b.animated)&&wi!==b)){if(Fn=ut(b),gr=ut(b,l.draggable),typeof C=="function"){if(C.call(this,i,b,this)){We({sortable:r,rootEl:w,name:"filter",targetEl:b,toEl:s,fromEl:s}),ke("filter",r,{evt:i}),h&&i.cancelable&&i.preventDefault();return}}else if(C&&(C=C.split(",").some(function(A){if(A=_t(w,A.trim(),s,!1),A)return We({sortable:r,rootEl:A,name:"filter",targetEl:b,fromEl:s,toEl:s}),ke("filter",r,{evt:i}),!0}),C)){h&&i.cancelable&&i.preventDefault();return}l.handle&&!_t(w,l.handle,s,!1)||this._prepareDragStart(i,m,b)}}},_prepareDragStart:function(i,r,s){var l=this,h=l.el,p=l.options,m=h.ownerDocument,b;if(s&&!I&&s.parentNode===h){var w=we(s);if(le=h,I=s,de=I.parentNode,pn=I.nextSibling,wi=s,hi=p.group,q.dragged=I,hn={target:I,clientX:(r||i).clientX,clientY:(r||i).clientY},nl=hn.clientX-w.left,rl=hn.clientY-w.top,this._lastX=(r||i).clientX,this._lastY=(r||i).clientY,I.style["will-change"]="all",b=function(){if(ke("delayEnded",l,{evt:i}),q.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!Ju&&l.nativeDraggable&&(I.draggable=!0),l._triggerDragStart(i,r),We({sortable:l,name:"choose",originalEvent:i}),Ze(I,p.chosenClass,!0)},p.ignore.split(",").forEach(function(C){cl(I,C.trim(),is)}),ee(m,"dragover",dn),ee(m,"mousemove",dn),ee(m,"touchmove",dn),ee(m,"mouseup",l._onDrop),ee(m,"touchend",l._onDrop),ee(m,"touchcancel",l._onDrop),Ju&&this.nativeDraggable&&(this.options.touchStartThreshold=4,I.draggable=!0),ke("delayStart",this,{evt:i}),p.delay&&(!p.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(_r||qt))){if(q.eventCanceled){this._onDrop();return}ee(m,"mouseup",l._disableDelayedDrag),ee(m,"touchend",l._disableDelayedDrag),ee(m,"touchcancel",l._disableDelayedDrag),ee(m,"mousemove",l._delayedDragTouchMoveHandler),ee(m,"touchmove",l._delayedDragTouchMoveHandler),p.supportPointer&&ee(m,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(b,p.delay)}else b()}},_delayedDragTouchMoveHandler:function(i){var r=i.touches?i.touches[0]:i;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){I&&is(I),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;J(i,"mouseup",this._disableDelayedDrag),J(i,"touchend",this._disableDelayedDrag),J(i,"touchcancel",this._disableDelayedDrag),J(i,"mousemove",this._delayedDragTouchMoveHandler),J(i,"touchmove",this._delayedDragTouchMoveHandler),J(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,r){r=r||i.pointerType=="touch"&&i,!this.nativeDraggable||r?this.options.supportPointer?ee(document,"pointermove",this._onTouchMove):r?ee(document,"touchmove",this._onTouchMove):ee(document,"mousemove",this._onTouchMove):(ee(I,"dragend",this),ee(le,"dragstart",this._onDragStart));try{document.selection?yi(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(i,r){if(Mn=!1,le&&I){ke("dragStarted",this,{evt:r}),this.nativeDraggable&&ee(document,"dragover",Lm);var s=this.options;!i&&Ze(I,s.dragClass,!1),Ze(I,s.ghostClass,!0),q.active=this,i&&this._appendGhost(),We({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,wl();for(var i=document.elementFromPoint(mt.clientX,mt.clientY),r=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(mt.clientX,mt.clientY),i!==r);)r=i;if(I.parentNode[Je]._isOutsideThisEl(i),r)do{if(r[Je]){var s=void 0;if(s=r[Je]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:i,rootEl:r}),s&&!this.options.dragoverBubble)break}i=r}while(r=r.parentNode);bl()}},_onTouchMove:function(i){if(hn){var r=this.options,s=r.fallbackTolerance,l=r.fallbackOffset,h=i.touches?i.touches[0]:i,p=k&&Nn(k,!0),m=k&&p&&p.a,b=k&&p&&p.d,w=pi&&Le&&tl(Le),C=(h.clientX-hn.clientX+l.x)/(m||1)+(w?w[0]-rs[0]:0)/(m||1),A=(h.clientY-hn.clientY+l.y)/(b||1)+(w?w[1]-rs[1]:0)/(b||1);if(!q.active&&!Mn){if(s&&Math.max(Math.abs(h.clientX-this._lastX),Math.abs(h.clientY-this._lastY))<s)return;this._onDragStart(i,!0)}if(k){p?(p.e+=C-(ts||0),p.f+=A-(ns||0)):p={a:1,b:0,c:0,d:1,e:C,f:A};var R="matrix(".concat(p.a,",").concat(p.b,",").concat(p.c,",").concat(p.d,",").concat(p.e,",").concat(p.f,")");B(k,"webkitTransform",R),B(k,"mozTransform",R),B(k,"msTransform",R),B(k,"transform",R),ts=C,ns=A,mt=h}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!k){var i=this.options.fallbackOnBody?document.body:le,r=we(I,!0,pi,!0,i),s=this.options;if(pi){for(Le=i;B(Le,"position")==="static"&&B(Le,"transform")==="none"&&Le!==document;)Le=Le.parentNode;Le!==document.body&&Le!==document.documentElement?(Le===document&&(Le=xt()),r.top+=Le.scrollTop,r.left+=Le.scrollLeft):Le=xt(),rs=tl(Le)}k=I.cloneNode(!0),Ze(k,s.ghostClass,!1),Ze(k,s.fallbackClass,!0),Ze(k,s.dragClass,!0),B(k,"transition",""),B(k,"transform",""),B(k,"box-sizing","border-box"),B(k,"margin",0),B(k,"top",r.top),B(k,"left",r.left),B(k,"width",r.width),B(k,"height",r.height),B(k,"opacity","0.8"),B(k,"position",pi?"absolute":"fixed"),B(k,"zIndex","100000"),B(k,"pointerEvents","none"),q.ghost=k,i.appendChild(k),B(k,"transform-origin",nl/parseInt(k.style.width)*100+"% "+rl/parseInt(k.style.height)*100+"%")}},_onDragStart:function(i,r){var s=this,l=i.dataTransfer,h=s.options;if(ke("dragStart",this,{evt:i}),q.eventCanceled){this._onDrop();return}ke("setupClone",this),q.eventCanceled||(ce=pl(I),ce.removeAttribute("id"),ce.draggable=!1,ce.style["will-change"]="",this._hideClone(),Ze(ce,this.options.chosenClass,!1),q.clone=ce),s.cloneId=yi(function(){ke("clone",s),!q.eventCanceled&&(s.options.removeCloneOnHide||le.insertBefore(ce,I),s._hideClone(),We({sortable:s,name:"clone"}))}),!r&&Ze(I,h.dragClass,!0),r?(Ei=!0,s._loopId=setInterval(s._emulateDragOver,50)):(J(document,"mouseup",s._onDrop),J(document,"touchend",s._onDrop),J(document,"touchcancel",s._onDrop),l&&(l.effectAllowed="move",h.setData&&h.setData.call(s,l,I)),ee(document,"drop",s),B(I,"transform","translateZ(0)")),Mn=!0,s._dragStartId=yi(s._dragStarted.bind(s,r,i)),ee(document,"selectstart",s),lr=!0,dr&&B(document.body,"user-select","none")},_onDragOver:function(i){var r=this.el,s=i.target,l,h,p,m=this.options,b=m.group,w=q.active,C=hi===b,A=m.sort,R=De||w,P,M=this,G=!1;if(ls)return;function ne(je,Di){ke(je,M,Ct({evt:i,isOwner:C,axis:P?"vertical":"horizontal",revert:p,dragRect:l,targetRect:h,canSort:A,fromSortable:R,target:s,completed:ae,onMove:function(ze,Ri){return gi(le,r,I,l,ze,we(ze),i,Ri)},changed:pe},Di))}function me(){ne("dragOverAnimationCapture"),M.captureAnimationState(),M!==R&&R.captureAnimationState()}function ae(je){return ne("dragOverCompleted",{insertion:je}),je&&(C?w._hideClone():w._showClone(M),M!==R&&(Ze(I,De?De.options.ghostClass:w.options.ghostClass,!1),Ze(I,m.ghostClass,!0)),De!==M&&M!==q.active?De=M:M===q.active&&De&&(De=null),R===M&&(M._ignoreWhileAnimating=s),M.animateAll(function(){ne("dragOverAnimationComplete"),M._ignoreWhileAnimating=null}),M!==R&&(R.animateAll(),R._ignoreWhileAnimating=null)),(s===I&&!I.animated||s===r&&!s.animated)&&(Ln=null),!m.dragoverBubble&&!i.rootEl&&s!==document&&(I.parentNode[Je]._isOutsideThisEl(i.target),!je&&dn(i)),!m.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),G=!0}function pe(){Qe=ut(I),Zt=ut(I,m.draggable),We({sortable:M,name:"change",toEl:r,newIndex:Qe,newDraggableIndex:Zt,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),s=_t(s,m.draggable,r,!0),ne("dragOver"),q.eventCanceled)return G;if(I.contains(i.target)||s.animated&&s.animatingX&&s.animatingY||M._ignoreWhileAnimating===s)return ae(!1);if(Ei=!1,w&&!m.disabled&&(C?A||(p=de!==le):De===this||(this.lastPutMode=hi.checkPull(this,w,I,i))&&b.checkPut(this,w,I,i))){if(P=this._getDirection(i,s)==="vertical",l=we(I),ne("dragOverValid"),q.eventCanceled)return G;if(p)return de=le,me(),this._hideClone(),ne("revert"),q.eventCanceled||(pn?le.insertBefore(I,pn):le.appendChild(I)),ae(!0);var be=gs(r,m.draggable);if(!be||Wm(i,P,this)&&!be.animated){if(be===I)return ae(!1);if(be&&r===i.target&&(s=be),s&&(h=we(s)),gi(le,r,I,l,s,h,i,!!s)!==!1)return me(),be&&be.nextSibling?r.insertBefore(I,be.nextSibling):r.appendChild(I),de=r,pe(),ae(!0)}else if(be&&Nm(i,P,this)){var Ee=$n(r,0,m,!0);if(Ee===I)return ae(!1);if(s=Ee,h=we(s),gi(le,r,I,l,s,h,i,!1)!==!1)return me(),r.insertBefore(I,Ee),de=r,pe(),ae(!0)}else if(s.parentNode===r){h=we(s);var Re=0,xe,lt=I.parentNode!==r,Ce=!Om(I.animated&&I.toRect||l,s.animated&&s.toRect||h,P),jt=P?"top":"left",wt=el(s,"top","top")||el(I,"top","top"),en=wt?wt.scrollTop:void 0;Ln!==s&&(xe=h[jt],mr=!1,di=!Ce&&m.invertSwap||lt),Re=Bm(i,s,h,P,Ce?1:m.swapThreshold,m.invertedSwapThreshold==null?m.swapThreshold:m.invertedSwapThreshold,di,Ln===s);var ft;if(Re!==0){var bt=ut(I);do bt-=Re,ft=de.children[bt];while(ft&&(B(ft,"display")==="none"||ft===k))}if(Re===0||ft===s)return ae(!1);Ln=s,vr=Re;var tn=s.nextElementSibling,yt=!1;yt=Re===1;var Tt=gi(le,r,I,l,s,h,i,yt);if(Tt!==!1)return(Tt===1||Tt===-1)&&(yt=Tt===1),ls=!0,setTimeout(Fm,30),me(),yt&&!tn?r.appendChild(I):s.parentNode.insertBefore(I,yt?tn:s),wt&&dl(wt,0,en-wt.scrollTop),de=I.parentNode,xe!==void 0&&!di&&(bi=Math.abs(xe-we(s)[jt])),pe(),ae(!0)}if(r.contains(I))return ae(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){J(document,"mousemove",this._onTouchMove),J(document,"touchmove",this._onTouchMove),J(document,"pointermove",this._onTouchMove),J(document,"dragover",dn),J(document,"mousemove",dn),J(document,"touchmove",dn)},_offUpEvents:function(){var i=this.el.ownerDocument;J(i,"mouseup",this._onDrop),J(i,"touchend",this._onDrop),J(i,"pointerup",this._onDrop),J(i,"touchcancel",this._onDrop),J(document,"selectstart",this)},_onDrop:function(i){var r=this.el,s=this.options;if(Qe=ut(I),Zt=ut(I,s.draggable),ke("drop",this,{evt:i}),de=I&&I.parentNode,Qe=ut(I),Zt=ut(I,s.draggable),q.eventCanceled){this._nulling();return}Mn=!1,di=!1,mr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fs(this.cloneId),fs(this._dragStartId),this.nativeDraggable&&(J(document,"drop",this),J(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),dr&&B(document.body,"user-select",""),B(I,"transform",""),i&&(lr&&(i.cancelable&&i.preventDefault(),!s.dropBubble&&i.stopPropagation()),k&&k.parentNode&&k.parentNode.removeChild(k),(le===de||De&&De.lastPutMode!=="clone")&&ce&&ce.parentNode&&ce.parentNode.removeChild(ce),I&&(this.nativeDraggable&&J(I,"dragend",this),is(I),I.style["will-change"]="",lr&&!Mn&&Ze(I,De?De.options.ghostClass:this.options.ghostClass,!1),Ze(I,this.options.chosenClass,!1),We({sortable:this,name:"unchoose",toEl:de,newIndex:null,newDraggableIndex:null,originalEvent:i}),le!==de?(Qe>=0&&(We({rootEl:de,name:"add",toEl:de,fromEl:le,originalEvent:i}),We({sortable:this,name:"remove",toEl:de,originalEvent:i}),We({rootEl:de,name:"sort",toEl:de,fromEl:le,originalEvent:i}),We({sortable:this,name:"sort",toEl:de,originalEvent:i})),De&&De.save()):Qe!==Fn&&Qe>=0&&(We({sortable:this,name:"update",toEl:de,originalEvent:i}),We({sortable:this,name:"sort",toEl:de,originalEvent:i})),q.active&&((Qe==null||Qe===-1)&&(Qe=Fn,Zt=gr),We({sortable:this,name:"end",toEl:de,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){ke("nulling",this),le=I=de=k=pn=ce=wi=Qt=hn=mt=lr=Qe=Zt=Fn=gr=Ln=vr=De=hi=q.dragged=q.ghost=q.clone=q.active=null,Ci.forEach(function(i){i.checked=!0}),Ci.length=ts=ns=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":I&&(this._onDragOver(i),Mm(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],r,s=this.el.children,l=0,h=s.length,p=this.options;l<h;l++)r=s[l],_t(r,p.draggable,this.el,!1)&&i.push(r.getAttribute(p.dataIdAttr)||qm(r));return i},sort:function(i,r){var s={},l=this.el;this.toArray().forEach(function(h,p){var m=l.children[p];_t(m,this.options.draggable,l,!1)&&(s[h]=m)},this),r&&this.captureAnimationState(),i.forEach(function(h){s[h]&&(l.removeChild(s[h]),l.appendChild(s[h]))}),r&&this.animateAll()},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,r){return _t(i,r||this.options.draggable,this.el,!1)},option:function(i,r){var s=this.options;if(r===void 0)return s[i];var l=wr.modifyOption(this,i,r);typeof l<"u"?s[i]=l:s[i]=r,i==="group"&&_l(s)},destroy:function(){ke("destroy",this);var i=this.el;i[Je]=null,J(i,"mousedown",this._onTapStart),J(i,"touchstart",this._onTapStart),J(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(J(i,"dragover",this),J(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xi.splice(xi.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Qt){if(ke("hideClone",this),q.eventCanceled)return;B(ce,"display","none"),this.options.removeCloneOnHide&&ce.parentNode&&ce.parentNode.removeChild(ce),Qt=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Qt){if(ke("showClone",this),q.eventCanceled)return;I.parentNode==le&&!this.options.group.revertClone?le.insertBefore(ce,I):pn?le.insertBefore(ce,pn):le.appendChild(ce),this.options.group.revertClone&&this.animate(I,ce),B(ce,"display",""),Qt=!1}}};function Mm(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function gi(a,i,r,s,l,h,p,m){var b,w=a[Je],C=w.options.onMove,A;return window.CustomEvent&&!qt&&!_r?b=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent("move",!0,!0)),b.to=i,b.from=a,b.dragged=r,b.draggedRect=s,b.related=l||i,b.relatedRect=h||we(i),b.willInsertAfter=m,b.originalEvent=p,a.dispatchEvent(b),C&&(A=C.call(w,b,p)),A}function is(a){a.draggable=!1}function Fm(){ls=!1}function Nm(a,i,r){var s=we($n(r.el,0,r.options,!0)),l=gl(r.el,r.options,k),h=10;return i?a.clientX<l.left-h||a.clientY<s.top&&a.clientX<s.right:a.clientY<l.top-h||a.clientY<s.bottom&&a.clientX<s.left}function Wm(a,i,r){var s=we(gs(r.el,r.options.draggable)),l=gl(r.el,r.options,k),h=10;return i?a.clientX>l.right+h||a.clientY>s.bottom&&a.clientX>s.left:a.clientY>l.bottom+h||a.clientX>s.right&&a.clientY>s.top}function Bm(a,i,r,s,l,h,p,m){var b=s?a.clientY:a.clientX,w=s?r.height:r.width,C=s?r.top:r.left,A=s?r.bottom:r.right,R=!1;if(!p){if(m&&bi<w*l){if(!mr&&(vr===1?b>C+w*h/2:b<A-w*h/2)&&(mr=!0),mr)R=!0;else if(vr===1?b<C+bi:b>A-bi)return-vr}else if(b>C+w*(1-l)/2&&b<A-w*(1-l)/2)return $m(i)}return R=R||p,R&&(b<C+w*h/2||b>A-w*h/2)?b>C+w/2?1:-1:0}function $m(a){return ut(I)<ut(a)?1:-1}function qm(a){for(var i=a.tagName+a.className+a.src+a.href+a.textContent,r=i.length,s=0;r--;)s+=i.charCodeAt(r);return s.toString(36)}function Um(a){Ci.length=0;for(var i=a.getElementsByTagName("input"),r=i.length;r--;){var s=i[r];s.checked&&Ci.push(s)}}function yi(a){return setTimeout(a,0)}function fs(a){return clearTimeout(a)}Ii&&ee(document,"touchmove",function(a){(q.active||Mn)&&a.cancelable&&a.preventDefault()});q.utils={on:ee,off:J,css:B,find:cl,is:function(i,r){return!!_t(i,r,i,!1)},extend:Am,throttle:hl,closest:_t,toggleClass:Ze,clone:pl,index:ut,nextTick:yi,cancelNextTick:fs,detectDirection:ml,getChild:$n};q.get=function(a){return a[Je]};q.mount=function(){for(var a=arguments.length,i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];i[0].constructor===Array&&(i=i[0]),i.forEach(function(s){if(!s.prototype||!s.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(s));s.utils&&(q.utils=Ct(Ct({},q.utils),s.utils)),wr.mount(s)})};q.create=function(a,i){return new q(a,i)};q.version=bm;var _e=[],fr,cs,hs=!1,os,ss,Ti,cr;function km(){function a(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return a.prototype={dragStarted:function(r){var s=r.originalEvent;this.sortable.nativeDraggable?ee(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ee(document,"pointermove",this._handleFallbackAutoScroll):s.touches?ee(document,"touchmove",this._handleFallbackAutoScroll):ee(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var s=r.originalEvent;!this.options.dragOverBubble&&!s.rootEl&&this._handleAutoScroll(s)},drop:function(){this.sortable.nativeDraggable?J(document,"dragover",this._handleAutoScroll):(J(document,"pointermove",this._handleFallbackAutoScroll),J(document,"touchmove",this._handleFallbackAutoScroll),J(document,"mousemove",this._handleFallbackAutoScroll)),ol(),Si(),Em()},nulling:function(){Ti=cs=fr=hs=cr=os=ss=null,_e.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,s){var l=this,h=(r.touches?r.touches[0]:r).clientX,p=(r.touches?r.touches[0]:r).clientY,m=document.elementFromPoint(h,p);if(Ti=r,s||this.options.forceAutoScrollFallback||_r||qt||dr){as(r,this.options,m,s);var b=Jt(m,!0);hs&&(!cr||h!==os||p!==ss)&&(cr&&ol(),cr=setInterval(function(){var w=Jt(document.elementFromPoint(h,p),!0);w!==b&&(b=w,Si()),as(r,l.options,w,s)},10),os=h,ss=p)}else{if(!this.options.bubbleScroll||Jt(m,!0)===xt()){Si();return}as(r,this.options,Jt(m,!1),!1)}}},$t(a,{pluginName:"scroll",initializeByDefault:!0})}function Si(){_e.forEach(function(a){clearInterval(a.pid)}),_e=[]}function ol(){clearInterval(cr)}var as=hl(function(a,i,r,s){if(i.scroll){var l=(a.touches?a.touches[0]:a).clientX,h=(a.touches?a.touches[0]:a).clientY,p=i.scrollSensitivity,m=i.scrollSpeed,b=xt(),w=!1,C;cs!==r&&(cs=r,Si(),fr=i.scroll,C=i.scrollFn,fr===!0&&(fr=Jt(r,!0)));var A=0,R=fr;do{var P=R,M=we(P),G=M.top,ne=M.bottom,me=M.left,ae=M.right,pe=M.width,be=M.height,Ee=void 0,Re=void 0,xe=P.scrollWidth,lt=P.scrollHeight,Ce=B(P),jt=P.scrollLeft,wt=P.scrollTop;P===b?(Ee=pe<xe&&(Ce.overflowX==="auto"||Ce.overflowX==="scroll"||Ce.overflowX==="visible"),Re=be<lt&&(Ce.overflowY==="auto"||Ce.overflowY==="scroll"||Ce.overflowY==="visible")):(Ee=pe<xe&&(Ce.overflowX==="auto"||Ce.overflowX==="scroll"),Re=be<lt&&(Ce.overflowY==="auto"||Ce.overflowY==="scroll"));var en=Ee&&(Math.abs(ae-l)<=p&&jt+pe<xe)-(Math.abs(me-l)<=p&&!!jt),ft=Re&&(Math.abs(ne-h)<=p&&wt+be<lt)-(Math.abs(G-h)<=p&&!!wt);if(!_e[A])for(var bt=0;bt<=A;bt++)_e[bt]||(_e[bt]={});(_e[A].vx!=en||_e[A].vy!=ft||_e[A].el!==P)&&(_e[A].el=P,_e[A].vx=en,_e[A].vy=ft,clearInterval(_e[A].pid),(en!=0||ft!=0)&&(w=!0,_e[A].pid=setInterval((function(){s&&this.layer===0&&q.active._onTouchMove(Ti);var tn=_e[this.layer].vy?_e[this.layer].vy*m:0,yt=_e[this.layer].vx?_e[this.layer].vx*m:0;typeof C=="function"&&C.call(q.dragged.parentNode[Je],yt,tn,a,Ti,_e[this.layer].el)!=="continue"||dl(_e[this.layer].el,yt,tn)}).bind({layer:A}),24))),A++}while(i.bubbleScroll&&R!==b&&(R=Jt(R,!1)));hs=w}},30),yl=function(i){var r=i.originalEvent,s=i.putSortable,l=i.dragEl,h=i.activeSortable,p=i.dispatchSortableEvent,m=i.hideGhostForTarget,b=i.unhideGhostForTarget;if(r){var w=s||h;m();var C=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,A=document.elementFromPoint(C.clientX,C.clientY);b(),w&&!w.el.contains(A)&&(p("spill"),this.onSpill({dragEl:l,putSortable:s}))}};function vs(){}vs.prototype={startIndex:null,dragStart:function(i){var r=i.oldDraggableIndex;this.startIndex=r},onSpill:function(i){var r=i.dragEl,s=i.putSortable;this.sortable.captureAnimationState(),s&&s.captureAnimationState();var l=$n(this.sortable.el,this.startIndex,this.options);l?this.sortable.el.insertBefore(r,l):this.sortable.el.appendChild(r),this.sortable.animateAll(),s&&s.animateAll()},drop:yl};$t(vs,{pluginName:"revertOnSpill"});function ms(){}ms.prototype={onSpill:function(i){var r=i.dragEl,s=i.putSortable,l=s||this.sortable;l.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),l.animateAll()},drop:yl};$t(ms,{pluginName:"removeOnSpill"});q.mount(new km);q.mount(ms,vs);var zm=q;function Hm(a){a.directive("sort",(i,{value:r,modifiers:s,expression:l},{effect:h,evaluate:p,evaluateLater:m,cleanup:b})=>{if(r==="config"||r==="handle"||r==="group")return;if(r==="key"||r==="item"){if([void 0,null,""].includes(l))return;i._x_sort_key=p(l);return}let w={hideGhost:!s.includes("ghost"),useHandles:!!i.querySelector("[x-sort\\:handle]"),group:Km(i,s)},C=Gm(l,m),A=Vm(i,s,p),R=Ym(i,A,w,(P,M)=>{C(P,M)});b(()=>R.destroy())})}function Gm(a,i){if([void 0,null,""].includes(a))return()=>{};let r=i(a);return(s,l)=>{Alpine.dontAutoEvaluateFunctions(()=>{r(h=>{typeof h=="function"&&h(s,l)},{scope:{$key:s,$item:s,$position:l}})})}}function Vm(a,i,r){return a.hasAttribute("x-sort:config")?r(a.getAttribute("x-sort:config")):{}}function Ym(a,i,r,s){let l,h={animation:150,handle:r.useHandles?"[x-sort\\:handle]":null,group:r.group,filter(p){return a.querySelector("[x-sort\\:item]")?!p.target.closest("[x-sort\\:item]"):!1},onSort(p){if(p.from!==p.to&&p.to!==p.target)return;let m=p.item._x_sort_key,b=p.newIndex;(m!==void 0||m!==null)&&s(m,b)},onStart(){document.body.classList.add("sorting"),l=document.querySelector(".sortable-ghost"),r.hideGhost&&l&&(l.style.opacity="0")},onEnd(){document.body.classList.remove("sorting"),r.hideGhost&&l&&(l.style.opacity="1"),l=void 0,Xm(a)}};return new zm(a,{...h,...i})}function Xm(a){let i=a.firstChild;for(;i.nextSibling;){if(i.textContent.trim()==="[if ENDBLOCK]><![endif]"){a.append(i);break}i=i.nextSibling}}function Km(a,i){return a.hasAttribute("x-sort:group")?a.getAttribute("x-sort:group"):i.indexOf("group")!==-1?i[i.indexOf("group")+1]:null}var Zm=Hm;/*! Bundled license information: sortablejs/modular/sortable.esm.js: (**! * Sortable 1.15.2 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT *) */function Qm(a){a.directive("intersect",a.skipDuringClone((i,{value:r,expression:s,modifiers:l},{evaluateLater:h,cleanup:p})=>{let m=h(s),b={rootMargin:e0(l),threshold:Jm(l)},w=new IntersectionObserver(C=>{C.forEach(A=>{A.isIntersecting!==(r==="leave")&&(m(),l.includes("once")&&w.disconnect())})},b);w.observe(i),p(()=>{w.disconnect()})}))}function Jm(a){if(a.includes("full"))return .99;if(a.includes("half"))return .5;if(!a.includes("threshold"))return 0;let i=a[a.indexOf("threshold")+1];return i==="100"?1:i==="0"?0:+`.${i}`}function jm(a){let i=a.match(/^(-?[0-9]+)(px|%)?$/);return i?i[1]+(i[2]||"px"):void 0}function e0(a){const i="margin",r="0px 0px 0px 0px",s=a.indexOf(i);if(s===-1)return r;let l=[];for(let h=1;h<5;h++)l.push(jm(a[s+h]||""));return l=l.filter(h=>h!==void 0),l.length?l.join(" ").trim():r}var t0=Qm;function n0(a={show:!1,focusable:!1}){return{show:a.show,focusable:a.focusable,closeModal(){this.show=!1},openModal(){this.show=!0},focusables(){return[...this.$el.querySelectorAll("a, button, input:not([type='hidden']), textarea, select, details, [tabindex]:not([tabindex='-1'])")].filter(r=>!r.hasAttribute("disabled"))},firstFocusable(){return this.focusables()[0]},lastFocusable(){return this.focusables().slice(-1)[0]},nextFocusable(){return this.focusables()[this.nextFocusableIndex()]||this.firstFocusable()},prevFocusable(){return this.focusables()[this.prevFocusableIndex()]||this.lastFocusable()},nextFocusableIndex(){return(this.focusables().indexOf(document.activeElement)+1)%(this.focusables().length+1)},prevFocusableIndex(){return Math.max(0,this.focusables().indexOf(document.activeElement))-1},init(){this.$watch("show",i=>{i?(document.body.classList.add("overflow-y-hidden"),this.focusable!==!1&&setTimeout(()=>this.firstFocusable().focus(),100)):document.body.classList.remove("overflow-y-hidden")})}}}function r0(a={}){return{isShared:a.isShared??!1,limits:a.limits??{},init(){},pushToAiEngines(i){this.aiEngines.push(i)}}}class i0{constructor(){this.playbackNode=null}async init(i){this.audioContext=new AudioContext({sampleRate:i}),await this.audioContext.audioWorklet.addModule("/themes/default/assets/js/audio/playback-worklet.js"),this.playbackNode=new AudioWorkletNode(this.audioContext,"playback-worklet"),this.playbackNode.connect(this.audioContext.destination)}play(i){this.playbackNode&&this.playbackNode.port.postMessage(i)}clear(){this.playbackNode&&this.playbackNode.port.postMessage(null)}}function Wn(a,i,r,s){function l(h){return h instanceof r?h:new r(function(p){p(h)})}return new(r||(r=Promise))(function(h,p){function m(C){try{w(s.next(C))}catch(A){p(A)}}function b(C){try{w(s.throw(C))}catch(A){p(A)}}function w(C){C.done?h(C.value):l(C.value).then(m,b)}w((s=s.apply(a,[])).next())})}function gn(a,i){var r={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,l,h,p=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return p.next=m(0),p.throw=m(1),p.return=m(2),typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function m(w){return function(C){return b([w,C])}}function b(w){if(s)throw new TypeError("Generator is already executing.");for(;p&&(p=0,w[0]&&(r=0)),r;)try{if(s=1,l&&(h=w[0]&2?l.return:w[0]?l.throw||((h=l.return)&&h.call(l),0):l.next)&&!(h=h.call(l,w[1])).done)return h;switch(l=0,h&&(w=[w[0]&2,h.value]),w[0]){case 0:case 1:h=w;break;case 4:return r.label++,{value:w[1],done:!1};case 5:r.label++,l=w[1],w=[0];continue;case 7:w=r.ops.pop(),r.trys.pop();continue;default:if(h=r.trys,!(h=h.length>0&&h[h.length-1])&&(w[0]===6||w[0]===2)){r=0;continue}if(w[0]===3&&(!h||w[1]>h[0]&&w[1]<h[3])){r.label=w[1];break}if(w[0]===6&&r.label<h[1]){r.label=h[1],h=w;break}if(h&&r.label<h[2]){r.label=h[2],r.ops.push(w);break}h[2]&&r.ops.pop(),r.trys.pop();continue}w=i.call(a,r)}catch(C){w=[6,C],l=0}finally{s=h=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}}function sl(a){var i=typeof Symbol=="function"&&Symbol.iterator,r=i&&a[i],s=0;if(r)return r.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&s>=a.length&&(a=void 0),{value:a&&a[s++],done:!a}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function us(a,i){var r=typeof Symbol=="function"&&a[Symbol.iterator];if(!r)return a;var s=r.call(a),l,h=[],p;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)h.push(l.value)}catch(m){p={error:m}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return h}function Bn(a){return this instanceof Bn?(this.v=a,this):new Bn(a)}function o0(a,i,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(a,i||[]),l,h=[];return l=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),m("next"),m("throw"),m("return",p),l[Symbol.asyncIterator]=function(){return this},l;function p(P){return function(M){return Promise.resolve(M).then(P,A)}}function m(P,M){s[P]&&(l[P]=function(G){return new Promise(function(ne,me){h.push([P,G,ne,me])>1||b(P,G)})},M&&(l[P]=M(l[P])))}function b(P,M){try{w(s[P](M))}catch(G){R(h[0][3],G)}}function w(P){P.value instanceof Bn?Promise.resolve(P.value.v).then(C,A):R(h[0][2],P)}function C(P){b("next",P)}function A(P){b("throw",P)}function R(P,M){P(M),h.shift(),h.length&&b(h[0][0],h[0][1])}}function s0(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a[Symbol.asyncIterator],r;return i?i.call(a):(a=typeof sl=="function"?sl(a):a[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(h){r[h]=a[h]&&function(p){return new Promise(function(m,b){p=a[h](p),l(m,b,p.done,p.value)})}}function l(h,p,m,b){Promise.resolve(b).then(function(w){h({value:w,done:m})},p)}}var a0=function(a){return typeof a=="object"&&a!==null&&"type"in a},u0=function(a){return a0(a)&&["error","message","conversation.item.input_audio_transcription.delta","session.created","session.updated","input_audio_buffer.committed","input_audio_buffer.cleared","input_audio_buffer.speech_started","input_audio_buffer.speech_stopped","conversation.item.created","conversation.item.truncated","conversation.item.deleted","conversation.item.input_audio_transcription.completed","conversation.item.input_audio_transcription.failed","response.created","response.done","response.output_item.added","response.output_item.done","response.content_part.added","response.content_part.done","response.text.delta","response.text.done","response.audio_transcript.delta","response.audio_transcript.done","response.audio.delta","response.audio.done","response.function_call_arguments.delta","response.function_call_arguments.done","rate_limits.updated"].includes(a.type)},l0=WebSocket,f0=function(a,i){return a.readyState!==WebSocket.OPEN?Promise.reject(new Error("Socket is not open")):(a.send(i),Promise.resolve())},c0=function(a){return{success:!0,message:a}},h0=function(a){return{success:!1,error:a}},d0=function(a){return a.success},p0=function(){function a(i,r){var s=this;this.closedPromise=void 0,this.messageQueue=[],this.receiverQueue=[],this.done=!1,this.validate=r.validate,this.serialize=r.serialize,this.connectedPromise=new Promise(function(l,h){return Wn(s,void 0,void 0,function(){var p,m,b,w,C=this;return gn(this,function(A){switch(A.label){case 0:return i.policy!==void 0?[3,1]:(w=i,[3,3]);case 1:return[4,i.policy(i)];case 2:w=A.sent(),A.label=3;case 3:return p=w,m=p.uri,b=p.protocols,this.socket=new l0(m.toString(),b),this.socket.onopen=function(){C.socket.onmessage=C.getMessageHandler(),C.closedPromise=new Promise(function(R){C.socket.onclose=C.getClosedHandler(R)}),C.socket.onerror=C.handleError,l()},this.socket.onerror=function(R){C.error=R.error,h(R)},[2]}})})})}return a.prototype.handleError=function(i){for(this.error=i.error;this.receiverQueue.length>0;){var r=us(this.receiverQueue.shift(),2);r[0];var s=r[1];s(i.error)}},a.prototype.getClosedHandler=function(i){var r=this;return function(s){for(r.done=!0;r.receiverQueue.length>0;){var l=us(r.receiverQueue.shift(),2),h=l[0],p=l[1];r.error?p(r.error):h({value:void 0,done:!0})}i()}},a.prototype.getMessageHandler=function(){var i=this;return function(r){var s=i.validate(r);if(d0(s)){var l=s.message;if(i.receiverQueue.length>0){var h=us(i.receiverQueue.shift(),2),p=h[0];h[1],p({value:l,done:!1})}else i.messageQueue.push(l)}else i.error=s.error,i.socket.close(1e3,"Unexpected message received")}},a.prototype[Symbol.asyncIterator]=function(){var i=this;return{next:function(){if(i.error)return Promise.reject(i.error);if(i.done)return Promise.resolve({value:void 0,done:!0});if(i.messageQueue.length>0){var r=i.messageQueue.shift();return Promise.resolve({value:r,done:!1})}else return new Promise(function(s,l){i.receiverQueue.push([s,l])})}}},a.prototype.send=function(i){return Wn(this,void 0,void 0,function(){var r;return gn(this,function(s){switch(s.label){case 0:return[4,this.connectedPromise];case 1:if(s.sent(),this.error)throw this.error;return r=this.serialize(i),[2,f0(this.socket,r)]}})})},a.prototype.close=function(){return Wn(this,void 0,void 0,function(){return gn(this,function(i){switch(i.label){case 0:return[4,this.connectedPromise];case 1:return i.sent(),this.done?[2]:(this.socket.close(),[4,this.closedPromise]);case 2:return i.sent(),[2]}})})},a}();function ds(a){return typeof a=="object"&&a!==null&&"key"in a&&typeof a.key=="string"}function g0(a){return typeof a=="object"&&a!==null&&"getToken"in a&&typeof a.getToken=="function"}var v0=function(a){return ds(a)||g0(a)},m0=function(a){return typeof a=="object"&&a!==null&&"model"in a&&typeof a.model=="string"},_0=function(a){return typeof a=="object"&&a!==null&&"deployment"in a&&typeof a.deployment=="string"},w0=function(){function a(i,r,s){var l=this,h=function(){if(ds(i)&&m0(r))return l.openAISettings(i,r);if(v0(r)&&_0(s))return l.azureOpenAISettings(i,r,s);throw new Error("Invalid combination of arguments to initialize the Realtime client")}();this.client=this.getWebsocket(h)}return a.prototype.azureOpenAISettings=function(i,r,s){var l=this,h=["https://cognitiveservices.azure.com/.default"];return this.requestId=crypto.randomUUID(),i.searchParams.set("api-version","2024-10-01-preview"),i.searchParams.set("x-ms-client-request-id",this.requestId),i.searchParams.set("deployment",s.deployment),i.pathname="openai/realtime",{uri:i,policy:function(p){return Wn(l,void 0,void 0,function(){var m;return gn(this,function(b){switch(b.label){case 0:return ds(r)?(p.uri.searchParams.set("api-key",r.key),[3,3]):[3,1];case 1:return[4,r.getToken(h)];case 2:m=b.sent(),p.uri.searchParams.set("Authorization","Bearer ".concat(m.token)),b.label=3;case 3:return[2,p]}})})}}},a.prototype.openAISettings=function(i,r){var s=new URL("wss://api.openai.com/v1/realtime");return s.searchParams.set("model",r.model),{uri:s,protocols:["realtime","openai-insecure-api-key.".concat(i.key),"openai-beta.realtime-v1"]}},a.prototype.getWebsocket=function(i){var r={validate:function(s){s.data;try{var l=JSON.parse(s.data);if(u0(l))return c0(l)}catch{return h0(new Error("Invalid JSON message"))}},serialize:function(s){return JSON.stringify(s)}};return new p0(i,r)},a.prototype.messages=function(){return o0(this,arguments,function(){var r,s,l,h,p,m,b,w,C;return gn(this,function(A){switch(A.label){case 0:A.trys.push([0,7,8,13]),r=!0,s=s0(this.client),A.label=1;case 1:return[4,Bn(s.next())];case 2:return l=A.sent(),m=l.done,!m?(C=l.value,r=!1,h=C,[4,Bn(h)]):[3,6];case 3:return[4,A.sent()];case 4:A.sent(),A.label=5;case 5:return r=!0,[3,1];case 6:return[3,13];case 7:return p=A.sent(),b={error:p},[3,13];case 8:return A.trys.push([8,,11,12]),!r&&!m&&(w=s.return)?[4,Bn(w.call(s))]:[3,10];case 9:A.sent(),A.label=10;case 10:return[3,12];case 11:if(b)throw b.error;return[7];case 12:return[7];case 13:return[2]}})})},a.prototype.send=function(i){return Wn(this,void 0,void 0,function(){return gn(this,function(r){switch(r.label){case 0:return[4,this.client.send(i)];case 1:return r.sent(),[2]}})})},a.prototype.close=function(){return Wn(this,void 0,void 0,function(){return gn(this,function(i){switch(i.label){case 0:return[4,this.client.close()];case 1:return i.sent(),[2]}})})},a}();H.store("realtimeChatStatus",{active:!1,conversationStarted:!1,setActive(a){this.active=a,this.onActiveChange()},setConversationStarted(a){this.conversationStarted=a,this.onConversationStartedChange()},onActiveChange(){var a,i;document.querySelectorAll(".lqd-realtime-chat-button").forEach(r=>r.classList.toggle("active",this.active)),(i=(a=document.querySelector(".lqd-audio-vis-wrap"))==null?void 0:a.classList)==null||i.toggle("active",this.active)},onConversationStartedChange(){const a=document.querySelector(".chats-wrap");a.classList.toggle("conversation-started",this.conversationStarted),a.classList.toggle("conversation-not-started",!this.conversationStarted),document.querySelectorAll(".lqd-realtime-chat-button").forEach(i=>{i.classList.toggle("conversation-started",this.conversationStarted),i.classList.toggle("conversation-not-started",!this.conversationStarted)})}});const b0=(a,i,r)=>({apiKey:"",recordingActive:!1,buffer:new Uint8Array,wsConnection:null,audioRecorder:null,audioPlayer:null,activeVisulaizer:"idle",audioVisWrap:null,audioVisBars:null,audioVisDotWrap:null,audioVisLoader:null,conversationArea:document.querySelector(".conversation-area"),chatsContainer:document.querySelector(".chats-container"),userBubbleTemplate:document.querySelector("#chat_user_bubble"),aiBubbleTemplate:document.querySelector("#chat_ai_bubble"),lastAiBubble:null,lastUserBubble:null,lastUserQuestion:"",lastAiResponse:"",lastResponseSaved:!1,init(){var s,l,h;this.audioVisWrap=document.querySelector(".lqd-audio-vis-wrap"),this.audioVisBars=(s=this.audioVisWrap)==null?void 0:s.querySelectorAll(".lqd-audio-vis-bar"),this.audioVisDotWrap=(l=this.audioVisWrap)==null?void 0:l.querySelector(".lqd-audio-vis-dot-wrap"),this.audioVisLoader=(h=this.audioVisWrap)==null?void 0:h.querySelector(".lqd-audio-vis-loader"),this.processAudioRecordingBuffer=this.processAudioRecordingBuffer.bind(this)},async start(){if(this.checkBalance(!0).then(s=>{s.shouldStop&&(toastr.error(s.errorMsg),this.stop())}),!H.store("realtimeChatStatus").isActive){H.store("realtimeChatStatus").setActive(!0),this.switchVisualizers("waiting"),this.wsConnection=new w0({key:atob(a)+atob(i)+atob(r)},{model:"gpt-4o-realtime-preview-2024-12-17"});try{await this.wsConnection.send(this.createConfigMessage())}catch(s){this.stop(),console.error("Error sending initial config message:",s),this.appendToChatBubble("ai","[Connection error]: Unable to send initial config message. Please check your endpoint and authentication details.");return}await Promise.all([this.startRecorder(),this.startPlayer()]).then(()=>{this.handleRealtimeMessages(),this.startBarsVisualizer(),this.startDotVisualizer(),this.switchVisualizers("idle")}).catch(s=>{this.stop(),console.error("Error starting recorder and player:",s),this.appendToChatBubble("ai","[Error]: Unable to start audio recorder and player. Please check your microphone permissions and refresh the page.")})}},stop(){!this.lastResponseSaved&&"saveResponseAsync"in window&&this.lastUserQuestion.trim()!==""&&this.lastAiResponse.trim()!==""&&saveResponseAsync(this.lastUserQuestion.trim(),this.lastAiResponse.trim(),document.querySelector("#chat_id").value,"","","","","gpt-4o-realtime-preview-2024-12-17"),this.resetPlayers(),this.wsConnection&&this.wsConnection.close(),this.switchVisualizers(""),H.store("realtimeChatStatus").setActive(!1)},async startPlayer(){try{this.audioPlayer=new i0,await this.audioPlayer.init(24e3)}catch(s){console.error("Error starting audio player:",s)}},async startRecorder(){try{this.audioRecorder=new pm(this.processAudioRecordingBuffer);const s=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1});await this.audioRecorder.start(s),this.recordingActive=!0}catch(s){console.error("Error starting audio recorder:",s)}},createConfigMessage(){let s={type:"session.update",session:{turn_detection:{type:"server_vad",silence_duration_ms:500},input_audio_transcription:{model:"whisper-1"}}};const l=this.getSystemMessage(),h=this.getTemperature(),p=this.getVoice();return l&&(s.session.instructions=l),isNaN(h)||(s.session.temperature=h),p&&(s.session.voice=p),s},async handleRealtimeMessages(){for await(const s of this.wsConnection.messages())switch(""+s.type,s.type){case"session.created":this.switchVisualizers("idle");break;case"response.content_part.added":this.checkBalance(!0).then(l=>{l.shouldStop&&(toastr.error(l.errorMsg),this.stop())}),this.lastAiResponse="",H.store("realtimeChatStatus").setConversationStarted(!0),this.createChatBubble("ai");break;case"response.audio_transcript.delta":this.lastAiResponse+=s.delta,this.appendToChatBubble("ai",s.delta);break;case"response.audio.delta":{this.switchVisualizers("playing");const l=atob(s.delta),h=Uint8Array.from(l,m=>m.charCodeAt(0)),p=new Int16Array(h.buffer);this.audioPlayer.play(p);break}case"input_audio_buffer.speech_started":{this.createChatBubble("user"),this.switchVisualizers("recording"),this.audioPlayer.clear(),this.lastResponseSaved=!1,setTimeout(()=>{this.lastUserQuestion=""},0);break}case"conversation.item.input_audio_transcription.completed":this.lastUserQuestion+=s.transcript,this.appendToChatBubble("user",s.transcript);break;case"response.output_item.done":break;case"conversation.item.truncated":this.appendToChatBubble("ai","...");break;case"conversation.item.deleted":break;case"response.done":"saveResponseAsync"in window&&(saveResponseAsync(this.lastUserQuestion.trim(),this.lastAiResponse.trim(),document.querySelector("#chat_id").value,"","","","","gpt-4o-realtime-preview-2024-12-17"),this.lastResponseSaved=!0),"formatString"in window&&this.lastAiBubble&&(this.lastAiBubble.innerHTML=formatString(this.lastAiResponse));break;default:JSON.stringify(s,null,2);break}this.resetPlayers()},combineArray(s){const l=new Uint8Array(this.buffer.length+s.length);l.set(this.buffer),l.set(s,this.buffer.length),this.buffer=l},processAudioRecordingBuffer(s){const l=new Uint8Array(s);if(this.combineArray(l),this.buffer.length>=4800){const h=new Uint8Array(this.buffer.slice(0,4800));this.buffer=new Uint8Array(this.buffer.slice(4800));const p=String.fromCharCode(...h),m=btoa(p);this.recordingActive&&this.wsConnection.send({type:"input_audio_buffer.append",audio:m})}},async resetPlayers(){var s,l;this.recordingActive=!1,(s=this.audioRecorder)==null||s.stop(),(l=this.audioPlayer)==null||l.clear()},getSystemMessage(){return""},getTemperature(){return parseFloat(.8)},getVoice(){return"alloy"},switchVisualizers(s){var l;this.activeVisulaizer=s,(l=this.audioVisWrap)==null||l.setAttribute("data-state",this.activeVisulaizer)},createChatBubble(s){const h=(s==="user"?this.userBubbleTemplate:this.aiBubbleTemplate).content.cloneNode(!0),p=h.querySelector(".chat-content");this.chatsContainer.appendChild(h),s==="user"?this.lastUserBubble=p:this.lastAiBubble=p,this.scrollConversationAreaToBottom()},appendToChatBubble(s,l){const h=s==="user"?this.lastUserBubble:this.lastAiBubble;h?(h.textContent+=l,this.scrollConversationAreaToBottom()):(this.createChatBubble(s),this.appendToChatBubble(s,l))},scrollConversationAreaToBottom(){this.conversationArea.scrollTo({top:this.conversationArea.scrollHeight+200,left:0})},startBarsVisualizer(){var w;if(!((w=this.audioVisBars)!=null&&w.length))return;const s=this.audioPlayer.audioContext.createAnalyser();s.fftSize=4096;const l=s.frequencyBinCount,h=new Uint8Array(l),p=this.audioVisBars.length;this.audioPlayer.playbackNode.connect(s);const m=[[85,150],[150,250],[250,400],[400,600],[600,1e3]];this.barHeights=this.barHeights||new Array(p).fill(0);const b=()=>{s.getByteFrequencyData(h),this.audioVisBars.forEach((C,A)=>{const[R,P]=m[A],M=Math.floor(R/(this.audioPlayer.audioContext.sampleRate/s.fftSize)),G=Math.ceil(P/(this.audioPlayer.audioContext.sampleRate/s.fftSize));let ne=0;for(let ae=M;ae<=G&&ae<h.length;ae++)h[ae]>ne&&(ne=h[ae]);let me=ne/255*80;this.barHeights[A]+=(me-this.barHeights[A])*.4,this.barHeights[A]+=(Math.random()-.5)*2,this.barHeights[A]=Math.max(5,Math.min(100,this.barHeights[A])),C.animate([{height:C.style.height},{height:`${this.barHeights[A]}%`}],{duration:30,fill:"forwards",easing:"linear"})}),requestAnimationFrame(b)};b()},startDotVisualizer(){if(!this.audioRecorder||!this.audioVisDotWrap)return;const s=this.audioRecorder.audioContext.createAnalyser();s.fftSize=256;const l=s.frequencyBinCount,h=new Uint8Array(l);this.audioRecorder.getMediaStreamSource().connect(s);const p=this.audioVisDotWrap.querySelector(".lqd-audio-vis-dot");if(!p)return;const m=()=>{s.getByteFrequencyData(h);let b=0;for(let R=0;R<l;R++)b+=h[R];const C=1+b/l/256*1.5,A=Math.max(.2,1-(C-1)/1.5);p.style.transform=`scale(${C})`,p.style.opacity=A.toFixed(2),requestAnimationFrame(m)};m()},checkBalance(s=!1){return new Promise(l=>{$.ajax({url:"/dashboard/user/realtime/chat/checkBalance",type:"POST",data:{onStart:s},dataType:"json",success:h=>{const p=h.status!=="success",m=h.message||"";l({shouldStop:p,errorMsg:m})},error:()=>{l({shouldStop:!0,errorMsg:"An error occurred."})}})})}}),y0=(a={})=>({prevViews:[],task:!1,currentView:"home",sidebarCollapsed:!1,modalShow:!1,activeModal:null,activeModalId:null,activeModalIdPrefix:null,currentToolsCat:"primary",tools:a.tools||[],primaryToolKeys:a.primaryToolKeys||[],showImageDetails:!1,zoomLevel:1,reachedMinZoom:!1,reachedMaxZoom:!1,newItems:[],showNotif:!1,editingImageDimensions:{width:0,height:0},painting:!1,brushSize:40,canvasCtx:null,lastUploadingImages:[],uploadingImages:[],promptLibraryShow:!1,promptFilter:"all",searchPromptStr:"",supportMultipleImageTools:["reimagine"],_busy:!1,_template:"",_prompt:"",_selectedTemplateDescription:"",_selectedPromptDescription:"",_selectedTool:"",aiModel:"",_prevEditingImage:{},_editingImage:{},get busy(){return this._busy},set busy(i){this._busy=i},get selectedTemplate(){return this._template.trim()},set selectedTemplate(i){var r;this._template=i,(r=this.$refs.promptInput)==null||r.focus()},get prompt(){return this._prompt},set prompt(i){var r;this._prompt=i.trim(),(r=this.$refs.promptInput)==null||r.focus()},get selectedTemplateDescription(){return this._selectedTemplateDescription},set selectedTemplateDescription(i){this._selectedTemplateDescription!==i&&(this._selectedTemplateDescription=i)},get selectedPromptDescription(){return this._selectedPromptDescription},set selectedPromptDescription(i){this._selectedPromptDescription!==i&&(this._selectedPromptDescription=i)},get selectedTool(){return this._selectedTool},set selectedTool(i){this.aiModel=AIModelsforTool[i],this._selectedTool!==i&&(this._selectedTool=i,this.makeCanvasEditable(this._selectedTool==="sketch_to_image"?{width:1024,height:1024}:{}),!this.selectedToolSupportMultiImagesUpload()&&this.$refs.editorFileInput.files.length&&this.clearImageInputs())},get prevEditingImage(){return this._prevEditingImage},get editingImage(){return this._editingImage},set editingImage(i){this._prevEditingImage=this._editingImage,this._editingImage=i,this.showImageDetails=!1,this.zoomLevel=1,i!=null&&i.output&&fetch(i.output).then(r=>r.blob()).then(r=>{var h,p;const s=new File([r],((p=(h=i.title)==null?void 0:h.split("."))==null?void 0:p.at(0))||"image",{type:r.type}),l=new DataTransfer;l.items.add(s),this.$refs.uploadedImageInput.files=l.files}).catch(r=>{toastr.error("Failed to load image"),console.error("Error creating file from URL:",r)})},init(){this.onViewChange=this.onViewChange.bind(this),this.onZoomLevelChange=this.onZoomLevelChange.bind(this),this.makeCanvasEditable=this.makeCanvasEditable.bind(this),this.startPainting=this.startPainting.bind(this),this.stopPainting=this.stopPainting.bind(this),this.paint=this.paint.bind(this),document.documentElement.style.scrollbarGutter="stable",this.$watch("currentView",this.onViewChange),this.$watch("zoomLevel",this.onZoomLevelChange);const i=new URLSearchParams(window.location.search);if(i.has("action")){const r=i.get("action");["merge_face","uncrop","reimagine","remove_background","cleanup","upscale","replace_background","sketch_to_image","remove_text","inpainting","style_transfer","image_relight"].includes(r)&&(this.currentView="editor",this.switchToolsCat({toolKey:r}),this.selectedTool=r)}},switchView(i){if(i==="<"){this.currentView=this.prevViews.pop()||"home";return}this.prevViews.push(this.currentView),this.currentView=i||"home"},switchSidebarCollapsed(i){if(i!=null){this.sidebarCollapsed=i;return}this.sidebarCollapsed=!this.sidebarCollapsed,this.$nextTick(()=>{this.zoomLevel>1&&this.fitToScreen()}),this.$refs.imageEditorSidebar.addEventListener("transitionend",r=>{r.target!==this.$refs.imageEditorSidebar&&r.propertyName!=="transform"||this.reachedMaxZoom&&this.fitToScreen()})},onViewChange(i){const r=i==="editor";document.documentElement.style.overflow=r?"hidden":""},setActiveModal(i,r="modal"){this.activeModal=i,this.activeModalId=i.id,this.activeModalIdPrefix=r},prevImageModal(){const i=document.querySelector(`.image-result[data-id='${this.activeModalId}'][data-id-prefix=${this.activeModalIdPrefix}]`),r=i==null?void 0:i.previousElementSibling;if(!r)return;const s=JSON.parse(r.getAttribute("data-payload")||{});this.setActiveModal(s,i.getAttribute("data-id-prefix"))},nextImageModal(){const i=document.querySelector(`.image-result[data-id='${this.activeModalId}'][data-id-prefix=${this.activeModalIdPrefix}]`),r=i==null?void 0:i.nextElementSibling;if(!r)return;const s=JSON.parse(r.getAttribute("data-payload")||{});this.setActiveModal(s,i.getAttribute("data-id-prefix"))},getSelectedToolCat(){return this.getToolCat(this.selectedTool)},switchToolsCat(i={}){if(i.cat)return this.currentToolsCat=i.cat;if(i.toolKey)return this.currentToolsCat=this.getToolCat(i.toolKey);if(!i.cat&&!i.toolKey)return this.currentToolsCat=this.currentToolsCat==="primary"?"secondary":"primary"},getToolCat(i){return this.primaryToolKeys.findIndex(r=>r===i)>=0?"primary":"secondary"},selectedToolSupportMultiImagesUpload(){return this.supportMultipleImageTools.includes(this.selectedTool)&&this.aiModel==="openai"},handleDragOver(){this.$refs.dropArea.classList.add("drag-over")},handleDragLeave(){this.$refs.dropArea.classList.remove("drag-over")},handleUploadingMultiImages(i){if(!this.selectedToolSupportMultiImagesUpload())return;const r=Array.from(i),s=Array.from(this.lastUploadingImages),l=new DataTransfer;return s.forEach(h=>{l.items.add(h)}),r.forEach(h=>{if(!h.type.startsWith("image/")){toastr.error("Please upload a valid image file."),this.clearImageInputs();return}s.findIndex(p=>p.name===h.name&&p.size===h.size)===-1&&l.items.add(h)}),this.$refs.editorFileInput.files=l.files,this.$refs.uploadedImageInput.files=l.files,this.lastUploadingImages=l.files,this.uploadingImages=Array.from(l.files).map(h=>({src:URL.createObjectURL(h),name:h.name})),l.files},handleFileChange(i){var s;let r=i.dataTransfer?i.dataTransfer.files:(s=i.target)==null?void 0:s.files;if(this.$refs.dropArea.classList.remove("drag-over"),!!r){if(i.dataTransfer&&(this.$refs.editorFileInput.files=r),r&&!r.length){this.handleUploadingMultiImages(this.lastUploadingImages);return}this.selectedToolSupportMultiImagesUpload()&&(r=this.handleUploadingMultiImages(r)),this.handleFiles(r)}},handleFiles(i){if(!i[0])return;this.selectedToolSupportMultiImagesUpload()||(this.editingImage={output:URL.createObjectURL(i[0]),name:i[0].name});const r=new FormData;r.append("image",i[0]),r.append("reimagine",i[0]),["reimagine"].includes(this.selectedTool)&&(this.$refs.promptInput&&(this.$refs.promptInput.disabled=!0,this.$refs.promptInput.placeholder="Analyzing image... Please wait..."),fetch("/dashboard/user/image-to-prompt",{method:"POST",headers:{"X-CSRF-TOKEN":"{{ csrf_token() }}"},body:r}).then(s=>s.json()).then(s=>{s.status==="success"?this.prompt=s.prompt:toastr.error(s.prompt)}).catch(s=>{console.log("Error:",s)}).finally(()=>{this.$refs.promptInput&&(this.$refs.promptInput.disabled=!1,this.$refs.promptInput.placeholder="Describe your idea or select a pre-defined prompt")}))},resetUploadedImageInput(){this.zoomLevel=1,this.clearImageInputs(),this.selectedTool==="sketch_to_image"&&this.makeCanvasEditable({width:1024,height:1024})},clearImageInputs(){this.lastUploadingImages=[],this.uploadingImages=[],this.editingImage={},this.$refs.editorFileInput.value="",this.$refs.uploadedImageInput.value=""},downloadImage(i,r){const s=document.createElement("a");s.href=i,s.download=r?r.replaceAll(" ","-"):"image",s.click(),s.remove()},getMaxZoom(){const i=this.$refs.editorCanvas,r=i.offsetWidth,s=window.getComputedStyle(i);return 1+(parseFloat(s.marginLeft)+parseFloat(s.marginRight)-20)/r},setZoomLevel(i){const r=this.getMaxZoom();this.zoomLevel=Math.max(.1,Math.min(r,i)),this.reachedMinZoom=this.zoomLevel===.1,this.reachedMaxZoom=this.zoomLevel>=r},zoomIn(){this.setZoomLevel(this.zoomLevel+.1)},zoomOut(){this.setZoomLevel(this.zoomLevel-.1)},fitToScreen(){const i=this.getMaxZoom();this.setZoomLevel(i)},onZoomLevelChange(){const i=this.$refs.editorCanvas;i.style.setProperty("--zoom-level",this.zoomLevel.toFixed(3)),i.style.setProperty("--zoom-offset","0px");const r=window.getComputedStyle(i),s=parseFloat(r.getPropertyValue("--header-h")),h=i.getBoundingClientRect().top+this.$refs.editorCanvasWrap.scrollTop;h<s&&i.style.setProperty("--zoom-offset",`${(h>=0?s-h:s+Math.abs(h)).toFixed(0)}px`)},submitEditorForm(i){this.busy=!0,console.log(i.target);const r=new FormData(i.target);fetch(i.target.action,{method:"POST",body:r,headers:{Accept:"application/json"}}).then(s=>s.ok?s.json():s.json().then(l=>{throw new Error(l.message||"An unknown error occurred")})).then(s=>{var l,h;if(s.type==="error"){toastr.error(s.message);return}if(((l=s==null?void 0:s.data)==null?void 0:l.status)==="CREATED"||((h=s==null?void 0:s.data)==null?void 0:h.status)==="IN_PROGRESS")this.task=!0,this.getStatus(s.data);else{this.editingImage=s.data,this.newItems.push(s.data),this.showNotif=!0,this.uploadingImages=[],this.selectedTool==="sketch_to_image"&&(this.switchToolsCat({toolKey:this.primaryToolKeys[0]}),this.selectedTool=this.primaryToolKeys[0]);const p=setTimeout(()=>{this.showNotif=!1,clearTimeout(p)},3e3)}}).catch(s=>{console.log(s),toastr.error(s)}).finally(()=>{this.task||(this.busy=!1)})},async getStatus(i={}){this.busy=!0,fetch("/dashboard/user/advanced-image/editor/"+i.id+"/status",{method:"GET",headers:{Accept:"application/json"}}).then(r=>r.ok?r.json():r.json().then(s=>{throw new Error(s.message||"An unknown error occurred")})).then(r=>{if(r.status==="error")throw new Error(r.message);if(r.data.status==="COMPLETED"){this.task=!1,this.editingImage=r.data,this.newItems.push(r.data),this.showNotif=!0;const s=setTimeout(()=>{this.showNotif=!1,clearTimeout(s)},3e3);this.busy=!1}else setTimeout(()=>{this.getStatus(r.data)},1e3)}).catch(r=>{toastr.error(r)})},async makeCanvasEditable(i={}){var s;this.editingImageDimensions={width:i.width||this.$refs.editorImagePreview.naturalWidth,height:i.height||this.$refs.editorImagePreview.naturalHeight},await this.$nextTick();const r=this.$refs.editorMaskCanvas;(s=this.canvasCtx)==null||s.reset(),this.canvasCtx=r.getContext("2d"),this.canvasCtx.fillStyle="black",this.canvasCtx.fillRect(0,0,r.width,r.height)},startPainting(i){this.painting=!0,this.painted=!1,this.paint(i)},stopPainting(){if(!this.painted)return;this.painting=!1,this.canvasCtx.beginPath();const i=this.$refs.editorMaskCanvas,r=document.createElement("canvas");r.width=this.editingImageDimensions.width,r.height=this.editingImageDimensions.height,r.getContext("2d").drawImage(i,0,0,r.width,r.height),r.toBlob(l=>{const h=new File([l],"mask.png",{type:"image/png"}),p=new DataTransfer;p.items.add(h),this.$refs[this.selectedTool==="sketch_to_image"?"sketchFileInput":"maskFileInput"].files=p.files,r.remove()},"image/png"),this.painted=!1},paint(i){if(!this.painting)return;const r=this.$refs.editorMaskCanvas,s=r.getBoundingClientRect(),l=(i.clientX-s.left)*(r.width/s.width),h=(i.clientY-s.top)*(r.height/s.height);this.canvasCtx.lineWidth=this.brushSize,this.canvasCtx.opacityTo=7,this.canvasCtx.lineCap="round",this.canvasCtx.strokeStyle="yellow",this.canvasCtx.lineTo(l,h),this.canvasCtx.stroke(),this.canvasCtx.beginPath(),this.canvasCtx.moveTo(l,h),this.painted=!0},setBrushSize(i){i==="-"?i=Math.max(this.brushSize-10,10):i==="+"&&(i=Math.min(this.brushSize+10,100)),this.brushSize=parseInt(i,10)},togglePromptLibraryShow(){this.promptLibraryShow=!this.promptLibraryShow},changePromptFilter(i){i!==this.promptFilter&&(this.promptFilter=i)},setSearchPromptStr(i){this.searchPromptStr=i.trim().toLowerCase()},setPrompt(i){this.prompt=i},focusOnPrompt(){this.$nextTick(()=>this.$refs.promptInput.focus())}});var vi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function L0(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var hr={exports:{}};/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */var S0=hr.exports,al;function A0(){return al||(al=1,function(a,i){(function(){var r,s="4.17.21",l=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",m="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",w=500,C="__lodash_placeholder__",A=1,R=2,P=4,M=1,G=2,ne=1,me=2,ae=4,pe=8,be=16,Ee=32,Re=64,xe=128,lt=256,Ce=512,jt=30,wt="...",en=800,ft=16,bt=1,tn=2,yt=3,Tt=1/0,je=9007199254740991,Di=17976931348623157e292,qn=NaN,ze=4294967295,Ri=ze-1,Sl=ze>>>1,Al=[["ary",xe],["bind",ne],["bindKey",me],["curry",pe],["curryRight",be],["flip",Ce],["partial",Ee],["partialRight",Re],["rearg",lt]],vn="[object Arguments]",br="[object Array]",El="[object AsyncFunction]",Un="[object Boolean]",kn="[object Date]",xl="[object DOMException]",yr="[object Error]",Sr="[object Function]",_s="[object GeneratorFunction]",ct="[object Map]",zn="[object Number]",Cl="[object Null]",It="[object Object]",ws="[object Promise]",Tl="[object Proxy]",Hn="[object RegExp]",ht="[object Set]",Gn="[object String]",Ar="[object Symbol]",Il="[object Undefined]",Vn="[object WeakMap]",Dl="[object WeakSet]",Yn="[object ArrayBuffer]",mn="[object DataView]",Oi="[object Float32Array]",Pi="[object Float64Array]",Li="[object Int8Array]",Mi="[object Int16Array]",Fi="[object Int32Array]",Ni="[object Uint8Array]",Wi="[object Uint8ClampedArray]",Bi="[object Uint16Array]",$i="[object Uint32Array]",Rl=/\b__p \+= '';/g,Ol=/\b(__p \+=) '' \+/g,Pl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bs=/&(?:amp|lt|gt|quot|#39);/g,ys=/[&<>"']/g,Ll=RegExp(bs.source),Ml=RegExp(ys.source),Fl=/<%-([\s\S]+?)%>/g,Nl=/<%([\s\S]+?)%>/g,Ss=/<%=([\s\S]+?)%>/g,Wl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bl=/^\w*$/,$l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qi=/[\\^$.*+?()[\]{}|]/g,ql=RegExp(qi.source),Ui=/^\s+/,Ul=/\s/,kl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zl=/\{\n\/\* \[wrapped with (.+)\] \*/,Hl=/,? & /,Gl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vl=/[()=,{}\[\]\/\s]/,Yl=/\\(\\)?/g,Xl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,As=/\w*$/,Kl=/^[-+]0x[0-9a-f]+$/i,Zl=/^0b[01]+$/i,Ql=/^\[object .+?Constructor\]$/,Jl=/^0o[0-7]+$/i,jl=/^(?:0|[1-9]\d*)$/,ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Er=/($^)/,tf=/['\n\r\u2028\u2029\\]/g,xr="\\ud800-\\udfff",nf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",of="\\u20d0-\\u20ff",Es=nf+rf+of,xs="\\u2700-\\u27bf",Cs="a-z\\xdf-\\xf6\\xf8-\\xff",sf="\\xac\\xb1\\xd7\\xf7",af="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",uf="\\u2000-\\u206f",lf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ts="A-Z\\xc0-\\xd6\\xd8-\\xde",Is="\\ufe0e\\ufe0f",Ds=sf+af+uf+lf,ki="['’]",ff="["+xr+"]",Rs="["+Ds+"]",Cr="["+Es+"]",Os="\\d+",cf="["+xs+"]",Ps="["+Cs+"]",Ls="[^"+xr+Ds+Os+xs+Cs+Ts+"]",zi="\\ud83c[\\udffb-\\udfff]",hf="(?:"+Cr+"|"+zi+")",Ms="[^"+xr+"]",Hi="(?:\\ud83c[\\udde6-\\uddff]){2}",Gi="[\\ud800-\\udbff][\\udc00-\\udfff]",_n="["+Ts+"]",Fs="\\u200d",Ns="(?:"+Ps+"|"+Ls+")",df="(?:"+_n+"|"+Ls+")",Ws="(?:"+ki+"(?:d|ll|m|re|s|t|ve))?",Bs="(?:"+ki+"(?:D|LL|M|RE|S|T|VE))?",$s=hf+"?",qs="["+Is+"]?",pf="(?:"+Fs+"(?:"+[Ms,Hi,Gi].join("|")+")"+qs+$s+")*",gf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Us=qs+$s+pf,mf="(?:"+[cf,Hi,Gi].join("|")+")"+Us,_f="(?:"+[Ms+Cr+"?",Cr,Hi,Gi,ff].join("|")+")",wf=RegExp(ki,"g"),bf=RegExp(Cr,"g"),Vi=RegExp(zi+"(?="+zi+")|"+_f+Us,"g"),yf=RegExp([_n+"?"+Ps+"+"+Ws+"(?="+[Rs,_n,"$"].join("|")+")",df+"+"+Bs+"(?="+[Rs,_n+Ns,"$"].join("|")+")",_n+"?"+Ns+"+"+Ws,_n+"+"+Bs,vf,gf,Os,mf].join("|"),"g"),Sf=RegExp("["+Fs+xr+Es+Is+"]"),Af=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ef=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xf=-1,se={};se[Oi]=se[Pi]=se[Li]=se[Mi]=se[Fi]=se[Ni]=se[Wi]=se[Bi]=se[$i]=!0,se[vn]=se[br]=se[Yn]=se[Un]=se[mn]=se[kn]=se[yr]=se[Sr]=se[ct]=se[zn]=se[It]=se[Hn]=se[ht]=se[Gn]=se[Vn]=!1;var oe={};oe[vn]=oe[br]=oe[Yn]=oe[mn]=oe[Un]=oe[kn]=oe[Oi]=oe[Pi]=oe[Li]=oe[Mi]=oe[Fi]=oe[ct]=oe[zn]=oe[It]=oe[Hn]=oe[ht]=oe[Gn]=oe[Ar]=oe[Ni]=oe[Wi]=oe[Bi]=oe[$i]=!0,oe[yr]=oe[Sr]=oe[Vn]=!1;var Cf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tf={"&":"&","<":"<",">":">",'"':""","'":"'"},If={"&":"&","<":"<",">":">",""":'"',"'":"'"},Df={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Rf=parseFloat,Of=parseInt,ks=typeof vi=="object"&&vi&&vi.Object===Object&&vi,Pf=typeof self=="object"&&self&&self.Object===Object&&self,Te=ks||Pf||Function("return this")(),Yi=i&&!i.nodeType&&i,nn=Yi&&!0&&a&&!a.nodeType&&a,zs=nn&&nn.exports===Yi,Xi=zs&&ks.process,et=function(){try{var v=nn&&nn.require&&nn.require("util").types;return v||Xi&&Xi.binding&&Xi.binding("util")}catch{}}(),Hs=et&&et.isArrayBuffer,Gs=et&&et.isDate,Vs=et&&et.isMap,Ys=et&&et.isRegExp,Xs=et&&et.isSet,Ks=et&&et.isTypedArray;function He(v,S,y){switch(y.length){case 0:return v.call(S);case 1:return v.call(S,y[0]);case 2:return v.call(S,y[0],y[1]);case 3:return v.call(S,y[0],y[1],y[2])}return v.apply(S,y)}function Lf(v,S,y,O){for(var U=-1,j=v==null?0:v.length;++U<j;){var ye=v[U];S(O,ye,y(ye),v)}return O}function tt(v,S){for(var y=-1,O=v==null?0:v.length;++y<O&&S(v[y],y,v)!==!1;);return v}function Mf(v,S){for(var y=v==null?0:v.length;y--&&S(v[y],y,v)!==!1;);return v}function Zs(v,S){for(var y=-1,O=v==null?0:v.length;++y<O;)if(!S(v[y],y,v))return!1;return!0}function Ut(v,S){for(var y=-1,O=v==null?0:v.length,U=0,j=[];++y<O;){var ye=v[y];S(ye,y,v)&&(j[U++]=ye)}return j}function Tr(v,S){var y=v==null?0:v.length;return!!y&&wn(v,S,0)>-1}function Ki(v,S,y){for(var O=-1,U=v==null?0:v.length;++O<U;)if(y(S,v[O]))return!0;return!1}function ue(v,S){for(var y=-1,O=v==null?0:v.length,U=Array(O);++y<O;)U[y]=S(v[y],y,v);return U}function kt(v,S){for(var y=-1,O=S.length,U=v.length;++y<O;)v[U+y]=S[y];return v}function Zi(v,S,y,O){var U=-1,j=v==null?0:v.length;for(O&&j&&(y=v[++U]);++U<j;)y=S(y,v[U],U,v);return y}function Ff(v,S,y,O){var U=v==null?0:v.length;for(O&&U&&(y=v[--U]);U--;)y=S(y,v[U],U,v);return y}function Qi(v,S){for(var y=-1,O=v==null?0:v.length;++y<O;)if(S(v[y],y,v))return!0;return!1}var Nf=Ji("length");function Wf(v){return v.split("")}function Bf(v){return v.match(Gl)||[]}function Qs(v,S,y){var O;return y(v,function(U,j,ye){if(S(U,j,ye))return O=j,!1}),O}function Ir(v,S,y,O){for(var U=v.length,j=y+(O?1:-1);O?j--:++j<U;)if(S(v[j],j,v))return j;return-1}function wn(v,S,y){return S===S?Zf(v,S,y):Ir(v,Js,y)}function $f(v,S,y,O){for(var U=y-1,j=v.length;++U<j;)if(O(v[U],S))return U;return-1}function Js(v){return v!==v}function js(v,S){var y=v==null?0:v.length;return y?eo(v,S)/y:qn}function Ji(v){return function(S){return S==null?r:S[v]}}function ji(v){return function(S){return v==null?r:v[S]}}function ea(v,S,y,O,U){return U(v,function(j,ye,ie){y=O?(O=!1,j):S(y,j,ye,ie)}),y}function qf(v,S){var y=v.length;for(v.sort(S);y--;)v[y]=v[y].value;return v}function eo(v,S){for(var y,O=-1,U=v.length;++O<U;){var j=S(v[O]);j!==r&&(y=y===r?j:y+j)}return y}function to(v,S){for(var y=-1,O=Array(v);++y<v;)O[y]=S(y);return O}function Uf(v,S){return ue(S,function(y){return[y,v[y]]})}function ta(v){return v&&v.slice(0,oa(v)+1).replace(Ui,"")}function Ge(v){return function(S){return v(S)}}function no(v,S){return ue(S,function(y){return v[y]})}function Xn(v,S){return v.has(S)}function na(v,S){for(var y=-1,O=v.length;++y<O&&wn(S,v[y],0)>-1;);return y}function ra(v,S){for(var y=v.length;y--&&wn(S,v[y],0)>-1;);return y}function kf(v,S){for(var y=v.length,O=0;y--;)v[y]===S&&++O;return O}var zf=ji(Cf),Hf=ji(Tf);function Gf(v){return"\\"+Df[v]}function Vf(v,S){return v==null?r:v[S]}function bn(v){return Sf.test(v)}function Yf(v){return Af.test(v)}function Xf(v){for(var S,y=[];!(S=v.next()).done;)y.push(S.value);return y}function ro(v){var S=-1,y=Array(v.size);return v.forEach(function(O,U){y[++S]=[U,O]}),y}function ia(v,S){return function(y){return v(S(y))}}function zt(v,S){for(var y=-1,O=v.length,U=0,j=[];++y<O;){var ye=v[y];(ye===S||ye===C)&&(v[y]=C,j[U++]=y)}return j}function Dr(v){var S=-1,y=Array(v.size);return v.forEach(function(O){y[++S]=O}),y}function Kf(v){var S=-1,y=Array(v.size);return v.forEach(function(O){y[++S]=[O,O]}),y}function Zf(v,S,y){for(var O=y-1,U=v.length;++O<U;)if(v[O]===S)return O;return-1}function Qf(v,S,y){for(var O=y+1;O--;)if(v[O]===S)return O;return O}function yn(v){return bn(v)?jf(v):Nf(v)}function dt(v){return bn(v)?ec(v):Wf(v)}function oa(v){for(var S=v.length;S--&&Ul.test(v.charAt(S)););return S}var Jf=ji(If);function jf(v){for(var S=Vi.lastIndex=0;Vi.test(v);)++S;return S}function ec(v){return v.match(Vi)||[]}function tc(v){return v.match(yf)||[]}var nc=function v(S){S=S==null?Te:Sn.defaults(Te.Object(),S,Sn.pick(Te,Ef));var y=S.Array,O=S.Date,U=S.Error,j=S.Function,ye=S.Math,ie=S.Object,io=S.RegExp,rc=S.String,nt=S.TypeError,Rr=y.prototype,ic=j.prototype,An=ie.prototype,Or=S["__core-js_shared__"],Pr=ic.toString,re=An.hasOwnProperty,oc=0,sa=function(){var e=/[^.]+$/.exec(Or&&Or.keys&&Or.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Lr=An.toString,sc=Pr.call(ie),ac=Te._,uc=io("^"+Pr.call(re).replace(qi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mr=zs?S.Buffer:r,Ht=S.Symbol,Fr=S.Uint8Array,aa=Mr?Mr.allocUnsafe:r,Nr=ia(ie.getPrototypeOf,ie),ua=ie.create,la=An.propertyIsEnumerable,Wr=Rr.splice,fa=Ht?Ht.isConcatSpreadable:r,Kn=Ht?Ht.iterator:r,rn=Ht?Ht.toStringTag:r,Br=function(){try{var e=ln(ie,"defineProperty");return e({},"",{}),e}catch{}}(),lc=S.clearTimeout!==Te.clearTimeout&&S.clearTimeout,fc=O&&O.now!==Te.Date.now&&O.now,cc=S.setTimeout!==Te.setTimeout&&S.setTimeout,$r=ye.ceil,qr=ye.floor,oo=ie.getOwnPropertySymbols,hc=Mr?Mr.isBuffer:r,ca=S.isFinite,dc=Rr.join,pc=ia(ie.keys,ie),Se=ye.max,Oe=ye.min,gc=O.now,vc=S.parseInt,ha=ye.random,mc=Rr.reverse,so=ln(S,"DataView"),Zn=ln(S,"Map"),ao=ln(S,"Promise"),En=ln(S,"Set"),Qn=ln(S,"WeakMap"),Jn=ln(ie,"create"),Ur=Qn&&new Qn,xn={},_c=fn(so),wc=fn(Zn),bc=fn(ao),yc=fn(En),Sc=fn(Qn),kr=Ht?Ht.prototype:r,jn=kr?kr.valueOf:r,da=kr?kr.toString:r;function f(e){if(he(e)&&!z(e)&&!(e instanceof Z)){if(e instanceof rt)return e;if(re.call(e,"__wrapped__"))return pu(e)}return new rt(e)}var Cn=function(){function e(){}return function(t){if(!fe(t))return{};if(ua)return ua(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zr(){}function rt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}f.templateSettings={escape:Fl,evaluate:Nl,interpolate:Ss,variable:"",imports:{_:f}},f.prototype=zr.prototype,f.prototype.constructor=f,rt.prototype=Cn(zr.prototype),rt.prototype.constructor=rt;function Z(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ze,this.__views__=[]}function Ac(){var e=new Z(this.__wrapped__);return e.__actions__=Be(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Be(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Be(this.__views__),e}function Ec(){if(this.__filtered__){var e=new Z(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function xc(){var e=this.__wrapped__.value(),t=this.__dir__,n=z(e),o=t<0,u=n?e.length:0,c=Wh(0,u,this.__views__),d=c.start,g=c.end,_=g-d,E=o?g:d-1,x=this.__iteratees__,T=x.length,D=0,L=Oe(_,this.__takeCount__);if(!n||!o&&u==_&&L==_)return Wa(e,this.__actions__);var N=[];e:for(;_--&&D<L;){E+=t;for(var Y=-1,W=e[E];++Y<T;){var K=x[Y],Q=K.iteratee,Xe=K.type,Ne=Q(W);if(Xe==tn)W=Ne;else if(!Ne){if(Xe==bt)continue e;break e}}N[D++]=W}return N}Z.prototype=Cn(zr.prototype),Z.prototype.constructor=Z;function on(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Cc(){this.__data__=Jn?Jn(null):{},this.size=0}function Tc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ic(e){var t=this.__data__;if(Jn){var n=t[e];return n===b?r:n}return re.call(t,e)?t[e]:r}function Dc(e){var t=this.__data__;return Jn?t[e]!==r:re.call(t,e)}function Rc(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Jn&&t===r?b:t,this}on.prototype.clear=Cc,on.prototype.delete=Tc,on.prototype.get=Ic,on.prototype.has=Dc,on.prototype.set=Rc;function Dt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Oc(){this.__data__=[],this.size=0}function Pc(e){var t=this.__data__,n=Hr(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Wr.call(t,n,1),--this.size,!0}function Lc(e){var t=this.__data__,n=Hr(t,e);return n<0?r:t[n][1]}function Mc(e){return Hr(this.__data__,e)>-1}function Fc(e,t){var n=this.__data__,o=Hr(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}Dt.prototype.clear=Oc,Dt.prototype.delete=Pc,Dt.prototype.get=Lc,Dt.prototype.has=Mc,Dt.prototype.set=Fc;function Rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Nc(){this.size=0,this.__data__={hash:new on,map:new(Zn||Dt),string:new on}}function Wc(e){var t=ni(this,e).delete(e);return this.size-=t?1:0,t}function Bc(e){return ni(this,e).get(e)}function $c(e){return ni(this,e).has(e)}function qc(e,t){var n=ni(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}Rt.prototype.clear=Nc,Rt.prototype.delete=Wc,Rt.prototype.get=Bc,Rt.prototype.has=$c,Rt.prototype.set=qc;function sn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Rt;++t<n;)this.add(e[t])}function Uc(e){return this.__data__.set(e,b),this}function kc(e){return this.__data__.has(e)}sn.prototype.add=sn.prototype.push=Uc,sn.prototype.has=kc;function pt(e){var t=this.__data__=new Dt(e);this.size=t.size}function zc(){this.__data__=new Dt,this.size=0}function Hc(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gc(e){return this.__data__.get(e)}function Vc(e){return this.__data__.has(e)}function Yc(e,t){var n=this.__data__;if(n instanceof Dt){var o=n.__data__;if(!Zn||o.length<l-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rt(o)}return n.set(e,t),this.size=n.size,this}pt.prototype.clear=zc,pt.prototype.delete=Hc,pt.prototype.get=Gc,pt.prototype.has=Vc,pt.prototype.set=Yc;function pa(e,t){var n=z(e),o=!n&&cn(e),u=!n&&!o&&Kt(e),c=!n&&!o&&!u&&Rn(e),d=n||o||u||c,g=d?to(e.length,rc):[],_=g.length;for(var E in e)(t||re.call(e,E))&&!(d&&(E=="length"||u&&(E=="offset"||E=="parent")||c&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||Mt(E,_)))&&g.push(E);return g}function ga(e){var t=e.length;return t?e[wo(0,t-1)]:r}function Xc(e,t){return ri(Be(e),an(t,0,e.length))}function Kc(e){return ri(Be(e))}function uo(e,t,n){(n!==r&&!gt(e[t],n)||n===r&&!(t in e))&&Ot(e,t,n)}function er(e,t,n){var o=e[t];(!(re.call(e,t)&>(o,n))||n===r&&!(t in e))&&Ot(e,t,n)}function Hr(e,t){for(var n=e.length;n--;)if(gt(e[n][0],t))return n;return-1}function Zc(e,t,n,o){return Gt(e,function(u,c,d){t(o,u,n(u),d)}),o}function va(e,t){return e&&At(t,Ae(t),e)}function Qc(e,t){return e&&At(t,qe(t),e)}function Ot(e,t,n){t=="__proto__"&&Br?Br(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lo(e,t){for(var n=-1,o=t.length,u=y(o),c=e==null;++n<o;)u[n]=c?r:Ho(e,t[n]);return u}function an(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function it(e,t,n,o,u,c){var d,g=t&A,_=t&R,E=t&P;if(n&&(d=u?n(e,o,u,c):n(e)),d!==r)return d;if(!fe(e))return e;var x=z(e);if(x){if(d=$h(e),!g)return Be(e,d)}else{var T=Pe(e),D=T==Sr||T==_s;if(Kt(e))return qa(e,g);if(T==It||T==vn||D&&!u){if(d=_||D?{}:ou(e),!g)return _?Ih(e,Qc(d,e)):Th(e,va(d,e))}else{if(!oe[T])return u?e:{};d=qh(e,T,g)}}c||(c=new pt);var L=c.get(e);if(L)return L;c.set(e,d),Mu(e)?e.forEach(function(W){d.add(it(W,t,n,W,e,c))}):Pu(e)&&e.forEach(function(W,K){d.set(K,it(W,t,n,K,e,c))});var N=E?_?Ro:Do:_?qe:Ae,Y=x?r:N(e);return tt(Y||e,function(W,K){Y&&(K=W,W=e[K]),er(d,K,it(W,t,n,K,e,c))}),d}function Jc(e){var t=Ae(e);return function(n){return ma(n,e,t)}}function ma(e,t,n){var o=n.length;if(e==null)return!o;for(e=ie(e);o--;){var u=n[o],c=t[u],d=e[u];if(d===r&&!(u in e)||!c(d))return!1}return!0}function _a(e,t,n){if(typeof e!="function")throw new nt(p);return ar(function(){e.apply(r,n)},t)}function tr(e,t,n,o){var u=-1,c=Tr,d=!0,g=e.length,_=[],E=t.length;if(!g)return _;n&&(t=ue(t,Ge(n))),o?(c=Ki,d=!1):t.length>=l&&(c=Xn,d=!1,t=new sn(t));e:for(;++u<g;){var x=e[u],T=n==null?x:n(x);if(x=o||x!==0?x:0,d&&T===T){for(var D=E;D--;)if(t[D]===T)continue e;_.push(x)}else c(t,T,o)||_.push(x)}return _}var Gt=Ga(St),wa=Ga(co,!0);function jc(e,t){var n=!0;return Gt(e,function(o,u,c){return n=!!t(o,u,c),n}),n}function Gr(e,t,n){for(var o=-1,u=e.length;++o<u;){var c=e[o],d=t(c);if(d!=null&&(g===r?d===d&&!Ye(d):n(d,g)))var g=d,_=c}return _}function eh(e,t,n,o){var u=e.length;for(n=V(n),n<0&&(n=-n>u?0:u+n),o=o===r||o>u?u:V(o),o<0&&(o+=u),o=n>o?0:Nu(o);n<o;)e[n++]=t;return e}function ba(e,t){var n=[];return Gt(e,function(o,u,c){t(o,u,c)&&n.push(o)}),n}function Ie(e,t,n,o,u){var c=-1,d=e.length;for(n||(n=kh),u||(u=[]);++c<d;){var g=e[c];t>0&&n(g)?t>1?Ie(g,t-1,n,o,u):kt(u,g):o||(u[u.length]=g)}return u}var fo=Va(),ya=Va(!0);function St(e,t){return e&&fo(e,t,Ae)}function co(e,t){return e&&ya(e,t,Ae)}function Vr(e,t){return Ut(t,function(n){return Ft(e[n])})}function un(e,t){t=Yt(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Et(t[n++])];return n&&n==o?e:r}function Sa(e,t,n){var o=t(e);return z(e)?o:kt(o,n(e))}function Me(e){return e==null?e===r?Il:Cl:rn&&rn in ie(e)?Nh(e):Kh(e)}function ho(e,t){return e>t}function th(e,t){return e!=null&&re.call(e,t)}function nh(e,t){return e!=null&&t in ie(e)}function rh(e,t,n){return e>=Oe(t,n)&&e<Se(t,n)}function po(e,t,n){for(var o=n?Ki:Tr,u=e[0].length,c=e.length,d=c,g=y(c),_=1/0,E=[];d--;){var x=e[d];d&&t&&(x=ue(x,Ge(t))),_=Oe(x.length,_),g[d]=!n&&(t||u>=120&&x.length>=120)?new sn(d&&x):r}x=e[0];var T=-1,D=g[0];e:for(;++T<u&&E.length<_;){var L=x[T],N=t?t(L):L;if(L=n||L!==0?L:0,!(D?Xn(D,N):o(E,N,n))){for(d=c;--d;){var Y=g[d];if(!(Y?Xn(Y,N):o(e[d],N,n)))continue e}D&&D.push(N),E.push(L)}}return E}function ih(e,t,n,o){return St(e,function(u,c,d){t(o,n(u),c,d)}),o}function nr(e,t,n){t=Yt(t,e),e=lu(e,t);var o=e==null?e:e[Et(st(t))];return o==null?r:He(o,e,n)}function Aa(e){return he(e)&&Me(e)==vn}function oh(e){return he(e)&&Me(e)==Yn}function sh(e){return he(e)&&Me(e)==kn}function rr(e,t,n,o,u){return e===t?!0:e==null||t==null||!he(e)&&!he(t)?e!==e&&t!==t:ah(e,t,n,o,rr,u)}function ah(e,t,n,o,u,c){var d=z(e),g=z(t),_=d?br:Pe(e),E=g?br:Pe(t);_=_==vn?It:_,E=E==vn?It:E;var x=_==It,T=E==It,D=_==E;if(D&&Kt(e)){if(!Kt(t))return!1;d=!0,x=!1}if(D&&!x)return c||(c=new pt),d||Rn(e)?nu(e,t,n,o,u,c):Mh(e,t,_,n,o,u,c);if(!(n&M)){var L=x&&re.call(e,"__wrapped__"),N=T&&re.call(t,"__wrapped__");if(L||N){var Y=L?e.value():e,W=N?t.value():t;return c||(c=new pt),u(Y,W,n,o,c)}}return D?(c||(c=new pt),Fh(e,t,n,o,u,c)):!1}function uh(e){return he(e)&&Pe(e)==ct}function go(e,t,n,o){var u=n.length,c=u,d=!o;if(e==null)return!c;for(e=ie(e);u--;){var g=n[u];if(d&&g[2]?g[1]!==e[g[0]]:!(g[0]in e))return!1}for(;++u<c;){g=n[u];var _=g[0],E=e[_],x=g[1];if(d&&g[2]){if(E===r&&!(_ in e))return!1}else{var T=new pt;if(o)var D=o(E,x,_,e,t,T);if(!(D===r?rr(x,E,M|G,o,T):D))return!1}}return!0}function Ea(e){if(!fe(e)||Hh(e))return!1;var t=Ft(e)?uc:Ql;return t.test(fn(e))}function lh(e){return he(e)&&Me(e)==Hn}function fh(e){return he(e)&&Pe(e)==ht}function ch(e){return he(e)&&li(e.length)&&!!se[Me(e)]}function xa(e){return typeof e=="function"?e:e==null?Ue:typeof e=="object"?z(e)?Ia(e[0],e[1]):Ta(e):Yu(e)}function vo(e){if(!sr(e))return pc(e);var t=[];for(var n in ie(e))re.call(e,n)&&n!="constructor"&&t.push(n);return t}function hh(e){if(!fe(e))return Xh(e);var t=sr(e),n=[];for(var o in e)o=="constructor"&&(t||!re.call(e,o))||n.push(o);return n}function mo(e,t){return e<t}function Ca(e,t){var n=-1,o=$e(e)?y(e.length):[];return Gt(e,function(u,c,d){o[++n]=t(u,c,d)}),o}function Ta(e){var t=Po(e);return t.length==1&&t[0][2]?au(t[0][0],t[0][1]):function(n){return n===e||go(n,e,t)}}function Ia(e,t){return Mo(e)&&su(t)?au(Et(e),t):function(n){var o=Ho(n,e);return o===r&&o===t?Go(n,e):rr(t,o,M|G)}}function Yr(e,t,n,o,u){e!==t&&fo(t,function(c,d){if(u||(u=new pt),fe(c))dh(e,t,d,n,Yr,o,u);else{var g=o?o(No(e,d),c,d+"",e,t,u):r;g===r&&(g=c),uo(e,d,g)}},qe)}function dh(e,t,n,o,u,c,d){var g=No(e,n),_=No(t,n),E=d.get(_);if(E){uo(e,n,E);return}var x=c?c(g,_,n+"",e,t,d):r,T=x===r;if(T){var D=z(_),L=!D&&Kt(_),N=!D&&!L&&Rn(_);x=_,D||L||N?z(g)?x=g:ge(g)?x=Be(g):L?(T=!1,x=qa(_,!0)):N?(T=!1,x=Ua(_,!0)):x=[]:ur(_)||cn(_)?(x=g,cn(g)?x=Wu(g):(!fe(g)||Ft(g))&&(x=ou(_))):T=!1}T&&(d.set(_,x),u(x,_,o,c,d),d.delete(_)),uo(e,n,x)}function Da(e,t){var n=e.length;if(n)return t+=t<0?n:0,Mt(t,n)?e[t]:r}function Ra(e,t,n){t.length?t=ue(t,function(c){return z(c)?function(d){return un(d,c.length===1?c[0]:c)}:c}):t=[Ue];var o=-1;t=ue(t,Ge(F()));var u=Ca(e,function(c,d,g){var _=ue(t,function(E){return E(c)});return{criteria:_,index:++o,value:c}});return qf(u,function(c,d){return Ch(c,d,n)})}function ph(e,t){return Oa(e,t,function(n,o){return Go(e,o)})}function Oa(e,t,n){for(var o=-1,u=t.length,c={};++o<u;){var d=t[o],g=un(e,d);n(g,d)&&ir(c,Yt(d,e),g)}return c}function gh(e){return function(t){return un(t,e)}}function _o(e,t,n,o){var u=o?$f:wn,c=-1,d=t.length,g=e;for(e===t&&(t=Be(t)),n&&(g=ue(e,Ge(n)));++c<d;)for(var _=0,E=t[c],x=n?n(E):E;(_=u(g,x,_,o))>-1;)g!==e&&Wr.call(g,_,1),Wr.call(e,_,1);return e}function Pa(e,t){for(var n=e?t.length:0,o=n-1;n--;){var u=t[n];if(n==o||u!==c){var c=u;Mt(u)?Wr.call(e,u,1):So(e,u)}}return e}function wo(e,t){return e+qr(ha()*(t-e+1))}function vh(e,t,n,o){for(var u=-1,c=Se($r((t-e)/(n||1)),0),d=y(c);c--;)d[o?c:++u]=e,e+=n;return d}function bo(e,t){var n="";if(!e||t<1||t>je)return n;do t%2&&(n+=e),t=qr(t/2),t&&(e+=e);while(t);return n}function X(e,t){return Wo(uu(e,t,Ue),e+"")}function mh(e){return ga(On(e))}function _h(e,t){var n=On(e);return ri(n,an(t,0,n.length))}function ir(e,t,n,o){if(!fe(e))return e;t=Yt(t,e);for(var u=-1,c=t.length,d=c-1,g=e;g!=null&&++u<c;){var _=Et(t[u]),E=n;if(_==="__proto__"||_==="constructor"||_==="prototype")return e;if(u!=d){var x=g[_];E=o?o(x,_,g):r,E===r&&(E=fe(x)?x:Mt(t[u+1])?[]:{})}er(g,_,E),g=g[_]}return e}var La=Ur?function(e,t){return Ur.set(e,t),e}:Ue,wh=Br?function(e,t){return Br(e,"toString",{configurable:!0,enumerable:!1,value:Yo(t),writable:!0})}:Ue;function bh(e){return ri(On(e))}function ot(e,t,n){var o=-1,u=e.length;t<0&&(t=-t>u?0:u+t),n=n>u?u:n,n<0&&(n+=u),u=t>n?0:n-t>>>0,t>>>=0;for(var c=y(u);++o<u;)c[o]=e[o+t];return c}function yh(e,t){var n;return Gt(e,function(o,u,c){return n=t(o,u,c),!n}),!!n}function Xr(e,t,n){var o=0,u=e==null?o:e.length;if(typeof t=="number"&&t===t&&u<=Sl){for(;o<u;){var c=o+u>>>1,d=e[c];d!==null&&!Ye(d)&&(n?d<=t:d<t)?o=c+1:u=c}return u}return yo(e,t,Ue,n)}function yo(e,t,n,o){var u=0,c=e==null?0:e.length;if(c===0)return 0;t=n(t);for(var d=t!==t,g=t===null,_=Ye(t),E=t===r;u<c;){var x=qr((u+c)/2),T=n(e[x]),D=T!==r,L=T===null,N=T===T,Y=Ye(T);if(d)var W=o||N;else E?W=N&&(o||D):g?W=N&&D&&(o||!L):_?W=N&&D&&!L&&(o||!Y):L||Y?W=!1:W=o?T<=t:T<t;W?u=x+1:c=x}return Oe(c,Ri)}function Ma(e,t){for(var n=-1,o=e.length,u=0,c=[];++n<o;){var d=e[n],g=t?t(d):d;if(!n||!gt(g,_)){var _=g;c[u++]=d===0?0:d}}return c}function Fa(e){return typeof e=="number"?e:Ye(e)?qn:+e}function Ve(e){if(typeof e=="string")return e;if(z(e))return ue(e,Ve)+"";if(Ye(e))return da?da.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Vt(e,t,n){var o=-1,u=Tr,c=e.length,d=!0,g=[],_=g;if(n)d=!1,u=Ki;else if(c>=l){var E=t?null:Ph(e);if(E)return Dr(E);d=!1,u=Xn,_=new sn}else _=t?[]:g;e:for(;++o<c;){var x=e[o],T=t?t(x):x;if(x=n||x!==0?x:0,d&&T===T){for(var D=_.length;D--;)if(_[D]===T)continue e;t&&_.push(T),g.push(x)}else u(_,T,n)||(_!==g&&_.push(T),g.push(x))}return g}function So(e,t){return t=Yt(t,e),e=lu(e,t),e==null||delete e[Et(st(t))]}function Na(e,t,n,o){return ir(e,t,n(un(e,t)),o)}function Kr(e,t,n,o){for(var u=e.length,c=o?u:-1;(o?c--:++c<u)&&t(e[c],c,e););return n?ot(e,o?0:c,o?c+1:u):ot(e,o?c+1:0,o?u:c)}function Wa(e,t){var n=e;return n instanceof Z&&(n=n.value()),Zi(t,function(o,u){return u.func.apply(u.thisArg,kt([o],u.args))},n)}function Ao(e,t,n){var o=e.length;if(o<2)return o?Vt(e[0]):[];for(var u=-1,c=y(o);++u<o;)for(var d=e[u],g=-1;++g<o;)g!=u&&(c[u]=tr(c[u]||d,e[g],t,n));return Vt(Ie(c,1),t,n)}function Ba(e,t,n){for(var o=-1,u=e.length,c=t.length,d={};++o<u;){var g=o<c?t[o]:r;n(d,e[o],g)}return d}function Eo(e){return ge(e)?e:[]}function xo(e){return typeof e=="function"?e:Ue}function Yt(e,t){return z(e)?e:Mo(e,t)?[e]:du(te(e))}var Sh=X;function Xt(e,t,n){var o=e.length;return n=n===r?o:n,!t&&n>=o?e:ot(e,t,n)}var $a=lc||function(e){return Te.clearTimeout(e)};function qa(e,t){if(t)return e.slice();var n=e.length,o=aa?aa(n):new e.constructor(n);return e.copy(o),o}function Co(e){var t=new e.constructor(e.byteLength);return new Fr(t).set(new Fr(e)),t}function Ah(e,t){var n=t?Co(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Eh(e){var t=new e.constructor(e.source,As.exec(e));return t.lastIndex=e.lastIndex,t}function xh(e){return jn?ie(jn.call(e)):{}}function Ua(e,t){var n=t?Co(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ka(e,t){if(e!==t){var n=e!==r,o=e===null,u=e===e,c=Ye(e),d=t!==r,g=t===null,_=t===t,E=Ye(t);if(!g&&!E&&!c&&e>t||c&&d&&_&&!g&&!E||o&&d&&_||!n&&_||!u)return 1;if(!o&&!c&&!E&&e<t||E&&n&&u&&!o&&!c||g&&n&&u||!d&&u||!_)return-1}return 0}function Ch(e,t,n){for(var o=-1,u=e.criteria,c=t.criteria,d=u.length,g=n.length;++o<d;){var _=ka(u[o],c[o]);if(_){if(o>=g)return _;var E=n[o];return _*(E=="desc"?-1:1)}}return e.index-t.index}function za(e,t,n,o){for(var u=-1,c=e.length,d=n.length,g=-1,_=t.length,E=Se(c-d,0),x=y(_+E),T=!o;++g<_;)x[g]=t[g];for(;++u<d;)(T||u<c)&&(x[n[u]]=e[u]);for(;E--;)x[g++]=e[u++];return x}function Ha(e,t,n,o){for(var u=-1,c=e.length,d=-1,g=n.length,_=-1,E=t.length,x=Se(c-g,0),T=y(x+E),D=!o;++u<x;)T[u]=e[u];for(var L=u;++_<E;)T[L+_]=t[_];for(;++d<g;)(D||u<c)&&(T[L+n[d]]=e[u++]);return T}function Be(e,t){var n=-1,o=e.length;for(t||(t=y(o));++n<o;)t[n]=e[n];return t}function At(e,t,n,o){var u=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var g=t[c],_=o?o(n[g],e[g],g,n,e):r;_===r&&(_=e[g]),u?Ot(n,g,_):er(n,g,_)}return n}function Th(e,t){return At(e,Lo(e),t)}function Ih(e,t){return At(e,ru(e),t)}function Zr(e,t){return function(n,o){var u=z(n)?Lf:Zc,c=t?t():{};return u(n,e,F(o,2),c)}}function Tn(e){return X(function(t,n){var o=-1,u=n.length,c=u>1?n[u-1]:r,d=u>2?n[2]:r;for(c=e.length>3&&typeof c=="function"?(u--,c):r,d&&Fe(n[0],n[1],d)&&(c=u<3?r:c,u=1),t=ie(t);++o<u;){var g=n[o];g&&e(t,g,o,c)}return t})}function Ga(e,t){return function(n,o){if(n==null)return n;if(!$e(n))return e(n,o);for(var u=n.length,c=t?u:-1,d=ie(n);(t?c--:++c<u)&&o(d[c],c,d)!==!1;);return n}}function Va(e){return function(t,n,o){for(var u=-1,c=ie(t),d=o(t),g=d.length;g--;){var _=d[e?g:++u];if(n(c[_],_,c)===!1)break}return t}}function Dh(e,t,n){var o=t&ne,u=or(e);function c(){var d=this&&this!==Te&&this instanceof c?u:e;return d.apply(o?n:this,arguments)}return c}function Ya(e){return function(t){t=te(t);var n=bn(t)?dt(t):r,o=n?n[0]:t.charAt(0),u=n?Xt(n,1).join(""):t.slice(1);return o[e]()+u}}function In(e){return function(t){return Zi(Gu(Hu(t).replace(wf,"")),e,"")}}function or(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Cn(e.prototype),o=e.apply(n,t);return fe(o)?o:n}}function Rh(e,t,n){var o=or(e);function u(){for(var c=arguments.length,d=y(c),g=c,_=Dn(u);g--;)d[g]=arguments[g];var E=c<3&&d[0]!==_&&d[c-1]!==_?[]:zt(d,_);if(c-=E.length,c<n)return Ja(e,t,Qr,u.placeholder,r,d,E,r,r,n-c);var x=this&&this!==Te&&this instanceof u?o:e;return He(x,this,d)}return u}function Xa(e){return function(t,n,o){var u=ie(t);if(!$e(t)){var c=F(n,3);t=Ae(t),n=function(g){return c(u[g],g,u)}}var d=e(t,n,o);return d>-1?u[c?t[d]:d]:r}}function Ka(e){return Lt(function(t){var n=t.length,o=n,u=rt.prototype.thru;for(e&&t.reverse();o--;){var c=t[o];if(typeof c!="function")throw new nt(p);if(u&&!d&&ti(c)=="wrapper")var d=new rt([],!0)}for(o=d?o:n;++o<n;){c=t[o];var g=ti(c),_=g=="wrapper"?Oo(c):r;_&&Fo(_[0])&&_[1]==(xe|pe|Ee|lt)&&!_[4].length&&_[9]==1?d=d[ti(_[0])].apply(d,_[3]):d=c.length==1&&Fo(c)?d[g]():d.thru(c)}return function(){var E=arguments,x=E[0];if(d&&E.length==1&&z(x))return d.plant(x).value();for(var T=0,D=n?t[T].apply(this,E):x;++T<n;)D=t[T].call(this,D);return D}})}function Qr(e,t,n,o,u,c,d,g,_,E){var x=t&xe,T=t&ne,D=t&me,L=t&(pe|be),N=t&Ce,Y=D?r:or(e);function W(){for(var K=arguments.length,Q=y(K),Xe=K;Xe--;)Q[Xe]=arguments[Xe];if(L)var Ne=Dn(W),Ke=kf(Q,Ne);if(o&&(Q=za(Q,o,u,L)),c&&(Q=Ha(Q,c,d,L)),K-=Ke,L&&K<E){var ve=zt(Q,Ne);return Ja(e,t,Qr,W.placeholder,n,Q,ve,g,_,E-K)}var vt=T?n:this,Wt=D?vt[e]:e;return K=Q.length,g?Q=Zh(Q,g):N&&K>1&&Q.reverse(),x&&_<K&&(Q.length=_),this&&this!==Te&&this instanceof W&&(Wt=Y||or(Wt)),Wt.apply(vt,Q)}return W}function Za(e,t){return function(n,o){return ih(n,e,t(o),{})}}function Jr(e,t){return function(n,o){var u;if(n===r&&o===r)return t;if(n!==r&&(u=n),o!==r){if(u===r)return o;typeof n=="string"||typeof o=="string"?(n=Ve(n),o=Ve(o)):(n=Fa(n),o=Fa(o)),u=e(n,o)}return u}}function To(e){return Lt(function(t){return t=ue(t,Ge(F())),X(function(n){var o=this;return e(t,function(u){return He(u,o,n)})})})}function jr(e,t){t=t===r?" ":Ve(t);var n=t.length;if(n<2)return n?bo(t,e):t;var o=bo(t,$r(e/yn(t)));return bn(t)?Xt(dt(o),0,e).join(""):o.slice(0,e)}function Oh(e,t,n,o){var u=t&ne,c=or(e);function d(){for(var g=-1,_=arguments.length,E=-1,x=o.length,T=y(x+_),D=this&&this!==Te&&this instanceof d?c:e;++E<x;)T[E]=o[E];for(;_--;)T[E++]=arguments[++g];return He(D,u?n:this,T)}return d}function Qa(e){return function(t,n,o){return o&&typeof o!="number"&&Fe(t,n,o)&&(n=o=r),t=Nt(t),n===r?(n=t,t=0):n=Nt(n),o=o===r?t<n?1:-1:Nt(o),vh(t,n,o,e)}}function ei(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=at(t),n=at(n)),e(t,n)}}function Ja(e,t,n,o,u,c,d,g,_,E){var x=t&pe,T=x?d:r,D=x?r:d,L=x?c:r,N=x?r:c;t|=x?Ee:Re,t&=~(x?Re:Ee),t&ae||(t&=-4);var Y=[e,t,u,L,T,N,D,g,_,E],W=n.apply(r,Y);return Fo(e)&&fu(W,Y),W.placeholder=o,cu(W,e,t)}function Io(e){var t=ye[e];return function(n,o){if(n=at(n),o=o==null?0:Oe(V(o),292),o&&ca(n)){var u=(te(n)+"e").split("e"),c=t(u[0]+"e"+(+u[1]+o));return u=(te(c)+"e").split("e"),+(u[0]+"e"+(+u[1]-o))}return t(n)}}var Ph=En&&1/Dr(new En([,-0]))[1]==Tt?function(e){return new En(e)}:Zo;function ja(e){return function(t){var n=Pe(t);return n==ct?ro(t):n==ht?Kf(t):Uf(t,e(t))}}function Pt(e,t,n,o,u,c,d,g){var _=t&me;if(!_&&typeof e!="function")throw new nt(p);var E=o?o.length:0;if(E||(t&=-97,o=u=r),d=d===r?d:Se(V(d),0),g=g===r?g:V(g),E-=u?u.length:0,t&Re){var x=o,T=u;o=u=r}var D=_?r:Oo(e),L=[e,t,n,o,u,x,T,c,d,g];if(D&&Yh(L,D),e=L[0],t=L[1],n=L[2],o=L[3],u=L[4],g=L[9]=L[9]===r?_?0:e.length:Se(L[9]-E,0),!g&&t&(pe|be)&&(t&=-25),!t||t==ne)var N=Dh(e,t,n);else t==pe||t==be?N=Rh(e,t,g):(t==Ee||t==(ne|Ee))&&!u.length?N=Oh(e,t,n,o):N=Qr.apply(r,L);var Y=D?La:fu;return cu(Y(N,L),e,t)}function eu(e,t,n,o){return e===r||gt(e,An[n])&&!re.call(o,n)?t:e}function tu(e,t,n,o,u,c){return fe(e)&&fe(t)&&(c.set(t,e),Yr(e,t,r,tu,c),c.delete(t)),e}function Lh(e){return ur(e)?r:e}function nu(e,t,n,o,u,c){var d=n&M,g=e.length,_=t.length;if(g!=_&&!(d&&_>g))return!1;var E=c.get(e),x=c.get(t);if(E&&x)return E==t&&x==e;var T=-1,D=!0,L=n&G?new sn:r;for(c.set(e,t),c.set(t,e);++T<g;){var N=e[T],Y=t[T];if(o)var W=d?o(Y,N,T,t,e,c):o(N,Y,T,e,t,c);if(W!==r){if(W)continue;D=!1;break}if(L){if(!Qi(t,function(K,Q){if(!Xn(L,Q)&&(N===K||u(N,K,n,o,c)))return L.push(Q)})){D=!1;break}}else if(!(N===Y||u(N,Y,n,o,c))){D=!1;break}}return c.delete(e),c.delete(t),D}function Mh(e,t,n,o,u,c,d){switch(n){case mn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yn:return!(e.byteLength!=t.byteLength||!c(new Fr(e),new Fr(t)));case Un:case kn:case zn:return gt(+e,+t);case yr:return e.name==t.name&&e.message==t.message;case Hn:case Gn:return e==t+"";case ct:var g=ro;case ht:var _=o&M;if(g||(g=Dr),e.size!=t.size&&!_)return!1;var E=d.get(e);if(E)return E==t;o|=G,d.set(e,t);var x=nu(g(e),g(t),o,u,c,d);return d.delete(e),x;case Ar:if(jn)return jn.call(e)==jn.call(t)}return!1}function Fh(e,t,n,o,u,c){var d=n&M,g=Do(e),_=g.length,E=Do(t),x=E.length;if(_!=x&&!d)return!1;for(var T=_;T--;){var D=g[T];if(!(d?D in t:re.call(t,D)))return!1}var L=c.get(e),N=c.get(t);if(L&&N)return L==t&&N==e;var Y=!0;c.set(e,t),c.set(t,e);for(var W=d;++T<_;){D=g[T];var K=e[D],Q=t[D];if(o)var Xe=d?o(Q,K,D,t,e,c):o(K,Q,D,e,t,c);if(!(Xe===r?K===Q||u(K,Q,n,o,c):Xe)){Y=!1;break}W||(W=D=="constructor")}if(Y&&!W){var Ne=e.constructor,Ke=t.constructor;Ne!=Ke&&"constructor"in e&&"constructor"in t&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof Ke=="function"&&Ke instanceof Ke)&&(Y=!1)}return c.delete(e),c.delete(t),Y}function Lt(e){return Wo(uu(e,r,mu),e+"")}function Do(e){return Sa(e,Ae,Lo)}function Ro(e){return Sa(e,qe,ru)}var Oo=Ur?function(e){return Ur.get(e)}:Zo;function ti(e){for(var t=e.name+"",n=xn[t],o=re.call(xn,t)?n.length:0;o--;){var u=n[o],c=u.func;if(c==null||c==e)return u.name}return t}function Dn(e){var t=re.call(f,"placeholder")?f:e;return t.placeholder}function F(){var e=f.iteratee||Xo;return e=e===Xo?xa:e,arguments.length?e(arguments[0],arguments[1]):e}function ni(e,t){var n=e.__data__;return zh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Po(e){for(var t=Ae(e),n=t.length;n--;){var o=t[n],u=e[o];t[n]=[o,u,su(u)]}return t}function ln(e,t){var n=Vf(e,t);return Ea(n)?n:r}function Nh(e){var t=re.call(e,rn),n=e[rn];try{e[rn]=r;var o=!0}catch{}var u=Lr.call(e);return o&&(t?e[rn]=n:delete e[rn]),u}var Lo=oo?function(e){return e==null?[]:(e=ie(e),Ut(oo(e),function(t){return la.call(e,t)}))}:Qo,ru=oo?function(e){for(var t=[];e;)kt(t,Lo(e)),e=Nr(e);return t}:Qo,Pe=Me;(so&&Pe(new so(new ArrayBuffer(1)))!=mn||Zn&&Pe(new Zn)!=ct||ao&&Pe(ao.resolve())!=ws||En&&Pe(new En)!=ht||Qn&&Pe(new Qn)!=Vn)&&(Pe=function(e){var t=Me(e),n=t==It?e.constructor:r,o=n?fn(n):"";if(o)switch(o){case _c:return mn;case wc:return ct;case bc:return ws;case yc:return ht;case Sc:return Vn}return t});function Wh(e,t,n){for(var o=-1,u=n.length;++o<u;){var c=n[o],d=c.size;switch(c.type){case"drop":e+=d;break;case"dropRight":t-=d;break;case"take":t=Oe(t,e+d);break;case"takeRight":e=Se(e,t-d);break}}return{start:e,end:t}}function Bh(e){var t=e.match(zl);return t?t[1].split(Hl):[]}function iu(e,t,n){t=Yt(t,e);for(var o=-1,u=t.length,c=!1;++o<u;){var d=Et(t[o]);if(!(c=e!=null&&n(e,d)))break;e=e[d]}return c||++o!=u?c:(u=e==null?0:e.length,!!u&&li(u)&&Mt(d,u)&&(z(e)||cn(e)))}function $h(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ou(e){return typeof e.constructor=="function"&&!sr(e)?Cn(Nr(e)):{}}function qh(e,t,n){var o=e.constructor;switch(t){case Yn:return Co(e);case Un:case kn:return new o(+e);case mn:return Ah(e,n);case Oi:case Pi:case Li:case Mi:case Fi:case Ni:case Wi:case Bi:case $i:return Ua(e,n);case ct:return new o;case zn:case Gn:return new o(e);case Hn:return Eh(e);case ht:return new o;case Ar:return xh(e)}}function Uh(e,t){var n=t.length;if(!n)return e;var o=n-1;return t[o]=(n>1?"& ":"")+t[o],t=t.join(n>2?", ":" "),e.replace(kl,`{ /* [wrapped with `+t+`] */ `)}function kh(e){return z(e)||cn(e)||!!(fa&&e&&e[fa])}function Mt(e,t){var n=typeof e;return t=t??je,!!t&&(n=="number"||n!="symbol"&&jl.test(e))&&e>-1&&e%1==0&&e<t}function Fe(e,t,n){if(!fe(n))return!1;var o=typeof t;return(o=="number"?$e(n)&&Mt(t,n.length):o=="string"&&t in n)?gt(n[t],e):!1}function Mo(e,t){if(z(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ye(e)?!0:Bl.test(e)||!Wl.test(e)||t!=null&&e in ie(t)}function zh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fo(e){var t=ti(e),n=f[t];if(typeof n!="function"||!(t in Z.prototype))return!1;if(e===n)return!0;var o=Oo(n);return!!o&&e===o[0]}function Hh(e){return!!sa&&sa in e}var Gh=Or?Ft:Jo;function sr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||An;return e===n}function su(e){return e===e&&!fe(e)}function au(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in ie(n))}}function Vh(e){var t=ai(e,function(o){return n.size===w&&n.clear(),o}),n=t.cache;return t}function Yh(e,t){var n=e[1],o=t[1],u=n|o,c=u<(ne|me|xe),d=o==xe&&n==pe||o==xe&&n==lt&&e[7].length<=t[8]||o==(xe|lt)&&t[7].length<=t[8]&&n==pe;if(!(c||d))return e;o&ne&&(e[2]=t[2],u|=n&ne?0:ae);var g=t[3];if(g){var _=e[3];e[3]=_?za(_,g,t[4]):g,e[4]=_?zt(e[3],C):t[4]}return g=t[5],g&&(_=e[5],e[5]=_?Ha(_,g,t[6]):g,e[6]=_?zt(e[5],C):t[6]),g=t[7],g&&(e[7]=g),o&xe&&(e[8]=e[8]==null?t[8]:Oe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=u,e}function Xh(e){var t=[];if(e!=null)for(var n in ie(e))t.push(n);return t}function Kh(e){return Lr.call(e)}function uu(e,t,n){return t=Se(t===r?e.length-1:t,0),function(){for(var o=arguments,u=-1,c=Se(o.length-t,0),d=y(c);++u<c;)d[u]=o[t+u];u=-1;for(var g=y(t+1);++u<t;)g[u]=o[u];return g[t]=n(d),He(e,this,g)}}function lu(e,t){return t.length<2?e:un(e,ot(t,0,-1))}function Zh(e,t){for(var n=e.length,o=Oe(t.length,n),u=Be(e);o--;){var c=t[o];e[o]=Mt(c,n)?u[c]:r}return e}function No(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var fu=hu(La),ar=cc||function(e,t){return Te.setTimeout(e,t)},Wo=hu(wh);function cu(e,t,n){var o=t+"";return Wo(e,Uh(o,Qh(Bh(o),n)))}function hu(e){var t=0,n=0;return function(){var o=gc(),u=ft-(o-n);if(n=o,u>0){if(++t>=en)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ri(e,t){var n=-1,o=e.length,u=o-1;for(t=t===r?o:t;++n<t;){var c=wo(n,u),d=e[c];e[c]=e[n],e[n]=d}return e.length=t,e}var du=Vh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($l,function(n,o,u,c){t.push(u?c.replace(Yl,"$1"):o||n)}),t});function Et(e){if(typeof e=="string"||Ye(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function fn(e){if(e!=null){try{return Pr.call(e)}catch{}try{return e+""}catch{}}return""}function Qh(e,t){return tt(Al,function(n){var o="_."+n[0];t&n[1]&&!Tr(e,o)&&e.push(o)}),e.sort()}function pu(e){if(e instanceof Z)return e.clone();var t=new rt(e.__wrapped__,e.__chain__);return t.__actions__=Be(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Jh(e,t,n){(n?Fe(e,t,n):t===r)?t=1:t=Se(V(t),0);var o=e==null?0:e.length;if(!o||t<1)return[];for(var u=0,c=0,d=y($r(o/t));u<o;)d[c++]=ot(e,u,u+=t);return d}function jh(e){for(var t=-1,n=e==null?0:e.length,o=0,u=[];++t<n;){var c=e[t];c&&(u[o++]=c)}return u}function ed(){var e=arguments.length;if(!e)return[];for(var t=y(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(z(n)?Be(n):[n],Ie(t,1))}var td=X(function(e,t){return ge(e)?tr(e,Ie(t,1,ge,!0)):[]}),nd=X(function(e,t){var n=st(t);return ge(n)&&(n=r),ge(e)?tr(e,Ie(t,1,ge,!0),F(n,2)):[]}),rd=X(function(e,t){var n=st(t);return ge(n)&&(n=r),ge(e)?tr(e,Ie(t,1,ge,!0),r,n):[]});function id(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===r?1:V(t),ot(e,t<0?0:t,o)):[]}function od(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===r?1:V(t),t=o-t,ot(e,0,t<0?0:t)):[]}function sd(e,t){return e&&e.length?Kr(e,F(t,3),!0,!0):[]}function ad(e,t){return e&&e.length?Kr(e,F(t,3),!0):[]}function ud(e,t,n,o){var u=e==null?0:e.length;return u?(n&&typeof n!="number"&&Fe(e,t,n)&&(n=0,o=u),eh(e,t,n,o)):[]}function gu(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var u=n==null?0:V(n);return u<0&&(u=Se(o+u,0)),Ir(e,F(t,3),u)}function vu(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var u=o-1;return n!==r&&(u=V(n),u=n<0?Se(o+u,0):Oe(u,o-1)),Ir(e,F(t,3),u,!0)}function mu(e){var t=e==null?0:e.length;return t?Ie(e,1):[]}function ld(e){var t=e==null?0:e.length;return t?Ie(e,Tt):[]}function fd(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:V(t),Ie(e,t)):[]}function cd(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var u=e[t];o[u[0]]=u[1]}return o}function _u(e){return e&&e.length?e[0]:r}function hd(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var u=n==null?0:V(n);return u<0&&(u=Se(o+u,0)),wn(e,t,u)}function dd(e){var t=e==null?0:e.length;return t?ot(e,0,-1):[]}var pd=X(function(e){var t=ue(e,Eo);return t.length&&t[0]===e[0]?po(t):[]}),gd=X(function(e){var t=st(e),n=ue(e,Eo);return t===st(n)?t=r:n.pop(),n.length&&n[0]===e[0]?po(n,F(t,2)):[]}),vd=X(function(e){var t=st(e),n=ue(e,Eo);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?po(n,r,t):[]});function md(e,t){return e==null?"":dc.call(e,t)}function st(e){var t=e==null?0:e.length;return t?e[t-1]:r}function _d(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var u=o;return n!==r&&(u=V(n),u=u<0?Se(o+u,0):Oe(u,o-1)),t===t?Qf(e,t,u):Ir(e,Js,u,!0)}function wd(e,t){return e&&e.length?Da(e,V(t)):r}var bd=X(wu);function wu(e,t){return e&&e.length&&t&&t.length?_o(e,t):e}function yd(e,t,n){return e&&e.length&&t&&t.length?_o(e,t,F(n,2)):e}function Sd(e,t,n){return e&&e.length&&t&&t.length?_o(e,t,r,n):e}var Ad=Lt(function(e,t){var n=e==null?0:e.length,o=lo(e,t);return Pa(e,ue(t,function(u){return Mt(u,n)?+u:u}).sort(ka)),o});function Ed(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,u=[],c=e.length;for(t=F(t,3);++o<c;){var d=e[o];t(d,o,e)&&(n.push(d),u.push(o))}return Pa(e,u),n}function Bo(e){return e==null?e:mc.call(e)}function xd(e,t,n){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Fe(e,t,n)?(t=0,n=o):(t=t==null?0:V(t),n=n===r?o:V(n)),ot(e,t,n)):[]}function Cd(e,t){return Xr(e,t)}function Td(e,t,n){return yo(e,t,F(n,2))}function Id(e,t){var n=e==null?0:e.length;if(n){var o=Xr(e,t);if(o<n&>(e[o],t))return o}return-1}function Dd(e,t){return Xr(e,t,!0)}function Rd(e,t,n){return yo(e,t,F(n,2),!0)}function Od(e,t){var n=e==null?0:e.length;if(n){var o=Xr(e,t,!0)-1;if(gt(e[o],t))return o}return-1}function Pd(e){return e&&e.length?Ma(e):[]}function Ld(e,t){return e&&e.length?Ma(e,F(t,2)):[]}function Md(e){var t=e==null?0:e.length;return t?ot(e,1,t):[]}function Fd(e,t,n){return e&&e.length?(t=n||t===r?1:V(t),ot(e,0,t<0?0:t)):[]}function Nd(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===r?1:V(t),t=o-t,ot(e,t<0?0:t,o)):[]}function Wd(e,t){return e&&e.length?Kr(e,F(t,3),!1,!0):[]}function Bd(e,t){return e&&e.length?Kr(e,F(t,3)):[]}var $d=X(function(e){return Vt(Ie(e,1,ge,!0))}),qd=X(function(e){var t=st(e);return ge(t)&&(t=r),Vt(Ie(e,1,ge,!0),F(t,2))}),Ud=X(function(e){var t=st(e);return t=typeof t=="function"?t:r,Vt(Ie(e,1,ge,!0),r,t)});function kd(e){return e&&e.length?Vt(e):[]}function zd(e,t){return e&&e.length?Vt(e,F(t,2)):[]}function Hd(e,t){return t=typeof t=="function"?t:r,e&&e.length?Vt(e,r,t):[]}function $o(e){if(!(e&&e.length))return[];var t=0;return e=Ut(e,function(n){if(ge(n))return t=Se(n.length,t),!0}),to(t,function(n){return ue(e,Ji(n))})}function bu(e,t){if(!(e&&e.length))return[];var n=$o(e);return t==null?n:ue(n,function(o){return He(t,r,o)})}var Gd=X(function(e,t){return ge(e)?tr(e,t):[]}),Vd=X(function(e){return Ao(Ut(e,ge))}),Yd=X(function(e){var t=st(e);return ge(t)&&(t=r),Ao(Ut(e,ge),F(t,2))}),Xd=X(function(e){var t=st(e);return t=typeof t=="function"?t:r,Ao(Ut(e,ge),r,t)}),Kd=X($o);function Zd(e,t){return Ba(e||[],t||[],er)}function Qd(e,t){return Ba(e||[],t||[],ir)}var Jd=X(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,bu(e,n)});function yu(e){var t=f(e);return t.__chain__=!0,t}function jd(e,t){return t(e),e}function ii(e,t){return t(e)}var ep=Lt(function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,u=function(c){return lo(c,e)};return t>1||this.__actions__.length||!(o instanceof Z)||!Mt(n)?this.thru(u):(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:ii,args:[u],thisArg:r}),new rt(o,this.__chain__).thru(function(c){return t&&!c.length&&c.push(r),c}))});function tp(){return yu(this)}function np(){return new rt(this.value(),this.__chain__)}function rp(){this.__values__===r&&(this.__values__=Fu(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function ip(){return this}function op(e){for(var t,n=this;n instanceof zr;){var o=pu(n);o.__index__=0,o.__values__=r,t?u.__wrapped__=o:t=o;var u=o;n=n.__wrapped__}return u.__wrapped__=e,t}function sp(){var e=this.__wrapped__;if(e instanceof Z){var t=e;return this.__actions__.length&&(t=new Z(this)),t=t.reverse(),t.__actions__.push({func:ii,args:[Bo],thisArg:r}),new rt(t,this.__chain__)}return this.thru(Bo)}function ap(){return Wa(this.__wrapped__,this.__actions__)}var up=Zr(function(e,t,n){re.call(e,n)?++e[n]:Ot(e,n,1)});function lp(e,t,n){var o=z(e)?Zs:jc;return n&&Fe(e,t,n)&&(t=r),o(e,F(t,3))}function fp(e,t){var n=z(e)?Ut:ba;return n(e,F(t,3))}var cp=Xa(gu),hp=Xa(vu);function dp(e,t){return Ie(oi(e,t),1)}function pp(e,t){return Ie(oi(e,t),Tt)}function gp(e,t,n){return n=n===r?1:V(n),Ie(oi(e,t),n)}function Su(e,t){var n=z(e)?tt:Gt;return n(e,F(t,3))}function Au(e,t){var n=z(e)?Mf:wa;return n(e,F(t,3))}var vp=Zr(function(e,t,n){re.call(e,n)?e[n].push(t):Ot(e,n,[t])});function mp(e,t,n,o){e=$e(e)?e:On(e),n=n&&!o?V(n):0;var u=e.length;return n<0&&(n=Se(u+n,0)),fi(e)?n<=u&&e.indexOf(t,n)>-1:!!u&&wn(e,t,n)>-1}var _p=X(function(e,t,n){var o=-1,u=typeof t=="function",c=$e(e)?y(e.length):[];return Gt(e,function(d){c[++o]=u?He(t,d,n):nr(d,t,n)}),c}),wp=Zr(function(e,t,n){Ot(e,n,t)});function oi(e,t){var n=z(e)?ue:Ca;return n(e,F(t,3))}function bp(e,t,n,o){return e==null?[]:(z(t)||(t=t==null?[]:[t]),n=o?r:n,z(n)||(n=n==null?[]:[n]),Ra(e,t,n))}var yp=Zr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Sp(e,t,n){var o=z(e)?Zi:ea,u=arguments.length<3;return o(e,F(t,4),n,u,Gt)}function Ap(e,t,n){var o=z(e)?Ff:ea,u=arguments.length<3;return o(e,F(t,4),n,u,wa)}function Ep(e,t){var n=z(e)?Ut:ba;return n(e,ui(F(t,3)))}function xp(e){var t=z(e)?ga:mh;return t(e)}function Cp(e,t,n){(n?Fe(e,t,n):t===r)?t=1:t=V(t);var o=z(e)?Xc:_h;return o(e,t)}function Tp(e){var t=z(e)?Kc:bh;return t(e)}function Ip(e){if(e==null)return 0;if($e(e))return fi(e)?yn(e):e.length;var t=Pe(e);return t==ct||t==ht?e.size:vo(e).length}function Dp(e,t,n){var o=z(e)?Qi:yh;return n&&Fe(e,t,n)&&(t=r),o(e,F(t,3))}var Rp=X(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Fe(e,t[0],t[1])?t=[]:n>2&&Fe(t[0],t[1],t[2])&&(t=[t[0]]),Ra(e,Ie(t,1),[])}),si=fc||function(){return Te.Date.now()};function Op(e,t){if(typeof t!="function")throw new nt(p);return e=V(e),function(){if(--e<1)return t.apply(this,arguments)}}function Eu(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Pt(e,xe,r,r,r,r,t)}function xu(e,t){var n;if(typeof t!="function")throw new nt(p);return e=V(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var qo=X(function(e,t,n){var o=ne;if(n.length){var u=zt(n,Dn(qo));o|=Ee}return Pt(e,o,t,n,u)}),Cu=X(function(e,t,n){var o=ne|me;if(n.length){var u=zt(n,Dn(Cu));o|=Ee}return Pt(t,o,e,n,u)});function Tu(e,t,n){t=n?r:t;var o=Pt(e,pe,r,r,r,r,r,t);return o.placeholder=Tu.placeholder,o}function Iu(e,t,n){t=n?r:t;var o=Pt(e,be,r,r,r,r,r,t);return o.placeholder=Iu.placeholder,o}function Du(e,t,n){var o,u,c,d,g,_,E=0,x=!1,T=!1,D=!0;if(typeof e!="function")throw new nt(p);t=at(t)||0,fe(n)&&(x=!!n.leading,T="maxWait"in n,c=T?Se(at(n.maxWait)||0,t):c,D="trailing"in n?!!n.trailing:D);function L(ve){var vt=o,Wt=u;return o=u=r,E=ve,d=e.apply(Wt,vt),d}function N(ve){return E=ve,g=ar(K,t),x?L(ve):d}function Y(ve){var vt=ve-_,Wt=ve-E,Xu=t-vt;return T?Oe(Xu,c-Wt):Xu}function W(ve){var vt=ve-_,Wt=ve-E;return _===r||vt>=t||vt<0||T&&Wt>=c}function K(){var ve=si();if(W(ve))return Q(ve);g=ar(K,Y(ve))}function Q(ve){return g=r,D&&o?L(ve):(o=u=r,d)}function Xe(){g!==r&&$a(g),E=0,o=_=u=g=r}function Ne(){return g===r?d:Q(si())}function Ke(){var ve=si(),vt=W(ve);if(o=arguments,u=this,_=ve,vt){if(g===r)return N(_);if(T)return $a(g),g=ar(K,t),L(_)}return g===r&&(g=ar(K,t)),d}return Ke.cancel=Xe,Ke.flush=Ne,Ke}var Pp=X(function(e,t){return _a(e,1,t)}),Lp=X(function(e,t,n){return _a(e,at(t)||0,n)});function Mp(e){return Pt(e,Ce)}function ai(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new nt(p);var n=function(){var o=arguments,u=t?t.apply(this,o):o[0],c=n.cache;if(c.has(u))return c.get(u);var d=e.apply(this,o);return n.cache=c.set(u,d)||c,d};return n.cache=new(ai.Cache||Rt),n}ai.Cache=Rt;function ui(e){if(typeof e!="function")throw new nt(p);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Fp(e){return xu(2,e)}var Np=Sh(function(e,t){t=t.length==1&&z(t[0])?ue(t[0],Ge(F())):ue(Ie(t,1),Ge(F()));var n=t.length;return X(function(o){for(var u=-1,c=Oe(o.length,n);++u<c;)o[u]=t[u].call(this,o[u]);return He(e,this,o)})}),Uo=X(function(e,t){var n=zt(t,Dn(Uo));return Pt(e,Ee,r,t,n)}),Ru=X(function(e,t){var n=zt(t,Dn(Ru));return Pt(e,Re,r,t,n)}),Wp=Lt(function(e,t){return Pt(e,lt,r,r,r,t)});function Bp(e,t){if(typeof e!="function")throw new nt(p);return t=t===r?t:V(t),X(e,t)}function $p(e,t){if(typeof e!="function")throw new nt(p);return t=t==null?0:Se(V(t),0),X(function(n){var o=n[t],u=Xt(n,0,t);return o&&kt(u,o),He(e,this,u)})}function qp(e,t,n){var o=!0,u=!0;if(typeof e!="function")throw new nt(p);return fe(n)&&(o="leading"in n?!!n.leading:o,u="trailing"in n?!!n.trailing:u),Du(e,t,{leading:o,maxWait:t,trailing:u})}function Up(e){return Eu(e,1)}function kp(e,t){return Uo(xo(t),e)}function zp(){if(!arguments.length)return[];var e=arguments[0];return z(e)?e:[e]}function Hp(e){return it(e,P)}function Gp(e,t){return t=typeof t=="function"?t:r,it(e,P,t)}function Vp(e){return it(e,A|P)}function Yp(e,t){return t=typeof t=="function"?t:r,it(e,A|P,t)}function Xp(e,t){return t==null||ma(e,t,Ae(t))}function gt(e,t){return e===t||e!==e&&t!==t}var Kp=ei(ho),Zp=ei(function(e,t){return e>=t}),cn=Aa(function(){return arguments}())?Aa:function(e){return he(e)&&re.call(e,"callee")&&!la.call(e,"callee")},z=y.isArray,Qp=Hs?Ge(Hs):oh;function $e(e){return e!=null&&li(e.length)&&!Ft(e)}function ge(e){return he(e)&&$e(e)}function Jp(e){return e===!0||e===!1||he(e)&&Me(e)==Un}var Kt=hc||Jo,jp=Gs?Ge(Gs):sh;function eg(e){return he(e)&&e.nodeType===1&&!ur(e)}function tg(e){if(e==null)return!0;if($e(e)&&(z(e)||typeof e=="string"||typeof e.splice=="function"||Kt(e)||Rn(e)||cn(e)))return!e.length;var t=Pe(e);if(t==ct||t==ht)return!e.size;if(sr(e))return!vo(e).length;for(var n in e)if(re.call(e,n))return!1;return!0}function ng(e,t){return rr(e,t)}function rg(e,t,n){n=typeof n=="function"?n:r;var o=n?n(e,t):r;return o===r?rr(e,t,r,n):!!o}function ko(e){if(!he(e))return!1;var t=Me(e);return t==yr||t==xl||typeof e.message=="string"&&typeof e.name=="string"&&!ur(e)}function ig(e){return typeof e=="number"&&ca(e)}function Ft(e){if(!fe(e))return!1;var t=Me(e);return t==Sr||t==_s||t==El||t==Tl}function Ou(e){return typeof e=="number"&&e==V(e)}function li(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=je}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function he(e){return e!=null&&typeof e=="object"}var Pu=Vs?Ge(Vs):uh;function og(e,t){return e===t||go(e,t,Po(t))}function sg(e,t,n){return n=typeof n=="function"?n:r,go(e,t,Po(t),n)}function ag(e){return Lu(e)&&e!=+e}function ug(e){if(Gh(e))throw new U(h);return Ea(e)}function lg(e){return e===null}function fg(e){return e==null}function Lu(e){return typeof e=="number"||he(e)&&Me(e)==zn}function ur(e){if(!he(e)||Me(e)!=It)return!1;var t=Nr(e);if(t===null)return!0;var n=re.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pr.call(n)==sc}var zo=Ys?Ge(Ys):lh;function cg(e){return Ou(e)&&e>=-9007199254740991&&e<=je}var Mu=Xs?Ge(Xs):fh;function fi(e){return typeof e=="string"||!z(e)&&he(e)&&Me(e)==Gn}function Ye(e){return typeof e=="symbol"||he(e)&&Me(e)==Ar}var Rn=Ks?Ge(Ks):ch;function hg(e){return e===r}function dg(e){return he(e)&&Pe(e)==Vn}function pg(e){return he(e)&&Me(e)==Dl}var gg=ei(mo),vg=ei(function(e,t){return e<=t});function Fu(e){if(!e)return[];if($e(e))return fi(e)?dt(e):Be(e);if(Kn&&e[Kn])return Xf(e[Kn]());var t=Pe(e),n=t==ct?ro:t==ht?Dr:On;return n(e)}function Nt(e){if(!e)return e===0?e:0;if(e=at(e),e===Tt||e===-1/0){var t=e<0?-1:1;return t*Di}return e===e?e:0}function V(e){var t=Nt(e),n=t%1;return t===t?n?t-n:t:0}function Nu(e){return e?an(V(e),0,ze):0}function at(e){if(typeof e=="number")return e;if(Ye(e))return qn;if(fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ta(e);var n=Zl.test(e);return n||Jl.test(e)?Of(e.slice(2),n?2:8):Kl.test(e)?qn:+e}function Wu(e){return At(e,qe(e))}function mg(e){return e?an(V(e),-9007199254740991,je):e===0?e:0}function te(e){return e==null?"":Ve(e)}var _g=Tn(function(e,t){if(sr(t)||$e(t)){At(t,Ae(t),e);return}for(var n in t)re.call(t,n)&&er(e,n,t[n])}),Bu=Tn(function(e,t){At(t,qe(t),e)}),ci=Tn(function(e,t,n,o){At(t,qe(t),e,o)}),wg=Tn(function(e,t,n,o){At(t,Ae(t),e,o)}),bg=Lt(lo);function yg(e,t){var n=Cn(e);return t==null?n:va(n,t)}var Sg=X(function(e,t){e=ie(e);var n=-1,o=t.length,u=o>2?t[2]:r;for(u&&Fe(t[0],t[1],u)&&(o=1);++n<o;)for(var c=t[n],d=qe(c),g=-1,_=d.length;++g<_;){var E=d[g],x=e[E];(x===r||gt(x,An[E])&&!re.call(e,E))&&(e[E]=c[E])}return e}),Ag=X(function(e){return e.push(r,tu),He($u,r,e)});function Eg(e,t){return Qs(e,F(t,3),St)}function xg(e,t){return Qs(e,F(t,3),co)}function Cg(e,t){return e==null?e:fo(e,F(t,3),qe)}function Tg(e,t){return e==null?e:ya(e,F(t,3),qe)}function Ig(e,t){return e&&St(e,F(t,3))}function Dg(e,t){return e&&co(e,F(t,3))}function Rg(e){return e==null?[]:Vr(e,Ae(e))}function Og(e){return e==null?[]:Vr(e,qe(e))}function Ho(e,t,n){var o=e==null?r:un(e,t);return o===r?n:o}function Pg(e,t){return e!=null&&iu(e,t,th)}function Go(e,t){return e!=null&&iu(e,t,nh)}var Lg=Za(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Lr.call(t)),e[t]=n},Yo(Ue)),Mg=Za(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Lr.call(t)),re.call(e,t)?e[t].push(n):e[t]=[n]},F),Fg=X(nr);function Ae(e){return $e(e)?pa(e):vo(e)}function qe(e){return $e(e)?pa(e,!0):hh(e)}function Ng(e,t){var n={};return t=F(t,3),St(e,function(o,u,c){Ot(n,t(o,u,c),o)}),n}function Wg(e,t){var n={};return t=F(t,3),St(e,function(o,u,c){Ot(n,u,t(o,u,c))}),n}var Bg=Tn(function(e,t,n){Yr(e,t,n)}),$u=Tn(function(e,t,n,o){Yr(e,t,n,o)}),$g=Lt(function(e,t){var n={};if(e==null)return n;var o=!1;t=ue(t,function(c){return c=Yt(c,e),o||(o=c.length>1),c}),At(e,Ro(e),n),o&&(n=it(n,A|R|P,Lh));for(var u=t.length;u--;)So(n,t[u]);return n});function qg(e,t){return qu(e,ui(F(t)))}var Ug=Lt(function(e,t){return e==null?{}:ph(e,t)});function qu(e,t){if(e==null)return{};var n=ue(Ro(e),function(o){return[o]});return t=F(t),Oa(e,n,function(o,u){return t(o,u[0])})}function kg(e,t,n){t=Yt(t,e);var o=-1,u=t.length;for(u||(u=1,e=r);++o<u;){var c=e==null?r:e[Et(t[o])];c===r&&(o=u,c=n),e=Ft(c)?c.call(e):c}return e}function zg(e,t,n){return e==null?e:ir(e,t,n)}function Hg(e,t,n,o){return o=typeof o=="function"?o:r,e==null?e:ir(e,t,n,o)}var Uu=ja(Ae),ku=ja(qe);function Gg(e,t,n){var o=z(e),u=o||Kt(e)||Rn(e);if(t=F(t,4),n==null){var c=e&&e.constructor;u?n=o?new c:[]:fe(e)?n=Ft(c)?Cn(Nr(e)):{}:n={}}return(u?tt:St)(e,function(d,g,_){return t(n,d,g,_)}),n}function Vg(e,t){return e==null?!0:So(e,t)}function Yg(e,t,n){return e==null?e:Na(e,t,xo(n))}function Xg(e,t,n,o){return o=typeof o=="function"?o:r,e==null?e:Na(e,t,xo(n),o)}function On(e){return e==null?[]:no(e,Ae(e))}function Kg(e){return e==null?[]:no(e,qe(e))}function Zg(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=at(n),n=n===n?n:0),t!==r&&(t=at(t),t=t===t?t:0),an(at(e),t,n)}function Qg(e,t,n){return t=Nt(t),n===r?(n=t,t=0):n=Nt(n),e=at(e),rh(e,t,n)}function Jg(e,t,n){if(n&&typeof n!="boolean"&&Fe(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Nt(e),t===r?(t=e,e=0):t=Nt(t)),e>t){var o=e;e=t,t=o}if(n||e%1||t%1){var u=ha();return Oe(e+u*(t-e+Rf("1e-"+((u+"").length-1))),t)}return wo(e,t)}var jg=In(function(e,t,n){return t=t.toLowerCase(),e+(n?zu(t):t)});function zu(e){return Vo(te(e).toLowerCase())}function Hu(e){return e=te(e),e&&e.replace(ef,zf).replace(bf,"")}function ev(e,t,n){e=te(e),t=Ve(t);var o=e.length;n=n===r?o:an(V(n),0,o);var u=n;return n-=t.length,n>=0&&e.slice(n,u)==t}function tv(e){return e=te(e),e&&Ml.test(e)?e.replace(ys,Hf):e}function nv(e){return e=te(e),e&&ql.test(e)?e.replace(qi,"\\$&"):e}var rv=In(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),iv=In(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),ov=Ya("toLowerCase");function sv(e,t,n){e=te(e),t=V(t);var o=t?yn(e):0;if(!t||o>=t)return e;var u=(t-o)/2;return jr(qr(u),n)+e+jr($r(u),n)}function av(e,t,n){e=te(e),t=V(t);var o=t?yn(e):0;return t&&o<t?e+jr(t-o,n):e}function uv(e,t,n){e=te(e),t=V(t);var o=t?yn(e):0;return t&&o<t?jr(t-o,n)+e:e}function lv(e,t,n){return n||t==null?t=0:t&&(t=+t),vc(te(e).replace(Ui,""),t||0)}function fv(e,t,n){return(n?Fe(e,t,n):t===r)?t=1:t=V(t),bo(te(e),t)}function cv(){var e=arguments,t=te(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var hv=In(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function dv(e,t,n){return n&&typeof n!="number"&&Fe(e,t,n)&&(t=n=r),n=n===r?ze:n>>>0,n?(e=te(e),e&&(typeof t=="string"||t!=null&&!zo(t))&&(t=Ve(t),!t&&bn(e))?Xt(dt(e),0,n):e.split(t,n)):[]}var pv=In(function(e,t,n){return e+(n?" ":"")+Vo(t)});function gv(e,t,n){return e=te(e),n=n==null?0:an(V(n),0,e.length),t=Ve(t),e.slice(n,n+t.length)==t}function vv(e,t,n){var o=f.templateSettings;n&&Fe(e,t,n)&&(t=r),e=te(e),t=ci({},t,o,eu);var u=ci({},t.imports,o.imports,eu),c=Ae(u),d=no(u,c),g,_,E=0,x=t.interpolate||Er,T="__p += '",D=io((t.escape||Er).source+"|"+x.source+"|"+(x===Ss?Xl:Er).source+"|"+(t.evaluate||Er).source+"|$","g"),L="//# sourceURL="+(re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xf+"]")+` `;e.replace(D,function(W,K,Q,Xe,Ne,Ke){return Q||(Q=Xe),T+=e.slice(E,Ke).replace(tf,Gf),K&&(g=!0,T+=`' + __e(`+K+`) + '`),Ne&&(_=!0,T+=`'; `+Ne+`; __p += '`),Q&&(T+=`' + ((__t = (`+Q+`)) == null ? '' : __t) + '`),E=Ke+W.length,W}),T+=`'; `;var N=re.call(t,"variable")&&t.variable;if(!N)T=`with (obj) { `+T+` } `;else if(Vl.test(N))throw new U(m);T=(_?T.replace(Rl,""):T).replace(Ol,"$1").replace(Pl,"$1;"),T="function("+(N||"obj")+`) { `+(N?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(g?", __e = _.escape":"")+(_?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+T+`return __p }`;var Y=Vu(function(){return j(c,L+"return "+T).apply(r,d)});if(Y.source=T,ko(Y))throw Y;return Y}function mv(e){return te(e).toLowerCase()}function _v(e){return te(e).toUpperCase()}function wv(e,t,n){if(e=te(e),e&&(n||t===r))return ta(e);if(!e||!(t=Ve(t)))return e;var o=dt(e),u=dt(t),c=na(o,u),d=ra(o,u)+1;return Xt(o,c,d).join("")}function bv(e,t,n){if(e=te(e),e&&(n||t===r))return e.slice(0,oa(e)+1);if(!e||!(t=Ve(t)))return e;var o=dt(e),u=ra(o,dt(t))+1;return Xt(o,0,u).join("")}function yv(e,t,n){if(e=te(e),e&&(n||t===r))return e.replace(Ui,"");if(!e||!(t=Ve(t)))return e;var o=dt(e),u=na(o,dt(t));return Xt(o,u).join("")}function Sv(e,t){var n=jt,o=wt;if(fe(t)){var u="separator"in t?t.separator:u;n="length"in t?V(t.length):n,o="omission"in t?Ve(t.omission):o}e=te(e);var c=e.length;if(bn(e)){var d=dt(e);c=d.length}if(n>=c)return e;var g=n-yn(o);if(g<1)return o;var _=d?Xt(d,0,g).join(""):e.slice(0,g);if(u===r)return _+o;if(d&&(g+=_.length-g),zo(u)){if(e.slice(g).search(u)){var E,x=_;for(u.global||(u=io(u.source,te(As.exec(u))+"g")),u.lastIndex=0;E=u.exec(x);)var T=E.index;_=_.slice(0,T===r?g:T)}}else if(e.indexOf(Ve(u),g)!=g){var D=_.lastIndexOf(u);D>-1&&(_=_.slice(0,D))}return _+o}function Av(e){return e=te(e),e&&Ll.test(e)?e.replace(bs,Jf):e}var Ev=In(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Vo=Ya("toUpperCase");function Gu(e,t,n){return e=te(e),t=n?r:t,t===r?Yf(e)?tc(e):Bf(e):e.match(t)||[]}var Vu=X(function(e,t){try{return He(e,r,t)}catch(n){return ko(n)?n:new U(n)}}),xv=Lt(function(e,t){return tt(t,function(n){n=Et(n),Ot(e,n,qo(e[n],e))}),e});function Cv(e){var t=e==null?0:e.length,n=F();return e=t?ue(e,function(o){if(typeof o[1]!="function")throw new nt(p);return[n(o[0]),o[1]]}):[],X(function(o){for(var u=-1;++u<t;){var c=e[u];if(He(c[0],this,o))return He(c[1],this,o)}})}function Tv(e){return Jc(it(e,A))}function Yo(e){return function(){return e}}function Iv(e,t){return e==null||e!==e?t:e}var Dv=Ka(),Rv=Ka(!0);function Ue(e){return e}function Xo(e){return xa(typeof e=="function"?e:it(e,A))}function Ov(e){return Ta(it(e,A))}function Pv(e,t){return Ia(e,it(t,A))}var Lv=X(function(e,t){return function(n){return nr(n,e,t)}}),Mv=X(function(e,t){return function(n){return nr(e,n,t)}});function Ko(e,t,n){var o=Ae(t),u=Vr(t,o);n==null&&!(fe(t)&&(u.length||!o.length))&&(n=t,t=e,e=this,u=Vr(t,Ae(t)));var c=!(fe(n)&&"chain"in n)||!!n.chain,d=Ft(e);return tt(u,function(g){var _=t[g];e[g]=_,d&&(e.prototype[g]=function(){var E=this.__chain__;if(c||E){var x=e(this.__wrapped__),T=x.__actions__=Be(this.__actions__);return T.push({func:_,args:arguments,thisArg:e}),x.__chain__=E,x}return _.apply(e,kt([this.value()],arguments))})}),e}function Fv(){return Te._===this&&(Te._=ac),this}function Zo(){}function Nv(e){return e=V(e),X(function(t){return Da(t,e)})}var Wv=To(ue),Bv=To(Zs),$v=To(Qi);function Yu(e){return Mo(e)?Ji(Et(e)):gh(e)}function qv(e){return function(t){return e==null?r:un(e,t)}}var Uv=Qa(),kv=Qa(!0);function Qo(){return[]}function Jo(){return!1}function zv(){return{}}function Hv(){return""}function Gv(){return!0}function Vv(e,t){if(e=V(e),e<1||e>je)return[];var n=ze,o=Oe(e,ze);t=F(t),e-=ze;for(var u=to(o,t);++n<e;)t(n);return u}function Yv(e){return z(e)?ue(e,Et):Ye(e)?[e]:Be(du(te(e)))}function Xv(e){var t=++oc;return te(e)+t}var Kv=Jr(function(e,t){return e+t},0),Zv=Io("ceil"),Qv=Jr(function(e,t){return e/t},1),Jv=Io("floor");function jv(e){return e&&e.length?Gr(e,Ue,ho):r}function em(e,t){return e&&e.length?Gr(e,F(t,2),ho):r}function tm(e){return js(e,Ue)}function nm(e,t){return js(e,F(t,2))}function rm(e){return e&&e.length?Gr(e,Ue,mo):r}function im(e,t){return e&&e.length?Gr(e,F(t,2),mo):r}var om=Jr(function(e,t){return e*t},1),sm=Io("round"),am=Jr(function(e,t){return e-t},0);function um(e){return e&&e.length?eo(e,Ue):0}function lm(e,t){return e&&e.length?eo(e,F(t,2)):0}return f.after=Op,f.ary=Eu,f.assign=_g,f.assignIn=Bu,f.assignInWith=ci,f.assignWith=wg,f.at=bg,f.before=xu,f.bind=qo,f.bindAll=xv,f.bindKey=Cu,f.castArray=zp,f.chain=yu,f.chunk=Jh,f.compact=jh,f.concat=ed,f.cond=Cv,f.conforms=Tv,f.constant=Yo,f.countBy=up,f.create=yg,f.curry=Tu,f.curryRight=Iu,f.debounce=Du,f.defaults=Sg,f.defaultsDeep=Ag,f.defer=Pp,f.delay=Lp,f.difference=td,f.differenceBy=nd,f.differenceWith=rd,f.drop=id,f.dropRight=od,f.dropRightWhile=sd,f.dropWhile=ad,f.fill=ud,f.filter=fp,f.flatMap=dp,f.flatMapDeep=pp,f.flatMapDepth=gp,f.flatten=mu,f.flattenDeep=ld,f.flattenDepth=fd,f.flip=Mp,f.flow=Dv,f.flowRight=Rv,f.fromPairs=cd,f.functions=Rg,f.functionsIn=Og,f.groupBy=vp,f.initial=dd,f.intersection=pd,f.intersectionBy=gd,f.intersectionWith=vd,f.invert=Lg,f.invertBy=Mg,f.invokeMap=_p,f.iteratee=Xo,f.keyBy=wp,f.keys=Ae,f.keysIn=qe,f.map=oi,f.mapKeys=Ng,f.mapValues=Wg,f.matches=Ov,f.matchesProperty=Pv,f.memoize=ai,f.merge=Bg,f.mergeWith=$u,f.method=Lv,f.methodOf=Mv,f.mixin=Ko,f.negate=ui,f.nthArg=Nv,f.omit=$g,f.omitBy=qg,f.once=Fp,f.orderBy=bp,f.over=Wv,f.overArgs=Np,f.overEvery=Bv,f.overSome=$v,f.partial=Uo,f.partialRight=Ru,f.partition=yp,f.pick=Ug,f.pickBy=qu,f.property=Yu,f.propertyOf=qv,f.pull=bd,f.pullAll=wu,f.pullAllBy=yd,f.pullAllWith=Sd,f.pullAt=Ad,f.range=Uv,f.rangeRight=kv,f.rearg=Wp,f.reject=Ep,f.remove=Ed,f.rest=Bp,f.reverse=Bo,f.sampleSize=Cp,f.set=zg,f.setWith=Hg,f.shuffle=Tp,f.slice=xd,f.sortBy=Rp,f.sortedUniq=Pd,f.sortedUniqBy=Ld,f.split=dv,f.spread=$p,f.tail=Md,f.take=Fd,f.takeRight=Nd,f.takeRightWhile=Wd,f.takeWhile=Bd,f.tap=jd,f.throttle=qp,f.thru=ii,f.toArray=Fu,f.toPairs=Uu,f.toPairsIn=ku,f.toPath=Yv,f.toPlainObject=Wu,f.transform=Gg,f.unary=Up,f.union=$d,f.unionBy=qd,f.unionWith=Ud,f.uniq=kd,f.uniqBy=zd,f.uniqWith=Hd,f.unset=Vg,f.unzip=$o,f.unzipWith=bu,f.update=Yg,f.updateWith=Xg,f.values=On,f.valuesIn=Kg,f.without=Gd,f.words=Gu,f.wrap=kp,f.xor=Vd,f.xorBy=Yd,f.xorWith=Xd,f.zip=Kd,f.zipObject=Zd,f.zipObjectDeep=Qd,f.zipWith=Jd,f.entries=Uu,f.entriesIn=ku,f.extend=Bu,f.extendWith=ci,Ko(f,f),f.add=Kv,f.attempt=Vu,f.camelCase=jg,f.capitalize=zu,f.ceil=Zv,f.clamp=Zg,f.clone=Hp,f.cloneDeep=Vp,f.cloneDeepWith=Yp,f.cloneWith=Gp,f.conformsTo=Xp,f.deburr=Hu,f.defaultTo=Iv,f.divide=Qv,f.endsWith=ev,f.eq=gt,f.escape=tv,f.escapeRegExp=nv,f.every=lp,f.find=cp,f.findIndex=gu,f.findKey=Eg,f.findLast=hp,f.findLastIndex=vu,f.findLastKey=xg,f.floor=Jv,f.forEach=Su,f.forEachRight=Au,f.forIn=Cg,f.forInRight=Tg,f.forOwn=Ig,f.forOwnRight=Dg,f.get=Ho,f.gt=Kp,f.gte=Zp,f.has=Pg,f.hasIn=Go,f.head=_u,f.identity=Ue,f.includes=mp,f.indexOf=hd,f.inRange=Qg,f.invoke=Fg,f.isArguments=cn,f.isArray=z,f.isArrayBuffer=Qp,f.isArrayLike=$e,f.isArrayLikeObject=ge,f.isBoolean=Jp,f.isBuffer=Kt,f.isDate=jp,f.isElement=eg,f.isEmpty=tg,f.isEqual=ng,f.isEqualWith=rg,f.isError=ko,f.isFinite=ig,f.isFunction=Ft,f.isInteger=Ou,f.isLength=li,f.isMap=Pu,f.isMatch=og,f.isMatchWith=sg,f.isNaN=ag,f.isNative=ug,f.isNil=fg,f.isNull=lg,f.isNumber=Lu,f.isObject=fe,f.isObjectLike=he,f.isPlainObject=ur,f.isRegExp=zo,f.isSafeInteger=cg,f.isSet=Mu,f.isString=fi,f.isSymbol=Ye,f.isTypedArray=Rn,f.isUndefined=hg,f.isWeakMap=dg,f.isWeakSet=pg,f.join=md,f.kebabCase=rv,f.last=st,f.lastIndexOf=_d,f.lowerCase=iv,f.lowerFirst=ov,f.lt=gg,f.lte=vg,f.max=jv,f.maxBy=em,f.mean=tm,f.meanBy=nm,f.min=rm,f.minBy=im,f.stubArray=Qo,f.stubFalse=Jo,f.stubObject=zv,f.stubString=Hv,f.stubTrue=Gv,f.multiply=om,f.nth=wd,f.noConflict=Fv,f.noop=Zo,f.now=si,f.pad=sv,f.padEnd=av,f.padStart=uv,f.parseInt=lv,f.random=Jg,f.reduce=Sp,f.reduceRight=Ap,f.repeat=fv,f.replace=cv,f.result=kg,f.round=sm,f.runInContext=v,f.sample=xp,f.size=Ip,f.snakeCase=hv,f.some=Dp,f.sortedIndex=Cd,f.sortedIndexBy=Td,f.sortedIndexOf=Id,f.sortedLastIndex=Dd,f.sortedLastIndexBy=Rd,f.sortedLastIndexOf=Od,f.startCase=pv,f.startsWith=gv,f.subtract=am,f.sum=um,f.sumBy=lm,f.template=vv,f.times=Vv,f.toFinite=Nt,f.toInteger=V,f.toLength=Nu,f.toLower=mv,f.toNumber=at,f.toSafeInteger=mg,f.toString=te,f.toUpper=_v,f.trim=wv,f.trimEnd=bv,f.trimStart=yv,f.truncate=Sv,f.unescape=Av,f.uniqueId=Xv,f.upperCase=Ev,f.upperFirst=Vo,f.each=Su,f.eachRight=Au,f.first=_u,Ko(f,function(){var e={};return St(f,function(t,n){re.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=s,tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),tt(["drop","take"],function(e,t){Z.prototype[e]=function(n){n=n===r?1:Se(V(n),0);var o=this.__filtered__&&!t?new Z(this):this.clone();return o.__filtered__?o.__takeCount__=Oe(n,o.__takeCount__):o.__views__.push({size:Oe(n,ze),type:e+(o.__dir__<0?"Right":"")}),o},Z.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),tt(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==bt||n==yt;Z.prototype[e]=function(u){var c=this.clone();return c.__iteratees__.push({iteratee:F(u,3),type:n}),c.__filtered__=c.__filtered__||o,c}}),tt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Z.prototype[e]=function(){return this[n](1).value()[0]}}),tt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Z.prototype[e]=function(){return this.__filtered__?new Z(this):this[n](1)}}),Z.prototype.compact=function(){return this.filter(Ue)},Z.prototype.find=function(e){return this.filter(e).head()},Z.prototype.findLast=function(e){return this.reverse().find(e)},Z.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new Z(this):this.map(function(n){return nr(n,e,t)})}),Z.prototype.reject=function(e){return this.filter(ui(F(e)))},Z.prototype.slice=function(e,t){e=V(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Z(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=V(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},Z.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Z.prototype.toArray=function(){return this.take(ze)},St(Z.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),u=f[o?"take"+(t=="last"?"Right":""):t],c=o||/^find/.test(t);u&&(f.prototype[t]=function(){var d=this.__wrapped__,g=o?[1]:arguments,_=d instanceof Z,E=g[0],x=_||z(d),T=function(K){var Q=u.apply(f,kt([K],g));return o&&D?Q[0]:Q};x&&n&&typeof E=="function"&&E.length!=1&&(_=x=!1);var D=this.__chain__,L=!!this.__actions__.length,N=c&&!D,Y=_&&!L;if(!c&&x){d=Y?d:new Z(this);var W=e.apply(d,g);return W.__actions__.push({func:ii,args:[T],thisArg:r}),new rt(W,D)}return N&&Y?e.apply(this,g):(W=this.thru(T),N?o?W.value()[0]:W.value():W)})}),tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Rr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var u=arguments;if(o&&!this.__chain__){var c=this.value();return t.apply(z(c)?c:[],u)}return this[n](function(d){return t.apply(z(d)?d:[],u)})}}),St(Z.prototype,function(e,t){var n=f[t];if(n){var o=n.name+"";re.call(xn,o)||(xn[o]=[]),xn[o].push({name:t,func:n})}}),xn[Qr(r,me).name]=[{name:"wrapper",func:r}],Z.prototype.clone=Ac,Z.prototype.reverse=Ec,Z.prototype.value=xc,f.prototype.at=ep,f.prototype.chain=tp,f.prototype.commit=np,f.prototype.next=rp,f.prototype.plant=op,f.prototype.reverse=sp,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=ap,f.prototype.first=f.prototype.head,Kn&&(f.prototype[Kn]=ip),f},Sn=nc();nn?((nn.exports=Sn)._=Sn,Yi._=Sn):Te._=Sn}).call(S0)}(hr,hr.exports)),hr.exports}var mi=A0();window.fetchEventSource=cm;const E0=localStorage.getItem("lqdDarkMode"),x0=localStorage.getItem("docsViewMode"),C0=localStorage.getItem("socialMediaPostsViewMode"),T0=localStorage.getItem("lqdNavbarShrinked"),ps=document.querySelector("body").getAttribute("data-theme"),I0=localStorage.getItem(ps+":lqdFocusModeEnabled");window.collectCreditsToFormData=function(a){document.querySelectorAll('input[name^="entities"]').forEach(r=>{const s=r.name,l=r.type==="checkbox"||r.type==="radio"?r.checked:r.value;a.append(s,l)})};window.Alpine=H;H.plugin(hm);H.plugin(Zm);H.plugin(t0);document.addEventListener("alpine:init",()=>{const a=H.$persist;H.data("modal",i=>n0(i)),H.data("clipboard",i=>dm(i)),H.data("assignViewCredits",i=>r0(i)),H.store("navbarShrink",{active:a(!!T0).as("lqdNavbarShrinked"),toggle(i){this.active=i?i==="shrink":!this.active,document.body.classList.toggle("navbar-shrinked",this.active)}}),H.data("navbarItem",()=>({dropdownOpen:!1,toggleDropdownOpen(i){this.dropdownOpen=i?i==="collapse":!this.dropdownOpen},item:{"x-ref":"item","@mouseenter"(){if(!H.store("navbarShrink").active)return;const i=this.$el.getBoundingClientRect(),r=this.$refs.item.querySelector(".lqd-navbar-dropdown");if(["y","height","bottom"].forEach(s=>this.$refs.item.style.setProperty(`--item-${s}`,`${i[s]}px`)),r){const s=r.getBoundingClientRect();["height"].forEach(l=>this.$refs.item.style.setProperty(`--dropdown-${l}`,`${s[l]}px`))}}}})),H.data("navbarLink",({isDemo:i=!1})=>({isDemo:i,isActive:!1,dropdown:null,dropdownItems:[],dropdownLinks:[],init(){const r=this.$el.closest(".lqd-navbar-inner");this.dropdown=this.$el.nextElementSibling&&this.$el.nextElementSibling.classList.contains("lqd-navbar-dropdown")&&this.$el.nextElementSibling,this.dropdownItems=this.dropdown?this.dropdown.querySelectorAll(".lqd-navbar-dropdown-link"):[],this.dropdownItems.forEach(s=>this.dropdownLinks.push(s.href)),this.isActive=this.$el.href===window.location.href||this.dropdownLinks.includes(window.location.href),this.$el.classList.toggle("active",this.isActive),this.$nextTick(()=>{var s,l;(l=(s=this.dropdown)==null?void 0:s.classList)==null||l.toggle("hidden",!this.isActive),r&&!this.isDemo&&this.isActive&&this.$el.parentElement.offsetTop+this.$el.parentElement.offsetHeight>window.innerHeight&&r.scrollTo({top:this.$el.parentElement.offsetTop-window.innerHeight/2})})}})),H.store("mobileNav",{navCollapse:!0,toggleNav(i){this.navCollapse=i?i==="collapse":!this.navCollapse},templatesCollapse:!0,toggleTemplates(i){this.templatesCollapse=i?i==="collapse":!this.templatesCollapse},searchCollapse:!0,toggleSearch(i){this.searchCollapse=i?i==="collapse":!this.searchCollapse}}),H.store("darkMode",{on:a(!!E0).as("lqdDarkMode"),toggle(){this.on=!this.on,document.body.classList.toggle("theme-dark",this.on),document.body.classList.toggle("theme-light",!this.on)}}),H.store("appLoadingIndicator",{showing:!1,show(){this.showing=!0},hide(){this.showing=!1},toggle(){this.showing=!this.showing}}),H.store("docsViewMode",{docsViewMode:a(x0||"list").as("docsViewMode"),change(i){this.docsViewMode=i}}),H.store("generatorsFilter",{init(){const i=new URLSearchParams(window.location.search);this.filter=i.get("filter")||"all"},filter:"all",changeFilter(i){if(this.filter!==i){if(!document.startViewTransition)return this.filter=i;document.startViewTransition(()=>this.filter=i)}}}),H.data("generatorItem",()=>({get isHidden(){return this.$store.generatorsFilter.filter!=="all"&&this.$el.getAttribute("data-filter").search(this.$store.generatorsFilter.filter)<0},updateDataFilter(i,r){const s=this.$el.getAttribute("data-filter"),l=new Set(s.split(","));r?l.add("favorite"):l.delete("favorite"),this.$el.setAttribute("data-filter",Array.from(l).join(","))}})),H.store("documentsFilter",{init(){const i=new URLSearchParams(window.location.search);this.sort=i.get("sort")||"created_at",this.sortAscDesc=i.get("sortAscDesc")||"desc",this.filter=i.get("filter")||"all",this.page=i.get("page")||"1"},sort:"created_at",sortAscDesc:"desc",filter:"all",page:"1",changeSort(i){i===this.sort?this.sortAscDesc=this.sortAscDesc==="desc"?"asc":"desc":this.sortAscDesc="desc",this.sort=i},changeAscDesc(i){this.ascDesc!==i&&(this.ascDesc=i)},changeFilter(i){this.filter!==i&&(this.filter=i)},changePage(i){(i===">"||i==="<")&&(i=i===">"?Number(this.page)+1:Number(this.page)-1),this.page!==i&&(this.page=i)}}),H.store("socialMediaPostsViewMode",{socialMediaPostsViewMode:a(C0||"list").as("socialMediaPostsViewMode"),change(i){this.socialMediaPostsViewMode=i}}),H.store("socialMediaPostsFilter",{init(){const i=new URLSearchParams(window.location.search);this.sort=i.get("sort")||"created_at",this.sortAscDesc=i.get("sortAscDesc")||"desc",this.filter=i.get("filter")||"all",this.page=i.get("page")||"1"},sort:"created_at",sortAscDesc:"desc",filter:"all",page:"1",changeSort(i){i===this.sort?this.sortAscDesc=this.sortAscDesc==="desc"?"asc":"desc":this.sortAscDesc="desc",this.sort=i},changeAscDesc(i){this.ascDesc!==i&&(this.ascDesc=i)},changeFilter(i){this.filter!==i&&(this.filter=i)},changePage(i){(i===">"||i==="<")&&(i=i===">"?Number(this.page)+1:Number(this.page)-1),this.page!==i&&(this.page=i)}}),H.store("chatsFilter",{init(){const i=new URLSearchParams(window.location.search);this.filter=i.get("filter")||"all",this.setSearchStr(i.get("search")||"")},searchStr:"",setSearchStr(i){this.searchStr=i.trim().toLowerCase()},filter:"all",changeFilter(i){if(this.filter!==i){if(!document.startViewTransition)return this.filter=i;document.startViewTransition(()=>this.filter=i)}}}),H.data("generatorV2",()=>({itemsSearchStr:"",setItemsSearchStr(i){this.itemsSearchStr=i.trim().toLowerCase(),this.itemsSearchStr!==""?this.$el.closest(".lqd-generator-sidebar").classList.add("lqd-showing-search-results"):this.$el.closest(".lqd-generator-sidebar").classList.remove("lqd-showing-search-results")},sideNavCollapsed:!1,toggleSideNavCollapse(i){var r;this.sideNavCollapsed=i?i==="collapse":!this.sideNavCollapsed,this.sideNavCollapsed&&((r=tinymce==null?void 0:tinymce.activeEditor)==null||r.focus())},generatorStep:0,setGeneratorStep(i){if(i!==this.generatorStep){if(!document.startViewTransition)return this.generatorStep=Number(i);document.startViewTransition(()=>this.generatorStep=Number(i))}},selectedGenerator:null})),H.store("mobileChat",{sidebarOpen:!1,toggleSidebar(i){this.sidebarOpen=i?!1:!this.sidebarOpen}}),H.data("dropdown",({triggerType:i="hover"})=>({open:!1,toggle(r){this.open=r?r!=="collapse":!this.open,this.$refs.parent.classList.toggle("lqd-is-active",this.open)},parent:{"@mouseenter"(){i==="hover"&&this.toggle("expand")},"@mouseleave"(){i==="hover"&&this.toggle("collapse")},"@click.outside"(){this.toggle("collapse")}},trigger:{"@click.prevent"(){this.toggle()}},dropdown:{}})),H.store("notifications",{notifications:[],loading:!1,add(i){this.notifications.unshift(i)},remove(i){this.notifications.splice(i,1)},markThenHref(i){const r=this.notifications.indexOf(i);if(r!==-1){var s=new FormData;s.append("id",i.id),this.loading=!0,$.ajax({url:"/dashboard/notifications/mark-as-read",type:"POST",data:s,cache:!1,contentType:!1,processData:!1,success:l=>{},error:l=>{console.error(l)},complete:()=>{this.markAsRead(r),window.location=i.link,this.loading=!1}})}},markAsRead(i){this.notifications=this.notifications.map((r,s)=>(s===i&&(r.unread=!1),r))},markAllAsRead(){this.loading=!0,$.ajax({url:"/dashboard/notifications/mark-as-read",type:"POST",success:i=>{i.success&&this.notifications.forEach((r,s)=>{this.markAsRead(s)})},error:i=>{console.error(i)},complete:()=>{this.loading=!1}})},setNotifications(i){this.notifications=i},hasUnread:function(){return this.notifications.some(i=>i.unread)}}),H.data("notifications",i=>({notifications:i||[]})),H.store("focusMode",{active:H.$persist(!!I0).as(ps+":lqdFocusModeEnabled"),toggle(i){console.log(ps),this.active=i?i==="activate":!this.active,document.body.classList.toggle("focus-mode",this.active)}}),H.data("numberCounter",({value:i=0,options:r={}})=>({value:i,options:{delay:0,...r},io:null,numberWrappers:[],numberCols:[],numberAnimators:[],init(){this.$el.innerHTML="",this.buildMarkup(),this.setupIO()},updateValue({value:s,options:l={}}){this.value!==s&&(this.value=s,this.options={...this.options,...l},this.buildMarkup(),this.setupIO())},buildMarkup(){const s=this.value.toString().split(""),l=this.$el.querySelectorAll(".lqd-number-counter-numbers-wrap");function h(){return Array.from({length:10},(m,b)=>`<span class="lqd-number-counter-number inline-flex h-full justify-center">${b}</span>`).join("")}if(s.map((m,b)=>{const w=!isNaN(m);return`<span class="lqd-number-counter-numbers-wrap relative inline-flex h-full w-[1ch]" data-index="${b}" data-value="${m}"><span class="lqd-number-counter-numbers-col absolute start-0 top-[-0.25lh] inline-flex h-[1.5lh] w-full flex-col overflow-hidden py-[0.25lh]"><span class="lqd-number-counter-numbers-animator inline-flex w-full h-full flex-col" data-is-number="${w}" data-value="${m}">${w?h():m}</span></span></span>`}).forEach((m,b)=>{const w=s[b],C=l[b],A=!isNaN(w);if(C){const R=C.querySelector(".lqd-number-counter-numbers-animator");C.setAttribute("data-value",w),R.setAttribute("data-value",w),R.setAttribute("data-is-number",A),R.getAttribute("data-is-number")==="true"&&A?R.innerHTML!==h()&&(R.innerHTML=h()):R.innerHTML!==w&&(R.innerHTML=w);return}this.$el.insertAdjacentHTML("beforeend",m),l.length&&this.$el.querySelector(`.lqd-number-counter-numbers-wrap[data-index="${b}"]`).animate([{translate:"0 0.25lh",opacity:0},{translate:"0 0",opacity:1}],{duration:250,easing:"ease",fill:"both"})}),l.length>s.length)for(let m=s.length;m<l.length;m++)l[m].animate([{translate:"0 -0.25lh",opacity:0}],{duration:250,easing:"ease",fill:"both"}).onfinish=()=>{l[m].remove()};this.numberWrappers=this.$el.querySelectorAll(".lqd-number-counter-numbers-wrap"),this.numberCols=this.$el.querySelectorAll(".lqd-number-counter-numbers-col"),this.numberAnimators=this.$el.querySelectorAll(".lqd-number-counter-numbers-animator")},setupIO(){this.io=new IntersectionObserver(([s],l)=>{s.isIntersecting&&(l.disconnect(),this.animate())}),this.io.observe(this.$el)},animate(){this.numberAnimators.forEach(s=>{if(!(s.getAttribute("data-is-number")==="true"))return;const h=s.getAttribute("data-value");s.animate([{translate:`0 ${h*100*-1}%`}],{duration:800,delay:this.options.delay,easing:"cubic-bezier(.47,1.09,.69,1.07)",fill:"both"})})}})),H.data("shapeCutout",()=>({init(){this.onResize=this.onResize.bind(this),this.afterResize=mi.debounce(this.afterResize.bind(this),1),this.svgEl=this.$el.querySelector("svg"),this.svgEl&&(this.svgObjects=this.svgEl.querySelectorAll("rect, circle, path, polygon"),this.events())},events(){$(window).on("resize",this.onResize),this.resizeObserver=new ResizeObserver(()=>{this.onResize()}),this.resizeObserver.observe(this.svgEl)},onResize(){this.changeObjAttr("-"),this.afterResize()},afterResize(){this.changeObjAttr("+")},changeObjAttr(i){this.svgObjects.forEach(r=>{r.hasAttribute("x")?r.setAttribute("x",parseFloat(parseFloat(r.getAttribute("x"))+i+"1")):r.hasAttribute("width")?r.setAttribute("width",parseFloat(parseFloat(r.getAttribute("width"))+i+"1")):r.hasAttribute("cx")?r.setAttribute("cx",parseFloat(parseFloat(r.getAttribute("cx"))+i+"1")):r.hasAttribute("r")&&r.setAttribute("r",parseFloat(parseFloat(r.getAttribute("r"))+i+"1"))})}})),H.data("marquee",(i={})=>({maxWidth:0,position:0,options:{direction:-1,speed:.5,pauseOnHover:!1,...i},async init(){this.direction=this.options.direction,this.cellWidths=[],this.cellHeights=[],this.viewportEl=this.$el.querySelector(".lqd-marquee-viewport"),this.sliderEl=this.$el.querySelector(".lqd-marquee-slider"),this.cells=this.sliderEl.querySelectorAll(".lqd-marquee-cell"),this.sliderElStyles=window.getComputedStyle(this.sliderEl),this.maxWidth=0,this.maxHeight=0,this.onResize=mi.debounce(this.onResize.bind(this),450),await document.fonts.ready,this.sizing(),this.startAnimation()},sizing(){for(let r=0;r<this.cells.length;r++)this.cellHeights.push(this.cells[r].offsetHeight),this.cellWidths.push(this.cells[r].offsetWidth);this.maxHeight=Math.max(...this.cellHeights),this.maxWidth=this.cellWidths.reduce((r,s)=>r+s,0),this.maxWidth+=parseInt(this.sliderElStyles.paddingLeft)+parseInt(this.sliderElStyles.paddingRight),this.maxWidth+=parseInt(this.sliderElStyles.gap)*(this.cells.length-1),this.viewportEl.style.height=`${this.maxHeight+parseInt(this.sliderElStyles.paddingTop)+parseInt(this.sliderElStyles.paddingBottom)}px`,this.sliderEl.classList.add("absolute","top-0","left-0","w-full","h-full"),this.maxWidth-=this.viewportEl.offsetWidth},startAnimation(){this.isAnimating=!0,this.options.pauseOnHover&&(this.sliderEl.addEventListener("pointerenter",()=>{this.isAnimating=!1}),this.sliderEl.addEventListener("pointerleave",()=>{this.isAnimating=!0}));const r=()=>{this.isAnimating&&(this.position+=this.options.speed*this.direction,this.position<=-this.maxWidth?this.direction=1:this.position>=0&&(this.direction=-1),this.sliderEl.style.transform=`translateX(${this.position}px)`),requestAnimationFrame(r)};requestAnimationFrame(r)},onResize(){this.sizing()}})),H.data("curtain",(i="curtain",r={})=>({id:i,activeCurtain:0,options:{itemsSelector:".lqd-curtain-item",contentSelector:".lqd-curtain-item-content",contentWidthOuter:".lqd-curtain-item-content-width-outer",contentWidthInner:".lqd-curtain-item-content-width-inner",activeClassname:"lqd-curtain-item-active",inactiveClassname:"lqd-curtain-item-inactive",duration:.65,ease:"cubic-bezier(0.23, 1, 0.320, 1)",trigger:"pointerenter",...r},init(){this.items=[...this.$el.querySelectorAll(this.options.itemsSelector)],this.items.length&&(this.onElementActive=this.onElementActive.bind(this),this.onWindowResize=mi.debounce(this.onWindowResize.bind(this),450),this.setActiveCurtain(),this.setActiveElement(),this.setActiveContentWidth(),this.events())},events(){const{trigger:s}=this.options,l=mi.throttle(this.onElementActive,50,{leading:!0,trailing:!1});this.items.forEach(h=>{h.addEventListener(s,l)}),window.addEventListener("resize",this.onWindowResize)},setActiveCurtain(){this.activeCurtain=this.items.findIndex(s=>s.classList.contains(this.options.activeClassname)),this.$dispatch(`curtain-changed-${this.id}`,{activeCurtain:this.activeCurtain})},setActiveElement(){this.activeElement=this.items[this.activeCurtain]},setActiveContentWidth(){if(!this.getElDirection().includes("row"))return;const l=this.activeElement.querySelector(this.options.contentWidthOuter).offsetWidth;this.$el.style.setProperty("--active-width",`${l}px`)},onElementActive(s){const{activeClassname:l,inactiveClassname:h}=this.options,p=s.currentTarget;this.items.forEach(m=>{m.classList.remove(l),m.classList.add(h)}),p.classList.remove(h),p.classList.add(l),this.setActiveCurtain(),this.setActiveElement()},getElDirection(){return window.getComputedStyle(this.activeElement).flexDirection},onWindowResize(){this.setActiveContentWidth()}})),H.data("slideshow",(i="slideshow",r=0,s={})=>({activeSlide:0,totalSlides:r,id:i,options:{...s},init(){this.setActiveSlide=this.setActiveSlide.bind(this)},setActiveSlide(l){l===">"?l=this.activeSlide+1:l==="<"&&(l=this.activeSlide-1),l<0?l=this.totalSlides-1:l>=this.totalSlides&&(l=0),this.activeSlide=l,this.$dispatch(`slide-changed-${this.id}`,{activeSlide:this.activeSlide})}})),H.data("splitText",(i={})=>({splitText:null,options:{type:"words",tag:"span",charsClass:"lqd-split-unit lqd-split-char",wordsClass:"lqd-split-unit lqd-split-word",linesClass:"lqd-split-unit lqd-split-line",...i},init(){this.splitText=new SplitText(this.$el,this.options);const r=this.splitText.words.length;this.splitText.words.forEach((s,l)=>{s.setAttribute("data-index",l),s.setAttribute("data-last-index",r-1-l),s.style.setProperty("--word-index",l),s.style.setProperty("--word-last-index",r-1-l)}),this.$dispatch("split-text-done",{splitText:this.splitText})}})),H.data("openaiRealtime",b0),H.data("advancedImageEditor",y0)});fm.start();export{L0 as g};
Save
Cancel